mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-12 10:31:09 +03:00
Move "go online link" generation to Controller
This commit is contained in:
parent
cb98a6fc94
commit
a314bca69b
@ -48,6 +48,7 @@ class HomeController extends AbstractController
|
|||||||
{
|
{
|
||||||
$operator = $this->getOperator();
|
$operator = $this->getOperator();
|
||||||
$is_online = is_operator_online($operator['operatorid']);
|
$is_online = is_operator_online($operator['operatorid']);
|
||||||
|
$users_url = $this->generateUrl('users', array('nomenu' => 1));
|
||||||
|
|
||||||
$page = array(
|
$page = array(
|
||||||
'version' => MIBEW_VERSION,
|
'version' => MIBEW_VERSION,
|
||||||
@ -61,6 +62,10 @@ class HomeController extends AbstractController
|
|||||||
'featuresPage' => $this->generateUrl('settings_features'),
|
'featuresPage' => $this->generateUrl('settings_features'),
|
||||||
'isOnline' => $is_online,
|
'isOnline' => $is_online,
|
||||||
'warnOffline' => true,
|
'warnOffline' => true,
|
||||||
|
'goOnlineLink' => getlocal(
|
||||||
|
"You are Offline.<br/><a href=\"{0}\">Connect...</a>",
|
||||||
|
array($users_url)
|
||||||
|
),
|
||||||
'title' => getlocal('Home'),
|
'title' => getlocal('Home'),
|
||||||
'menuid' => 'main',
|
'menuid' => 'main',
|
||||||
);
|
);
|
||||||
|
@ -669,10 +669,6 @@ function prepare_menu($operator, $has_right = true)
|
|||||||
|
|
||||||
$result['showMenu'] = true;
|
$result['showMenu'] = true;
|
||||||
$result['operator'] = get_operator_name($operator);
|
$result['operator'] = get_operator_name($operator);
|
||||||
$result['goOnlineLink'] = getlocal(
|
|
||||||
"You are Offline.<br/><a href=\"{0}\">Connect...</a>",
|
|
||||||
array(MIBEW_WEB_ROOT . "/operator/users?nomenu")
|
|
||||||
);
|
|
||||||
if ($has_right) {
|
if ($has_right) {
|
||||||
$result['showban'] = Settings::get('enableban') == "1";
|
$result['showban'] = Settings::get('enableban') == "1";
|
||||||
$result['showstat'] = Settings::get('enablestatistics') == "1";
|
$result['showstat'] = Settings::get('enablestatistics') == "1";
|
||||||
|
Loading…
Reference in New Issue
Block a user