]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/settingsaction.php
??? Not callable?
[quix0rs-gnu-social.git] / lib / settingsaction.php
index a923a98b2dd9862a6125973714d6bec9fb1e4862..bed478f135d09c8c91cf20b39fe6d0416f620cea 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);
 }
 
@@ -35,15 +35,15 @@ if (!defined('LACONICA')) {
  * 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 CurrentUserDesignAction
+class SettingsAction extends Action
 {
     /**
      * A message for the user.
@@ -65,12 +65,12 @@ class SettingsAction extends CurrentUserDesignAction
      * @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
@@ -150,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()
+    {
+    }
 }