3 * StatusNet - the distributed open-source microblogging tool
4 * Copyright (C) 2010, StatusNet, Inc.
6 * Plugin enable action.
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 * @author Brion Vibber <brion@status.net>
26 * @copyright 2010 StatusNet, Inc.
27 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
28 * @link http://status.net/
31 if (!defined('STATUSNET')) {
36 * Plugin enable action.
38 * (Re)-enables a plugin from the default plugins list.
42 * - plugin: plugin name
43 * - token: session token to prevent CSRF attacks
44 * - ajax: boolean; whether to return Ajax or full-browser results
46 * Only works if the current user is logged in.
50 * @author Brion Vibber <brion@status.net>
51 * @copyright 2010 StatusNet, Inc.
52 * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPLv3
53 * @link http://status.net/
56 class PluginDisableAction extends PluginEnableAction
59 * Value to save into $config['plugins']['disable-<name>']
61 protected function overrideValue()
66 protected function successShortTitle()
68 // TRANS: Page title for AJAX form return when a disabling a plugin.
69 return _m('plugin', 'Disabled');
72 protected function successNextForm()
74 return new EnablePluginForm($this, $this->plugin);