diff options
author | Robert Ros <robert@robertros.nl> | 2014-09-20 16:38:41 +0200 |
---|---|---|
committer | Robert Ros <robert@robertros.nl> | 2014-09-21 00:39:40 +0200 |
commit | 0dc4797a4cbc91467ec2d9816d102942ddc0605f (patch) | |
tree | 54e6e4fd9f277540b79b03974a4a20f76051f5c6 /install/index.php | |
parent | a15108e65b12ceaf50821783bcaa1ee3fee10d13 (diff) | |
download | wallabag-0dc4797a4cbc91467ec2d9816d102942ddc0605f.tar.gz wallabag-0dc4797a4cbc91467ec2d9816d102942ddc0605f.tar.zst wallabag-0dc4797a4cbc91467ec2d9816d102942ddc0605f.zip |
Fix the PostgreSQL install errors
Diffstat (limited to 'install/index.php')
-rwxr-xr-x | install/index.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/install/index.php b/install/index.php index 1ae782a2..ba7c4b0f 100755 --- a/install/index.php +++ b/install/index.php | |||
@@ -141,16 +141,16 @@ else if (isset($_POST['install'])) { | |||
141 | } | 141 | } |
142 | 142 | ||
143 | // create database structure | 143 | // create database structure |
144 | $query = executeQuery($handle, $sql_structure, array()); | 144 | $query = $handle->exec($sql_structure); |
145 | 145 | ||
146 | // Create user | 146 | // Create user |
147 | $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); | 147 | $handle->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
148 | 148 | ||
149 | $sql = 'INSERT INTO users (username, password, name) VALUES (?, ?, ?)'; | 149 | $sql = "INSERT INTO users (username, password, name, email) VALUES (?, ?, ?, '')"; |
150 | $params = array($username, $salted_password, $username); | 150 | $params = array($username, $salted_password, $username); |
151 | $query = executeQuery($handle, $sql, $params); | 151 | $query = executeQuery($handle, $sql, $params); |
152 | 152 | ||
153 | $id_user = $handle->lastInsertId(); | 153 | $id_user = (int)$handle->lastInsertId('users_id_seq'); |
154 | 154 | ||
155 | $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)'; | 155 | $sql = 'INSERT INTO users_config ( user_id, name, value ) VALUES (?, ?, ?)'; |
156 | $params = array($id_user, 'pager', '10'); | 156 | $params = array($id_user, 'pager', '10'); |