Remove functions definition from operator/opgroups.php

This commit is contained in:
Dmitriy Simushev 2014-01-27 10:24:07 +00:00
parent c6b03cfe55
commit 41f1e0a3bc
2 changed files with 16 additions and 17 deletions

View File

@ -874,4 +874,20 @@ function check_password_hash($login, $password, $hash)
} }
} }
function update_operator_groups($operatorid, $newvalue)
{
$db = Database::getInstance();
$db->query(
"delete from {chatgroupoperator} where operatorid = ?",
array($operatorid)
);
foreach ($newvalue as $groupid) {
$db->query(
"insert into {chatgroupoperator} (groupid, operatorid) values (?,?)",
array($groupid, $operatorid)
);
}
}
?> ?>

View File

@ -16,7 +16,6 @@
*/ */
// Import namespaces and classes of the core // Import namespaces and classes of the core
use Mibew\Database;
use Mibew\Style\PageStyle; use Mibew\Style\PageStyle;
// Initialize libraries // Initialize libraries
@ -27,22 +26,6 @@ require_once(MIBEW_FS_ROOT.'/libs/operator_settings.php');
$operator = check_login(); $operator = check_login();
csrfchecktoken(); csrfchecktoken();
function update_operator_groups($operatorid, $newvalue)
{
$db = Database::getInstance();
$db->query(
"delete from {chatgroupoperator} where operatorid = ?",
array($operatorid)
);
foreach ($newvalue as $groupid) {
$db->query(
"insert into {chatgroupoperator} (groupid, operatorid) values (?,?)",
array($groupid, $operatorid)
);
}
}
$operator_in_isolation = in_isolation($operator); $operator_in_isolation = in_isolation($operator);
$opId = verifyparam("op", "/^\d{1,9}$/"); $opId = verifyparam("op", "/^\d{1,9}$/");