aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-01-14 21:13:40 +0000
committerrvelices <rv-github@modusoptimus.com>2014-01-14 21:13:40 +0000
commit089c4542fb3dee4077066f38d6dd4869c18779df (patch)
treea7a447241c941c473e8ae60f7fd02cdd6e0cf77c
parenta6cc81af3c9df05fc7725aa22d2e7e19187e43d4 (diff)
bug 2963: Ability to create css/js smarty templates with caching (scripts was not using template parameter)
git-svn-id: http://piwigo.org/svn/trunk@26718 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/template.class.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/template.class.php b/include/template.class.php
index 6dfb427b5..74a1eb36d 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -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 |
// +-----------------------------------------------------------------------+
@@ -797,7 +797,8 @@ class Template
$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']);
}
/**
@@ -1494,7 +1495,7 @@ class ScriptLoader
* @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)
{
@@ -1507,6 +1508,7 @@ class ScriptLoader
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;