installer fails

This commit is contained in:
Shish 2012-02-22 13:58:55 +00:00
parent f9de9ece21
commit 169ae5f590
2 changed files with 2 additions and 2 deletions

View File

@ -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)",

View File

@ -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)
{