*
* @category Settings
* @package StatusNet
- * @author Evan Prodromou <evan@controlyourself.ca>
+ * @author Evan Prodromou <evan@status.net>
* @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://status.net/
*/
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
*
* @category Settings
* @package StatusNet
- * @author Evan Prodromou <evan@controlyourself.ca>
+ * @author Evan Prodromou <evan@status.net>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*
* @see Widget
*/
-class SettingsAction extends CurrentUserDesignAction
+class SettingsAction extends Action
{
/**
* A message for the user.
* @return void
*/
- function handle($args)
+ function handle(array $args=array())
{
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') {
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()
+ {
+ }
}