]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/ownerdesignaction.php
Merge branch '0.8.x' into 0.9.x
[quix0rs-gnu-social.git] / lib / ownerdesignaction.php
index 785b8a93d3aad2a0a3962e324516d9d7ef726d1e..d557f10c06fae6ba0df596c047437cd8a741a2fd 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 page owner's design
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Action
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @copyright 2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @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/
+ * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -39,10 +39,10 @@ if (!defined('LACONICA')) {
  * design.
  *
  * @category Action
- * @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/
  *
  */
 
@@ -52,26 +52,6 @@ class OwnerDesignAction extends Action {
 
     var $user = null;
 
-    /**
-      * Show the owner's design stylesheet
-      *
-      * @return nothing
-      */
-     function showStylesheets()
-     {
-         parent::showStylesheets();
-
-         $user = common_current_user();
-
-         if (empty($user) || $user->viewdesigns) {
-             $design = $this->getDesign();
-
-             if (!empty($design)) {
-                 $design->showCSS($this);
-             }
-         }
-     }
-
     /**
      * A design for this action
      *
@@ -83,10 +63,15 @@ class OwnerDesignAction extends Action {
 
     function getDesign()
     {
-        if (empty($this->user)) {
-            return null;
+        if (!empty($this->user)) {
+
+            $design = $this->user->getDesign();
+
+            if (!empty($design)) {
+                return $design;
+            }
         }
 
-        return $this->user->getDesign();
+        return parent::getDesign();
     }
 }