X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsettingsaction.php;h=fd4885c830223072a9421435def6fb756b448613;hb=6e181a2454e888b09313344138f66713d5c9c99f;hp=a1f305f5b74e076cdda6256b8bb04a6e1d1cbdae;hpb=bbb830e14c718c687f0636710a1827c90b11f4cc;p=quix0rs-gnu-social.git diff --git a/lib/settingsaction.php b/lib/settingsaction.php index a1f305f5b7..fd4885c830 100644 --- a/lib/settingsaction.php +++ b/lib/settingsaction.php @@ -43,7 +43,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @see Widget */ -class SettingsAction extends CurrentUserDesignAction +class SettingsAction extends Action { /** * A message for the user. @@ -69,17 +69,15 @@ 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()) { // 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()); $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 +150,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() + { + } }