]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add *Laconica* events back in for backwards compatibility
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 26 Aug 2009 14:33:04 +0000 (10:33 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 26 Aug 2009 14:33:04 +0000 (10:33 -0400)
EVENTS.txt
lib/action.php

index 59de6de5f8de15bb8d7cb59c5cd6424eb4d56f90..68cb28603b644ea092a58a18fe91877c4c4d26af 100644 (file)
@@ -26,6 +26,12 @@ StartShowStatusNetStyles: Showing StatusNet Style links
 EndShowStatusNetStyles: End showing StatusNet Style links;  good place to add handheld or JavaScript dependant styles
 - $action: the current action
 
+StartShowLaconicaStyles: backwards compatibility; deprecated
+- $action: the current action
+
+EndShowLaconicaStyles: backwards compatibility; deprecated
+- $action: the current action
+
 StartShowUAStyles: Showing custom UA Style links
 - $action: the current action
 
@@ -51,6 +57,12 @@ StartShowStatusNetScripts: Showing StatusNet script links (use this to link to a
 EndShowStatusNetScripts: End showing StatusNet script links
 - $action: the current action
 
+StartShowLaconicaScripts: backwards compatibility; deprecated
+- $action: the current action
+
+EndShowLaconicaScripts: backwards compatibility; deprecated
+- $action: the current action
+
 StartShowSections: Start the list of sections in the sidebar
 - $action: the current action
 
index a99c885dd6db3d63e31545ee7ed2f7ba9905fcef..cb922f60e006a3676f1d90922fc9dfa3bebf4e2a 100644 (file)
@@ -192,7 +192,10 @@ class Action extends HTMLOutputter // lawsuit
     {
         if (Event::handle('StartShowStyles', array($this))) {
 
-            if (Event::handle('StartShowStatusNetStyles', array($this))) {
+            // Use old name for StatusNet for compatibility on events
+
+            if (Event::handle('StartShowStatusNetStyles', array($this)) &&
+                Event::handle('StartShowLaconicaStyles', array($this))) {
                 $this->cssLink('css/display.css',null,'screen, projection, tv');
                 if (common_config('site', 'mobile')) {
                     // TODO: "handheld" CSS for other mobile devices
@@ -200,6 +203,7 @@ class Action extends HTMLOutputter // lawsuit
                 }
                 $this->cssLink('css/print.css','base','print');
                 Event::handle('EndShowStatusNetStyles', array($this));
+                Event::handle('EndShowLaconicaStyles', array($this));
             }
 
             if (Event::handle('StartShowUAStyles', array($this))) {
@@ -249,13 +253,15 @@ class Action extends HTMLOutputter // lawsuit
                 $this->script('js/jquery.joverlay.min.js');
                 Event::handle('EndShowJQueryScripts', array($this));
             }
-            if (Event::handle('StartShowStatusNetScripts', array($this))) {
+            if (Event::handle('StartShowStatusNetScripts', array($this)) &&
+                Event::handle('StartShowLaconicaScripts', array($this))) {
                 $this->script('js/xbImportNode.js');
                 $this->script('js/util.js');
                 // Frame-busting code to avoid clickjacking attacks.
                 $this->element('script', array('type' => 'text/javascript'),
                                'if (window.top !== window.self) { window.top.location.href = window.self.location.href; }');
                 Event::handle('EndShowStatusNetScripts', array($this));
+                Event::handle('EndShowLaconicaScripts', array($this));
             }
             Event::handle('EndShowScripts', array($this));
         }