X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Faction.php;h=8ad3917550ae7e09eeb112dfc8d9a24c8c557fdd;hb=69ac99ff949ab0118ff25a62471980ad0ec7a52b;hp=b5cf3240c69a39efe131f27dfdad5e4fb6f1606e;hpb=eeae20c1010e75c955a9ec0caffd3fc8165aa65c;p=quix0rs-gnu-social.git diff --git a/lib/action.php b/lib/action.php index b5cf3240c6..8ad3917550 100644 --- a/lib/action.php +++ b/lib/action.php @@ -259,6 +259,7 @@ class Action extends HTMLOutputter // lawsuit Event::handle('StartShowLaconicaScripts', array($this))) { $this->script('js/xbImportNode.js'); $this->script('js/util.js'); + $this->script('js/geometa.js'); // Frame-busting code to avoid clickjacking attacks. $this->element('script', array('type' => 'text/javascript'), 'if (window.top !== window.self) { window.top.location.href = window.self.location.href; }'); @@ -434,6 +435,10 @@ class Action extends HTMLOutputter // lawsuit $this->menuItem(common_local_url($connect), _('Connect'), _('Connect to services'), false, 'nav_connect'); } + if ($user->hasRight(Right::CONFIGURESITE)) { + $this->menuItem(common_local_url('siteadminpanel'), + _('Admin'), _('Change site configuration'), false, 'nav_admin'); + } if (common_config('invite', 'enabled')) { $this->menuItem(common_local_url('invite'), _('Invite'), @@ -985,6 +990,18 @@ class Action extends HTMLOutputter // lawsuit */ function selfUrl() + { + list($action, $args) = $this->returnToArgs(); + return common_local_url($action, $args); + } + + /** + * Returns arguments sufficient for re-constructing URL + * + * @return array two elements: action, other args + */ + + function returnToArgs() { $action = $this->trimmed('action'); $args = $this->args; @@ -998,8 +1015,7 @@ class Action extends HTMLOutputter // lawsuit foreach (array_keys($_COOKIE) as $cookie) { unset($args[$cookie]); } - - return common_local_url($action, $args); + return array($action, $args); } /**