ModPlus available also for non-logged in users.
This commit is contained in:
parent
725af5edd0
commit
41a233f106
@ -43,22 +43,19 @@ class ModPlusPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load JS at runtime if we're logged in.
|
* Load JS at runtime.
|
||||||
*
|
*
|
||||||
* @param Action $action
|
* @param Action $action
|
||||||
* @return boolean hook result
|
* @return boolean hook result
|
||||||
*/
|
*/
|
||||||
function onEndShowScripts($action)
|
function onEndShowScripts(Action $action)
|
||||||
{
|
{
|
||||||
$user = common_current_user();
|
$action->script($this->path('js/modplus.js'));
|
||||||
if ($user) {
|
|
||||||
$action->script($this->path('modplus.js'));
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function onEndShowStylesheets(Action $action) {
|
public function onEndShowStylesheets(Action $action) {
|
||||||
$action->cssLink($this->path('modplus.css'));
|
$action->cssLink($this->path('css/modplus.css'));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user