[-] FO : Do no try to add empty css or js file name

This commit is contained in:
gRoussac
2013-03-14 11:15:49 +01:00
parent 1f540553b2
commit 2bb4c6c08a
+8 -4
View File
@@ -327,15 +327,19 @@ abstract class ControllerCore
foreach ($name as $plugin) foreach ($name as $plugin)
{ {
$plugin_path = Media::getJqueryPluginPath($plugin, $folder); $plugin_path = Media::getJqueryPluginPath($plugin, $folder);
$this->addJS($plugin_path['js']); if(!empty($plugin_path['js']))
$this->addCSS($plugin_path['css']); $this->addJS($plugin_path['js']);
if(!empty($plugin_path['css']))
$this->addCSS($plugin_path['css']);
} }
} }
else else
$plugin_path = Media::getJqueryPluginPath($name, $folder); $plugin_path = Media::getJqueryPluginPath($name, $folder);
$this->addCSS($plugin_path['css']); if(!empty($plugin_path['css']))
$this->addJS($plugin_path['js']); $this->addCSS($plugin_path['css']);
if(!empty($plugin_path['js']))
$this->addJS($plugin_path['js']);
} }
/** /**