X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpluginenable.php;h=0f2b4ba6702201f8c39de493d0ba465529aa7f1c;hb=bc2f64d7ab6c0218104e1a655209fe062d5bdd43;hp=2dbb3e3956ce0cff6e711b19a7faf8beaca365cc;hpb=5c4723919fa757b3e14a59350415cfe53e0900d1;p=quix0rs-gnu-social.git diff --git a/actions/pluginenable.php b/actions/pluginenable.php index 2dbb3e3956..0f2b4ba670 100644 --- a/actions/pluginenable.php +++ b/actions/pluginenable.php @@ -52,7 +52,6 @@ if (!defined('STATUSNET')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3 * @link http://status.net/ */ - class PluginEnableAction extends Action { var $user; @@ -65,7 +64,6 @@ class PluginEnableAction extends Action * * @return boolean success flag */ - function prepare($args) { parent::prepare($args); @@ -75,6 +73,8 @@ class PluginEnableAction extends Action // Only allow POST requests if ($_SERVER['REQUEST_METHOD'] != 'POST') { + // TRANS: Client error displayed when trying to use another method than POST. + // TRANS: Do not translate POST. $this->clientError(_('This action only accepts POST requests.')); return false; } @@ -94,11 +94,13 @@ class PluginEnableAction extends Action $this->user = common_current_user(); if (empty($this->user)) { + // TRANS: Client error displayed when trying to enable or disable a plugin while not logged in. $this->clientError(_('Not logged in.')); return false; } if (!AdminPanelAction::canAdmin('plugins')) { + // TRANS: Client error displayed when trying to enable or disable a plugin without access rights. $this->clientError(_('You cannot administer plugins.')); return false; } @@ -106,6 +108,7 @@ class PluginEnableAction extends Action $this->plugin = $this->arg('plugin'); $defaultPlugins = common_config('plugins', 'default'); if (!array_key_exists($this->plugin, $defaultPlugins)) { + // TRANS: Client error displayed when trying to enable or disable a non-existing plugin. $this->clientError(_('No such plugin.')); return false; } @@ -122,7 +125,6 @@ class PluginEnableAction extends Action * * @return void */ - function handle($args) { $key = 'disable-' . $this->plugin;