diff --git a/ext/comment/main.php b/ext/comment/main.php index 36196ede..f98ba3c7 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -451,7 +451,7 @@ class CommentList extends SimpleExtension { "INSERT INTO comments(image_id, owner_id, owner_ip, posted, comment) ". "VALUES(?, ?, ?, now(), ?)", array($image_id, $user->id, $_SERVER['REMOTE_ADDR'], $comment)); - $cid = $database->db->Insert_ID(); + $cid = $database->db->lastInsertId(); log_info("comment", "Comment #$cid added to Image #$image_id"); } } diff --git a/ext/image/main.php b/ext/image/main.php index 89da1730..5c4cad1d 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -243,7 +243,7 @@ class ImageIO extends SimpleExtension { $image->id = $database->db->GetOne("SELECT id FROM images WHERE hash=?", array($image->hash)); } else { - $image->id = $database->db->Insert_ID(); + $image->id = $database->db->lastInsertId(); } log_info("image", "Uploaded Image #{$image->id} ({$image->hash})"); diff --git a/ext/user/main.php b/ext/user/main.php index 70912700..949d3609 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -304,7 +304,7 @@ class UserPage extends SimpleExtension { $database->Execute( "INSERT INTO users (name, pass, joindate, email, admin) VALUES (?, ?, now(), ?, ?)", array($event->username, $hash, $email, $admin)); - $uid = $database->db->Insert_ID(); + $uid = $database->db->lastInsertId(); log_info("user", "Created User #$uid ({$event->username})"); } diff --git a/install.php b/install.php index 938d8493..c66f82c3 100644 --- a/install.php +++ b/install.php @@ -323,7 +323,7 @@ function insert_defaults($dsn) { // {{{ $user_insert = $db->Prepare("INSERT INTO users(name, pass, joindate, admin) VALUES(?, ?, now(), ?)"); $db->Execute($user_insert, Array('Anonymous', null, 'N')); - $db->Execute($config_insert, Array('anon_id', $db->Insert_ID())); + $db->Execute($config_insert, Array('anon_id', $db->lastInsertId())); if(check_im_version() > 0) { $db->Execute($config_insert, Array('thumb_engine', 'convert'));