From d6ca90bb21d1d7f0dc2ed63d360872d19dcbbbb3 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 27 Feb 2014 23:30:35 +0100 Subject: [PATCH] Partly revert 97830b07019d9ffe33e2c2048bac39026e636998 (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__. --- plugins/Comet/CometPlugin.php | 2 ++ plugins/Meteor/MeteorPlugin.php | 2 ++ plugins/Orbited/OrbitedPlugin.php | 2 ++ plugins/Realtime/RealtimePlugin.php | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/Comet/CometPlugin.php b/plugins/Comet/CometPlugin.php index 22f791e2fc..d669626a67 100644 --- a/plugins/Comet/CometPlugin.php +++ b/plugins/Comet/CometPlugin.php @@ -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 * diff --git a/plugins/Meteor/MeteorPlugin.php b/plugins/Meteor/MeteorPlugin.php index b495fcddd9..881dfdc1b3 100644 --- a/plugins/Meteor/MeteorPlugin.php +++ b/plugins/Meteor/MeteorPlugin.php @@ -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 * diff --git a/plugins/Orbited/OrbitedPlugin.php b/plugins/Orbited/OrbitedPlugin.php index 6267b38f7e..e788c464e6 100644 --- a/plugins/Orbited/OrbitedPlugin.php +++ b/plugins/Orbited/OrbitedPlugin.php @@ -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 * diff --git a/plugins/Realtime/RealtimePlugin.php b/plugins/Realtime/RealtimePlugin.php index 138ed4dc7a..69182b14fe 100644 --- a/plugins/Realtime/RealtimePlugin.php +++ b/plugins/Realtime/RealtimePlugin.php @@ -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')); } /** -- 2.39.5