diff --git a/src/messenger/webim/libs/chat.php b/src/messenger/webim/libs/chat.php index 97b66411..04071c89 100644 --- a/src/messenger/webim/libs/chat.php +++ b/src/messenger/webim/libs/chat.php @@ -59,7 +59,7 @@ function next_revision($link) { global $mysqlprefix; perform_query("update ${mysqlprefix}chatrevision set id=LAST_INSERT_ID(id+1)", $link); - $val = mysql_insert_id($link); + $val = db_insert_id($link); return $val; } @@ -76,7 +76,7 @@ function post_message_($threadid, $kind, $message, $link, $from = null, $utime = $utime ? "FROM_UNIXTIME($utime)" : "CURRENT_TIMESTAMP"); perform_query($query, $link); - return mysql_insert_id($link); + return db_insert_id($link); } function post_message($threadid, $kind, $message, $from = null, $agentid = null) @@ -600,7 +600,7 @@ function create_thread($groupid, $username, $remoteHost, $referer, $lang, $useri db_escape_string($userbrowser, $link)); perform_query($query, $link); - $id = mysql_insert_id($link); + $id = db_insert_id($link); $newthread = thread_by_id_($id, $link); return $newthread; diff --git a/src/messenger/webim/libs/operator.php b/src/messenger/webim/libs/operator.php index eea6f5c9..a0fea376 100755 --- a/src/messenger/webim/libs/operator.php +++ b/src/messenger/webim/libs/operator.php @@ -149,7 +149,7 @@ function create_operator_($login, $email, $password, $localename, $commonname, $ db_escape_string($email), ''); perform_query($query, $link); - $id = mysql_insert_id($link); + $id = db_insert_id($link); return select_one_row("select * from ${mysqlprefix}chatoperator where operatorid = $id", $link); } diff --git a/src/messenger/webim/libs/track.php b/src/messenger/webim/libs/track.php index d1de91a4..bd3753c1 100644 --- a/src/messenger/webim/libs/track.php +++ b/src/messenger/webim/libs/track.php @@ -51,7 +51,7 @@ function track_visitor_start($entry, $referer, $link) db_escape_string(track_build_path($referer, '')), db_escape_string(track_build_details())), $link); - $id = mysql_insert_id($link); + $id = db_insert_id($link); return $id ? $id : 0; } diff --git a/src/messenger/webim/operator/group.php b/src/messenger/webim/operator/group.php index 2358e725..98397971 100644 --- a/src/messenger/webim/operator/group.php +++ b/src/messenger/webim/operator/group.php @@ -52,7 +52,7 @@ function create_group($name, $descr, $commonname, $commondescr, $email) db_escape_string($email)); perform_query($query, $link); - $id = mysql_insert_id($link); + $id = db_insert_id($link); $newdep = select_one_row("select * from ${mysqlprefix}chatgroup where groupid = $id", $link); close_connection($link);