From 65404ac1d203dc20a1a56f68e973f38daa9513db Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Thu, 10 Nov 2011 15:25:46 +0000 Subject: [PATCH] Replaced all mysql_fetch_array by mysql_fetch_assoc or mysql_fetch_row, except for the directory /install --- src/messenger/webim/libs/common.php | 8 ++++---- src/messenger/webim/operator/history.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index d6192b37..bdf9e735 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -406,7 +406,7 @@ function perform_query($query, $link) function select_one_row($query, $link) { $result = mysql_query($query, $link) or die(' Query failed: ' . db_error($link)); - $line = mysql_fetch_array($result, MYSQL_ASSOC); + $line = db_fetch_assoc($result); mysql_free_result($result); return $line; } @@ -416,7 +416,7 @@ function select_multi_assoc($query, $link) $sqlresult = mysql_query($query, $link) or die(' Query failed: ' . db_error($link)); $result = array(); - while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) { + while ($row = db_fetch_assoc($sqlresult)) { $result[] = $row; } mysql_free_result($sqlresult); @@ -434,7 +434,7 @@ function db_rows_count($table, $conditions, $countfields, $link) { $result = mysql_query(db_build_select("count(" . ($countfields ? $countfields : "*") . ")", $table, $conditions, ""), $link) or die(' Count query failed: ' . db_error($link)); - $line = mysql_fetch_array($result, MYSQL_NUM); + $line = db_fetch_row($result); mysql_free_result($result); return $line[0]; } @@ -700,7 +700,7 @@ function loadsettings_($link) $sqlresult = mysql_query("select vckey,vcvalue from ${mysqlprefix}chatconfig", $link) or die(' Query failed: ' . db_error($link)); - while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) { + while ($row = db_fetch_assoc($sqlresult)) { $name = $row['vckey']; $settings[$name] = $row['vcvalue']; $settings_in_db[$name] = true; diff --git a/src/messenger/webim/operator/history.php b/src/messenger/webim/operator/history.php index f028ea83..e9c53f2b 100644 --- a/src/messenger/webim/operator/history.php +++ b/src/messenger/webim/operator/history.php @@ -41,7 +41,7 @@ if ($query !== false) { $result = mysql_query("select ${mysqlprefix}chatgroup.groupid as groupid, vclocalname " . "from ${mysqlprefix}chatgroup order by vclocalname", $link); $groupName = array(); - while ($group = mysql_fetch_array($result, MYSQL_ASSOC)) { + while ($group = db_fetch_assoc($result)) { $groupName[$group['groupid']] = $group['vclocalname']; } mysql_free_result($result);