mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-23 05:40:30 +03:00
small fix in /libs/operator.php, a few missed db usages, formatting
This commit is contained in:
parent
7cc810c683
commit
1388151bf8
@ -147,7 +147,7 @@ if ($act == "silentcreateall") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( in_array($mysqlprefix . "chatthread.groupid", $absent) ) {
|
if( in_array($mysqlprefix . "chatthread.groupid", $absent) ) {
|
||||||
runsql("ALTER TABLE " . $mysqlprefix . "chatthread ADD groupid int references chatgroup(groupid)", $link);
|
runsql("ALTER TABLE " . $mysqlprefix . "chatthread ADD groupid int references " . $mysqlprefix . "chatgroup(groupid)", $link);
|
||||||
}
|
}
|
||||||
|
|
||||||
if( in_array($mysqlprefix . "chatthread.userAgent", $absent) ) {
|
if( in_array($mysqlprefix . "chatthread.userAgent", $absent) ) {
|
||||||
|
@ -359,7 +359,6 @@ function select_multi_assoc($query, $link) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function db_build_select($fields, $table, $conditions, $orderandgroup) {
|
function db_build_select($fields, $table, $conditions, $orderandgroup) {
|
||||||
global $mysqlprefix;
|
|
||||||
$condition = count($conditions) > 0 ? " where ".implode(" and ", $conditions) : "";
|
$condition = count($conditions) > 0 ? " where ".implode(" and ", $conditions) : "";
|
||||||
if($orderandgroup) $orderandgroup = " ".$orderandgroup;
|
if($orderandgroup) $orderandgroup = " ".$orderandgroup;
|
||||||
return "select $fields from $table$condition$orderandgroup";
|
return "select $fields from $table$condition$orderandgroup";
|
||||||
|
@ -30,9 +30,10 @@ $page = array();
|
|||||||
setlocale(LC_TIME, getstring("time.locale"));
|
setlocale(LC_TIME, getstring("time.locale"));
|
||||||
|
|
||||||
function notification_info($id) {
|
function notification_info($id) {
|
||||||
|
global $mysqlprefix;
|
||||||
$link = connect();
|
$link = connect();
|
||||||
$notification = select_one_row(db_build_select(
|
$notification = select_one_row(db_build_select(
|
||||||
"id, locale, vckind, vcto, unix_timestamp(dtmcreated) as created, vcsubject, tmessage, refoperator", "chatnotification",
|
"id, locale, vckind, vcto, unix_timestamp(dtmcreated) as created, vcsubject, tmessage, refoperator", $mysqlprefix . "chatnotification",
|
||||||
array("id = $id"), ""), $link);
|
array("id = $id"), ""), $link);
|
||||||
mysql_close($link);
|
mysql_close($link);
|
||||||
return $notification;
|
return $notification;
|
||||||
|
@ -63,7 +63,7 @@ if( !$op ) {
|
|||||||
update_operator_permissions($op['operatorid'],$new_permissions);
|
update_operator_permissions($op['operatorid'],$new_permissions);
|
||||||
|
|
||||||
if ($opId && $_SESSION[$mysqlprefix . 'operator'] && $operator['operatorid'] == $opId) {
|
if ($opId && $_SESSION[$mysqlprefix . 'operator'] && $operator['operatorid'] == $opId) {
|
||||||
$_SESSION[$mysqlprefix . $mysqlprefix . 'operator']['iperm'] = $new_permissions;
|
$_SESSION[$mysqlprefix . 'operator']['iperm'] = $new_permissions;
|
||||||
}
|
}
|
||||||
header("Location: $webimroot/operator/permissions.php?op=$opId&stored");
|
header("Location: $webimroot/operator/permissions.php?op=$opId&stored");
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user