forked from GNUsocial/gnu-social
disable routes that aren't available in single-user mode
This commit is contained in:
parent
ce84555a50
commit
fc3d52c120
@ -324,8 +324,12 @@ class Action extends HTMLOutputter // lawsuit
|
|||||||
$this->script('xbImportNode.js');
|
$this->script('xbImportNode.js');
|
||||||
$this->script('geometa.js');
|
$this->script('geometa.js');
|
||||||
}
|
}
|
||||||
$this->inlineScript('var _peopletagAC = "' .
|
// This route isn't available in single-user mode.
|
||||||
common_local_url('peopletagautocomplete') . '";');
|
// Not sure why, but it causes errors here.
|
||||||
|
if (!common_config('singleuser', 'enabled')) {
|
||||||
|
$this->inlineScript('var _peopletagAC = "' .
|
||||||
|
common_local_url('peopletagautocomplete') . '";');
|
||||||
|
}
|
||||||
$this->showScriptMessages();
|
$this->showScriptMessages();
|
||||||
// Anti-framing code to avoid clickjacking attacks in older browsers.
|
// Anti-framing code to avoid clickjacking attacks in older browsers.
|
||||||
// This will show a blank page if the page is being framed, which is
|
// This will show a blank page if the page is being framed, which is
|
||||||
|
@ -62,10 +62,12 @@ class PublicGroupNav extends Menu
|
|||||||
$this->action->elementStart('ul', array('class' => 'nav'));
|
$this->action->elementStart('ul', array('class' => 'nav'));
|
||||||
|
|
||||||
if (Event::handle('StartPublicGroupNav', array($this))) {
|
if (Event::handle('StartPublicGroupNav', array($this))) {
|
||||||
// TRANS: Menu item in search group navigation panel.
|
if (!common_config('singleuser', 'enabled')) {
|
||||||
$this->out->menuItem(common_local_url('public'), _m('MENU','Public'),
|
// TRANS: Menu item in search group navigation panel.
|
||||||
// TRANS: Menu item title in search group navigation panel.
|
$this->out->menuItem(common_local_url('public'), _m('MENU','Public'),
|
||||||
_('Public timeline'), $this->actionName == 'public', 'nav_timeline_public');
|
// TRANS: Menu item title in search group navigation panel.
|
||||||
|
_('Public timeline'), $this->actionName == 'public', 'nav_timeline_public');
|
||||||
|
}
|
||||||
|
|
||||||
// TRANS: Menu item in search group navigation panel.
|
// TRANS: Menu item in search group navigation panel.
|
||||||
$this->out->menuItem(common_local_url('groups'), _m('MENU','Groups'),
|
$this->out->menuItem(common_local_url('groups'), _m('MENU','Groups'),
|
||||||
@ -84,10 +86,12 @@ class PublicGroupNav extends Menu
|
|||||||
_('Featured users'), $this->actionName == 'featured', 'nav_featured');
|
_('Featured users'), $this->actionName == 'featured', 'nav_featured');
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRANS: Menu item in search group navigation panel.
|
if (!common_config('singleuser', 'enabled')) {
|
||||||
$this->out->menuItem(common_local_url('favorited'), _m('MENU','Popular'),
|
// TRANS: Menu item in search group navigation panel.
|
||||||
// TRANS: Menu item title in search group navigation panel.
|
$this->out->menuItem(common_local_url('favorited'), _m('MENU','Popular'),
|
||||||
_('Popular notices'), $this->actionName == 'favorited', 'nav_timeline_favorited');
|
// TRANS: Menu item title in search group navigation panel.
|
||||||
|
_('Popular notices'), $this->actionName == 'favorited', 'nav_timeline_favorited');
|
||||||
|
}
|
||||||
|
|
||||||
Event::handle('EndPublicGroupNav', array($this));
|
Event::handle('EndPublicGroupNav', array($this));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user