mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-08 00:34:42 +03:00
Remove global variable $page from setup_redirect_links func
This commit is contained in:
parent
155c858fd6
commit
3feb32d6c9
@ -583,9 +583,8 @@ function logout_operator() {
|
|||||||
$dispatcher->triggerEvent('operatorLogout');
|
$dispatcher->triggerEvent('operatorLogout');
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_redirect_links($threadid, $operator, $token)
|
function setup_redirect_links($threadid, $operator, $token) {
|
||||||
{
|
$result = array();
|
||||||
global $page;
|
|
||||||
|
|
||||||
$operator_in_isolation = in_isolation($operator);
|
$operator_in_isolation = in_isolation($operator);
|
||||||
|
|
||||||
@ -607,7 +606,7 @@ function setup_redirect_links($threadid, $operator, $token)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$p = pagination_info(max($operatorscount, $groupscount), 8);
|
$p = pagination_info(max($operatorscount, $groupscount), 8);
|
||||||
$page['pagination'] = $p;
|
$result['pagination'] = $p;
|
||||||
|
|
||||||
$operators = array_slice($operators, $p['start'], $p['end'] - $p['start']);
|
$operators = array_slice($operators, $p['start'], $p['end'] - $p['start']);
|
||||||
$groups = array_slice($groups, $p['start'], $p['end'] - $p['start']);
|
$groups = array_slice($groups, $p['start'], $p['end'] - $p['start']);
|
||||||
@ -627,7 +626,7 @@ function setup_redirect_links($threadid, $operator, $token)
|
|||||||
topage(get_operator_name($agent)) .
|
topage(get_operator_name($agent)) .
|
||||||
"</a> $status</li>";
|
"</a> $status</li>";
|
||||||
}
|
}
|
||||||
$page['redirectToAgent'] = $agent_list;
|
$result['redirectToAgent'] = $agent_list;
|
||||||
|
|
||||||
$group_list = "";
|
$group_list = "";
|
||||||
if (Settings::get('enablegroups') == "1") {
|
if (Settings::get('enablegroups') == "1") {
|
||||||
@ -645,7 +644,9 @@ function setup_redirect_links($threadid, $operator, $token)
|
|||||||
"</a> $status</li>";
|
"</a> $status</li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$page['redirectToGroup'] = $group_list;
|
$result['redirectToGroup'] = $group_list;
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_permission_list()
|
function get_permission_list()
|
||||||
|
@ -135,7 +135,10 @@ start_html_output();
|
|||||||
|
|
||||||
$pparam = verifyparam("act", "/^(redirect)$/", "default");
|
$pparam = verifyparam("act", "/^(redirect)$/", "default");
|
||||||
if ($pparam == "redirect") {
|
if ($pparam == "redirect") {
|
||||||
setup_redirect_links($threadid, $operator, $token);
|
$page = array_merge_recursive(
|
||||||
|
$page,
|
||||||
|
setup_redirect_links($threadid, $operator, $token)
|
||||||
|
);
|
||||||
$chat_style->render('redirect', $page);
|
$chat_style->render('redirect', $page);
|
||||||
} else {
|
} else {
|
||||||
// Build js application options
|
// Build js application options
|
||||||
|
Loading…
Reference in New Issue
Block a user