X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsettingsaction.php;h=c70a5ffa8d7a3fd7b4b52d8c1a1c605aff4012c5;hb=fdee4190510b88189cc368cb94ec2a01db4cc55f;hp=17d3a2f64dcb1853190ee0064b6a224d01342be0;hpb=3e60160f07f32d109b545db6b73be344b9180de8;p=quix0rs-gnu-social.git diff --git a/lib/settingsaction.php b/lib/settingsaction.php index 17d3a2f64d..c70a5ffa8d 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Evan Prodromou - * @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); } @@ -35,10 +35,10 @@ if (!defined('LACONICA')) { * 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 */ @@ -69,6 +69,7 @@ class SettingsAction extends CurrentUserDesignAction { 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()) { @@ -77,9 +78,7 @@ class SettingsAction extends CurrentUserDesignAction // _all_ our settings are important common_set_returnto($this->selfUrl()); $user = common_current_user(); - if ($user->hasOpenID()) { - common_redirect(common_local_url('openidlogin'), 303); - } else { + if (Event::handle('RedirectToLogin', array($this, $user))) { common_redirect(common_local_url('login'), 303); } } else if ($_SERVER['REQUEST_METHOD'] == 'POST') { @@ -152,4 +151,32 @@ class SettingsAction extends CurrentUserDesignAction return ''; } + /** + * Show the local navigation menu + * + * This is the same for all settings, so we show it here. + * + * @return void + */ + + function showLocalNav() + { + $menu = new SettingsNav($this); + $menu->show(); + } + + /** + * Show notice form. + * + * @return nothing + */ + + function showNoticeForm() + { + return; + } + + function showProfileBlock() + { + } }