aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-01-07 19:57:07 +0000
committerrvelices <rv-github@modusoptimus.com>2011-01-07 19:57:07 +0000
commit18cbb9635b9b78df3114cc04bb122bc70e1a9c73 (patch)
tree9f0ca65a59b467c0a1696658687e654c6cffa4f2
parent1d47959745494181fe947d5d85d0bd18c859d2b5 (diff)
added some comments
git-svn-id: http://piwigo.org/svn/trunk@8506 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--include/template.class.php34
1 files changed, 27 insertions, 7 deletions
diff --git a/include/template.class.php b/include/template.class.php
index da3c4bb38..f1b53039c 100644
--- a/include/template.class.php
+++ b/include/template.class.php
@@ -548,6 +548,18 @@ class Template {
}
}
+ /**
+ * combine_script smarty function allows inclusion of a javascript file in the current page.
+ * The engine will combine several js files into a single one in order to reduce the number of
+ * required http requests.
+ * param id - required
+ * param path - required - the path to js file RELATIVE to piwigo root dir
+ * param load - optional - header|footer|async, default header
+ * param require - optional - comma separated list of script ids required to be loaded and executed
+ before this one
+ * param version - optional - plugins could use this and change it in order to force a
+ browser refresh
+ */
function func_combine_script($params, &$smarty)
{
if (!isset($params['id']))
@@ -652,6 +664,14 @@ var s;';
}
}
+ /**
+ * combine_css smarty function allows inclusion of a css stylesheet file in the current page.
+ * The engine will combine several css files into a single one in order to reduce the number of
+ * required http requests.
+ * param path - required - the path to css file RELATIVE to piwigo root dir
+ * param version - optional - plugins could use this and change it in order to force a
+ browser refresh
+ */
function func_combine_css($params, &$smarty)
{
!empty($params['path']) || fatal_error('combine_css missing path');
@@ -899,11 +919,11 @@ class ScriptLoader
$this->head_done_scripts = array();
$this->did_head = false;
}
-
- function get_all()
- {
- return $this->registered_scripts;
- }
+
+ function get_all()
+ {
+ return $this->registered_scripts;
+ }
function add_inline($code, $require)
{
@@ -1198,10 +1218,10 @@ final class FileCombiner
return 2;
}
- $output = "/* ".join("\n", $this->files)."*/\n";
+ $output = '';
foreach ($this->files as $input_file)
{
- $output .= "/* BEGIN $input_file */\n";
+ $output .= "/*BEGIN $input_file */\n";
if ($is_css)
$output .= self::process_css($input_file);
else