X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsettingsaction.php;h=fd4885c830223072a9421435def6fb756b448613;hb=fe6498e7c875f5b386a9c7d2cc1fba5677daae09;hp=77ecb80e458f0f52294c663d3323abd820fcd1c4;hpb=be445a4b91b8a6245965fc68557947c52b99d35d;p=quix0rs-gnu-social.git diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 77ecb80e45..fd4885c830 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 */ @@ -72,14 +69,17 @@ class SettingsAction extends Action { parent::handle($args); if (!common_logged_in()) { + // TRANS: Error message displayed when trying to perform an action that requires a logged in user. $this->clientError(_('Not logged in.')); - return; } else if (!common_is_real_login()) { // Cookie theft means that automatic logins can't // 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'); } } @@ -160,7 +160,22 @@ class SettingsAction extends Action function showLocalNav() { - $menu = new SettingsGroupNav($this); + $menu = new SettingsNav($this); $menu->show(); } + + /** + * Show notice form. + * + * @return nothing + */ + + function showNoticeForm() + { + return; + } + + function showProfileBlock() + { + } }