// Fix bug with js inclusion

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15394 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte
2012-05-18 15:25:33 +00:00
parent 76b9e4ec08
commit 2fd7807ae5
3 changed files with 47 additions and 49 deletions

View File

@@ -150,6 +150,10 @@ abstract class ControllerCore
$this->init();
if ($this->checkAccess())
{
// setMedia MUST be called before postProcess
if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
$this->setMedia();
// postProcess handles ajaxProcess
$this->postProcess();
@@ -157,10 +161,7 @@ abstract class ControllerCore
$this->redirect();
if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
{
$this->setMedia();
$this->initHeader();
}
if ($this->viewAccess())
$this->initContent();
@@ -266,6 +267,7 @@ abstract class ControllerCore
*/
public function addJS($js_uri)
{
//elog($js_uri);
if (is_array($js_uri))
foreach ($js_uri as $js_file)
{