Skip to content

Commit

Permalink
Fixed issue #13494: Problem when activating force_xmlsettings_for_sur…
Browse files Browse the repository at this point in the history
…vey_rendering
  • Loading branch information
lacrioque committed Mar 19, 2018
1 parent 9615c9d commit 0c973e1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
9 changes: 2 additions & 7 deletions application/config/packages.php
Expand Up @@ -103,13 +103,8 @@
'pjax' => array(
'devBaseUrl' => 'assets/packages/pjax/',
'basePath' => 'core.pjax',
'js' => ($debug > 0 ?
array(
'pjax.js',
)
: array(
'min/pjax.min.js',
)
'js' => array(
$debug > 0 ? 'pjax.js' : 'min/pjax.min.js',
),
'depends' => array(
'lslog',
Expand Down
15 changes: 13 additions & 2 deletions application/models/TemplateManifest.php
Expand Up @@ -841,10 +841,21 @@ protected function setThisTemplate()

// Not mandatory (use package dependances)
$this->cssFramework = (!empty($this->config->xpath("//cssframework"))) ? $this->config->engine->cssframework : '';
$this->packages = (!empty($this->config->xpath("//packages"))) ? $this->config->engine->packages : array();

// Add depend package according to packages
$this->depends = array_merge($this->depends, $this->getDependsPackages($this));

//Add extra packages from xml
$this->packages = array();
$packageActionFromEngineSection = json_decode(json_encode($this->config->engine->packages));
if (!empty($packageActionFromEngineSection)) {
if (!empty($packageActionFromEngineSection->add)) {
$this->packages = array_merge($packageActionFromEngineSection->add, $this->packages);
}
if (!empty($packageActionFromEngineSection->remove)) {
$this->packages = array_diff($this->packages, $packageActionFromEngineSection->remove);
}
}
$this->depends = array_merge($this->depends, $this->packages);
}


Expand Down

0 comments on commit 0c973e1

Please sign in to comment.