mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-22 21:40:28 +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) ) {
|
||||
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) ) {
|
||||
|
@ -359,7 +359,6 @@ function select_multi_assoc($query, $link) {
|
||||
}
|
||||
|
||||
function db_build_select($fields, $table, $conditions, $orderandgroup) {
|
||||
global $mysqlprefix;
|
||||
$condition = count($conditions) > 0 ? " where ".implode(" and ", $conditions) : "";
|
||||
if($orderandgroup) $orderandgroup = " ".$orderandgroup;
|
||||
return "select $fields from $table$condition$orderandgroup";
|
||||
|
@ -50,7 +50,7 @@ $mail_encoding = "utf-8";
|
||||
/*
|
||||
* Locales
|
||||
*/
|
||||
$home_locale = "en"; /* native name will be used in this locale */
|
||||
$default_locale = "en"; /* if user does not provide known lang */
|
||||
$home_locale = "en"; /* native name will be used in this locale */
|
||||
$default_locale = "en"; /* if user does not provide known lang */
|
||||
|
||||
?>
|
||||
|
@ -30,9 +30,10 @@ $page = array();
|
||||
setlocale(LC_TIME, getstring("time.locale"));
|
||||
|
||||
function notification_info($id) {
|
||||
global $mysqlprefix;
|
||||
$link = connect();
|
||||
$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);
|
||||
mysql_close($link);
|
||||
return $notification;
|
||||
|
@ -63,7 +63,7 @@ if( !$op ) {
|
||||
update_operator_permissions($op['operatorid'],$new_permissions);
|
||||
|
||||
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");
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user