installer fails
This commit is contained in:
parent
f9de9ece21
commit
169ae5f590
@ -334,7 +334,7 @@ class UserPage extends Extension {
|
||||
|
||||
// if there are currently no admins, the new user should be one
|
||||
$need_admin = ($database->get_one("SELECT COUNT(*) FROM users WHERE class='admin'") == 0);
|
||||
$admin = $need_admin ? 'admin' : 'user';
|
||||
$class = $need_admin ? 'admin' : 'user';
|
||||
|
||||
$database->Execute(
|
||||
"INSERT INTO users (name, pass, joindate, email, class) VALUES (:username, :hash, now(), :email, :class)",
|
||||
|
@ -341,7 +341,7 @@ function create_tables() { // {{{
|
||||
CONSTRAINT foreign_image_tags_image_id FOREIGN KEY (image_id) REFERENCES images(id) ON DELETE CASCADE,
|
||||
CONSTRAINT foreign_image_tags_tag_id FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
|
||||
");
|
||||
$db->execute("INSERT INTO config(name, value) VALUES('db_version', 10)");
|
||||
$db->execute("INSERT INTO config(name, value) VALUES('db_version', 11)");
|
||||
}
|
||||
catch (PDOException $e)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user