X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsettingsaction.php;h=c3669868d4d3cb177401e1f1747b7f7c06cf6c0d;hb=acaf07f6e8c873e0069e84dac74bac3c7da98a97;hp=77ecb80e458f0f52294c663d3323abd820fcd1c4;hpb=be445a4b91b8a6245965fc68557947c52b99d35d;p=quix0rs-gnu-social.git diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 77ecb80e45..c3669868d4 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Evan Prodromou - * @author Earle Martin - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } -require_once INSTALLDIR.'/lib/settingsgroupnav.php'; - /** * Base class for settings group of actions * * @category Settings - * @package Laconica - * @author Evan Prodromou + * @package StatusNet + * @author Evan Prodromou * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * * @see Widget */ -class SettingsAction extends Action +class SettingsAction extends CurrentUserDesignAction { /** * A message for the user. @@ -79,7 +76,10 @@ class SettingsAction extends Action // change important settings or see private info, and // _all_ our settings are important common_set_returnto($this->selfUrl()); - common_redirect(common_local_url('login')); + $user = common_current_user(); + if (Event::handle('RedirectToLogin', array($this, $user))) { + common_redirect(common_local_url('login'), 303); + } } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->handlePost(); } else { @@ -127,12 +127,12 @@ class SettingsAction extends Action $this->element('div', ($this->success) ? 'success' : 'error', $this->msg); } else { - $inst = $this->get_instructions(); + $inst = $this->getInstructions(); $output = common_markup_to_html($inst); $this->elementStart('div', 'instructions'); $this->raw($output); - $this->elementEend('div'); + $this->elementEnd('div'); } } @@ -150,17 +150,4 @@ class SettingsAction extends Action return ''; } - /** - * Show the local navigation menu - * - * This is the same for all settings, so we show it here. - * - * @return void - */ - - function showLocalNav() - { - $menu = new SettingsGroupNav($this); - $menu->show(); - } }