]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/settingsaction.php
Merge branch '0.8.x' of git@gitorious.org:statusnet/mainline into i18n-work
[quix0rs-gnu-social.git] / lib / settingsaction.php
index 8624803ac41705150a1d9d815bd89d0fc44648fa..a1f305f5b74e076cdda6256b8bb04a6e1d1cbdae 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Base class for settings actions
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Settings
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @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://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 <evan@controlyourself.ca>
+ * @package  StatusNet
+ * @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://laconi.ca/
+ * @link     http://status.net/
  *
  * @see      Widget
  */
 
-class SettingsAction extends Action
+class SettingsAction extends CurrentUserDesignAction
 {
     /**
      * A message for the user.
@@ -78,7 +76,12 @@ 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 ($user->hasOpenID()) {
+                common_redirect(common_local_url('openidlogin'), 303);
+            } else {
+                common_redirect(common_local_url('login'), 303);
+            }
         } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
             $this->handlePost();
         } else {
@@ -149,17 +152,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();
-    }
 }