]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/currentuserdesignaction.php
change Laconica and Control Yourself to StatusNet in PHP files
[quix0rs-gnu-social.git] / lib / currentuserdesignaction.php
index 7c2520cf67cbf292334a821dd952be1caa99da15..8323eeccb76b11e5f08131678cc8dcdd0d1b6969 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Base class for actions that use the current user's design
  *
@@ -20,9 +20,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Action
- * @package   Laconica
+ * @package   StatusNet
  * @author    Evan Prodromou <evan@controlyourself.ca>
- * @copyright 2009 Control Yourself, Inc.
+ * @copyright 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/
  */
@@ -38,7 +38,7 @@ if (!defined('LACONICA')) {
  * design. This superclass returns that design.
  *
  * @category Action
- * @package  Laconica
+ * @package  StatusNet
  * @author   Evan Prodromou <evan@controlyourself.ca>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://laconi.ca/
@@ -47,28 +47,10 @@ if (!defined('LACONICA')) {
 
 class CurrentUserDesignAction extends Action
 {
-
-    /**
-      * Show the user's design stylesheet
-      *
-      * @return nothing
-      */
-     function showStylesheets()
-     {
-         parent::showStylesheets();
-
-         $design = $this->getDesign();
-
-         if (!empty($design)) {
-             $design->showCSS($this);
-         }
-     }
-
     /**
      * A design for this action
      *
-     * if the user attribute has been set, returns that user's
-     * design.
+     * Returns the design preferences for the current user.
      *
      * @return Design a design object to use
      */
@@ -77,12 +59,15 @@ class CurrentUserDesignAction extends Action
     {
         $cur = common_current_user();
 
-        if (empty($cur)) {
-            return null;
-        }
+        if (!empty($cur)) {
 
-        return $cur->getDesign();
-    }
+            $design = $cur->getDesign();
 
+            if (!empty($design)) {
+                return $design;
+            }
+        }
 
+        return parent::getDesign();
+    }
 }