X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Faction.php;h=9c7060bba831467041f554e08f6b3f2679169f32;hb=fae0f36b4d1e43e42637bced0b655ee6a25d6226;hp=80f398fbd77e25b8736af0a5c7cb33cae06cb5fd;hpb=b7e2e3fd2b7e36f75c810a599334c2ca8abcca55;p=quix0rs-gnu-social.git diff --git a/lib/action.php b/lib/action.php index 80f398fbd7..9c7060bba8 100644 --- a/lib/action.php +++ b/lib/action.php @@ -434,6 +434,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 +989,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 +1014,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); } /** @@ -1048,8 +1063,7 @@ class Action extends HTMLOutputter // lawsuit { // Does a little before-after block for next/prev page if ($have_before || $have_after) { - $this->elementStart('div', array('class' => 'pagination')); - $this->elementStart('dl', null); + $this->elementStart('dl', 'pagination'); $this->element('dt', null, _('Pagination')); $this->elementStart('dd', null); $this->elementStart('ul', array('class' => 'nav')); @@ -1074,7 +1088,6 @@ class Action extends HTMLOutputter // lawsuit $this->elementEnd('ul'); $this->elementEnd('dd'); $this->elementEnd('dl'); - $this->elementEnd('div'); } }