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
- $action: the current action
StartShowStatusNetStyles: Showing StatusNet Style links
StartShowStylesheets: Showing stylesheet links
- $action: the current action
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
EndShowStylesheets: End showing stylesheet links; good place to add handheld or JavaScript dependant styles
- $action: the current action
StartShowUAStyles: Showing custom User-Agent style links

View File

@ -28,9 +28,7 @@
* @link http://status.net/
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
if (!defined('GNUSOCIAL')) { exit(1); }
require_once INSTALLDIR.'/lib/noticeform.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
if (Event::handle('StartShowStatusNetStyles', array($this)) &&
Event::handle('StartShowLaconicaStyles', array($this))) {
if (Event::handle('StartShowStylesheets', array($this))) {
$this->primaryCssLink(null, 'screen, projection, tv, print');
Event::handle('EndShowStatusNetStyles', array($this));
Event::handle('EndShowLaconicaStyles', array($this));
Event::handle('EndShowStylesheets', array($this));
}
$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/
*/
if (!defined('STATUSNET') && !defined('LACONICA')) {
if (!defined('STATUSNET')) {
exit(1);
}
@ -65,7 +65,7 @@ abstract class UAPPlugin extends Plugin
*
* @return boolean hook flag
*/
function onEndShowStatusNetStyles($action)
public function onEndShowStylesheets(Action $action)
{
// XXX: allow override by theme
$action->cssLink('css/uap.css', 'base', 'screen, projection, tv');

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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