]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/action.php
correct instructions for length in groupeditform
[quix0rs-gnu-social.git] / lib / action.php
index 95ee10c642b0ec22bfd7d755144d031d958fba7e..158870fa8e8d02da57a2e4177161e469fb5adadb 100644 (file)
@@ -120,14 +120,17 @@ class Action extends HTMLOutputter // lawsuit
     {
         // XXX: attributes (profile?)
         $this->elementStart('head');
-        $this->showTitle();
-        $this->showShortcutIcon();
-        $this->showStylesheets();
-        $this->showScripts();
-        $this->showOpenSearch();
-        $this->showFeeds();
-        $this->showDescription();
-        $this->extraHead();
+        if (Event::handle('StartHeadChildren', array($this))) {
+            $this->showTitle();
+            $this->showShortcutIcon();
+            $this->showStylesheets();
+            $this->showScripts();
+            $this->showOpenSearch();
+            $this->showFeeds();
+            $this->showDescription();
+            $this->extraHead();
+            Event::handle('EndHeadChildren', array($this));
+        }
         $this->elementEnd('head');
     }
 
@@ -191,6 +194,7 @@ class Action extends HTMLOutputter // lawsuit
     function showStylesheets()
     {
         if (Event::handle('StartShowStyles', array($this))) {
+
             if (Event::handle('StartShowLaconicaStyles', array($this))) {
                 $this->element('link', array('rel' => 'stylesheet',
                                              'type' => 'text/css',
@@ -209,6 +213,7 @@ class Action extends HTMLOutputter // lawsuit
                                              'media' => 'print'));
                 Event::handle('EndShowLaconicaStyles', array($this));
             }
+
             if (Event::handle('StartShowUAStyles', array($this))) {
                 $this->comment('[if IE]><link rel="stylesheet" type="text/css" '.
                                'href="'.theme_path('css/ie.css', 'base').'?version='.LACONICA_VERSION.'" /><![endif]');
@@ -223,6 +228,21 @@ class Action extends HTMLOutputter // lawsuit
                                'href="'.theme_path('css/ie.css', null).'?version='.LACONICA_VERSION.'" /><![endif]');
                 Event::handle('EndShowUAStyles', array($this));
             }
+
+            if (Event::handle('StartShowDesign', array($this))) {
+
+                $user = common_current_user();
+
+                if (empty($user) || $user->viewdesigns) {
+                    $design = $this->getDesign();
+
+                    if (!empty($design)) {
+                        $design->showCSS($this);
+                    }
+                }
+
+                Event::handle('EndShowDesign', array($this));
+            }
             Event::handle('EndShowStyles', array($this));
         }
     }
@@ -1074,4 +1094,15 @@ class Action extends HTMLOutputter // lawsuit
     {
         return null;
     }
+
+    /**
+     * A design for this action
+     *
+     * @return Design a design object to use
+     */
+
+    function getDesign()
+    {
+        return Design::siteDesign();
+    }
 }