From 3d368c6783bcef9c3ca94db4b86ffc304a8a485a Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Sun, 27 Feb 2011 00:11:08 +0100 Subject: [PATCH] fix session using for installations with prefix --- src/messenger/webim/operator/avatar.php | 4 ++-- src/messenger/webim/operator/update.php | 6 +++--- src/messenger/webim/operator/users.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/messenger/webim/operator/avatar.php b/src/messenger/webim/operator/avatar.php index 9c7e4673..9bb0545f 100755 --- a/src/messenger/webim/operator/avatar.php +++ b/src/messenger/webim/operator/avatar.php @@ -77,8 +77,8 @@ if (!$op) { if (count($errors) == 0) { update_operator_avatar($op['operatorid'], $avatar); - if ($opId && $avatar && $_SESSION[$mysqlprefix . 'operator'] && $operator['operatorid'] == $opId) { - $_SESSION[$mysqlprefix . 'operator']['vcavatar'] = $avatar; + if ($opId && $avatar && $_SESSION["${mysqlprefix}operator"] && $operator['operatorid'] == $opId) { + $_SESSION["${mysqlprefix}operator"]['vcavatar'] = $avatar; } header("Location: $webimroot/operator/avatar.php?op=$opId"); exit; diff --git a/src/messenger/webim/operator/update.php b/src/messenger/webim/operator/update.php index 85fdad20..38c374d5 100644 --- a/src/messenger/webim/operator/update.php +++ b/src/messenger/webim/operator/update.php @@ -173,11 +173,11 @@ $showonline = verifyparam("showonline", "/^1$/", 0); $link = connect(); loadsettings_($link); -if (!isset($_SESSION['operatorgroups'])) { - $_SESSION['operatorgroups'] = get_operator_groupslist($operator['operatorid'], $link); +if (!isset($_SESSION["${mysqlprefix}operatorgroups"])) { + $_SESSION["${mysqlprefix}operatorgroups"] = get_operator_groupslist($operator['operatorid'], $link); } mysql_close($link); -$groupids = $_SESSION['operatorgroups']; +$groupids = $_SESSION["${mysqlprefix}operatorgroups"]; start_xml_output(); echo ''; diff --git a/src/messenger/webim/operator/users.php b/src/messenger/webim/operator/users.php index a25ba5ec..dba8d1f4 100644 --- a/src/messenger/webim/operator/users.php +++ b/src/messenger/webim/operator/users.php @@ -30,7 +30,7 @@ notify_operator_alive($operator['operatorid'], $status); $link = connect(); loadsettings_($link); -$_SESSION['operatorgroups'] = get_operator_groupslist($operator['operatorid'], $link); +$_SESSION["${mysqlprefix}operatorgroups"] = get_operator_groupslist($operator['operatorid'], $link); mysql_close($link); $page = array();