Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bug 2963: Ability to create css/js smarty templates with caching (scr…
…ipts was not using template parameter)

git-svn-id: http://piwigo.org/svn/trunk@26718 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Jan 14, 2014
1 parent a6cc81a commit 089c454
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/template.class.php
Expand Up @@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | Piwigo - a PHP based photo gallery |
// +-----------------------------------------------------------------------+
// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org |
// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org |
// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
// +-----------------------------------------------------------------------+
Expand Down Expand Up @@ -797,7 +797,8 @@ function func_combine_script($params)
$this->scriptLoader->add( $params['id'], $load,
empty($params['require']) ? array() : explode( ',', $params['require'] ),
@$params['path'],
isset($params['version']) ? $params['version'] : 0 );
isset($params['version']) ? $params['version'] : 0,
@$params['template']);
}

/**
Expand Down Expand Up @@ -1494,7 +1495,7 @@ function add_inline($code, $require)
* @param string $path
* @param string $version
*/
function add($id, $load_mode, $require, $path, $version=0)
function add($id, $load_mode, $require, $path, $version=0, $is_template=false)
{
if ($this->did_head && $load_mode==0)
{
Expand All @@ -1507,6 +1508,7 @@ function add($id, $load_mode, $require, $path, $version=0)
if (! isset( $this->registered_scripts[$id] ) )
{
$script = new Script($load_mode, $id, $path, $version, $require);
$script->is_template = $is_template;
self::fill_well_known($id, $script);
$this->registered_scripts[$id] = $script;

Expand Down

0 comments on commit 089c454

Please sign in to comment.