Stylesheet event now removed of StatusNet-remnants

This commit is contained in:
Mikael Nordfeldth 2013-09-17 20:41:54 +02:00
parent 4ca1c10fb8
commit 8205c56e25
9 changed files with 16 additions and 27 deletions

View File

@ -20,16 +20,10 @@ StartShowStyles: Showing Style links; good place to add UA style resets
EndShowStyles: End showing Style links; good place to add custom styles EndShowStyles: End showing Style links; good place to add custom styles
- $action: the current action - $action: the current action
StartShowStatusNetStyles: Showing StatusNet Style links StartShowStylesheets: Showing stylesheet links
- $action: the current action - $action: the current action
EndShowStatusNetStyles: End showing StatusNet Style links; good place to add handheld or JavaScript dependant styles EndShowStylesheets: End showing stylesheet 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 - $action: the current action
StartShowUAStyles: Showing custom User-Agent style links StartShowUAStyles: Showing custom User-Agent style links

View File

@ -28,9 +28,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('GNUSOCIAL')) { exit(1); }
exit(1);
}
require_once INSTALLDIR.'/lib/noticeform.php'; require_once INSTALLDIR.'/lib/noticeform.php';
require_once INSTALLDIR.'/lib/htmloutputter.php'; require_once INSTALLDIR.'/lib/htmloutputter.php';
@ -283,11 +281,9 @@ class Action extends HTMLOutputter // lawsuit
// Use old name for StatusNet for compatibility on events // Use old name for StatusNet for compatibility on events
if (Event::handle('StartShowStatusNetStyles', array($this)) && if (Event::handle('StartShowStylesheets', array($this))) {
Event::handle('StartShowLaconicaStyles', array($this))) {
$this->primaryCssLink(null, 'screen, projection, tv, print'); $this->primaryCssLink(null, 'screen, projection, tv, print');
Event::handle('EndShowStatusNetStyles', array($this)); Event::handle('EndShowStylesheets', array($this));
Event::handle('EndShowLaconicaStyles', array($this));
} }
$this->cssLink(common_path('js/extlib/jquery-ui/css/smoothness/jquery-ui.css', StatusNet::isHTTPS())); $this->cssLink(common_path('js/extlib/jquery-ui/css/smoothness/jquery-ui.css', StatusNet::isHTTPS()));

View File

@ -28,7 +28,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('STATUSNET')) {
exit(1); exit(1);
} }
@ -65,7 +65,7 @@ abstract class UAPPlugin extends Plugin
* *
* @return boolean hook flag * @return boolean hook flag
*/ */
function onEndShowStatusNetStyles($action) public function onEndShowStylesheets(Action $action)
{ {
// XXX: allow override by theme // XXX: allow override by theme
$action->cssLink('css/uap.css', 'base', 'screen, projection, tv'); $action->cssLink('css/uap.css', 'base', 'screen, projection, tv');

View File

@ -153,7 +153,7 @@ class DirectoryPlugin extends Plugin
* *
* @return boolean hook flag * @return boolean hook flag
*/ */
function onEndShowStatusNetStyles($action) public function onEndShowStylesheets(Action $action)
{ {
if (in_array( if (in_array(
$action->trimmed('action'), $action->trimmed('action'),

View File

@ -27,7 +27,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('STATUSNET')) {
exit(1); exit(1);
} }
@ -244,7 +244,7 @@ class MobileProfilePlugin extends WAP20Plugin
} }
} }
function onStartShowStatusNetStyles($action) public function onStartShowStylesheets(Action $action)
{ {
if (!$this->serveMobile) { if (!$this->serveMobile) {
return true; return true;
@ -263,8 +263,7 @@ class MobileProfilePlugin extends WAP20Plugin
} }
// Allow other plugins to load their styles. // Allow other plugins to load their styles.
Event::handle('EndShowStatusNetStyles', array($action)); Event::handle('EndShowStylesheets', array($action));
Event::handle('EndShowLaconicaStyles', array($action));
return false; return false;
} }

View File

@ -57,7 +57,7 @@ class ModPlusPlugin extends Plugin
return true; return true;
} }
function onEndShowStatusNetStyles($action) { public function onEndShowStylesheets(Action $action) {
$action->cssLink($this->path('modplus.css')); $action->cssLink($this->path('modplus.css'));
return true; return true;
} }

View File

@ -518,7 +518,7 @@ class OStatusPlugin extends Plugin
return true; return true;
} }
function onEndShowStatusNetStyles($action) { public function onEndShowStylesheets(Action $action) {
$action->cssLink($this->path('theme/base/css/ostatus.css')); $action->cssLink($this->path('theme/base/css/ostatus.css'));
return true; return true;
} }

View File

@ -27,7 +27,7 @@
* @link http://status.net/ * @link http://status.net/
*/ */
if (!defined('STATUSNET') && !defined('LACONICA')) { if (!defined('STATUSNET')) {
exit(1); exit(1);
} }
@ -140,7 +140,7 @@ class RealtimePlugin extends Plugin
return true; return true;
} }
function onEndShowStatusNetStyles($action) public function onEndShowStylesheets(Action $action)
{ {
$action->cssLink(Plugin::staticPath('Realtime', 'realtimeupdate.css'), $action->cssLink(Plugin::staticPath('Realtime', 'realtimeupdate.css'),
null, null,

View File

@ -32,7 +32,7 @@ class ShareNoticePlugin extends Plugin
array('StatusNet', array('baseurl' => 'http://identi.ca')) array('StatusNet', array('baseurl' => 'http://identi.ca'))
); );
function onEndShowStatusNetStyles($action) { public function onEndShowStylesheets(Action $action) {
$action->cssLink($this->path('css/sharenotice.css')); $action->cssLink($this->path('css/sharenotice.css'));
return true; return true;
} }