From 41a233f106a1bc5f6df17538963253895770daa1 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 23 Jun 2014 20:30:00 +0200 Subject: [PATCH] ModPlus available also for non-logged in users. --- plugins/ModPlus/ModPlusPlugin.php | 11 ++++------- plugins/ModPlus/{ => css}/modplus.css | 0 plugins/ModPlus/{ => js}/modplus.js | 0 3 files changed, 4 insertions(+), 7 deletions(-) rename plugins/ModPlus/{ => css}/modplus.css (100%) rename plugins/ModPlus/{ => js}/modplus.js (100%) diff --git a/plugins/ModPlus/ModPlusPlugin.php b/plugins/ModPlus/ModPlusPlugin.php index e041b1aaf4..682545327d 100644 --- a/plugins/ModPlus/ModPlusPlugin.php +++ b/plugins/ModPlus/ModPlusPlugin.php @@ -43,22 +43,19 @@ class ModPlusPlugin extends Plugin } /** - * Load JS at runtime if we're logged in. + * Load JS at runtime. * * @param Action $action * @return boolean hook result */ - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { - $user = common_current_user(); - if ($user) { - $action->script($this->path('modplus.js')); - } + $action->script($this->path('js/modplus.js')); return true; } public function onEndShowStylesheets(Action $action) { - $action->cssLink($this->path('modplus.css')); + $action->cssLink($this->path('css/modplus.css')); return true; } diff --git a/plugins/ModPlus/modplus.css b/plugins/ModPlus/css/modplus.css similarity index 100% rename from plugins/ModPlus/modplus.css rename to plugins/ModPlus/css/modplus.css diff --git a/plugins/ModPlus/modplus.js b/plugins/ModPlus/js/modplus.js similarity index 100% rename from plugins/ModPlus/modplus.js rename to plugins/ModPlus/js/modplus.js -- 2.39.5