]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/groupdesignaction.php
Merge branch '1.0.x' into testing
[quix0rs-gnu-social.git] / lib / groupdesignaction.php
index bc95921f1b156b1751b55fb060b7ea5930ea233e..44f35f6299f6d3257785b5c3fb8fbb1b3e93284b 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);
 }
 
 /**
  * Base class for actions that use a group's design
  *
- * Pages related to groups can be themed with a design. 
+ * Pages related to groups can be themed with a design.
  * 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 {
 
     /** The group in question */
     var $group = null;
-    
-    /**
-      * Show the groups's design stylesheet
-      *
-      * @return nothing
-      */
-     function showStylesheets()
-     {
-         parent::showStylesheets();
-
-         $design = $this->getDesign();
-
-         if (!empty($design)) {
-             $design->showCSS($this);
-         }
-     }
 
     /**
      * A design for this action
@@ -76,12 +60,18 @@ 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();
     }
 
+    function showProfileBlock()
+    {
+        $block = new GroupProfileBlock($this, $this->group);
+        $block->show();
+    }
 }