From 18d9bff158bf90fb7b57c34ca8835273b3bdced7 Mon Sep 17 00:00:00 2001 From: rvelices Date: Tue, 12 Nov 2013 20:30:35 +0000 Subject: bug 2963: Ability to create css/js smarty templates - fixes git-svn-id: http://piwigo.org/svn/trunk@25464 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/template.class.php b/include/template.class.php index 6f37aa897..deef61af5 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -1372,9 +1372,8 @@ final class FileCombiner else { $this->flush_pending($result, $pending, $key, $force); - $pending = array(); $key = $this->is_css ? array(get_absolute_root_url(false)): array(); //because for css we modify bg url - $result[] = $combinable; + $pending = array($combinable); } } $this->flush_pending($result, $pending, $key, $force); @@ -1413,6 +1412,7 @@ final class FileCombiner private function process_combinable($combinable, $return_content, $force) { + global $conf; if ($combinable->is_template) { if (!$return_content) @@ -1420,7 +1420,7 @@ final class FileCombiner $key = array($combinable->path, $combinable->version); if ($conf['template_compile_check']) $key[] = filemtime( PHPWG_ROOT_PATH . $combinable->path ); - $file = PWG_COMBINED_DIR . 't' . base_convert(crc32($key),10,36) . '.' . $this->type; + $file = PWG_COMBINED_DIR . 't' . base_convert(crc32(implode(',',$key)),10,36) . '.' . $this->type; if (!$force && file_exists(PHPWG_ROOT_PATH.$file) ) { $combinable->path = $file; -- cgit v1.2.3