]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/groupdesignaction.php
Merge branch 'master' into testing
[quix0rs-gnu-social.git] / lib / groupdesignaction.php
index 58777c283a06859a5b635baf08b397ac8b713a5a..3eb3964e87fa393361b68dfc0f3ff72ffe354653 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
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Action
- * @package   Laconica
- * @author    Zach Copley <zach@controlyourself.ca>
- * @copyright 2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Zach Copley <zach@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);
 }
 
@@ -38,10 +38,10 @@ if (!defined('LACONICA')) {
  * This superclass returns that design.
  *
  * @category Action
- * @package  Laconica
- * @author   Zach Copley <zach@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Zach Copley <zach@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/
  *
  */
 class GroupDesignAction extends Action {
@@ -49,26 +49,6 @@ class GroupDesignAction extends Action {
     /** The group in question */
     var $group = null;
 
-    /**
-      * Show the groups'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
      *
@@ -80,10 +60,12 @@ class GroupDesignAction extends Action {
 
     function getDesign()
     {
-        if (empty($this->group)) {
-            return null;
+        if (!empty($this->group)) {
+            $design = $this->group->getDesign();
+            if (!empty($design)) {
+                return $design;
+            }
         }
-
-        return $this->group->getDesign();
+        return parent::getDesign();
     }
 }