Skip to content

Commit

Permalink
prevent core from attempting to include module stylesheets that may n…
Browse files Browse the repository at this point in the history
…ot exist. refs #2626
  • Loading branch information
craigh committed Nov 7, 2015
1 parent 96ccd0a commit 296e491
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/lib/util/ModUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,10 @@ public static function loadAll()
private static function _loadStyleSheets($modname, $api, $type)
{
if (!System::isInstalling() && !$api) {
PageUtil::addVar('stylesheet', ThemeUtil::getModuleStylesheet($modname));
$moduleStylesheet = ThemeUtil::getModuleStylesheet($modname);
if (!empty($moduleStylesheet)) {
PageUtil::addVar('stylesheet', $moduleStylesheet);
}
if (strpos($type, 'admin') === 0) {
// load special admin stylesheets for administrator controllers
PageUtil::addVar('stylesheet', ThemeUtil::getModuleStylesheet('ZikulaAdminModule'));
Expand Down
3 changes: 3 additions & 0 deletions src/lib/util/PageUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@ private static function fixJQueryThemesPath($path)
*/
public static function addVar($varname, $value, $features = 'forms')
{
if (empty($varname) || empty($value)) {
throw new \InvalidArgumentException('empty parameter!');
}
global $_pageVars;

if (System::isLegacyMode()) {
Expand Down
16 changes: 8 additions & 8 deletions src/system/ExtensionsModule/Resources/public/css/hooks.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,24 @@
}

#hookSubscriber .sarea_wrapper h4 {
background: #ddd url("../../../../../../../images/global/arrow_right_black.png") no-repeat scroll 3px 0.65em;
background: #ddd url("../../../../../images/global/arrow_right_black.png") no-repeat scroll 3px 0.65em;
color: inherit;
font-size: 1.1em;
margin: 2px;
padding: 3px 3px 3px 14px;
}

#hookSubscriber .sarea_wrapper h4:hover {
background: #ccc url("../../../../../../../images/global/arrow_right_grey.png") no-repeat scroll 3px 0.65em;
background: #ccc url("../../../../../images/global/arrow_right_grey.png") no-repeat scroll 3px 0.65em;
}

#hookSubscriber .sarea_wrapper h4.active {
background: #ddd url("../../../../../../../images/global/arrow_down_black.png") no-repeat scroll 3px 0.65em;
background: #ddd url("../../../../../images/global/arrow_down_black.png") no-repeat scroll 3px 0.65em;
border-bottom: 1px solid #ccc;
}

#hookSubscriber .sarea_wrapper h4.active:hover {
background: #ccc url("../../../../../../../images/global/arrow_down_grey.png") no-repeat scroll 3px 0.65em;
background: #ccc url("../../../../../images/global/arrow_down_grey.png") no-repeat scroll 3px 0.65em;
}

#hookSubscriber .sarea_wrapper ol.z-itemlist li {
Expand Down Expand Up @@ -91,7 +91,7 @@

/* provider areas */
#hookProviderAreas h4 {
background: #ddd url("../../../../../../../images/global/arrow_right_black.png") no-repeat scroll 3px 0.65em;
background: #ddd url("../../../../../images/global/arrow_right_black.png") no-repeat scroll 3px 0.65em;
color: inherit;
border: none;
font-size: 1.1em;
Expand All @@ -100,15 +100,15 @@
}

#hookProviderAreas h4:hover {
background: #ccc url("../../../../../../../images/global/arrow_right_grey.png") no-repeat scroll 3px 0.65em;
background: #ccc url("../../../../../images/global/arrow_right_grey.png") no-repeat scroll 3px 0.65em;
}

#hookProviderAreas h4.z-panel-active {
background: #ddd url("../../../../../../../images/global/arrow_down_black.png") no-repeat scroll 3px 0.65em;
background: #ddd url("../../../../../images/global/arrow_down_black.png") no-repeat scroll 3px 0.65em;
}

#hookProviderAreas h4.z-panel-active:hover {
background: #ccc url("../../../../../../../images/global/arrow_down_grey.png") no-repeat scroll 3px 0.65em;
background: #ccc url("../../../../../images/global/arrow_down_grey.png") no-repeat scroll 3px 0.65em;
}

#hookProviderAreas .panel-content {
Expand Down

0 comments on commit 296e491

Please sign in to comment.