Avoid caching dependencies without assets
parent
8597baa253
commit
5eb0e0e14c
|
@ -1939,6 +1939,17 @@ class H5PCore {
|
||||||
* @return array files.
|
* @return array files.
|
||||||
*/
|
*/
|
||||||
public function getDependenciesFiles($dependencies, $prefix = '') {
|
public function getDependenciesFiles($dependencies, $prefix = '') {
|
||||||
|
// Build files list for assets
|
||||||
|
$files = array(
|
||||||
|
'scripts' => array(),
|
||||||
|
'styles' => array()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Avoid caching empty files
|
||||||
|
if (empty($dependencies)) {
|
||||||
|
return $files;
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->aggregateAssets) {
|
if ($this->aggregateAssets) {
|
||||||
// Get aggregated files for assets
|
// Get aggregated files for assets
|
||||||
$key = self::getDependenciesHash($dependencies);
|
$key = self::getDependenciesHash($dependencies);
|
||||||
|
@ -1949,11 +1960,6 @@ class H5PCore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build files list for assets
|
|
||||||
$files = array(
|
|
||||||
'scripts' => array(),
|
|
||||||
'styles' => array()
|
|
||||||
);
|
|
||||||
// Using content dependencies
|
// Using content dependencies
|
||||||
foreach ($dependencies as $dependency) {
|
foreach ($dependencies as $dependency) {
|
||||||
if (isset($dependency['path']) === FALSE) {
|
if (isset($dependency['path']) === FALSE) {
|
||||||
|
|
Loading…
Reference in New Issue