Skip to content

Commit

Permalink
bug 2963: Ability to create css/js smarty templates - fixes
Browse files Browse the repository at this point in the history
git-svn-id: http://piwigo.org/svn/trunk@25464 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Nov 12, 2013
1 parent 2eb4059 commit 18d9bff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/template.class.php
Expand Up @@ -1372,9 +1372,8 @@ function combine()
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);
Expand Down Expand Up @@ -1413,14 +1412,15 @@ private function flush_pending(&$result, $pending, $key, $force)

private function process_combinable($combinable, $return_content, $force)
{
global $conf;
if ($combinable->is_template)
{
if (!$return_content)
{
$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;
Expand Down

0 comments on commit 18d9bff

Please sign in to comment.