X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fadminpanelaction.php;h=6c9947608c3e00210bd6eb7871e906e582bc2bda;hb=3e8af172d636cc7ca3a9e2301b928f6ca79b9eb2;hp=a927e23336f73b80ab78bc0a98aafbf95778e286;hpb=6c4ade4251eca321b5251092dbb84d648b3a4258;p=quix0rs-gnu-social.git diff --git a/lib/adminpanelaction.php b/lib/adminpanelaction.php index a927e23336..6c9947608c 100644 --- a/lib/adminpanelaction.php +++ b/lib/adminpanelaction.php @@ -69,7 +69,7 @@ class AdminPanelAction extends Action // User must be logged in. if (!common_logged_in()) { - // TRANS: Client error message + // TRANS: Client error message thrown when trying to access the admin panel while not logged in. $this->clientError(_('Not logged in.')); return false; } @@ -94,7 +94,7 @@ class AdminPanelAction extends Action // User must have the right to change admin settings if (!$user->hasRight(Right::CONFIGURESITE)) { - // TRANS: Client error message + // TRANS: Client error message thrown when a user tries to change admin settings but has no access rights. $this->clientError(_('You cannot make changes to this site.')); return false; } @@ -106,7 +106,7 @@ class AdminPanelAction extends Action $name = mb_substr($name, 0, -10); if (!self::canAdmin($name)) { - // TRANS: Client error message + // TRANS: Client error message throw when a certain panel's settings cannot be changed. $this->clientError(_('Changes to that panel are not allowed.'), 403); return false; } @@ -225,7 +225,7 @@ class AdminPanelAction extends Action function showForm() { - // TRANS: Client error message + // TRANS: Client error message. $this->clientError(_('showForm() not implemented.')); return; } @@ -279,7 +279,8 @@ class AdminPanelAction extends Action $result = $config->delete(); if (!$result) { common_log_db_error($config, 'DELETE', __FILE__); - // TRANS: Client error message + // TRANS: Client error message thrown if design settings could not be deleted in + // TRANS: the admin panel Design. $this->clientError(_("Unable to delete design setting.")); return null; } @@ -407,6 +408,14 @@ class AdminPanelNav extends Widget $menu_title, $action_name == 'snapshotadminpanel', 'nav_snapshot_admin_panel'); } + if (AdminPanelAction::canAdmin('plugins')) { + // TRANS: Menu item title/tooltip + $menu_title = _('Plugins configuration'); + // TRANS: Menu item for site administration + $this->out->menuItem(common_local_url('pluginsadminpanel'), _('Plugins'), + $menu_title, $action_name == 'pluginsadminpanel', 'nav_design_admin_panel'); + } + Event::handle('EndAdminPanelNav', array($this)); } $this->action->elementEnd('ul');