Partly revert 97830b0701 (thanks _MrB_)

require_once lines were required since _plugins_ don't __autoload

Also, Realtime would load the wrong URL for css/js since $this->name()
returns get_class($this) instead of the calling class' __CLASS__.
This commit is contained in:
Mikael Nordfeldth 2014-02-27 23:30:35 +01:00
parent c6bdafb3d0
commit d6ca90bb21
4 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,8 @@ if (!defined('GNUSOCIAL') && !defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/plugins/Realtime/RealtimePlugin.php';
/**
* Plugin to do realtime updates using Comet
*

View File

@ -31,6 +31,8 @@ if (!defined('GNUSOCIAL') && !defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/plugins/Realtime/RealtimePlugin.php';
/**
* Plugin to do realtime updates using Meteor
*

View File

@ -31,6 +31,8 @@ if (!defined('GNUSOCIAL') && !defined('STATUSNET')) {
exit(1);
}
require_once INSTALLDIR.'/plugins/Realtime/RealtimePlugin.php';
/**
* Plugin to do realtime updates using Orbited + STOMP
*

View File

@ -142,7 +142,7 @@ class RealtimePlugin extends Plugin
public function onEndShowStylesheets(Action $action)
{
$action->cssLink($this->path('css/realtimeupdate.css'),
$action->cssLink(self::staticPath(__CLASS__, 'css/realtimeupdate.css'),
null,
'screen, projection, tv');
return true;
@ -391,7 +391,7 @@ class RealtimePlugin extends Plugin
function _getScripts()
{
return array($this->path('js/realtimeupdate.js'));
return array(self::staticPath(__CLASS__, 'js/realtimeupdate.js'));
}
/**