summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--change_log.txt1
-rw-r--r--demo/index.php4
-rw-r--r--demo/plugins/cacheresource.apc.php2
-rw-r--r--demo/plugins/cacheresource.memcache.php4
-rw-r--r--demo/plugins/cacheresource.mysql.php20
-rw-r--r--demo/plugins/cacheresource.pdo.php45
-rw-r--r--demo/plugins/resource.mysql.php6
-rw-r--r--demo/plugins/resource.mysqls.php5
-rw-r--r--libs/Autoloader.php8
-rw-r--r--libs/Smarty.class.php28
-rw-r--r--libs/SmartyBC.class.php3
-rw-r--r--libs/plugins/block.textformat.php4
-rw-r--r--libs/plugins/function.counter.php47
-rw-r--r--libs/plugins/function.cycle.php50
-rw-r--r--libs/plugins/function.fetch.php50
-rw-r--r--libs/plugins/function.html_checkboxes.php44
-rw-r--r--libs/plugins/function.html_image.php33
-rw-r--r--libs/plugins/function.html_options.php28
-rw-r--r--libs/plugins/function.html_radios.php37
-rw-r--r--libs/plugins/function.html_select_date.php82
-rw-r--r--libs/plugins/function.html_select_time.php94
-rw-r--r--libs/plugins/function.html_table.php14
-rw-r--r--libs/plugins/function.mailto.php42
-rw-r--r--libs/plugins/function.math.php29
-rw-r--r--libs/plugins/modifier.capitalize.php39
-rw-r--r--libs/plugins/modifier.debug_print_var.php5
-rw-r--r--libs/plugins/modifier.escape.php12
-rw-r--r--libs/plugins/modifier.regex_replace.php8
-rw-r--r--libs/plugins/modifier.truncate.php8
-rw-r--r--libs/plugins/modifiercompiler.count_characters.php8
-rw-r--r--libs/plugins/modifiercompiler.count_paragraphs.php2
-rw-r--r--libs/plugins/modifiercompiler.count_sentences.php2
-rw-r--r--libs/plugins/modifiercompiler.count_words.php5
-rw-r--r--libs/plugins/modifiercompiler.default.php6
-rw-r--r--libs/plugins/modifiercompiler.escape.php57
-rw-r--r--libs/plugins/modifiercompiler.from_charset.php8
-rw-r--r--libs/plugins/modifiercompiler.indent.php10
-rw-r--r--libs/plugins/modifiercompiler.lower.php4
-rw-r--r--libs/plugins/modifiercompiler.string_format.php2
-rw-r--r--libs/plugins/modifiercompiler.strip.php4
-rw-r--r--libs/plugins/modifiercompiler.strip_tags.php4
-rw-r--r--libs/plugins/modifiercompiler.to_charset.php8
-rw-r--r--libs/plugins/modifiercompiler.unescape.php22
-rw-r--r--libs/plugins/modifiercompiler.upper.php4
-rw-r--r--libs/plugins/modifiercompiler.wordwrap.php26
-rw-r--r--libs/plugins/outputfilter.trimwhitespace.php43
-rw-r--r--libs/plugins/shared.literal_compiler_param.php9
-rw-r--r--libs/plugins/shared.make_timestamp.php8
-rw-r--r--libs/plugins/shared.mb_str_replace.php2
-rw-r--r--libs/plugins/shared.mb_wordwrap.php8
-rw-r--r--libs/sysplugins/smarty_cacheresource.php17
-rw-r--r--libs/sysplugins/smarty_cacheresource_custom.php15
-rw-r--r--libs/sysplugins/smarty_cacheresource_keyvaluestore.php37
-rw-r--r--libs/sysplugins/smarty_data.php2
-rw-r--r--libs/sysplugins/smarty_internal_cacheresource_file.php12
-rw-r--r--libs/sysplugins/smarty_internal_compile_append.php12
-rw-r--r--libs/sysplugins/smarty_internal_compile_assign.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_block.php5
-rw-r--r--libs/sysplugins/smarty_internal_compile_break.php14
-rw-r--r--libs/sysplugins/smarty_internal_compile_call.php8
-rw-r--r--libs/sysplugins/smarty_internal_compile_capture.php16
-rw-r--r--libs/sysplugins/smarty_internal_compile_config_load.php33
-rw-r--r--libs/sysplugins/smarty_internal_compile_continue.php10
-rw-r--r--libs/sysplugins/smarty_internal_compile_debug.php3
-rw-r--r--libs/sysplugins/smarty_internal_compile_eval.php9
-rw-r--r--libs/sysplugins/smarty_internal_compile_extends.php14
-rw-r--r--libs/sysplugins/smarty_internal_compile_for.php38
-rw-r--r--libs/sysplugins/smarty_internal_compile_foreach.php4
-rw-r--r--libs/sysplugins/smarty_internal_compile_function.php75
-rw-r--r--libs/sysplugins/smarty_internal_compile_if.php114
-rw-r--r--libs/sysplugins/smarty_internal_compile_include.php97
-rw-r--r--libs/sysplugins/smarty_internal_compile_include_php.php10
-rw-r--r--libs/sysplugins/smarty_internal_compile_insert.php26
-rw-r--r--libs/sysplugins/smarty_internal_compile_ldelim.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_block_plugin.php9
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_foreachsection.php17
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_function_plugin.php16
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_modifier.php64
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_object_function.php22
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_php.php77
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_print_expression.php61
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_registered_block.php22
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_registered_function.php27
-rw-r--r--libs/sysplugins/smarty_internal_compile_private_special_variable.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_rdelim.php4
-rw-r--r--libs/sysplugins/smarty_internal_compile_section.php269
-rw-r--r--libs/sysplugins/smarty_internal_compile_setfilter.php8
-rw-r--r--libs/sysplugins/smarty_internal_compile_shared_inheritance.php6
-rw-r--r--libs/sysplugins/smarty_internal_compile_while.php53
-rw-r--r--libs/sysplugins/smarty_internal_compilebase.php36
-rw-r--r--libs/sysplugins/smarty_internal_config_file_compiler.php32
-rw-r--r--libs/sysplugins/smarty_internal_configfilelexer.php96
-rw-r--r--libs/sysplugins/smarty_internal_configfileparser.php270
-rw-r--r--libs/sysplugins/smarty_internal_data.php19
-rw-r--r--libs/sysplugins/smarty_internal_debug.php106
-rw-r--r--libs/sysplugins/smarty_internal_extension_clear.php10
-rw-r--r--libs/sysplugins/smarty_internal_extension_handler.php70
-rw-r--r--libs/sysplugins/smarty_internal_method_addautoloadfilters.php13
-rw-r--r--libs/sysplugins/smarty_internal_method_append.php16
-rw-r--r--libs/sysplugins/smarty_internal_method_appendbyref.php12
-rw-r--r--libs/sysplugins/smarty_internal_method_assignbyref.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_assignglobal.php12
-rw-r--r--libs/sysplugins/smarty_internal_method_clearassign.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_clearcache.php3
-rw-r--r--libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php17
-rw-r--r--libs/sysplugins/smarty_internal_method_clearconfig.php2
-rw-r--r--libs/sysplugins/smarty_internal_method_compileallconfig.php3
-rw-r--r--libs/sysplugins/smarty_internal_method_compilealltemplates.php9
-rw-r--r--libs/sysplugins/smarty_internal_method_configload.php28
-rw-r--r--libs/sysplugins/smarty_internal_method_getautoloadfilters.php2
-rw-r--r--libs/sysplugins/smarty_internal_method_getconfigvars.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_getdebugtemplate.php2
-rw-r--r--libs/sysplugins/smarty_internal_method_getregisteredobject.php6
-rw-r--r--libs/sysplugins/smarty_internal_method_gettags.php6
-rw-r--r--libs/sysplugins/smarty_internal_method_gettemplatevars.php28
-rw-r--r--libs/sysplugins/smarty_internal_method_loadfilter.php6
-rw-r--r--libs/sysplugins/smarty_internal_method_loadplugin.php32
-rw-r--r--libs/sysplugins/smarty_internal_method_mustcompile.php6
-rw-r--r--libs/sysplugins/smarty_internal_method_registercacheresource.php5
-rw-r--r--libs/sysplugins/smarty_internal_method_registerclass.php2
-rw-r--r--libs/sysplugins/smarty_internal_method_registerdefaulttemplatehandler.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_registerfilter.php8
-rw-r--r--libs/sysplugins/smarty_internal_method_registerobject.php7
-rw-r--r--libs/sysplugins/smarty_internal_method_registerplugin.php7
-rw-r--r--libs/sysplugins/smarty_internal_method_registerresource.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_setautoloadfilters.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_unloadfilter.php10
-rw-r--r--libs/sysplugins/smarty_internal_method_unregistercacheresource.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_unregisterfilter.php10
-rw-r--r--libs/sysplugins/smarty_internal_method_unregisterobject.php4
-rw-r--r--libs/sysplugins/smarty_internal_method_unregisterplugin.php10
-rw-r--r--libs/sysplugins/smarty_internal_method_unregisterresource.php8
-rw-r--r--libs/sysplugins/smarty_internal_nocache_insert.php6
-rw-r--r--libs/sysplugins/smarty_internal_parsetree_dq.php15
-rw-r--r--libs/sysplugins/smarty_internal_parsetree_template.php26
-rw-r--r--libs/sysplugins/smarty_internal_resource_file.php31
-rw-r--r--libs/sysplugins/smarty_internal_resource_php.php3
-rw-r--r--libs/sysplugins/smarty_internal_resource_registered.php6
-rw-r--r--libs/sysplugins/smarty_internal_runtime_cachemodify.php20
-rw-r--r--libs/sysplugins/smarty_internal_runtime_codeframe.php4
-rw-r--r--libs/sysplugins/smarty_internal_runtime_filterhandler.php10
-rw-r--r--libs/sysplugins/smarty_internal_runtime_getincludepath.php36
-rw-r--r--libs/sysplugins/smarty_internal_runtime_tplfunction.php26
-rw-r--r--libs/sysplugins/smarty_internal_runtime_updatecache.php12
-rw-r--r--libs/sysplugins/smarty_internal_runtime_writefile.php5
-rw-r--r--libs/sysplugins/smarty_internal_smartytemplatecompiler.php12
-rw-r--r--libs/sysplugins/smarty_internal_template.php12
-rw-r--r--libs/sysplugins/smarty_internal_templatebase.php15
-rw-r--r--libs/sysplugins/smarty_internal_templatecompilerbase.php32
-rw-r--r--libs/sysplugins/smarty_internal_templatelexer.php46
-rw-r--r--libs/sysplugins/smarty_internal_templateparser.php2006
-rw-r--r--libs/sysplugins/smarty_internal_testinstall.php319
-rw-r--r--libs/sysplugins/smarty_internal_undefined.php8
-rw-r--r--libs/sysplugins/smarty_resource.php39
-rw-r--r--libs/sysplugins/smarty_security.php70
-rw-r--r--libs/sysplugins/smarty_template_cached.php2
-rw-r--r--libs/sysplugins/smarty_template_compiled.php11
-rw-r--r--libs/sysplugins/smarty_template_config.php8
-rw-r--r--libs/sysplugins/smarty_template_resource_base.php10
-rw-r--r--libs/sysplugins/smarty_template_source.php10
-rw-r--r--libs/sysplugins/smarty_variable.php1
-rw-r--r--libs/sysplugins/smartycompilerexception.php3
-rw-r--r--libs/sysplugins/smartyexception.php1
163 files changed, 3259 insertions, 2713 deletions
diff --git a/change_log.txt b/change_log.txt
index 88584c03..79a12af5 100644
--- a/change_log.txt
+++ b/change_log.txt
@@ -1,6 +1,7 @@
 ===== 3.1.30-dev ===== (xx.xx.xx)
09.02.2016
- move some code from parser into compiler
+ - reformat all code for unique style
05.02.2016
- improvement internal compiler changes
diff --git a/demo/index.php b/demo/index.php
index 33f3035c..b67c217b 100644
--- a/demo/index.php
+++ b/demo/index.php
@@ -17,8 +17,8 @@ $smarty->cache_lifetime = 120;
$smarty->assign("Name", "Fred Irving Johnathan Bradley Peppergill", true);
$smarty->assign("FirstName", array("John", "Mary", "James", "Henry"));
$smarty->assign("LastName", array("Doe", "Smith", "Johnson", "Case"));
-$smarty->assign("Class", array(array("A", "B", "C", "D"), array("E", "F", "G", "H"),
- array("I", "J", "K", "L"), array("M", "N", "O", "P")));
+$smarty->assign("Class", array(array("A", "B", "C", "D"), array("E", "F", "G", "H"), array("I", "J", "K", "L"),
+ array("M", "N", "O", "P")));
$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
diff --git a/demo/plugins/cacheresource.apc.php b/demo/plugins/cacheresource.apc.php
index d7336f2b..ed55ec84 100644
--- a/demo/plugins/cacheresource.apc.php
+++ b/demo/plugins/cacheresource.apc.php
@@ -32,7 +32,7 @@ class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore
$_res = array();
$res = apc_fetch($keys);
foreach ($res as $k => $v) {
- $_res[$k] = $v;
+ $_res[ $k ] = $v;
}
return $_res;
diff --git a/demo/plugins/cacheresource.memcache.php b/demo/plugins/cacheresource.memcache.php
index 15bb073b..945beb34 100644
--- a/demo/plugins/cacheresource.memcache.php
+++ b/demo/plugins/cacheresource.memcache.php
@@ -43,12 +43,12 @@ class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore
foreach ($keys as $k) {
$_k = sha1($k);
$_keys[] = $_k;
- $lookup[$_k] = $k;
+ $lookup[ $_k ] = $k;
}
$_res = array();
$res = $this->memcache->get($_keys);
foreach ($res as $k => $v) {
- $_res[$lookup[$k]] = $v;
+ $_res[ $lookup[ $k ] ] = $v;
}
return $_res;
diff --git a/demo/plugins/cacheresource.mysql.php b/demo/plugins/cacheresource.mysql.php
index d8d00ab2..027b9376 100644
--- a/demo/plugins/cacheresource.mysql.php
+++ b/demo/plugins/cacheresource.mysql.php
@@ -26,8 +26,11 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
{
// PDO instance
protected $db;
+
protected $fetch;
+
protected $fetchTimestamp;
+
protected $save;
public function __construct()
@@ -62,8 +65,8 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
$row = $this->fetch->fetch();
$this->fetch->closeCursor();
if ($row) {
- $content = $row['content'];
- $mtime = strtotime($row['modified']);
+ $content = $row[ 'content' ];
+ $mtime = strtotime($row[ 'modified' ]);
} else {
$content = null;
$mtime = null;
@@ -105,13 +108,8 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
*/
protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content)
{
- $this->save->execute(array(
- 'id' => $id,
- 'name' => $name,
- 'cache_id' => $cache_id,
- 'compile_id' => $compile_id,
- 'content' => $content,
- ));
+ $this->save->execute(array('id' => $id, 'name' => $name, 'cache_id' => $cache_id, 'compile_id' => $compile_id,
+ 'content' => $content,));
return !!$this->save->rowCount();
}
@@ -151,8 +149,8 @@ class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom
}
// equal test cache_id and match sub-groups
if ($cache_id !== null) {
- $where[] = '(cache_id = ' . $this->db->quote($cache_id)
- . ' OR cache_id LIKE ' . $this->db->quote($cache_id . '|%') . ')';
+ $where[] = '(cache_id = ' . $this->db->quote($cache_id) . ' OR cache_id LIKE ' .
+ $this->db->quote($cache_id . '|%') . ')';
}
// run delete query
$query = $this->db->query('DELETE FROM output_cache WHERE ' . join(' AND ', $where));
diff --git a/demo/plugins/cacheresource.pdo.php b/demo/plugins/cacheresource.pdo.php
index 569193aa..d1e2d6ac 100644
--- a/demo/plugins/cacheresource.pdo.php
+++ b/demo/plugins/cacheresource.pdo.php
@@ -30,21 +30,21 @@
class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
{
- protected $fetchStatements = Array('default' => 'SELECT %2$s
+ protected $fetchStatements = Array('default' => 'SELECT %2$s
FROM %1$s
WHERE 1
AND id = :id
AND cache_id IS NULL
AND compile_id IS NULL',
- 'withCacheId' => 'SELECT %2$s
+ 'withCacheId' => 'SELECT %2$s
FROM %1$s
WHERE 1
AND id = :id
AND cache_id = :cache_id
AND compile_id IS NULL',
- 'withCompileId' => 'SELECT %2$s
+ 'withCompileId' => 'SELECT %2$s
FROM %1$s
WHERE 1
AND id = :id
@@ -57,6 +57,7 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
AND id = :id
AND cache_id = :cache_id
AND compile_id = :compile_id');
+
protected $insertStatement = 'INSERT INTO %s
SET id = :id,
@@ -76,9 +77,11 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
content = :content';
protected $deleteStatement = 'DELETE FROM %1$s WHERE %2$s';
+
protected $truncateStatement = 'TRUNCATE TABLE %s';
protected $fetchColumns = 'modified, content';
+
protected $fetchTimestampColumns = 'modified';
protected $pdo, $table, $database;
@@ -137,13 +140,15 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
{
if (!is_null($cache_id) && !is_null($compile_id)) {
- $query = $this->fetchStatements['withCacheIdAndCompileId'] AND $args = Array('id' => $id, 'cache_id' => $cache_id, 'compile_id' => $compile_id);
+ $query = $this->fetchStatements[ 'withCacheIdAndCompileId' ] AND
+ $args = Array('id' => $id, 'cache_id' => $cache_id, 'compile_id' => $compile_id);
} elseif (is_null($cache_id) && !is_null($compile_id)) {
- $query = $this->fetchStatements['withCompileId'] AND $args = Array('id' => $id, 'compile_id' => $compile_id);
+ $query = $this->fetchStatements[ 'withCompileId' ] AND
+ $args = Array('id' => $id, 'compile_id' => $compile_id);
} elseif (!is_null($cache_id) && is_null($compile_id)) {
- $query = $this->fetchStatements['withCacheId'] AND $args = Array('id' => $id, 'cache_id' => $cache_id);
+ $query = $this->fetchStatements[ 'withCacheId' ] AND $args = Array('id' => $id, 'cache_id' => $cache_id);
} else {
- $query = $this->fetchStatements['default'] AND $args = Array('id' => $id);
+ $query = $this->fetchStatements[ 'default' ] AND $args = Array('id' => $id);
}
$query = sprintf($query, $columns);
@@ -174,13 +179,13 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
{
$stmt = $this->getFetchStatement($this->fetchColumns, $id, $cache_id, $compile_id);
- $stmt ->execute();
+ $stmt->execute();
$row = $stmt->fetch();
- $stmt ->closeCursor();
+ $stmt->closeCursor();
if ($row) {
- $content = $this->outputContent($row['content']);
- $mtime = strtotime($row['modified']);
+ $content = $this->outputContent($row[ 'content' ]);
+ $mtime = strtotime($row[ 'modified' ]);
} else {
$content = null;
$mtime = null;
@@ -226,13 +231,13 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
$stmt = $this->pdo->prepare($this->insertStatement);
- $stmt ->bindValue('id', $id);
- $stmt ->bindValue('name', $name);
- $stmt ->bindValue('cache_id', $cache_id, (is_null($cache_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR);
- $stmt ->bindValue('compile_id', $compile_id, (is_null($compile_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR);
- $stmt ->bindValue('expire', (int) $exp_time, PDO::PARAM_INT);
- $stmt ->bindValue('content', $this->inputContent($content));
- $stmt ->execute();
+ $stmt->bindValue('id', $id);
+ $stmt->bindValue('name', $name);
+ $stmt->bindValue('cache_id', $cache_id, (is_null($cache_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR);
+ $stmt->bindValue('compile_id', $compile_id, (is_null($compile_id)) ? PDO::PARAM_NULL : PDO::PARAM_STR);
+ $stmt->bindValue('expire', (int) $exp_time, PDO::PARAM_INT);
+ $stmt->bindValue('content', $this->inputContent($content));
+ $stmt->execute();
return !!$stmt->rowCount();
}
@@ -289,8 +294,8 @@ class Smarty_CacheResource_Pdo extends Smarty_CacheResource_Custom
}
// equal test cache_id and match sub-groups
if ($cache_id !== null) {
- $where[] = '(cache_id = ' . $this->pdo->quote($cache_id)
- . ' OR cache_id LIKE ' . $this->pdo->quote($cache_id . '|%') . ')';
+ $where[] = '(cache_id = ' . $this->pdo->quote($cache_id) . ' OR cache_id LIKE ' .
+ $this->pdo->quote($cache_id . '|%') . ')';
}
// equal test compile_id
if ($compile_id !== null) {
diff --git a/demo/plugins/resource.mysql.php b/demo/plugins/resource.mysql.php
index dfc9606b..619707e7 100644
--- a/demo/plugins/resource.mysql.php
+++ b/demo/plugins/resource.mysql.php
@@ -21,8 +21,10 @@ class Smarty_Resource_Mysql extends Smarty_Resource_Custom
{
// PDO instance
protected $db;
+
// prepared fetch() statement
protected $fetch;
+
// prepared fetchTimestamp() statement
protected $mtime;
@@ -53,8 +55,8 @@ class Smarty_Resource_Mysql extends Smarty_Resource_Custom
$row = $this->fetch->fetch();
$this->fetch->closeCursor();
if ($row) {
- $source = $row['source'];
- $mtime = strtotime($row['modified']);
+ $source = $row[ 'source' ];
+ $mtime = strtotime($row[ 'modified' ]);
} else {
$source = null;
$mtime = null;
diff --git a/demo/plugins/resource.mysqls.php b/demo/plugins/resource.mysqls.php
index f694ddf1..d85aecf3 100644
--- a/demo/plugins/resource.mysqls.php
+++ b/demo/plugins/resource.mysqls.php
@@ -23,6 +23,7 @@ class Smarty_Resource_Mysqls extends Smarty_Resource_Custom
{
// PDO instance
protected $db;
+
// prepared fetch() statement
protected $fetch;
@@ -52,8 +53,8 @@ class Smarty_Resource_Mysqls extends Smarty_Resource_Custom
$row = $this->fetch->fetch();
$this->fetch->closeCursor();
if ($row) {
- $source = $row['source'];
- $mtime = strtotime($row['modified']);
+ $source = $row[ 'source' ];
+ $mtime = strtotime($row[ 'modified' ]);
} else {
$source = null;
$mtime = null;
diff --git a/libs/Autoloader.php b/libs/Autoloader.php
index 7d0c388a..c713ac61 100644
--- a/libs/Autoloader.php
+++ b/libs/Autoloader.php
@@ -57,7 +57,7 @@ class Smarty_Autoloader
set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false
) {
$registeredAutoLoadFunctions = spl_autoload_functions();
- if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {
+ if (!isset($registeredAutoLoadFunctions[ 'spl_autoload' ])) {
spl_autoload_register();
}
} else {
@@ -103,11 +103,11 @@ class Smarty_Autoloader
}
if (preg_match('/^(smarty_(((template_(source|config|cache|compiled|resource_base))|((cached|compiled)?resource)|(variable|security)))|(smarty(bc)?)$)/',
$_class, $match)) {
- if (!empty($match[3])) {
+ if (!empty($match[ 3 ])) {
@include $file;
return;
- } elseif (!empty($match[9]) && isset(self::$rootClasses[$_class])) {
- $file = self::$rootClasses[$_class];
+ } elseif (!empty($match[ 9 ]) && isset(self::$rootClasses[ $_class ])) {
+ $file = self::$rootClasses[ $_class ];
require $file;
return;
}
diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php
index 73598d1c..f10d345a 100644
--- a/libs/Smarty.class.php
+++ b/libs/Smarty.class.php
@@ -684,8 +684,8 @@ class Smarty extends Smarty_Internal_TemplateBase
* @var string[]
*/
private $accessMap = array('template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir',
- 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir',
- 'cache_dir' => 'CacheDir',);
+ 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir',
+ 'cache_dir' => 'CacheDir',);
/**#@-*/
@@ -1144,12 +1144,13 @@ class Smarty extends Smarty_Internal_TemplateBase
if (strpos($path, $nds) !== false) {
$path = str_replace($nds, DS, $path);
}
- preg_match('%^(?<root>(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(?:[[:print:]]*))$%', $path, $parts);
- $path = $parts['path'];
- if ($parts['root'] == '\\') {
- $parts['root'] = substr(getcwd(), 0, 2) . $parts['root'];
+ preg_match('%^(?<root>(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(?:[[:print:]]*))$%',
+ $path, $parts);
+ $path = $parts[ 'path' ];
+ if ($parts[ 'root' ] == '\\') {
+ $parts[ 'root' ] = substr(getcwd(), 0, 2) . $parts[ 'root' ];
} else {
- if ($realpath !== null && !$parts['root']) {
+ if ($realpath !== null && !$parts[ 'root' ]) {
$path = getcwd() . DS . $path;
}
}
@@ -1159,15 +1160,16 @@ class Smarty extends Smarty_Internal_TemplateBase
preg_replace('#([\\\\/][^\\\\/]+[\\\\/]([.]?[\\\\/])*[.][.][\\\\/]([.]?[\\\\/])*)+|([\\\\/]([.]?[\\\\/])+)#',
DS, $path, - 1, $count);
}
- return $parts['root'] . $path;
+ return $parts[ 'root' ] . $path;
}
/**
* Empty template objects cache
*/
- public function _clearTemplateCache() {
- $this->_cache['isCached'] = array();
- $this->_cache['tplObjects'] = array();
+ public function _clearTemplateCache()
+ {
+ $this->_cache[ 'isCached' ] = array();
+ $this->_cache[ 'tplObjects' ] = array();
}
/**
@@ -1345,7 +1347,7 @@ class Smarty extends Smarty_Internal_TemplateBase
if (isset($this->accessMap[ $name ])) {
$method = 'set' . $this->accessMap[ $name ];
$this->{$method}($value);
- } elseif (in_array($name, $this->obsoleteProperties)) {
+ } elseif (in_array($name, $this->obsoleteProperties)) {
return;
} else {
if (is_object($value) && method_exists($value, $name)) {
@@ -1399,7 +1401,7 @@ class Smarty extends Smarty_Internal_TemplateBase
break;
}
}
- // pass to next error handler if this error did not occur inside SMARTY_DIR
+ // pass to next error handler if this error did not occur inside SMARTY_DIR
// or the error was within smarty but masked to be ignored
if (!$_is_muted_directory || ($errno && $errno & error_reporting())) {
if (Smarty::$_previous_error_handler) {
diff --git a/libs/SmartyBC.class.php b/libs/SmartyBC.class.php
index f50792ed..3955e4f2 100644
--- a/libs/SmartyBC.class.php
+++ b/libs/SmartyBC.class.php
@@ -128,7 +128,8 @@ class SmartyBC extends Smarty
* @throws SmartyException
* @internal param array $block_functs list of methods that are block format
*/
- public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
+ public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true,
+ $block_methods = array())
{
settype($allowed, 'array');
settype($smarty_args, 'boolean');
diff --git a/libs/plugins/block.textformat.php b/libs/plugins/block.textformat.php
index abf54493..e9f5fe2d 100644
--- a/libs/plugins/block.textformat.php
+++ b/libs/plugins/block.textformat.php
@@ -83,7 +83,9 @@ function smarty_block_textformat($params, $content, $template, &$repeat)
continue;
}
// convert mult. spaces & special chars to single space
- $_paragraph = preg_replace(array('!\s+!' . Smarty::$_UTF8_MODIFIER, '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER), array(' ', ''), $_paragraph);
+ $_paragraph =
+ preg_replace(array('!\s+!' . Smarty::$_UTF8_MODIFIER, '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER),
+ array(' ', ''), $_paragraph);
// indent first line
if ($indent_first > 0) {
$_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph;
diff --git a/libs/plugins/function.counter.php b/libs/plugins/function.counter.php
index 4da85a14..bcc8f498 100644
--- a/libs/plugins/function.counter.php
+++ b/libs/plugins/function.counter.php
@@ -25,53 +25,48 @@ function smarty_function_counter($params, $template)
{
static $counters = array();
- $name = (isset($params['name'])) ? $params['name'] : 'default';
- if (!isset($counters[$name])) {
- $counters[$name] = array(
- 'start' => 1,
- 'skip' => 1,
- 'direction' => 'up',
- 'count' => 1
- );
+ $name = (isset($params[ 'name' ])) ? $params[ 'name' ] : 'default';
+ if (!isset($counters[ $name ])) {
+ $counters[ $name ] = array('start' => 1, 'skip' => 1, 'direction' => 'up', 'count' => 1);
}
- $counter =& $counters[$name];
+ $counter =& $counters[ $name ];
- if (isset($params['start'])) {
- $counter['start'] = $counter['count'] = (int) $params['start'];
+ if (isset($params[ 'start' ])) {
+ $counter[ 'start' ] = $counter[ 'count' ] = (int) $params[ 'start' ];
}
- if (!empty($params['assign'])) {
- $counter['assign'] = $params['assign'];
+ if (!empty($params[ 'assign' ])) {
+ $counter[ 'assign' ] = $params[ 'assign' ];
}
- if (isset($counter['assign'])) {
- $template->assign($counter['assign'], $counter['count']);
+ if (isset($counter[ 'assign' ])) {
+ $template->assign($counter[ 'assign' ], $counter[ 'count' ]);
}
- if (isset($params['print'])) {
- $print = (bool) $params['print'];
+ if (isset($params[ 'print' ])) {
+ $print = (bool) $params[ 'print' ];
} else {
- $print = empty($counter['assign']);
+ $print = empty($counter[ 'assign' ]);
}
if ($print) {
- $retval = $counter['count'];
+ $retval = $counter[ 'count' ];
} else {
$retval = null;
}
- if (isset($params['skip'])) {
- $counter['skip'] = $params['skip'];
+ if (isset($params[ 'skip' ])) {
+ $counter[ 'skip' ] = $params[ 'skip' ];
}
- if (isset($params['direction'])) {
- $counter['direction'] = $params['direction'];
+ if (isset($params[ 'direction' ])) {
+ $counter[ 'direction' ] = $params[ 'direction' ];
}
- if ($counter['direction'] == "down") {
- $counter['count'] -= $counter['skip'];
+ if ($counter[ 'direction' ] == "down") {
+ $counter[ 'count' ] -= $counter[ 'skip' ];
} else {
- $counter['count'] += $counter['skip'];
+ $counter[ 'count' ] += $counter[ 'skip' ];
}
return $retval;
diff --git a/libs/plugins/function.cycle.php b/libs/plugins/function.cycle.php
index 8dc5cd9d..a76d49ae 100644
--- a/libs/plugins/function.cycle.php
+++ b/libs/plugins/function.cycle.php
@@ -48,58 +48,56 @@ function smarty_function_cycle($params, $template)
{
static $cycle_vars;
- $name = (empty($params['name'])) ? 'default' : $params['name'];
- $print = (isset($params['print'])) ? (bool) $params['print'] : true;
- $advance = (isset($params['advance'])) ? (bool) $params['advance'] : true;
- $reset = (isset($params['reset'])) ? (bool) $params['reset'] : false;
+ $name = (empty($params[ 'name' ])) ? 'default' : $params[ 'name' ];
+ $print = (isset($params[ 'print' ])) ? (bool) $params[ 'print' ] : true;
+ $advance = (isset($params[ 'advance' ])) ? (bool) $params[ 'advance' ] : true;
+ $reset = (isset($params[ 'reset' ])) ? (bool) $params[ 'reset' ] : false;
- if (!isset($params['values'])) {
- if (!isset($cycle_vars[$name]['values'])) {
+ if (!isset($params[ 'values' ])) {
+ if (!isset($cycle_vars[ $name ][ 'values' ])) {
trigger_error("cycle: missing 'values' parameter");
return;
}
} else {
- if (isset($cycle_vars[$name]['values'])
- && $cycle_vars[$name]['values'] != $params['values']
- ) {
- $cycle_vars[$name]['index'] = 0;
+ if (isset($cycle_vars[ $name ][ 'values' ]) && $cycle_vars[ $name ][ 'values' ] != $params[ 'values' ]) {
+ $cycle_vars[ $name ][ 'index' ] = 0;
}
- $cycle_vars[$name]['values'] = $params['values'];
+ $cycle_vars[ $name ][ 'values' ] = $params[ 'values' ];
}
- if (isset($params['delimiter'])) {
- $cycle_vars[$name]['delimiter'] = $params['delimiter'];
- } elseif (!isset($cycle_vars[$name]['delimiter'])) {
- $cycle_vars[$name]['delimiter'] = ',';
+ if (isset($params[ 'delimiter' ])) {
+ $cycle_vars[ $name ][ 'delimiter' ] = $params[ 'delimiter' ];
+ } elseif (!isset($cycle_vars[ $name ][ 'delimiter' ])) {
+ $cycle_vars[ $name ][ 'delimiter' ] = ',';
}
- if (is_array($cycle_vars[$name]['values'])) {
- $cycle_array = $cycle_vars[$name]['values'];
+ if (is_array($cycle_vars[ $name ][ 'values' ])) {
+ $cycle_array = $cycle_vars[ $name ][ 'values' ];
} else {
- $cycle_array = explode($cycle_vars[$name]['delimiter'], $cycle_vars[$name]['values']);
+ $cycle_array = explode($cycle_vars[ $name ][ 'delimiter' ], $cycle_vars[ $name ][ 'values' ]);
}
- if (!isset($cycle_vars[$name]['index']) || $reset) {
- $cycle_vars[$name]['index'] = 0;
+ if (!isset($cycle_vars[ $name ][ 'index' ]) || $reset) {
+ $cycle_vars[ $name ][ 'index' ] = 0;
}
- if (isset($params['assign'])) {
+ if (isset($params[ 'assign' ])) {
$print = false;
- $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
+ $template->assign($params[ 'assign' ], $cycle_array[ $cycle_vars[ $name ][ 'index' ] ]);
}
if ($print) {
- $retval = $cycle_array[$cycle_vars[$name]['index']];
+ $retval = $cycle_array[ $cycle_vars[ $name ][ 'index' ] ];
} else {
$retval = null;
}
if ($advance) {
- if ($cycle_vars[$name]['index'] >= count($cycle_array) - 1) {
- $cycle_vars[$name]['index'] = 0;
+ if ($cycle_vars[ $name ][ 'index' ] >= count($cycle_array) - 1) {
+ $cycle_vars[ $name ][ 'index' ] = 0;
} else {
- $cycle_vars[$name]['index'] ++;
+ $cycle_vars[ $name ][ 'index' ] ++;
}
}
diff --git a/libs/plugins/function.fetch.php b/libs/plugins/function.fetch.php
index 3506d4a8..cb60dd91 100644
--- a/libs/plugins/function.fetch.php
+++ b/libs/plugins/function.fetch.php
@@ -24,31 +24,31 @@
*/
function smarty_function_fetch($params, $template)
{
- if (empty($params['file'])) {
+ if (empty($params[ 'file' ])) {
trigger_error("[plugin] fetch parameter 'file' cannot be empty", E_USER_NOTICE);
return;
}
// strip file protocol
- if (stripos($params['file'], 'file://') === 0) {
- $params['file'] = substr($params['file'], 7);
+ if (stripos($params[ 'file' ], 'file://') === 0) {
+ $params[ 'file' ] = substr($params[ 'file' ], 7);
}
- $protocol = strpos($params['file'], '://');
+ $protocol = strpos($params[ 'file' ], '://');
if ($protocol !== false) {
- $protocol = strtolower(substr($params['file'], 0, $protocol));
+ $protocol = strtolower(substr($params[ 'file' ], 0, $protocol));
}
if (isset($template->smarty->security_policy)) {
if ($protocol) {
// remote resource (or php stream, …)
- if (!$template->smarty->security_policy->isTrustedUri($params['file'])) {
+ if (!$template->smarty->security_policy->isTrustedUri($params[ 'file' ])) {
return;
}
} else {
// local file
- if (!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) {
+ if (!$template->smarty->security_policy->isTrustedResourceDir($params[ 'file' ])) {
return;
}
}
@@ -57,26 +57,26 @@ function smarty_function_fetch($params, $template)
$content = '';
if ($protocol == 'http') {
// http fetch
- if ($uri_parts = parse_url($params['file'])) {
+ if ($uri_parts = parse_url($params[ 'file' ])) {
// set defaults
- $host = $server_name = $uri_parts['host'];
+ $host = $server_name = $uri_parts[ 'host' ];
$timeout = 30;
$accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
$agent = "Smarty Template Engine " . Smarty::SMARTY_VERSION;
$referer = "";
- $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
- $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
+ $uri = !empty($uri_parts[ 'path' ]) ? $uri_parts[ 'path' ] : '/';
+ $uri .= !empty($uri_parts[ 'query' ]) ? '?' . $uri_parts[ 'query' ] : '';
$_is_proxy = false;
- if (empty($uri_parts['port'])) {
+ if (empty($uri_parts[ 'port' ])) {
$port = 80;
} else {
- $port = $uri_parts['port'];
+ $port = $uri_parts[ 'port' ];
}
- if (!empty($uri_parts['user'])) {
- $user = $uri_parts['user'];
+ if (!empty($uri_parts[ 'user' ])) {
+ $user = $uri_parts[ 'user' ];
}
- if (!empty($uri_parts['pass'])) {
- $pass = $uri_parts['pass'];
+ if (!empty($uri_parts[ 'pass' ])) {
+ $pass = $uri_parts[ 'pass' ];
}
// loop through parameters, setup headers
foreach ($params as $param_key => $param_value) {
@@ -163,7 +163,7 @@ function smarty_function_fetch($params, $template)
return;
} else {
if ($_is_proxy) {
- fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
+ fputs($fp, 'GET ' . $params[ 'file' ] . " HTTP/1.0\r\n");
} else {
fputs($fp, "GET $uri HTTP/1.0\r\n");
}
@@ -195,10 +195,10 @@ function smarty_function_fetch($params, $template)
fclose($fp);
$csplit = preg_split("!\r\n\r\n!", $content, 2);
- $content = $csplit[1];
+ $content = $csplit[ 1 ];
- if (!empty($params['assign_headers'])) {
- $template->assign($params['assign_headers'], preg_split("!\r\n!", $csplit[0]));
+ if (!empty($params[ 'assign_headers' ])) {
+ $template->assign($params[ 'assign_headers' ], preg_split("!\r\n!", $csplit[ 0 ]));
}
}
} else {
@@ -207,14 +207,14 @@ function smarty_function_fetch($params, $template)
return;
}
} else {
- $content = @file_get_contents($params['file']);
+ $content = @file_get_contents($params[ 'file' ]);
if ($content === false) {
- throw new SmartyException("{fetch} cannot read resource '" . $params['file'] . "'");
+ throw new SmartyException("{fetch} cannot read resource '" . $params[ 'file' ] . "'");
}
}
- if (!empty($params['assign'])) {
- $template->assign($params['assign'], $content);
+ if (!empty($params[ 'assign' ])) {
+ $template->assign($params[ 'assign' ], $content);
} else {
return $content;
}
diff --git a/libs/plugins/function.html_checkboxes.php b/libs/plugins/function.html_checkboxes.php
index d7868036..33f2efe1 100644
--- a/libs/plugins/function.html_checkboxes.php
+++ b/libs/plugins/function.html_checkboxes.php
@@ -90,19 +90,21 @@ function smarty_function_html_checkboxes($params, $template)
if (method_exists($_sel, "__toString")) {
$_sel = smarty_function_escape_special_chars((string) $_sel->__toString());
} else {
- trigger_error("html_checkboxes: selected attribute contains an object of class '" . get_class($_sel) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_checkboxes: selected attribute contains an object of class '" .
+ get_class($_sel) . "' without __toString() method", E_USER_NOTICE);
continue;
}
} else {
$_sel = smarty_function_escape_special_chars((string) $_sel);
}
- $selected[$_sel] = true;
+ $selected[ $_sel ] = true;
}
} elseif (is_object($_val)) {
if (method_exists($_val, "__toString")) {
$selected = smarty_function_escape_special_chars((string) $_val->__toString());
} else {
- trigger_error("html_checkboxes: selected attribute is an object of class '" . get_class($_val) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_checkboxes: selected attribute is an object of class '" . get_class($_val) .
+ "' without __toString() method", E_USER_NOTICE);
}
} else {
$selected = smarty_function_escape_special_chars((string) $_val);
@@ -110,7 +112,8 @@ function smarty_function_html_checkboxes($params, $template)
break;
case 'checkboxes':
- trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead',
+ E_USER_WARNING);
$options = (array) $_val;
break;
@@ -122,9 +125,10 @@ function smarty_function_html_checkboxes($params, $template)
case 'disabled':
case 'readonly':
- if (!empty($params['strict'])) {
+ if (!empty($params[ 'strict' ])) {
if (!is_scalar($_val)) {
- trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE);
+ trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute",
+ E_USER_NOTICE);
}
if ($_val === true || $_val === $_key) {
@@ -153,23 +157,28 @@ function smarty_function_html_checkboxes($params, $template)
if (isset($options)) {
foreach ($options as $_key => $_val) {
- $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ $_html_result[] =
+ smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels,
+ $label_ids, $escape);
}
} else {
foreach ($values as $_i => $_key) {
- $_val = isset($output[$_i]) ? $output[$_i] : '';
- $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ $_val = isset($output[ $_i ]) ? $output[ $_i ] : '';
+ $_html_result[] =
+ smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels,
+ $label_ids, $escape);
}
}
- if (!empty($params['assign'])) {
- $template->assign($params['assign'], $_html_result);
+ if (!empty($params[ 'assign' ])) {
+ $template->assign($params[ 'assign' ], $_html_result);
} else {
return implode("\n", $_html_result);
}
}
-function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape = true)
+function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels,
+ $label_ids, $escape = true)
{
$_output = '';
@@ -177,7 +186,8 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte
if (method_exists($value, "__toString")) {
$value = (string) $value->__toString();
} else {
- trigger_error("html_options: value is an object of class '" . get_class($value) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_options: value is an object of class '" . get_class($value) .
+ "' without __toString() method", E_USER_NOTICE);
return '';
}
@@ -189,7 +199,8 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte
if (method_exists($output, "__toString")) {
$output = (string) $output->__toString();
} else {
- trigger_error("html_options: output is an object of class '" . get_class($output) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_options: output is an object of class '" . get_class($output) .
+ "' without __toString() method", E_USER_NOTICE);
return '';
}
@@ -199,7 +210,8 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte
if ($labels) {
if ($label_ids) {
- $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value));
+ $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_',
+ $name . '_' . $value));
$_output .= '<label for="' . $_id . '">';
} else {
$_output .= '<label>';
@@ -219,7 +231,7 @@ function smarty_function_html_checkboxes_output($name, $value, $output, $selecte
}
if (is_array($selected)) {
- if (isset($selected[$value])) {
+ if (isset($selected[ $value ])) {
$_output .= ' checked="checked"';
}
} elseif ($value === $selected) {
diff --git a/libs/plugins/function.html_image.php b/libs/plugins/function.html_image.php
index 5037e8bd..854af61b 100644
--- a/libs/plugins/function.html_image.php
+++ b/libs/plugins/function.html_image.php
@@ -48,7 +48,7 @@ function smarty_function_html_image($params, $template)
$prefix = '';
$suffix = '';
$path_prefix = '';
- $basedir = isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : '';
+ $basedir = isset($_SERVER[ 'DOCUMENT_ROOT' ]) ? $_SERVER[ 'DOCUMENT_ROOT' ] : '';
foreach ($params as $_key => $_val) {
switch ($_key) {
case 'file':
@@ -90,26 +90,26 @@ function smarty_function_html_image($params, $template)
return;
}
- if ($file[0] == '/') {
+ if ($file[ 0 ] == '/') {
$_image_path = $basedir . $file;
} else {
$_image_path = $file;
}
// strip file protocol
- if (stripos($params['file'], 'file://') === 0) {
- $params['file'] = substr($params['file'], 7);
+ if (stripos($params[ 'file' ], 'file://') === 0) {
+ $params[ 'file' ] = substr($params[ 'file' ], 7);
}
- $protocol = strpos($params['file'], '://');
+ $protocol = strpos($params[ 'file' ], '://');
if ($protocol !== false) {
- $protocol = strtolower(substr($params['file'], 0, $protocol));
+ $protocol = strtolower(substr($params[ 'file' ], 0, $protocol));
}
if (isset($template->smarty->security_policy)) {
if ($protocol) {
// remote resource (or php stream, …)
- if (!$template->smarty->security_policy->isTrustedUri($params['file'])) {
+ if (!$template->smarty->security_policy->isTrustedUri($params[ 'file' ])) {
return;
}
} else {
@@ -120,7 +120,7 @@ function smarty_function_html_image($params, $template)
}
}
- if (!isset($params['width']) || !isset($params['height'])) {
+ if (!isset($params[ 'width' ]) || !isset($params[ 'height' ])) {
// FIXME: (rodneyrehm) getimagesize() loads the complete file off a remote resource, use custom [jpg,png,gif]header reader!
if (!$_image_data = @getimagesize($_image_path)) {
if (!file_exists($_image_path)) {
@@ -138,26 +138,27 @@ function smarty_function_html_image($params, $template)
}
}
- if (!isset($params['width'])) {
- $width = $_image_data[0];
+ if (!isset($params[ 'width' ])) {
+ $width = $_image_data[ 0 ];
}
- if (!isset($params['height'])) {
- $height = $_image_data[1];
+ if (!isset($params[ 'height' ])) {
+ $height = $_image_data[ 1 ];
}
}
- if (isset($params['dpi'])) {
- if (strstr($_SERVER['HTTP_USER_AGENT'], 'Mac')) {
+ if (isset($params[ 'dpi' ])) {
+ if (strstr($_SERVER[ 'HTTP_USER_AGENT' ], 'Mac')) {
// FIXME: (rodneyrehm) wrong dpi assumption
// don't know who thought this up… even if it was true in 1998, it's definitely wrong in 2011.
$dpi_default = 72;
} else {
$dpi_default = 96;
}
- $_resize = $dpi_default / $params['dpi'];
+ $_resize = $dpi_default / $params[ 'dpi' ];
$width = round($width * $_resize);
$height = round($height * $_resize);
}
- return $prefix . '<img src="' . $path_prefix . $file . '" alt="' . $alt . '" width="' . $width . '" height="' . $height . '"' . $extra . ' />' . $suffix;
+ return $prefix . '<img src="' . $path_prefix . $file . '" alt="' . $alt . '" width="' . $width . '" height="' .
+ $height . '"' . $extra . ' />' . $suffix;
}
diff --git a/libs/plugins/function.html_options.php b/libs/plugins/function.html_options.php
index 7ec3e065..20e66771 100644
--- a/libs/plugins/function.html_options.php
+++ b/libs/plugins/function.html_options.php
@@ -72,19 +72,21 @@ function smarty_function_html_options($params)
if (method_exists($_sel, "__toString")) {
$_sel = smarty_function_escape_special_chars((string) $_sel->__toString());
} else {
- trigger_error("html_options: selected attribute contains an object of class '" . get_class($_sel) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_options: selected attribute contains an object of class '" .
+ get_class($_sel) . "' without __toString() method", E_USER_NOTICE);
continue;
}
} else {
$_sel = smarty_function_escape_special_chars((string) $_sel);
}
- $selected[$_sel] = true;
+ $selected[ $_sel ] = true;
}
} elseif (is_object($_val)) {
if (method_exists($_val, "__toString")) {
$selected = smarty_function_escape_special_chars((string) $_val->__toString());
} else {
- trigger_error("html_options: selected attribute is an object of class '" . get_class($_val) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_options: selected attribute is an object of class '" . get_class($_val) .
+ "' without __toString() method", E_USER_NOTICE);
}
} else {
$selected = smarty_function_escape_special_chars((string) $_val);
@@ -96,9 +98,10 @@ function smarty_function_html_options($params)
case 'disabled':
case 'readonly':
- if (!empty($params['strict'])) {
+ if (!empty($params[ 'strict' ])) {
if (!is_scalar($_val)) {
- trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE);
+ trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute",
+ E_USER_NOTICE);
}
if ($_val === true || $_val === $_key) {
@@ -134,7 +137,7 @@ function smarty_function_html_options($params)
}
} else {
foreach ($values as $_i => $_key) {
- $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_val = isset($output[ $_i ]) ? $output[ $_i ] : '';
$_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);
}
}
@@ -142,7 +145,9 @@ function smarty_function_html_options($params)
if (!empty($name)) {
$_html_class = !empty($class) ? ' class="' . $class . '"' : '';
$_html_id = !empty($id) ? ' id="' . $id . '"' : '';
- $_html_result = '<select name="' . $name . '"' . $_html_class . $_html_id . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
+ $_html_result =
+ '<select name="' . $name . '"' . $_html_class . $_html_id . $extra . '>' . "\n" . $_html_result .
+ '</select>' . "\n";
}
return $_html_result;
@@ -154,7 +159,7 @@ function smarty_function_html_options_optoutput($key, $value, $selected, $id, $c
$_key = smarty_function_escape_special_chars($key);
$_html_result = '<option value="' . $_key . '"';
if (is_array($selected)) {
- if (isset($selected[$_key])) {
+ if (isset($selected[ $_key ])) {
$_html_result .= ' selected="selected"';
}
} elseif ($_key === $selected) {
@@ -166,7 +171,8 @@ function smarty_function_html_options_optoutput($key, $value, $selected, $id, $c
if (method_exists($value, "__toString")) {
$value = smarty_function_escape_special_chars((string) $value->__toString());
} else {
- trigger_error("html_options: value is an object of class '" . get_class($value) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_options: value is an object of class '" . get_class($value) .
+ "' without __toString() method", E_USER_NOTICE);
return '';
}
@@ -177,7 +183,9 @@ function smarty_function_html_options_optoutput($key, $value, $selected, $id, $c
$idx ++;
} else {
$_idx = 0;
- $_html_result = smarty_function_html_options_optgroup($key, $value, $selected, !empty($id) ? ($id . '-' . $idx) : null, $class, $_idx);
+ $_html_result =
+ smarty_function_html_options_optgroup($key, $value, $selected, !empty($id) ? ($id . '-' . $idx) : null,
+ $class, $_idx);
$idx ++;
}
diff --git a/libs/plugins/function.html_radios.php b/libs/plugins/function.html_radios.php
index f121d5ea..53b342de 100644
--- a/libs/plugins/function.html_radios.php
+++ b/libs/plugins/function.html_radios.php
@@ -73,7 +73,8 @@ function smarty_function_html_radios($params, $template)
if (method_exists($_val, "__toString")) {
$selected = smarty_function_escape_special_chars((string) $_val->__toString());
} else {
- trigger_error("html_radios: selected attribute is an object of class '" . get_class($_val) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_radios: selected attribute is an object of class '" . get_class($_val) .
+ "' without __toString() method", E_USER_NOTICE);
}
} else {
$selected = (string) $_val;
@@ -96,7 +97,8 @@ function smarty_function_html_radios($params, $template)
break;
case 'radios':
- trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead',
+ E_USER_WARNING);
$options = (array) $_val;
break;
@@ -108,9 +110,10 @@ function smarty_function_html_radios($params, $template)
case 'disabled':
case 'readonly':
- if (!empty($params['strict'])) {
+ if (!empty($params[ 'strict' ])) {
if (!is_scalar($_val)) {
- trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute", E_USER_NOTICE);
+ trigger_error("html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute",
+ E_USER_NOTICE);
}
if ($_val === true || $_val === $_key) {
@@ -141,23 +144,28 @@ function smarty_function_html_radios($params, $template)
if (isset($options)) {
foreach ($options as $_key => $_val) {
- $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ $_html_result[] =
+ smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels,
+ $label_ids, $escape);
}
} else {
foreach ($values as $_i => $_key) {
- $_val = isset($output[$_i]) ? $output[$_i] : '';
- $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ $_val = isset($output[ $_i ]) ? $output[ $_i ] : '';
+ $_html_result[] =
+ smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels,
+ $label_ids, $escape);
}
}
- if (!empty($params['assign'])) {
- $template->assign($params['assign'], $_html_result);
+ if (!empty($params[ 'assign' ])) {
+ $template->assign($params[ 'assign' ], $_html_result);
} else {
return implode("\n", $_html_result);
}
}
-function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape)
+function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids,
+ $escape)
{
$_output = '';
@@ -165,7 +173,8 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
if (method_exists($value, "__toString")) {
$value = (string) $value->__toString();
} else {
- trigger_error("html_options: value is an object of class '" . get_class($value) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_options: value is an object of class '" . get_class($value) .
+ "' without __toString() method", E_USER_NOTICE);
return '';
}
@@ -177,7 +186,8 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
if (method_exists($output, "__toString")) {
$output = (string) $output->__toString();
} else {
- trigger_error("html_options: output is an object of class '" . get_class($output) . "' without __toString() method", E_USER_NOTICE);
+ trigger_error("html_options: output is an object of class '" . get_class($output) .
+ "' without __toString() method", E_USER_NOTICE);
return '';
}
@@ -187,7 +197,8 @@ function smarty_function_html_radios_output($name, $value, $output, $selected, $
if ($labels) {
if ($label_ids) {
- $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value));
+ $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_',
+ $name . '_' . $value));
$_output .= '<label for="' . $_id . '">';
} else {
$_output .= '<label>';
diff --git a/libs/plugins/function.html_select_date.php b/libs/plugins/function.html_select_date.php
index d6625665..8191700d 100644
--- a/libs/plugins/function.html_select_date.php
+++ b/libs/plugins/function.html_select_date.php
@@ -59,7 +59,7 @@ function smarty_function_html_select_date($params)
$_current_year = date('Y');
$_month_timestamps = array();
for ($i = 1; $i <= 12; $i ++) {
- $_month_timestamps[$i] = mktime(0, 0, 0, $i, 1, 2000);
+ $_month_timestamps[ $i ] = mktime(0, 0, 0, $i, 1, 2000);
}
}
@@ -177,22 +177,21 @@ function smarty_function_html_select_date($params)
// Note: date() is faster than strftime()
// Note: explode(date()) is faster than date() date() date()
- if (isset($params['time']) && is_array($params['time'])) {
- if (isset($params['time'][$prefix . 'Year'])) {
+ if (isset($params[ 'time' ]) && is_array($params[ 'time' ])) {
+ if (isset($params[ 'time' ][ $prefix . 'Year' ])) {
// $_REQUEST[$field_array] given
foreach (array('Y' => 'Year', 'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) {
$_variableName = '_' . strtolower($_elementName);
- $$_variableName = isset($params['time'][$prefix . $_elementName])
- ? $params['time'][$prefix . $_elementName]
- : date($_elementKey);
+ $$_variableName =
+ isset($params[ 'time' ][ $prefix . $_elementName ]) ? $params[ 'time' ][ $prefix . $_elementName ] :
+ date($_elementKey);
}
- } elseif (isset($params['time'][$field_array][$prefix . 'Year'])) {
+ } elseif (isset($params[ 'time' ][ $field_array ][ $prefix . 'Year' ])) {
// $_REQUEST given
foreach (array('Y' => 'Year', 'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) {
$_variableName = '_' . strtolower($_elementName);
- $$_variableName = isset($params['time'][$field_array][$prefix . $_elementName])
- ? $params['time'][$field_array][$prefix . $_elementName]
- : date($_elementKey);
+ $$_variableName = isset($params[ 'time' ][ $field_array ][ $prefix . $_elementName ]) ?
+ $params[ 'time' ][ $field_array ][ $prefix . $_elementName ] : date($_elementKey);
}
} else {
// no date found, use NOW
@@ -215,10 +214,10 @@ function smarty_function_html_select_date($params)
$t = $$key;
if ($t === null) {
$$key = (int) $_current_year;
- } elseif ($t[0] == '+') {
- $$key = (int) ($_current_year + (int)trim(substr($t, 1)));
- } elseif ($t[0] == '-') {
- $$key = (int) ($_current_year - (int)trim(substr($t, 1)));
+ } elseif ($t[ 0 ] == '+') {
+ $$key = (int) ($_current_year + (int) trim(substr($t, 1)));
+ } elseif ($t[ 0 ] == '-') {
+ $$key = (int) ($_current_year - (int) trim(substr($t, 1)));
} else {
$$key = (int) $$key;
}
@@ -243,13 +242,16 @@ function smarty_function_html_select_date($params)
}
if ($year_as_text) {
- $_html_years = '<input type="text" name="' . $_name . '" value="' . $_year . '" size="4" maxlength="4"' . $_extra . $extra_attrs . ' />';
+ $_html_years =
+ '<input type="text" name="' . $_name . '" value="' . $_year . '" size="4" maxlength="4"' . $_extra .
+ $extra_attrs . ' />';
} else {
$_html_years = '<select name="' . $_name . '"';
if ($year_id !== null || $all_id !== null) {
- $_html_years .= ' id="' . smarty_function_escape_special_chars(
- $year_id !== null ? ($year_id ? $year_id : $_name) : ($all_id ? ($all_id . $_name) : $_name)
- ) . '"';
+ $_html_years .= ' id="' . smarty_function_escape_special_chars($year_id !== null ?
+ ($year_id ? $year_id : $_name) :
+ ($all_id ? ($all_id . $_name) :
+ $_name)) . '"';
}
if ($year_size) {
$_html_years .= ' size="' . $year_size . '"';
@@ -257,14 +259,14 @@ function smarty_function_html_select_date($params)
$_html_years .= $_extra . $extra_attrs . '>' . $option_separator;
if (isset($year_empty) || isset($all_empty)) {
- $_html_years .= '<option value="">' . (isset($year_empty) ? $year_empty : $all_empty) . '</option>' . $option_separator;
+ $_html_years .= '<option value="">' . (isset($year_empty) ? $year_empty : $all_empty) . '</option>' .
+ $option_separator;
}
$op = $start_year > $end_year ? - 1 : 1;
for ($i = $start_year; $op > 0 ? $i <= $end_year : $i >= $end_year; $i += $op) {
- $_html_years .= '<option value="' . $i . '"'
- . ($_year == $i ? ' selected="selected"' : '')
- . '>' . $i . '</option>' . $option_separator;
+ $_html_years .= '<option value="' . $i . '"' . ($_year == $i ? ' selected="selected"' : '') . '>' . $i .
+ '</option>' . $option_separator;
}
$_html_years .= '</select>';
@@ -284,9 +286,10 @@ function smarty_function_html_select_date($params)
$_html_months = '<select name="' . $_name . '"';
if ($month_id !== null || $all_id !== null) {
- $_html_months .= ' id="' . smarty_function_escape_special_chars(
- $month_id !== null ? ($month_id ? $month_id : $_name) : ($all_id ? ($all_id . $_name) : $_name)
- ) . '"';
+ $_html_months .= ' id="' . smarty_function_escape_special_chars($month_id !== null ?
+ ($month_id ? $month_id : $_name) :
+ ($all_id ? ($all_id . $_name) :
+ $_name)) . '"';
}
if ($month_size) {
$_html_months .= ' size="' . $month_size . '"';
@@ -294,16 +297,17 @@ function smarty_function_html_select_date($params)
$_html_months .= $_extra . $extra_attrs . '>' . $option_separator;
if (isset($month_empty) || isset($all_empty)) {
- $_html_months .= '<option value="">' . (isset($month_empty) ? $month_empty : $all_empty) . '</option>' . $option_separator;
+ $_html_months .= '<option value="">' . (isset($month_empty) ? $month_empty : $all_empty) . '</option>' .
+ $option_separator;
}
for ($i = 1; $i <= 12; $i ++) {
$_val = sprintf('%02d', $i);
- $_text = isset($month_names) ? smarty_function_escape_special_chars($month_names[$i]) : ($month_format == "%m" ? $_val : strftime($month_format, $_month_timestamps[$i]));
- $_value = $month_value_format == "%m" ? $_val : strftime($month_value_format, $_month_timestamps[$i]);
- $_html_months .= '<option value="' . $_value . '"'
- . ($_val == $_month ? ' selected="selected"' : '')
- . '>' . $_text . '</option>' . $option_separator;
+ $_text = isset($month_names) ? smarty_function_escape_special_chars($month_names[ $i ]) :
+ ($month_format == "%m" ? $_val : strftime($month_format, $_month_timestamps[ $i ]));
+ $_value = $month_value_format == "%m" ? $_val : strftime($month_value_format, $_month_timestamps[ $i ]);
+ $_html_months .= '<option value="' . $_value . '"' . ($_val == $_month ? ' selected="selected"' : '') .
+ '>' . $_text . '</option>' . $option_separator;
}
$_html_months .= '</select>';
@@ -322,9 +326,9 @@ function smarty_function_html_select_date($params)
$_html_days = '<select name="' . $_name . '"';
if ($day_id !== null || $all_id !== null) {
- $_html_days .= ' id="' . smarty_function_escape_special_chars(
- $day_id !== null ? ($day_id ? $day_id : $_name) : ($all_id ? ($all_id . $_name) : $_name)
- ) . '"';
+ $_html_days .= ' id="' .
+ smarty_function_escape_special_chars($day_id !== null ? ($day_id ? $day_id : $_name) :
+ ($all_id ? ($all_id . $_name) : $_name)) . '"';
}
if ($day_size) {
$_html_days .= ' size="' . $day_size . '"';
@@ -332,16 +336,16 @@ function smarty_function_html_select_date($params)
$_html_days .= $_extra . $extra_attrs . '>' . $option_separator;
if (isset($day_empty) || isset($all_empty)) {
- $_html_days .= '<option value="">' . (isset($day_empty) ? $day_empty : $all_empty) . '</option>' . $option_separator;
+ $_html_days .= '<option value="">' . (isset($day_empty) ? $day_empty : $all_empty) . '</option>' .
+ $option_separator;
}
for ($i = 1; $i <= 31; $i ++) {
$_val = sprintf('%02d', $i);
$_text = $day_format == '%02d' ? $_val : sprintf($day_format, $i);
$_value = $day_value_format == '%02d' ? $_val : sprintf($day_value_format, $i);
- $_html_days .= '<option value="' . $_value . '"'
- . ($_val == $_day ? ' selected="selected"' : '')
- . '>' . $_text . '</option>' . $option_separator;
+ $_html_days .= '<option value="' . $_value . '"' . ($_val == $_day ? ' selected="selected"' : '') . '>' .
+ $_text . '</option>' . $option_separator;
}
$_html_days .= '</select>';
@@ -350,7 +354,7 @@ function smarty_function_html_select_date($params)
// order the fields for output
$_html = '';
for ($i = 0; $i <= 2; $i ++) {
- switch ($field_order[$i]) {
+ switch ($field_order[ $i ]) {
case 'Y':
case 'y':
if (isset($_html_years)) {
diff --git a/libs/plugins/function.html_select_time.php b/libs/plugins/function.html_select_time.php
index 9af6aad5..4a3639bc 100644
--- a/libs/plugins/function.html_select_time.php
+++ b/libs/plugins/function.html_select_time.php
@@ -148,31 +148,29 @@ function smarty_function_html_select_time($params)
}
}
- if (isset($params['time']) && is_array($params['time'])) {
- if (isset($params['time'][$prefix . 'Hour'])) {
+ if (isset($params[ 'time' ]) && is_array($params[ 'time' ])) {
+ if (isset($params[ 'time' ][ $prefix . 'Hour' ])) {
// $_REQUEST[$field_array] given
foreach (array('H' => 'Hour', 'i' => 'Minute', 's' => 'Second') as $_elementKey => $_elementName) {
$_variableName = '_' . strtolower($_elementName);
- $$_variableName = isset($params['time'][$prefix . $_elementName])
- ? $params['time'][$prefix . $_elementName]
- : date($_elementKey);
+ $$_variableName =
+ isset($params[ 'time' ][ $prefix . $_elementName ]) ? $params[ 'time' ][ $prefix . $_elementName ] :
+ date($_elementKey);
}
- $_meridian = isset($params['time'][$prefix . 'Meridian'])
- ? (' ' . $params['time'][$prefix . 'Meridian'])
- : '';
+ $_meridian =
+ isset($params[ 'time' ][ $prefix . 'Meridian' ]) ? (' ' . $params[ 'time' ][ $prefix . 'Meridian' ]) :
+ '';
$time = strtotime($_hour . ':' . $_minute . ':' . $_second . $_meridian);
list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
- } elseif (isset($params['time'][$field_array][$prefix . 'Hour'])) {
+ } elseif (isset($params[ 'time' ][ $field_array ][ $prefix . 'Hour' ])) {
// $_REQUEST given
foreach (array('H' => 'Hour', 'i' => 'Minute', 's' => 'Second') as $_elementKey => $_elementName) {
$_variableName = '_' . strtolower($_elementName);
- $$_variableName = isset($params['time'][$field_array][$prefix . $_elementName])
- ? $params['time'][$field_array][$prefix . $_elementName]
- : date($_elementKey);
+ $$_variableName = isset($params[ 'time' ][ $field_array ][ $prefix . $_elementName ]) ?
+ $params[ 'time' ][ $field_array ][ $prefix . $_elementName ] : date($_elementKey);
}
- $_meridian = isset($params['time'][$field_array][$prefix . 'Meridian'])
- ? (' ' . $params['time'][$field_array][$prefix . 'Meridian'])
- : '';
+ $_meridian = isset($params[ 'time' ][ $field_array ][ $prefix . 'Meridian' ]) ?
+ (' ' . $params[ 'time' ][ $field_array ][ $prefix . 'Meridian' ]) : '';
$time = strtotime($_hour . ':' . $_minute . ':' . $_second . $_meridian);
list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
} else {
@@ -203,9 +201,9 @@ function smarty_function_html_select_time($params)
$_html_hours = '<select name="' . $_name . '"';
if ($hour_id !== null || $all_id !== null) {
- $_html_hours .= ' id="' . smarty_function_escape_special_chars(
- $hour_id !== null ? ($hour_id ? $hour_id : $_name) : ($all_id ? ($all_id . $_name) : $_name)
- ) . '"';
+ $_html_hours .= ' id="' .
+ smarty_function_escape_special_chars($hour_id !== null ? ($hour_id ? $hour_id : $_name) :
+ ($all_id ? ($all_id . $_name) : $_name)) . '"';
}
if ($hour_size) {
$_html_hours .= ' size="' . $hour_size . '"';
@@ -213,7 +211,8 @@ function smarty_function_html_select_time($params)
$_html_hours .= $_extra . $extra_attrs . '>' . $option_separator;
if (isset($hour_empty) || isset($all_empty)) {
- $_html_hours .= '<option value="">' . (isset($hour_empty) ? $hour_empty : $all_empty) . '</option>' . $option_separator;
+ $_html_hours .= '<option value="">' . (isset($hour_empty) ? $hour_empty : $all_empty) . '</option>' .
+ $option_separator;
}
$start = $use_24_hours ? 0 : 1;
@@ -224,15 +223,12 @@ function smarty_function_html_select_time($params)
$_value = $hour_value_format == '%02d' ? $_val : sprintf($hour_value_format, $i);
if (!$use_24_hours) {
- $_hour12 = $_hour == 0
- ? 12
- : ($_hour <= 12 ? $_hour : $_hour - 12);
+ $_hour12 = $_hour == 0 ? 12 : ($_hour <= 12 ? $_hour : $_hour - 12);
}
$selected = $_hour !== null ? ($use_24_hours ? $_hour == $_val : $_hour12 == $_val) : null;
- $_html_hours .= '<option value="' . $_value . '"'
- . ($selected ? ' selected="selected"' : '')
- . '>' . $_text . '</option>' . $option_separator;
+ $_html_hours .= '<option value="' . $_value . '"' . ($selected ? ' selected="selected"' : '') . '>' .
+ $_text . '</option>' . $option_separator;
}
$_html_hours .= '</select>';
@@ -252,9 +248,10 @@ function smarty_function_html_select_time($params)
$_html_minutes = '<select name="' . $_name . '"';
if ($minute_id !== null || $all_id !== null) {
- $_html_minutes .= ' id="' . smarty_function_escape_special_chars(
- $minute_id !== null ? ($minute_id ? $minute_id : $_name) : ($all_id ? ($all_id . $_name) : $_name)
- ) . '"';
+ $_html_minutes .= ' id="' . smarty_function_escape_special_chars($minute_id !== null ?
+ ($minute_id ? $minute_id : $_name) :
+ ($all_id ? ($all_id . $_name) :
+ $_name)) . '"';
}
if ($minute_size) {
$_html_minutes .= ' size="' . $minute_size . '"';
@@ -262,7 +259,8 @@ function smarty_function_html_select_time($params)
$_html_minutes .= $_extra . $extra_attrs . '>' . $option_separator;
if (isset($minute_empty) || isset($all_empty)) {
- $_html_minutes .= '<option value="">' . (isset($minute_empty) ? $minute_empty : $all_empty) . '</option>' . $option_separator;
+ $_html_minutes .= '<option value="">' . (isset($minute_empty) ? $minute_empty : $all_empty) . '</option>' .
+ $option_separator;
}
$selected = $_minute !== null ? ($_minute - $_minute % $minute_interval) : null;
@@ -270,9 +268,8 @@ function smarty_function_html_select_time($params)
$_val = sprintf('%02d', $i);
$_text = $minute_format == '%02d' ? $_val : sprintf($minute_format, $i);
$_value = $minute_value_format == '%02d' ? $_val : sprintf($minute_value_format, $i);
- $_html_minutes .= '<option value="' . $_value . '"'
- . ($selected === $i ? ' selected="selected"' : '')
- . '>' . $_text . '</option>' . $option_separator;
+ $_html_minutes .= '<option value="' . $_value . '"' . ($selected === $i ? ' selected="selected"' : '') .
+ '>' . $_text . '</option>' . $option_separator;
}
$_html_minutes .= '</select>';
@@ -292,9 +289,10 @@ function smarty_function_html_select_time($params)
$_html_seconds = '<select name="' . $_name . '"';
if ($second_id !== null || $all_id !== null) {
- $_html_seconds .= ' id="' . smarty_function_escape_special_chars(
- $second_id !== null ? ($second_id ? $second_id : $_name) : ($all_id ? ($all_id . $_name) : $_name)
- ) . '"';
+ $_html_seconds .= ' id="' . smarty_function_escape_special_chars($second_id !== null ?
+ ($second_id ? $second_id : $_name) :
+ ($all_id ? ($all_id . $_name) :
+ $_name)) . '"';
}
if ($second_size) {
$_html_seconds .= ' size="' . $second_size . '"';
@@ -302,7 +300,8 @@ function smarty_function_html_select_time($params)
$_html_seconds .= $_extra . $extra_attrs . '>' . $option_separator;
if (isset($second_empty) || isset($all_empty)) {
- $_html_seconds .= '<option value="">' . (isset($second_empty) ? $second_empty : $all_empty) . '</option>' . $option_separator;
+ $_html_seconds .= '<option value="">' . (isset($second_empty) ? $second_empty : $all_empty) . '</option>' .
+ $option_separator;
}
$selected = $_second !== null ? ($_second - $_second % $second_interval) : null;
@@ -310,9 +309,8 @@ function smarty_function_html_select_time($params)
$_val = sprintf('%02d', $i);
$_text = $second_format == '%02d' ? $_val : sprintf($second_format, $i);
$_value = $second_value_format == '%02d' ? $_val : sprintf($second_value_format, $i);
- $_html_seconds .= '<option value="' . $_value . '"'
- . ($selected === $i ? ' selected="selected"' : '')
- . '>' . $_text . '</option>' . $option_separator;
+ $_html_seconds .= '<option value="' . $_value . '"' . ($selected === $i ? ' selected="selected"' : '') .
+ '>' . $_text . '</option>' . $option_separator;
}
$_html_seconds .= '</select>';
@@ -332,9 +330,11 @@ function smarty_function_html_select_time($params)
$_html_meridian = '<select name="' . $_name . '"';
if ($meridian_id !== null || $all_id !== null) {
- $_html_meridian .= ' id="' . smarty_function_escape_special_chars(
- $meridian_id !== null ? ($meridian_id ? $meridian_id : $_name) : ($all_id ? ($all_id . $_name) : $_name)
- ) . '"';
+ $_html_meridian .= ' id="' . smarty_function_escape_special_chars($meridian_id !== null ?
+ ($meridian_id ? $meridian_id :
+ $_name) :
+ ($all_id ? ($all_id . $_name) :
+ $_name)) . '"';
}
if ($meridian_size) {
$_html_meridian .= ' size="' . $meridian_size . '"';
@@ -342,12 +342,14 @@ function smarty_function_html_select_time($params)
$_html_meridian .= $_extra . $extra_attrs . '>' . $option_separator;
if (isset($meridian_empty) || isset($all_empty)) {
- $_html_meridian .= '<option value="">' . (isset($meridian_empty) ? $meridian_empty : $all_empty) . '</option>' . $option_separator;
+ $_html_meridian .= '<option value="">' . (isset($meridian_empty) ? $meridian_empty : $all_empty) .
+ '</option>' . $option_separator;
}
- $_html_meridian .= '<option value="am"' . ($_hour > 0 && $_hour < 12 ? ' selected="selected"' : '') . '>AM</option>' . $option_separator
- . '<option value="pm"' . ($_hour < 12 ? '' : ' selected="selected"') . '>PM</option>' . $option_separator
- . '</select>';
+ $_html_meridian .= '<option value="am"' . ($_hour > 0 && $_hour < 12 ? ' selected="selected"' : '') .
+ '>AM</option>' . $option_separator . '<option value="pm"' .
+ ($_hour < 12 ? '' : ' selected="selected"') . '>PM</option>' . $option_separator .
+ '</select>';
}
$_html = '';
diff --git a/libs/plugins/function.html_table.php b/libs/plugins/function.html_table.php
index ec7ba48a..42e23e72 100644
--- a/libs/plugins/function.html_table.php
+++ b/libs/plugins/function.html_table.php
@@ -62,7 +62,7 @@ function smarty_function_html_table($params)
$caption = '';
$loop = null;
- if (!isset($params['loop'])) {
+ if (!isset($params[ 'loop' ])) {
trigger_error("html_table: missing 'loop' parameter", E_USER_WARNING);
return;
@@ -110,11 +110,11 @@ function smarty_function_html_table($params)
}
$loop_count = count($loop);
- if (empty($params['rows'])) {
+ if (empty($params[ 'rows' ])) {
/* no rows specified */
$rows = ceil($loop_count / $cols_count);
- } elseif (empty($params['cols'])) {
- if (!empty($params['rows'])) {
+ } elseif (empty($params[ 'cols' ])) {
+ if (!empty($params[ 'rows' ])) {
/* no cols specified, but rows */
$cols_count = ceil($loop_count / $rows);
}
@@ -132,7 +132,7 @@ function smarty_function_html_table($params)
for ($r = 0; $r < $cols_count; $r ++) {
$output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
- $output .= $cols[$r];
+ $output .= $cols[ $r ];
$output .= "</th>\n";
}
$output .= "</tr></thead>\n";
@@ -151,7 +151,7 @@ function smarty_function_html_table($params)
}
if ($x < $loop_count) {
- $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[$x] . "</td>\n";
+ $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[ $x ] . "</td>\n";
} else {
$output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">$trailpad</td>\n";
}
@@ -169,7 +169,7 @@ function smarty_function_html_table_cycle($name, $var, $no)
if (!is_array($var)) {
$ret = $var;
} else {
- $ret = $var[$no % count($var)];
+ $ret = $var[ $no % count($var) ];
}
return ($ret) ? ' ' . $ret : '';
diff --git a/libs/plugins/function.mailto.php b/libs/plugins/function.mailto.php
index 520fb7aa..9d2a5d2d 100644
--- a/libs/plugins/function.mailto.php
+++ b/libs/plugins/function.mailto.php
@@ -50,15 +50,16 @@
*/
function smarty_function_mailto($params)
{
- static $_allowed_encoding = array('javascript' => true, 'javascript_charcode' => true, 'hex' => true, 'none' => true);
+ static $_allowed_encoding =
+ array('javascript' => true, 'javascript_charcode' => true, 'hex' => true, 'none' => true);
$extra = '';
- if (empty($params['address'])) {
+ if (empty($params[ 'address' ])) {
trigger_error("mailto: missing 'address' parameter", E_USER_WARNING);
return;
} else {
- $address = $params['address'];
+ $address = $params[ 'address' ];
}
$text = $address;
@@ -72,9 +73,9 @@ function smarty_function_mailto($params)
case 'cc':
case 'bcc':
case 'followupto':
- if (!empty($value)) {
- $mail_parms[] = $var . '=' . str_replace($search, $replace, rawurlencode($value));
- }
+ if (!empty($value)) {
+ $mail_parms[] = $var . '=' . str_replace($search, $replace, rawurlencode($value));
+ }
break;
case 'subject':
@@ -94,9 +95,10 @@ function smarty_function_mailto($params)
$address .= '?' . join('&', $mail_parms);
}
- $encode = (empty($params['encode'])) ? 'none' : $params['encode'];
- if (!isset($_allowed_encoding[$encode])) {
- trigger_error("mailto: 'encode' parameter must be none, javascript, javascript_charcode or hex", E_USER_WARNING);
+ $encode = (empty($params[ 'encode' ])) ? 'none' : $params[ 'encode' ];
+ if (!isset($_allowed_encoding[ $encode ])) {
+ trigger_error("mailto: 'encode' parameter must be none, javascript, javascript_charcode or hex",
+ E_USER_WARNING);
return;
}
@@ -106,7 +108,7 @@ function smarty_function_mailto($params)
$js_encode = '';
for ($x = 0, $_length = strlen($string); $x < $_length; $x ++) {
- $js_encode .= '%' . bin2hex($string[$x]);
+ $js_encode .= '%' . bin2hex($string[ $x ]);
}
return '<script type="text/javascript">eval(unescape(\'' . $js_encode . '\'))</script>';
@@ -114,35 +116,31 @@ function smarty_function_mailto($params)
$string = '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>';
for ($x = 0, $y = strlen($string); $x < $y; $x ++) {
- $ord[] = ord($string[$x]);
+ $ord[] = ord($string[ $x ]);
}
- $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n"
- . "{document.write(String.fromCharCode("
- . implode(',', $ord)
- . "))"
- . "}\n"
- . "</script>\n";
+ $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n" . "{document.write(String.fromCharCode(" .
+ implode(',', $ord) . "))" . "}\n" . "</script>\n";
return $_ret;
} elseif ($encode == 'hex') {
preg_match('!^(.*)(\?.*)$!', $address, $match);
- if (!empty($match[2])) {
+ if (!empty($match[ 2 ])) {
trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.", E_USER_WARNING);
return;
}
$address_encode = '';
for ($x = 0, $_length = strlen($address); $x < $_length; $x ++) {
- if (preg_match('!\w!' . Smarty::$_UTF8_MODIFIER, $address[$x])) {
- $address_encode .= '%' . bin2hex($address[$x]);
+ if (preg_match('!\w!' . Smarty::$_UTF8_MODIFIER, $address[ $x ])) {
+ $address_encode .= '%' . bin2hex($address[ $x ]);
} else {
- $address_encode .= $address[$x];
+ $address_encode .= $address[ $x ];
}
}
$text_encode = '';
for ($x = 0, $_length = strlen($text); $x < $_length; $x ++) {
- $text_encode .= '&#x' . bin2hex($text[$x]) . ';';
+ $text_encode .= '&#x' . bin2hex($text[ $x ]) . ';';
}
$mailto = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;";
diff --git a/libs/plugins/function.math.php b/libs/plugins/function.math.php
index aba76e82..a6e2a152 100644
--- a/libs/plugins/function.math.php
+++ b/libs/plugins/function.math.php
@@ -24,19 +24,18 @@
*/
function smarty_function_math($params, $template)
{
- static $_allowed_funcs = array(
- 'int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,
- 'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true,
- 'rand' => true, 'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true, 'tan' => true
- );
+ static $_allowed_funcs =
+ array('int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,
+ 'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true, 'rand' => true,
+ 'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true, 'tan' => true);
// be sure equation parameter is present
- if (empty($params['equation'])) {
+ if (empty($params[ 'equation' ])) {
trigger_error("math: missing equation parameter", E_USER_WARNING);
return;
}
- $equation = $params['equation'];
+ $equation = $params[ 'equation' ];
// make sure parenthesis are balanced
if (substr_count($equation, "(") != substr_count($equation, ")")) {
@@ -48,8 +47,8 @@ function smarty_function_math($params, $template)
// match all vars in equation, make sure all are passed
preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!", $equation, $match);
- foreach ($match[1] as $curr_var) {
- if ($curr_var && !isset($params[$curr_var]) && !isset($_allowed_funcs[$curr_var])) {
+ foreach ($match[ 1 ] as $curr_var) {
+ if ($curr_var && !isset($params[ $curr_var ]) && !isset($_allowed_funcs[ $curr_var ])) {
trigger_error("math: function call $curr_var not allowed", E_USER_WARNING);
return;
@@ -75,17 +74,17 @@ function smarty_function_math($params, $template)
$smarty_math_result = null;
eval("\$smarty_math_result = " . $equation . ";");
- if (empty($params['format'])) {
- if (empty($params['assign'])) {
+ if (empty($params[ 'format' ])) {
+ if (empty($params[ 'assign' ])) {
return $smarty_math_result;
} else {
- $template->assign($params['assign'], $smarty_math_result);
+ $template->assign($params[ 'assign' ], $smarty_math_result);
}
} else {
- if (empty($params['assign'])) {
- printf($params['format'], $smarty_math_result);
+ if (empty($params[ 'assign' ])) {
+ printf($params[ 'format' ], $smarty_math_result);
} else {
- $template->assign($params['assign'], sprintf($params['format'], $smarty_math_result));
+ $template->assign($params[ 'assign' ], sprintf($params[ 'format' ], $smarty_math_result));
}
}
}
diff --git a/libs/plugins/modifier.capitalize.php b/libs/plugins/modifier.capitalize.php
index a8ad7637..6513a049 100644
--- a/libs/plugins/modifier.capitalize.php
+++ b/libs/plugins/modifier.capitalize.php
@@ -29,17 +29,23 @@ function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = fals
$upper_string = mb_convert_case($string, MB_CASE_TITLE, Smarty::$_CHARSET);
} else {
// uppercase word breaks
- $upper_string = preg_replace_callback("!(^|[^\p{L}'])([\p{Ll}])!S" . Smarty::$_UTF8_MODIFIER, 'smarty_mod_cap_mbconvert_cb', $string);
+ $upper_string = preg_replace_callback("!(^|[^\p{L}'])([\p{Ll}])!S" . Smarty::$_UTF8_MODIFIER,
+ 'smarty_mod_cap_mbconvert_cb', $string);
}
// check uc_digits case
if (!$uc_digits) {
- if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!" . Smarty::$_UTF8_MODIFIER, $string, $matches, PREG_OFFSET_CAPTURE)) {
- foreach ($matches[1] as $match) {
- $upper_string = substr_replace($upper_string, mb_strtolower($match[0], Smarty::$_CHARSET), $match[1], strlen($match[0]));
+ if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!" . Smarty::$_UTF8_MODIFIER, $string, $matches,
+ PREG_OFFSET_CAPTURE)) {
+ foreach ($matches[ 1 ] as $match) {
+ $upper_string =
+ substr_replace($upper_string, mb_strtolower($match[ 0 ], Smarty::$_CHARSET), $match[ 1 ],
+ strlen($match[ 0 ]));
}
}
}
- $upper_string = preg_replace_callback("!((^|\s)['\"])(\w)!" . Smarty::$_UTF8_MODIFIER, 'smarty_mod_cap_mbconvert2_cb', $upper_string);
+ $upper_string =
+ preg_replace_callback("!((^|\s)['\"])(\w)!" . Smarty::$_UTF8_MODIFIER, 'smarty_mod_cap_mbconvert2_cb',
+ $upper_string);
return $upper_string;
}
@@ -48,16 +54,21 @@ function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = fals
$string = strtolower($string);
}
// uppercase (including hyphenated words)
- $upper_string = preg_replace_callback("!(^|[^\p{L}'])([\p{Ll}])!S" . Smarty::$_UTF8_MODIFIER, 'smarty_mod_cap_ucfirst_cb', $string);
+ $upper_string =
+ preg_replace_callback("!(^|[^\p{L}'])([\p{Ll}])!S" . Smarty::$_UTF8_MODIFIER, 'smarty_mod_cap_ucfirst_cb',
+ $string);
// check uc_digits case
if (!$uc_digits) {
- if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!" . Smarty::$_UTF8_MODIFIER, $string, $matches, PREG_OFFSET_CAPTURE)) {
- foreach ($matches[1] as $match) {
- $upper_string = substr_replace($upper_string, strtolower($match[0]), $match[1], strlen($match[0]));
+ if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!" . Smarty::$_UTF8_MODIFIER, $string, $matches,
+ PREG_OFFSET_CAPTURE)) {
+ foreach ($matches[ 1 ] as $match) {
+ $upper_string =
+ substr_replace($upper_string, strtolower($match[ 0 ]), $match[ 1 ], strlen($match[ 0 ]));
}
}
}
- $upper_string = preg_replace_callback("!((^|\s)['\"])(\w)!" . Smarty::$_UTF8_MODIFIER, 'smarty_mod_cap_ucfirst2_cb', $upper_string);
+ $upper_string = preg_replace_callback("!((^|\s)['\"])(\w)!" . Smarty::$_UTF8_MODIFIER, 'smarty_mod_cap_ucfirst2_cb',
+ $upper_string);
return $upper_string;
}
@@ -71,20 +82,20 @@ function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = fals
*/
function smarty_mod_cap_mbconvert_cb($matches)
{
- return stripslashes($matches[1]) . mb_convert_case(stripslashes($matches[2]), MB_CASE_UPPER, Smarty::$_CHARSET);
+ return stripslashes($matches[ 1 ]) . mb_convert_case(stripslashes($matches[ 2 ]), MB_CASE_UPPER, Smarty::$_CHARSET);
}
function smarty_mod_cap_mbconvert2_cb($matches)
{
- return stripslashes($matches[1]) . mb_convert_case(stripslashes($matches[3]), MB_CASE_UPPER, Smarty::$_CHARSET);
+ return stripslashes($matches[ 1 ]) . mb_convert_case(stripslashes($matches[ 3 ]), MB_CASE_UPPER, Smarty::$_CHARSET);
}
function smarty_mod_cap_ucfirst_cb($matches)
{
- return stripslashes($matches[1]) . ucfirst(stripslashes($matches[2]));
+ return stripslashes($matches[ 1 ]) . ucfirst(stripslashes($matches[ 2 ]));
}
function smarty_mod_cap_ucfirst2_cb($matches)
{
- return stripslashes($matches[1]) . ucfirst(stripslashes($matches[3]));
+ return stripslashes($matches[ 1 ]) . ucfirst(stripslashes($matches[ 3 ]));
}
diff --git a/libs/plugins/modifier.debug_print_var.php b/libs/plugins/modifier.debug_print_var.php
index 804d743d..34f85dcd 100644
--- a/libs/plugins/modifier.debug_print_var.php
+++ b/libs/plugins/modifier.debug_print_var.php
@@ -33,7 +33,8 @@ function smarty_modifier_debug_print_var($var, $max = 10, $length = 40, $depth =
}
foreach ($var as $curr_key => $curr_val) {
$results .= '<br>' . str_repeat('&nbsp;', $depth * 2) . '<b>' . strtr($curr_key, $_replace) .
- '</b> =&gt; ' . smarty_modifier_debug_print_var($curr_val, $max, $length, ++ $depth, $objects);
+ '</b> =&gt; ' .
+ smarty_modifier_debug_print_var($curr_val, $max, $length, ++ $depth, $objects);
$depth --;
}
break;
@@ -51,7 +52,7 @@ function smarty_modifier_debug_print_var($var, $max = 10, $length = 40, $depth =
$objects[] = $var;
foreach ($object_vars as $curr_key => $curr_val) {
$results .= '<br>' . str_repeat('&nbsp;', $depth * 2) . '<b> -&gt;' . strtr($curr_key, $_replace) .
- '</b> = ' . smarty_modifier_debug_print_var($curr_val, $max, $length, ++ $depth, $objects);
+ '</b> = ' . smarty_modifier_debug_print_var($curr_val, $max, $length, ++ $depth, $objects);
$depth --;
}
break;
diff --git a/libs/plugins/modifier.escape.php b/libs/plugins/modifier.escape.php
index 9fdb0702..b9842aaf 100644
--- a/libs/plugins/modifier.escape.php
+++ b/libs/plugins/modifier.escape.php
@@ -66,7 +66,8 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
// php <5.2.3 - prevent double encoding
$string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string = htmlspecialchars($string, ENT_QUOTES, $char_set);
- $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ $string =
+ str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
return $string;
}
@@ -107,7 +108,7 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
$return = '';
$_length = strlen($string);
for ($x = 0; $x < $_length; $x ++) {
- $return .= '%' . bin2hex($string[$x]);
+ $return .= '%' . bin2hex($string[ $x ]);
}
return $return;
@@ -126,7 +127,7 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
// no MBString fallback
$_length = strlen($string);
for ($x = 0; $x < $_length; $x ++) {
- $return .= '&#x' . bin2hex($string[$x]) . ';';
+ $return .= '&#x' . bin2hex($string[ $x ]) . ';';
}
return $return;
@@ -145,14 +146,15 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $
// no MBString fallback
$_length = strlen($string);
for ($x = 0; $x < $_length; $x ++) {
- $return .= '&#' . ord($string[$x]) . ';';
+ $return .= '&#' . ord($string[ $x ]) . ';';
}
return $return;
case 'javascript':
// escape quotes and backslashes, newlines, etc.
- return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', '</' => '<\/'));
+ return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n',
+ '</' => '<\/'));
case 'mail':
if (Smarty::$_MBSTRING) {
diff --git a/libs/plugins/modifier.regex_replace.php b/libs/plugins/modifier.regex_replace.php
index ffea1675..85f41fdd 100644
--- a/libs/plugins/modifier.regex_replace.php
+++ b/libs/plugins/modifier.regex_replace.php
@@ -23,11 +23,11 @@
*
* @return string
*/
-function smarty_modifier_regex_replace($string, $search, $replace, $limit = -1)
+function smarty_modifier_regex_replace($string, $search, $replace, $limit = - 1)
{
if (is_array($search)) {
foreach ($search as $idx => $s) {
- $search[$idx] = _smarty_regex_replace_check($s);
+ $search[ $idx ] = _smarty_regex_replace_check($s);
}
} else {
$search = _smarty_regex_replace_check($search);
@@ -50,8 +50,8 @@ function _smarty_regex_replace_check($search)
$search = substr($search, 0, $pos);
}
// remove eval-modifier from $search
- if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
- $search = substr($search, 0, - strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
+ if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[ 1 ], 'e') !== false)) {
+ $search = substr($search, 0, - strlen($match[ 1 ])) . preg_replace('![e\s]+!', '', $match[ 1 ]);
}
return $search;
diff --git a/libs/plugins/modifier.truncate.php b/libs/plugins/modifier.truncate.php
index fbe62e82..6fe84425 100644
--- a/libs/plugins/modifier.truncate.php
+++ b/libs/plugins/modifier.truncate.php
@@ -35,20 +35,22 @@ function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_wo
if (mb_strlen($string, Smarty::$_CHARSET) > $length) {
$length -= min($length, mb_strlen($etc, Smarty::$_CHARSET));
if (!$break_words && !$middle) {
- $string = preg_replace('/\s+?(\S+)?$/' . Smarty::$_UTF8_MODIFIER, '', mb_substr($string, 0, $length + 1, Smarty::$_CHARSET));
+ $string = preg_replace('/\s+?(\S+)?$/' . Smarty::$_UTF8_MODIFIER, '',
+ mb_substr($string, 0, $length + 1, Smarty::$_CHARSET));
}
if (!$middle) {
return mb_substr($string, 0, $length, Smarty::$_CHARSET) . $etc;
}
- return mb_substr($string, 0, $length / 2, Smarty::$_CHARSET) . $etc . mb_substr($string, - $length / 2, $length, Smarty::$_CHARSET);
+ return mb_substr($string, 0, $length / 2, Smarty::$_CHARSET) . $etc .
+ mb_substr($string, - $length / 2, $length, Smarty::$_CHARSET);
}
return $string;
}
// no MBString fallback
- if (isset($string[$length])) {
+ if (isset($string[ $length ])) {
$length -= min($length, strlen($etc));
if (!$break_words && !$middle) {
$string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length + 1));
diff --git a/libs/plugins/modifiercompiler.count_characters.php b/libs/plugins/modifiercompiler.count_characters.php
index f8463d80..0a3ce257 100644
--- a/libs/plugins/modifiercompiler.count_characters.php
+++ b/libs/plugins/modifiercompiler.count_characters.php
@@ -21,12 +21,12 @@
*/
function smarty_modifiercompiler_count_characters($params)
{
- if (!isset($params[1]) || $params[1] != 'true') {
- return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[0] . ', $tmp)';
+ if (!isset($params[ 1 ]) || $params[ 1 ] != 'true') {
+ return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[ 0 ] . ', $tmp)';
}
if (Smarty::$_MBSTRING) {
- return 'mb_strlen(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
+ return 'mb_strlen(' . $params[ 0 ] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
}
// no MBString fallback
- return 'strlen(' . $params[0] . ')';
+ return 'strlen(' . $params[ 0 ] . ')';
}
diff --git a/libs/plugins/modifiercompiler.count_paragraphs.php b/libs/plugins/modifiercompiler.count_paragraphs.php
index 34f0bbb8..f7f44776 100644
--- a/libs/plugins/modifiercompiler.count_paragraphs.php
+++ b/libs/plugins/modifiercompiler.count_paragraphs.php
@@ -23,5 +23,5 @@
function smarty_modifiercompiler_count_paragraphs($params)
{
// count \r or \n characters
- return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)';
+ return '(preg_match_all(\'#[\r\n]+#\', ' . $params[ 0 ] . ', $tmp)+1)';
}
diff --git a/libs/plugins/modifiercompiler.count_sentences.php b/libs/plugins/modifiercompiler.count_sentences.php
index f1ec5600..20032925 100644
--- a/libs/plugins/modifiercompiler.count_sentences.php
+++ b/libs/plugins/modifiercompiler.count_sentences.php
@@ -23,5 +23,5 @@
function smarty_modifiercompiler_count_sentences($params)
{
// find periods, question marks, exclamation marks with a word before but not after.
- return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[0] . ', $tmp)';
+ return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[ 0 ] . ', $tmp)';
}
diff --git a/libs/plugins/modifiercompiler.count_words.php b/libs/plugins/modifiercompiler.count_words.php
index 8b4330f1..f20a197c 100644
--- a/libs/plugins/modifiercompiler.count_words.php
+++ b/libs/plugins/modifiercompiler.count_words.php
@@ -24,8 +24,9 @@ function smarty_modifiercompiler_count_words($params)
if (Smarty::$_MBSTRING) {
// return 'preg_match_all(\'#[\w\pL]+#' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)';
// expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592
- return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)';
+ return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\', ' .
+ $params[ 0 ] . ', $tmp)';
}
// no MBString fallback
- return 'str_word_count(' . $params[0] . ')';
+ return 'str_word_count(' . $params[ 0 ] . ')';
}
diff --git a/libs/plugins/modifiercompiler.default.php b/libs/plugins/modifiercompiler.default.php
index fe777623..2c4c00a3 100644
--- a/libs/plugins/modifiercompiler.default.php
+++ b/libs/plugins/modifiercompiler.default.php
@@ -21,9 +21,9 @@
*/
function smarty_modifiercompiler_default($params)
{
- $output = $params[0];
- if (!isset($params[1])) {
- $params[1] = "''";
+ $output = $params[ 0 ];
+ if (!isset($params[ 1 ])) {
+ $params[ 1 ] = "''";
}
array_shift($params);
diff --git a/libs/plugins/modifiercompiler.escape.php b/libs/plugins/modifiercompiler.escape.php
index 0b29220e..48161066 100644
--- a/libs/plugins/modifiercompiler.escape.php
+++ b/libs/plugins/modifiercompiler.escape.php
@@ -44,14 +44,10 @@ function smarty_modifiercompiler_escape($params, $compiler)
switch ($esc_type) {
case 'html':
if ($_double_encode) {
- return 'htmlspecialchars('
- . $params[0] . ', ENT_QUOTES, '
- . var_export($char_set, true) . ', '
- . var_export($double_encode, true) . ')';
+ return 'htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ', ' .
+ var_export($double_encode, true) . ')';
} elseif ($double_encode) {
- return 'htmlspecialchars('
- . $params[0] . ', ENT_QUOTES, '
- . var_export($char_set, true) . ')';
+ return 'htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ')';
} else {
// fall back to modifier.escape.php
}
@@ -60,19 +56,13 @@ function smarty_modifiercompiler_escape($params, $compiler)
if (Smarty::$_MBSTRING) {
if ($_double_encode) {
// php >=5.2.3 - go native
- return 'mb_convert_encoding(htmlspecialchars('
- . $params[0] . ', ENT_QUOTES, '
- . var_export($char_set, true) . ', '
- . var_export($double_encode, true)
- . '), "HTML-ENTITIES", '
- . var_export($char_set, true) . ')';
+ return 'mb_convert_encoding(htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' .
+ var_export($char_set, true) . ', ' . var_export($double_encode, true) .
+ '), "HTML-ENTITIES", ' . var_export($char_set, true) . ')';
} elseif ($double_encode) {
// php <5.2.3 - only handle double encoding
- return 'mb_convert_encoding(htmlspecialchars('
- . $params[0] . ', ENT_QUOTES, '
- . var_export($char_set, true)
- . '), "HTML-ENTITIES", '
- . var_export($char_set, true) . ')';
+ return 'mb_convert_encoding(htmlspecialchars(' . $params[ 0 ] . ', ENT_QUOTES, ' .
+ var_export($char_set, true) . '), "HTML-ENTITIES", ' . var_export($char_set, true) . ')';
} else {
// fall back to modifier.escape.php
}
@@ -81,32 +71,29 @@ function smarty_modifiercompiler_escape($params, $compiler)
// no MBString fallback
if ($_double_encode) {
// php >=5.2.3 - go native
- return 'htmlentities('
- . $params[0] . ', ENT_QUOTES, '
- . var_export($char_set, true) . ', '
- . var_export($double_encode, true) . ')';
+ return 'htmlentities(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ', ' .
+ var_export($double_encode, true) . ')';
} elseif ($double_encode) {
// php <5.2.3 - only handle double encoding
- return 'htmlentities('
- . $params[0] . ', ENT_QUOTES, '
- . var_export($char_set, true) . ')';
+ return 'htmlentities(' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ')';
} else {
// fall back to modifier.escape.php
}
case 'url':
- return 'rawurlencode(' . $params[0] . ')';
+ return 'rawurlencode(' . $params[ 0 ] . ')';
case 'urlpathinfo':
- return 'str_replace("%2F", "/", rawurlencode(' . $params[0] . '))';
+ return 'str_replace("%2F", "/", rawurlencode(' . $params[ 0 ] . '))';
case 'quotes':
// escape unescaped single quotes
- return 'preg_replace("%(?<!\\\\\\\\)\'%", "\\\'",' . $params[0] . ')';
+ return 'preg_replace("%(?<!\\\\\\\\)\'%", "\\\'",' . $params[ 0 ] . ')';
case 'javascript':
// escape quotes and backslashes, newlines, etc.
- return 'strtr(' . $params[0] . ', array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", "</" => "<\/" ))';
+ return 'strtr(' . $params[ 0 ] .
+ ', array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", "</" => "<\/" ))';
}
}
catch (SmartyException $e) {
@@ -115,11 +102,15 @@ function smarty_modifiercompiler_escape($params, $compiler)
// could not optimize |escape call, so fallback to regular plugin
if ($compiler->template->caching && ($compiler->tag_nocache | $compiler->nocache)) {
- $compiler->parent_compiler->template->compiled->required_plugins['nocache']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR . 'modifier.escape.php';
- $compiler->parent_compiler->template->compiled->required_plugins['nocache']['escape']['modifier']['function'] = 'smarty_modifier_escape';
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ 'escape' ][ 'modifier' ][ 'file' ] =
+ SMARTY_PLUGINS_DIR . 'modifier.escape.php';
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ 'escape' ][ 'modifier' ][ 'function' ] =
+ 'smarty_modifier_escape';
} else {
- $compiler->parent_compiler->template->compiled->required_plugins['compiled']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR . 'modifier.escape.php';
- $compiler->parent_compiler->template->compiled->required_plugins['compiled']['escape']['modifier']['function'] = 'smarty_modifier_escape';
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'escape' ][ 'modifier' ][ 'file' ] =
+ SMARTY_PLUGINS_DIR . 'modifier.escape.php';
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'escape' ][ 'modifier' ][ 'function' ] =
+ 'smarty_modifier_escape';
}
return 'smarty_modifier_escape(' . join(', ', $params) . ')';
diff --git a/libs/plugins/modifiercompiler.from_charset.php b/libs/plugins/modifiercompiler.from_charset.php
index dab43e9c..e25a9574 100644
--- a/libs/plugins/modifiercompiler.from_charset.php
+++ b/libs/plugins/modifiercompiler.from_charset.php
@@ -22,12 +22,12 @@ function smarty_modifiercompiler_from_charset($params)
{
if (!Smarty::$_MBSTRING) {
// FIXME: (rodneyrehm) shouldn't this throw an error?
- return $params[0];
+ return $params[ 0 ];
}
- if (!isset($params[1])) {
- $params[1] = '"ISO-8859-1"';
+ if (!isset($params[ 1 ])) {
+ $params[ 1 ] = '"ISO-8859-1"';
}
- return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')';
+ return 'mb_convert_encoding(' . $params[ 0 ] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[ 1 ] . ')';
}
diff --git a/libs/plugins/modifiercompiler.indent.php b/libs/plugins/modifiercompiler.indent.php
index e3ca2082..851f1844 100644
--- a/libs/plugins/modifiercompiler.indent.php
+++ b/libs/plugins/modifiercompiler.indent.php
@@ -22,12 +22,12 @@
function smarty_modifiercompiler_indent($params)
{
- if (!isset($params[1])) {
- $params[1] = 4;
+ if (!isset($params[ 1 ])) {
+ $params[ 1 ] = 4;
}
- if (!isset($params[2])) {
- $params[2] = "' '";
+ if (!isset($params[ 2 ])) {
+ $params[ 2 ] = "' '";
}
- return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')';
+ return 'preg_replace(\'!^!m\',str_repeat(' . $params[ 2 ] . ',' . $params[ 1 ] . '),' . $params[ 0 ] . ')';
}
diff --git a/libs/plugins/modifiercompiler.lower.php b/libs/plugins/modifiercompiler.lower.php
index 1d255f37..a335eff7 100644
--- a/libs/plugins/modifiercompiler.lower.php
+++ b/libs/plugins/modifiercompiler.lower.php
@@ -24,8 +24,8 @@
function smarty_modifiercompiler_lower($params)
{
if (Smarty::$_MBSTRING) {
- return 'mb_strtolower(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
+ return 'mb_strtolower(' . $params[ 0 ] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
}
// no MBString fallback
- return 'strtolower(' . $params[0] . ')';
+ return 'strtolower(' . $params[ 0 ] . ')';
}
diff --git a/libs/plugins/modifiercompiler.string_format.php b/libs/plugins/modifiercompiler.string_format.php
index 71cdf281..bcf9883d 100644
--- a/libs/plugins/modifiercompiler.string_format.php
+++ b/libs/plugins/modifiercompiler.string_format.php
@@ -21,5 +21,5 @@
*/
function smarty_modifiercompiler_string_format($params)
{
- return 'sprintf(' . $params[1] . ',' . $params[0] . ')';
+ return 'sprintf(' . $params[ 1 ] . ',' . $params[ 0 ] . ')';
}
diff --git a/libs/plugins/modifiercompiler.strip.php b/libs/plugins/modifiercompiler.strip.php
index fcd6cbae..8173eed8 100644
--- a/libs/plugins/modifiercompiler.strip.php
+++ b/libs/plugins/modifiercompiler.strip.php
@@ -25,8 +25,8 @@
function smarty_modifiercompiler_strip($params)
{
- if (!isset($params[1])) {
- $params[1] = "' '";
+ if (!isset($params[ 1 ])) {
+ $params[ 1 ] = "' '";
}
return "preg_replace('!\s+!" . Smarty::$_UTF8_MODIFIER . "', {$params[1]},{$params[0]})";
diff --git a/libs/plugins/modifiercompiler.strip_tags.php b/libs/plugins/modifiercompiler.strip_tags.php
index da5d364c..e56bf931 100644
--- a/libs/plugins/modifiercompiler.strip_tags.php
+++ b/libs/plugins/modifiercompiler.strip_tags.php
@@ -21,9 +21,9 @@
*/
function smarty_modifiercompiler_strip_tags($params)
{
- if (!isset($params[1]) || $params[1] === true || trim($params[1], '"') == 'true') {
+ if (!isset($params[ 1 ]) || $params[ 1 ] === true || trim($params[ 1 ], '"') == 'true') {
return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
} else {
- return 'strip_tags(' . $params[0] . ')';
+ return 'strip_tags(' . $params[ 0 ] . ')';
}
}
diff --git a/libs/plugins/modifiercompiler.to_charset.php b/libs/plugins/modifiercompiler.to_charset.php
index 9122d8bb..fea8d827 100644
--- a/libs/plugins/modifiercompiler.to_charset.php
+++ b/libs/plugins/modifiercompiler.to_charset.php
@@ -22,12 +22,12 @@ function smarty_modifiercompiler_to_charset($params)
{
if (!Smarty::$_MBSTRING) {
// FIXME: (rodneyrehm) shouldn't this throw an error?
- return $params[0];
+ return $params[ 0 ];
}
- if (!isset($params[1])) {
- $params[1] = '"ISO-8859-1"';
+ if (!isset($params[ 1 ])) {
+ $params[ 1 ] = '"ISO-8859-1"';
}
- return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', "' . addslashes(Smarty::$_CHARSET) . '")';
+ return 'mb_convert_encoding(' . $params[ 0 ] . ', ' . $params[ 1 ] . ', "' . addslashes(Smarty::$_CHARSET) . '")';
}
diff --git a/libs/plugins/modifiercompiler.unescape.php b/libs/plugins/modifiercompiler.unescape.php
index 3b17ea2e..a3409bc7 100644
--- a/libs/plugins/modifiercompiler.unescape.php
+++ b/libs/plugins/modifiercompiler.unescape.php
@@ -20,31 +20,31 @@
*/
function smarty_modifiercompiler_unescape($params)
{
- if (!isset($params[1])) {
- $params[1] = 'html';
+ if (!isset($params[ 1 ])) {
+ $params[ 1 ] = 'html';
}
- if (!isset($params[2])) {
- $params[2] = '\'' . addslashes(Smarty::$_CHARSET) . '\'';
+ if (!isset($params[ 2 ])) {
+ $params[ 2 ] = '\'' . addslashes(Smarty::$_CHARSET) . '\'';
} else {
- $params[2] = "'" . $params[2] . "'";
+ $params[ 2 ] = "'" . $params[ 2 ] . "'";
}
- switch (trim($params[1], '"\'')) {
+ switch (trim($params[ 1 ], '"\'')) {
case 'entity':
case 'htmlall':
if (Smarty::$_MBSTRING) {
- return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')';
+ return 'mb_convert_encoding(' . $params[ 0 ] . ', ' . $params[ 2 ] . ', \'HTML-ENTITIES\')';
}
- return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')';
+ return 'html_entity_decode(' . $params[ 0 ] . ', ENT_NOQUOTES, ' . $params[ 2 ] . ')';
case 'html':
- return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)';
+ return 'htmlspecialchars_decode(' . $params[ 0 ] . ', ENT_QUOTES)';
case 'url':
- return 'rawurldecode(' . $params[0] . ')';
+ return 'rawurldecode(' . $params[ 0 ] . ')';
default:
- return $params[0];
+ return $params[ 0 ];
}
}
diff --git a/libs/plugins/modifiercompiler.upper.php b/libs/plugins/modifiercompiler.upper.php
index 52ca4e8f..a083c4f7 100644
--- a/libs/plugins/modifiercompiler.upper.php
+++ b/libs/plugins/modifiercompiler.upper.php
@@ -22,8 +22,8 @@
function smarty_modifiercompiler_upper($params)
{
if (Smarty::$_MBSTRING) {
- return 'mb_strtoupper(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
+ return 'mb_strtoupper(' . $params[ 0 ] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
}
// no MBString fallback
- return 'strtoupper(' . $params[0] . ')';
+ return 'strtoupper(' . $params[ 0 ] . ')';
}
diff --git a/libs/plugins/modifiercompiler.wordwrap.php b/libs/plugins/modifiercompiler.wordwrap.php
index 6bb63247..91849738 100644
--- a/libs/plugins/modifiercompiler.wordwrap.php
+++ b/libs/plugins/modifiercompiler.wordwrap.php
@@ -22,26 +22,30 @@
*/
function smarty_modifiercompiler_wordwrap($params, $compiler)
{
- if (!isset($params[1])) {
- $params[1] = 80;
+ if (!isset($params[ 1 ])) {
+ $params[ 1 ] = 80;
}
- if (!isset($params[2])) {
- $params[2] = '"\n"';
+ if (!isset($params[ 2 ])) {
+ $params[ 2 ] = '"\n"';
}
- if (!isset($params[3])) {
- $params[3] = 'false';
+ if (!isset($params[ 3 ])) {
+ $params[ 3 ] = 'false';
}
$function = 'wordwrap';
if (Smarty::$_MBSTRING) {
if ($compiler->template->caching && ($compiler->tag_nocache | $compiler->nocache)) {
- $compiler->parent_compiler->template->compiled->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php';
- $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ 'wordwrap' ][ 'modifier' ][ 'file' ] =
+ SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php';
+ $compiler->template->required_plugins[ 'nocache' ][ 'wordwrap' ][ 'modifier' ][ 'function' ] =
+ 'smarty_mb_wordwrap';
} else {
- $compiler->parent_compiler->template->compiled->required_plugins['compiled']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php';
- $compiler->parent_compiler->template->compiled->required_plugins['compiled']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'wordwrap' ][ 'modifier' ][ 'file' ] =
+ SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php';
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ 'wordwrap' ][ 'modifier' ][ 'function' ] =
+ 'smarty_mb_wordwrap';
}
$function = 'smarty_mb_wordwrap';
}
- return $function . '(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')';
+ return $function . '(' . $params[ 0 ] . ',' . $params[ 1 ] . ',' . $params[ 2 ] . ',' . $params[ 3 ] . ')';
}
diff --git a/libs/plugins/outputfilter.trimwhitespace.php b/libs/plugins/outputfilter.trimwhitespace.php
index ad35d11a..79b48528 100644
--- a/libs/plugins/outputfilter.trimwhitespace.php
+++ b/libs/plugins/outputfilter.trimwhitespace.php
@@ -27,12 +27,13 @@ function smarty_outputfilter_trimwhitespace($source)
$source = preg_replace("/\015\012|\015|\012/", "\n", $source);
// capture Internet Explorer Conditional Comments
- if (preg_match_all('#<!--\[[^\]]+\]>.*?<!\[[^\]]+\]-->#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
+ if (preg_match_all('#<!--\[[^\]]+\]>.*?<!\[[^\]]+\]-->#is', $source, $matches,
+ PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
foreach ($matches as $match) {
- $store[] = $match[0][0];
- $_length = strlen($match[0][0]);
+ $store[] = $match[ 0 ][ 0 ];
+ $_length = strlen($match[ 0 ][ 0 ]);
$replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
- $source = substr_replace($source, $replace, $match[0][1] - $_offset, $_length);
+ $source = substr_replace($source, $replace, $match[ 0 ][ 1 ] - $_offset, $_length);
$_offset += $_length - strlen($replace);
$_store ++;
@@ -45,29 +46,27 @@ function smarty_outputfilter_trimwhitespace($source)
// capture html elements not to be messed with
$_offset = 0;
- if (preg_match_all('#(<script[^>]*>.*?</script[^>]*>)|(<textarea[^>]*>.*?</textarea[^>]*>)|(<pre[^>]*>.*?</pre[^>]*>)#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
+ if (preg_match_all('#(<script[^>]*>.*?</script[^>]*>)|(<textarea[^>]*>.*?</textarea[^>]*>)|(<pre[^>]*>.*?</pre[^>]*>)#is',
+ $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
foreach ($matches as $match) {
- $store[] = $match[0][0];
- $_length = strlen($match[0][0]);
+ $store[] = $match[ 0 ][ 0 ];
+ $_length = strlen($match[ 0 ][ 0 ]);
$replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
- $source = substr_replace($source, $replace, $match[0][1] - $_offset, $_length);
+ $source = substr_replace($source, $replace, $match[ 0 ][ 1 ] - $_offset, $_length);
$_offset += $_length - strlen($replace);
$_store ++;
}
}
- $expressions = array(
- // replace multiple spaces between tags by a single space
- // can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements
- '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1 \2',
- // remove spaces between attributes (but not in attribute values!)
- '#(([a-z0-9]\s*=\s*("[^"]*?")|(\'[^\']*?\'))|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \5',
- // note: for some very weird reason trim() seems to remove spaces inside attributes.
- // maybe a \0 byte or something is interfering?
- '#^\s+<#Ss' => '<',
- '#>\s+$#Ss' => '>',
- );
+ $expressions = array(// replace multiple spaces between tags by a single space
+ // can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements
+ '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1 \2',
+ // remove spaces between attributes (but not in attribute values!)
+ '#(([a-z0-9]\s*=\s*("[^"]*?")|(\'[^\']*?\'))|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \5',
+ // note: for some very weird reason trim() seems to remove spaces inside attributes.
+ // maybe a \0 byte or something is interfering?
+ '#^\s+<#Ss' => '<', '#>\s+$#Ss' => '>',);
$source = preg_replace(array_keys($expressions), array_values($expressions), $source);
// note: for some very weird reason trim() seems to remove spaces inside attributes.
@@ -77,9 +76,9 @@ function smarty_outputfilter_trimwhitespace($source)
$_offset = 0;
if (preg_match_all('#@!@SMARTY:([0-9]+):SMARTY@!@#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
foreach ($matches as $match) {
- $_length = strlen($match[0][0]);
- $replace = $store[$match[1][0]];
- $source = substr_replace($source, $replace, $match[0][1] + $_offset, $_length);
+ $_length = strlen($match[ 0 ][ 0 ]);
+ $replace = $store[ $match[ 1 ][ 0 ] ];
+ $source = substr_replace($source, $replace, $match[ 0 ][ 1 ] + $_offset, $_length);
$_offset += strlen($replace) - $_length;
$_store ++;
diff --git a/libs/plugins/shared.literal_compiler_param.php b/libs/plugins/shared.literal_compiler_param.php
index 47d728a7..8a3711d3 100644
--- a/libs/plugins/shared.literal_compiler_param.php
+++ b/libs/plugins/shared.literal_compiler_param.php
@@ -20,16 +20,17 @@
function smarty_literal_compiler_param($params, $index, $default = null)
{
// not set, go default
- if (!isset($params[$index])) {
+ if (!isset($params[ $index ])) {
return $default;
}
// test if param is a literal
- if (!preg_match('/^([\'"]?)[a-zA-Z0-9-]+(\\1)$/', $params[$index])) {
- throw new SmartyException('$param[' . $index . '] is not a literal and is thus not evaluatable at compile time');
+ if (!preg_match('/^([\'"]?)[a-zA-Z0-9-]+(\\1)$/', $params[ $index ])) {
+ throw new SmartyException('$param[' . $index .
+ '] is not a literal and is thus not evaluatable at compile time');
}
$t = null;
- eval("\$t = " . $params[$index] . ";");
+ eval("\$t = " . $params[ $index ] . ";");
return $t;
}
diff --git a/libs/plugins/shared.make_timestamp.php b/libs/plugins/shared.make_timestamp.php
index f87d40c7..67f86244 100644
--- a/libs/plugins/shared.make_timestamp.php
+++ b/libs/plugins/shared.make_timestamp.php
@@ -21,12 +21,14 @@ function smarty_make_timestamp($string)
if (empty($string)) {
// use "now":
return time();
- } elseif ($string instanceof DateTime || (interface_exists('DateTimeInterface', false) && $string instanceof DateTimeInterface)) {
+ } elseif ($string instanceof DateTime ||
+ (interface_exists('DateTimeInterface', false) && $string instanceof DateTimeInterface)
+ ) {
return (int) $string->format('U'); // PHP 5.2 BC
} elseif (strlen($string) == 14 && ctype_digit($string)) {
// it is mysql timestamp format of YYYYMMDDHHMMSS?
- return mktime(substr($string, 8, 2), substr($string, 10, 2), substr($string, 12, 2),
- substr($string, 4, 2), substr($string, 6, 2), substr($string, 0, 4));
+ return mktime(substr($string, 8, 2), substr($string, 10, 2), substr($string, 12, 2), substr($string, 4, 2),
+ substr($string, 6, 2), substr($string, 0, 4));
} elseif (is_numeric($string)) {
// it is a numeric string, we handle it as timestamp
return (int) $string;
diff --git a/libs/plugins/shared.mb_str_replace.php b/libs/plugins/shared.mb_str_replace.php
index a5682ed3..7fb779f4 100644
--- a/libs/plugins/shared.mb_str_replace.php
+++ b/libs/plugins/shared.mb_str_replace.php
@@ -26,7 +26,7 @@ if (!function_exists('smarty_mb_str_replace')) {
if (is_array($subject)) {
// call mb_replace for each single string in $subject
foreach ($subject as &$string) {
- $string = & smarty_mb_str_replace($search, $replace, $string, $c);
+ $string = &smarty_mb_str_replace($search, $replace, $string, $c);
$count += $c;
}
} elseif (is_array($search)) {
diff --git a/libs/plugins/shared.mb_wordwrap.php b/libs/plugins/shared.mb_wordwrap.php
index 31f4acf0..21632a1c 100644
--- a/libs/plugins/shared.mb_wordwrap.php
+++ b/libs/plugins/shared.mb_wordwrap.php
@@ -24,7 +24,8 @@ if (!function_exists('smarty_mb_wordwrap')) {
function smarty_mb_wordwrap($str, $width = 75, $break = "\n", $cut = false)
{
// break words into tokens using white space as a delimiter
- $tokens = preg_split('!(\s)!S' . Smarty::$_UTF8_MODIFIER, $str, - 1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
+ $tokens =
+ preg_split('!(\s)!S' . Smarty::$_UTF8_MODIFIER, $str, - 1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
$length = 0;
$t = '';
$_previous = false;
@@ -34,8 +35,9 @@ if (!function_exists('smarty_mb_wordwrap')) {
$token_length = mb_strlen($_token, Smarty::$_CHARSET);
$_tokens = array($_token);
if ($token_length > $width) {
- if ($cut) {
- $_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, - 1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
+ if ($cut) {
+ $_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, - 1,
+ PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
}
}
diff --git a/libs/sysplugins/smarty_cacheresource.php b/libs/sysplugins/smarty_cacheresource.php
index ef0324f9..4d668838 100644
--- a/libs/sysplugins/smarty_cacheresource.php
+++ b/libs/sysplugins/smarty_cacheresource.php
@@ -50,7 +50,8 @@ abstract class Smarty_CacheResource
*
* @return bool true or false if the cached content does not exist
*/
- abstract public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached = null, $update = false);
+ abstract public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached = null,
+ $update = false);
/**
* Write the rendered template output to cache
@@ -185,24 +186,24 @@ abstract class Smarty_CacheResource
}
// try smarty's cache
- if (isset($smarty->_cache['cacheresource_handlers'][$type])) {
- return $smarty->_cache['cacheresource_handlers'][$type];
+ if (isset($smarty->_cache[ 'cacheresource_handlers' ][ $type ])) {
+ return $smarty->_cache[ 'cacheresource_handlers' ][ $type ];
}
// try registered resource
- if (isset($smarty->registered_cache_resources[$type])) {
+ if (isset($smarty->registered_cache_resources[ $type ])) {
// do not cache these instances as they may vary from instance to instance
- return $smarty->_cache['cacheresource_handlers'][$type] = $smarty->registered_cache_resources[$type];
+ return $smarty->_cache[ 'cacheresource_handlers' ][ $type ] = $smarty->registered_cache_resources[ $type ];
}
// try sysplugins dir
- if (isset(self::$sysplugins[$type])) {
+ if (isset(self::$sysplugins[ $type ])) {
$cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type);
- return $smarty->_cache['cacheresource_handlers'][$type] = new $cache_resource_class();
+ return $smarty->_cache[ 'cacheresource_handlers' ][ $type ] = new $cache_resource_class();
}
// try plugins dir
$cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type);
if ($smarty->loadPlugin($cache_resource_class)) {
- return $smarty->_cache['cacheresource_handlers'][$type] = new $cache_resource_class();
+ return $smarty->_cache[ 'cacheresource_handlers' ][ $type ] = new $cache_resource_class();
}
// give up
throw new SmartyException("Unable to load cache resource '{$type}'");
diff --git a/libs/sysplugins/smarty_cacheresource_custom.php b/libs/sysplugins/smarty_cacheresource_custom.php
index fc02c4d7..89197fa9 100644
--- a/libs/sysplugins/smarty_cacheresource_custom.php
+++ b/libs/sysplugins/smarty_cacheresource_custom.php
@@ -101,7 +101,8 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
*/
public function populateTimestamp(Smarty_Template_Cached $cached)
{
- $mtime = $this->fetchTimestamp($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id);
+ $mtime =
+ $this->fetchTimestamp($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id);
if ($mtime !== null) {
$cached->timestamp = $mtime;
$cached->exists = !!$cached->timestamp;
@@ -109,7 +110,8 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
return;
}
$timestamp = null;
- $this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $cached->content, $timestamp);
+ $this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $cached->content,
+ $timestamp);
$cached->timestamp = isset($timestamp) ? $timestamp : false;
$cached->exists = !!$cached->timestamp;
}
@@ -131,7 +133,8 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
$content = $cached->content ? $cached->content : null;
$timestamp = $cached->timestamp ? $cached->timestamp : null;
if ($content === null || !$timestamp) {
- $this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id, $_template->compile_id, $content, $timestamp);
+ $this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id,
+ $_template->compile_id, $content, $timestamp);
}
if (isset($content)) {
/** @var Smarty_Internal_Template $_smarty_tpl
@@ -156,7 +159,8 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
*/
public function writeCachedContent(Smarty_Internal_Template $_template, $content)
{
- return $this->save($_template->cached->filepath, $_template->source->name, $_template->cache_id, $_template->compile_id, $_template->cache_lifetime, $content);
+ return $this->save($_template->cached->filepath, $_template->source->name, $_template->cache_id,
+ $_template->compile_id, $_template->cache_lifetime, $content);
}
/**
@@ -172,7 +176,8 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
$timestamp = null;
if ($content === null) {
$timestamp = null;
- $this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id, $_template->compile_id, $content, $timestamp);
+ $this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id,
+ $_template->compile_id, $content, $timestamp);
}
if (isset($content)) {
return $content;
diff --git a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
index 89f82fc3..d6caf3dc 100644
--- a/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
+++ b/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
@@ -55,7 +55,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)
{
$cached->filepath = sha1($_template->source->uid) . '#' . $this->sanitize($cached->source->resource) . '#' .
- $this->sanitize($cached->cache_id) . '#' . $this->sanitize($cached->compile_id);
+ $this->sanitize($cached->cache_id) . '#' . $this->sanitize($cached->compile_id);
$this->populateTimestamp($cached);
}
@@ -69,7 +69,9 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
*/
public function populateTimestamp(Smarty_Template_Cached $cached)
{
- if (!$this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $content, $timestamp, $cached->source->uid)) {
+ if (!$this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $content,
+ $timestamp, $cached->source->uid)
+ ) {
return;
}
$cached->content = $content;
@@ -94,7 +96,9 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
$content = $cached->content ? $cached->content : null;
$timestamp = $cached->timestamp ? $cached->timestamp : null;
if ($content === null || !$timestamp) {
- if (!$this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id, $_template->compile_id, $content, $timestamp, $_template->source->uid)) {
+ if (!$this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id,
+ $_template->compile_id, $content, $timestamp, $_template->source->uid)
+ ) {
return false;
}
}
@@ -138,7 +142,9 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
$content = $_template->cached->content ? $_template->cached->content : null;
$timestamp = null;
if ($content === null) {
- if (!$this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id, $_template->compile_id, $content, $timestamp, $_template->source->uid)) {
+ if (!$this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id,
+ $_template->compile_id, $content, $timestamp, $_template->source->uid)
+ ) {
return false;
}
}
@@ -186,7 +192,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
{
$uid = $this->getTemplateUid($smarty, $resource_name);
$cid = $uid . '#' . $this->sanitize($resource_name) . '#' . $this->sanitize($cache_id) . '#' .
- $this->sanitize($compile_id);
+ $this->sanitize($compile_id);
$this->delete(array($cid));
$this->invalidate($cid, $resource_name, $cache_id, $compile_id, $uid);
return - 1;
@@ -242,14 +248,16 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
*
* @return boolean success
*/
- protected function fetch($cid, $resource_name = null, $cache_id = null, $compile_id = null, &$content = null, &$timestamp = null, $resource_uid = null)
+ protected function fetch($cid, $resource_name = null, $cache_id = null, $compile_id = null, &$content = null,
+ &$timestamp = null, $resource_uid = null)
{
$t = $this->read(array($cid));
- $content = !empty($t[$cid]) ? $t[$cid] : null;
+ $content = !empty($t[ $cid ]) ? $t[ $cid ] : null;
$timestamp = null;
if ($content && ($timestamp = $this->getMetaTimestamp($content))) {
- $invalidated = $this->getLatestInvalidationTimestamp($cid, $resource_name, $cache_id, $compile_id, $resource_uid);
+ $invalidated =
+ $this->getLatestInvalidationTimestamp($cid, $resource_name, $cache_id, $compile_id, $resource_uid);
if ($invalidated > $timestamp) {
$timestamp = null;
$content = null;
@@ -268,7 +276,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
protected function addMetaTimestamp(&$content)
{
$mt = explode(" ", microtime());
- $ts = pack("NN", $mt[1], (int) ($mt[0] * 100000000));
+ $ts = pack("NN", $mt[ 1 ], (int) ($mt[ 0 ] * 100000000));
$content = $ts . $content;
}
@@ -296,7 +304,8 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
*
* @return void
*/
- protected function invalidate($cid = null, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
+ protected function invalidate($cid = null, $resource_name = null, $cache_id = null, $compile_id = null,
+ $resource_uid = null)
{
$now = microtime(true);
$key = null;
@@ -336,7 +345,8 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
*
* @return float the microtime the CacheID was invalidated
*/
- protected function getLatestInvalidationTimestamp($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
+ protected function getLatestInvalidationTimestamp($cid, $resource_name = null, $cache_id = null, $compile_id = null,
+ $resource_uid = null)
{
// abort if there is no CacheID
if (false && !$cid) {
@@ -370,7 +380,8 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
* @return array list of InvalidationKeys
* @uses $invalidationKeyPrefix to prepend to each InvalidationKey
*/
- protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
+ protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null,
+ $resource_uid = null)
{
$t = array('IVK#ALL');
$_name = $_compile = '#';
@@ -422,7 +433,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
$key = 'LOCK#' . $cached->filepath;
$data = $this->read(array($key));
- return $data && time() - $data[$key] < $smarty->locking_timeout;
+ return $data && time() - $data[ $key ] < $smarty->locking_timeout;
}
/**
diff --git a/libs/sysplugins/smarty_data.php b/libs/sysplugins/smarty_data.php
index 7cf18a43..b9f5de9a 100644
--- a/libs/sysplugins/smarty_data.php
+++ b/libs/sysplugins/smarty_data.php
@@ -59,7 +59,7 @@ class Smarty_Data extends Smarty_Internal_Data
} elseif (is_array($_parent)) {
// set up variable values
foreach ($_parent as $_key => $_val) {
- $this->tpl_vars[$_key] = new Smarty_Variable($_val);
+ $this->tpl_vars[ $_key ] = new Smarty_Variable($_val);
}
} elseif ($_parent != null) {
throw new SmartyException("Wrong type for template variables");
diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php
index 23467c59..30053c04 100644
--- a/libs/sysplugins/smarty_internal_cacheresource_file.php
+++ b/libs/sysplugins/smarty_internal_cacheresource_file.php
@@ -34,7 +34,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
// if use_sub_dirs, break file into directories
if ($_template->smarty->use_sub_dirs) {
$_filepath = substr($_filepath, 0, 2) . DS . substr($_filepath, 2, 2) . DS . substr($_filepath, 4, 2) . DS .
- $_filepath;
+ $_filepath;
}
$_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
if (isset($_cache_id)) {
@@ -58,8 +58,8 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
}
$cached->lock_id = $_lock_dir . sha1($_cache_id . $_compile_id . $_template->source->uid) . '.lock';
}
- $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) .
- '.php';
+ $cached->filepath =
+ $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
$cached->timestamp = $cached->exists = is_file($cached->filepath);
if ($cached->exists) {
$cached->timestamp = filemtime($cached->filepath);
@@ -86,7 +86,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
*
* @param Smarty_Internal_Template $_template template object
* @param Smarty_Template_Cached $cached cached object
- * @param bool $update flag if called because cache update
+ * @param bool $update flag if called because cache update
*
* @return boolean true or false if the cached content does not exist
*/
@@ -115,7 +115,9 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
*/
public function writeCachedContent(Smarty_Internal_Template $_template, $content)
{
- if ($_template->smarty->ext->_writeFile->writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
+ if ($_template->smarty->ext->_writeFile->writeFile($_template->cached->filepath, $content,
+ $_template->smarty) === true
+ ) {
if (function_exists('opcache_invalidate')) {
opcache_invalidate($_template->cached->filepath, true);
} elseif (function_exists('apc_compile_file')) {
diff --git a/libs/sysplugins/smarty_internal_compile_append.php b/libs/sysplugins/smarty_internal_compile_append.php
index bd2ffe47..5ec14bc1 100644
--- a/libs/sysplugins/smarty_internal_compile_append.php
+++ b/libs/sysplugins/smarty_internal_compile_append.php
@@ -19,9 +19,9 @@ class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign
/**
* Compiles code for the {append} tag
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $parameter array with compilation parameter
*
* @return string compiled code
*/
@@ -34,11 +34,11 @@ class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
// map to compile assign attributes
- if (isset($_attr['index'])) {
- $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']';
- unset($_attr['index']);
+ if (isset($_attr[ 'index' ])) {
+ $_params[ 'smarty_internal_index' ] = '[' . $_attr[ 'index' ] . ']';
+ unset($_attr[ 'index' ]);
} else {
- $_params['smarty_internal_index'] = '[]';
+ $_params[ 'smarty_internal_index' ] = '[]';
}
$_new_attr = array();
foreach ($_attr as $key => $value) {
diff --git a/libs/sysplugins/smarty_internal_compile_assign.php b/libs/sysplugins/smarty_internal_compile_assign.php
index 46f17733..807ca22e 100644
--- a/libs/sysplugins/smarty_internal_compile_assign.php
+++ b/libs/sysplugins/smarty_internal_compile_assign.php
@@ -21,7 +21,7 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase
*
* @var array
*/
- public $valid_scopes = array('local' => true, 'parent' => true, 'root' => true, 'global' => true,
+ public $valid_scopes = array('local' => true, 'parent' => true, 'root' => true, 'global' => true,
'tpl_root' => true);
/**
diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php
index 8288fdbf..8076a279 100644
--- a/libs/sysplugins/smarty_internal_compile_block.php
+++ b/libs/sysplugins/smarty_internal_compile_block.php
@@ -176,7 +176,7 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
}
}
$_className = 'Block_' . preg_replace('#[^\w\|]+#S', '_', $_name) . '_' .
- preg_replace('![^\w]+!', '_', uniqid(rand(), true));
+ preg_replace('![^\w]+!', '_', uniqid(rand(), true));
// get compiled block code
$_functionCode = $compiler->parser->current_buffer;
// setup buffer for template function code
@@ -185,7 +185,8 @@ class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_Compile_Shared_
$sourceInfo = $compiler->template->source->filepath;
} else {
$basename = $compiler->template->source->handler->getBasename($compiler->template->source);
- $sourceInfo = $compiler->template->source->type .':' . ($basename ? $basename : $compiler->template->source->name);
+ $sourceInfo =
+ $compiler->template->source->type . ':' . ($basename ? $basename : $compiler->template->source->name);
}
$output = "<?php\n";
diff --git a/libs/sysplugins/smarty_internal_compile_break.php b/libs/sysplugins/smarty_internal_compile_break.php
index cbc73d36..0555eccc 100644
--- a/libs/sysplugins/smarty_internal_compile_break.php
+++ b/libs/sysplugins/smarty_internal_compile_break.php
@@ -35,9 +35,9 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
/**
* Compiles code for the {break} tag
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $parameter array with compilation parameter
*
* @return string compiled code
* @throws \SmartyCompilerException
@@ -48,22 +48,22 @@ class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
- if (isset($_attr['levels'])) {
- if (!is_numeric($_attr['levels'])) {
+ if (isset($_attr[ 'levels' ])) {
+ if (!is_numeric($_attr[ 'levels' ])) {
$compiler->trigger_template_error('level attribute must be a numeric constant', null, true);
}
- $_levels = $_attr['levels'];
+ $_levels = $_attr[ 'levels' ];
} else {
$_levels = 1;
}
$level_count = $_levels;
$stack_count = count($compiler->_tag_stack) - 1;
while ($level_count > 0 && $stack_count >= 0) {
- if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {
+ if (isset($_is_loopy[ $compiler->_tag_stack[ $stack_count ][ 0 ] ])) {
$level_count --;
}
$stack_count --;
diff --git a/libs/sysplugins/smarty_internal_compile_call.php b/libs/sysplugins/smarty_internal_compile_call.php
index b7204bec..739df5ec 100644
--- a/libs/sysplugins/smarty_internal_compile_call.php
+++ b/libs/sysplugins/smarty_internal_compile_call.php
@@ -53,13 +53,13 @@ class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
// save possible attributes
- if (isset($_attr['assign'])) {
+ if (isset($_attr[ 'assign' ])) {
// output will be stored in a smarty variable instead of being displayed
- $_assign = $_attr['assign'];
+ $_assign = $_attr[ 'assign' ];
}
//$_name = trim($_attr['name'], "'\"");
- $_name = $_attr['name'];
- unset($_attr['name'], $_attr['assign'], $_attr['nocache']);
+ $_name = $_attr[ 'name' ];
+ unset($_attr[ 'name' ], $_attr[ 'assign' ], $_attr[ 'nocache' ]);
// set flag (compiled code of {function} must be included in cache file
if (!$compiler->template->caching || $compiler->nocache || $compiler->tag_nocache) {
$_nocache = 'true';
diff --git a/libs/sysplugins/smarty_internal_compile_capture.php b/libs/sysplugins/smarty_internal_compile_capture.php
index 016f2cf1..bea31514 100644
--- a/libs/sysplugins/smarty_internal_compile_capture.php
+++ b/libs/sysplugins/smarty_internal_compile_capture.php
@@ -45,14 +45,15 @@ class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- $buffer = isset($_attr['name']) ? $_attr['name'] : "'default'";
- $assign = isset($_attr['assign']) ? $_attr['assign'] : 'null';
- $append = isset($_attr['append']) ? $_attr['append'] : 'null';
+ $buffer = isset($_attr[ 'name' ]) ? $_attr[ 'name' ] : "'default'";
+ $assign = isset($_attr[ 'assign' ]) ? $_attr[ 'assign' ] : 'null';
+ $append = isset($_attr[ 'append' ]) ? $_attr[ 'append' ] : 'null';
- $compiler->_capture_stack[0][] = array($buffer, $assign, $append, $compiler->nocache);
+ $compiler->_capture_stack[ 0 ][] = array($buffer, $assign, $append, $compiler->nocache);
// maybe nocache because of nocache variables
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
- $_output = "<?php \$_smarty_tpl->smarty->_cache['capture_stack'][] = array($buffer, $assign, $append); ob_start(); ?>";
+ $_output =
+ "<?php \$_smarty_tpl->smarty->_cache['capture_stack'][] = array($buffer, $assign, $append); ob_start(); ?>";
return $_output;
}
@@ -103,9 +104,10 @@ class Smarty_Internal_Compile_CaptureClose extends Smarty_Internal_CompileBase
$compiler->tag_nocache = true;
}
- list($buffer, $assign, $append, $compiler->nocache) = array_pop($compiler->_capture_stack[0]);
+ list($buffer, $assign, $append, $compiler->nocache) = array_pop($compiler->_capture_stack[ 0 ]);
- $_output = "<?php list(\$_capture_buffer, \$_capture_assign, \$_capture_append) = array_pop(\$_smarty_tpl->smarty->_cache['capture_stack']);\n";
+ $_output =
+ "<?php list(\$_capture_buffer, \$_capture_assign, \$_capture_append) = array_pop(\$_smarty_tpl->smarty->_cache['capture_stack']);\n";
$_output .= "if (!empty(\$_capture_buffer)) {\n";
$_output .= " if (isset(\$_capture_assign)) \$_smarty_tpl->assign(\$_capture_assign, ob_get_contents());\n";
$_output .= " if (isset( \$_capture_append)) \$_smarty_tpl->append( \$_capture_append, ob_get_contents());\n";
diff --git a/libs/sysplugins/smarty_internal_compile_config_load.php b/libs/sysplugins/smarty_internal_compile_config_load.php
index e957086d..adacaa1b 100644
--- a/libs/sysplugins/smarty_internal_compile_config_load.php
+++ b/libs/sysplugins/smarty_internal_compile_config_load.php
@@ -42,11 +42,10 @@ class Smarty_Internal_Compile_Config_Load extends Smarty_Internal_CompileBase
/**
* Valid scope names
- *
+ *
* @var array
*/
- public $valid_scopes = array('local' => true, 'parent' => true, 'root' => true,
- 'tpl_root' => true);
+ public $valid_scopes = array('local' => true, 'parent' => true, 'root' => true, 'tpl_root' => true);
/**
* Compiles code for the {config_load} tag
@@ -62,32 +61,34 @@ class Smarty_Internal_Compile_Config_Load extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
// save possible attributes
- $conf_file = $_attr['file'];
- if (isset($_attr['section'])) {
- $section = $_attr['section'];
+ $conf_file = $_attr[ 'file' ];
+ if (isset($_attr[ 'section' ])) {
+ $section = $_attr[ 'section' ];
} else {
$section = 'null';
}
$_scope = Smarty::SCOPE_LOCAL;
- if (isset($_attr['scope'])) {
- $_attr['scope'] = trim($_attr['scope'], "'\"");
- if (!isset($this->valid_scopes[$_attr['scope']])) {
- $compiler->trigger_template_error("illegal value '{$_attr['scope']}' for \"scope\" attribute", null, true);
+ if (isset($_attr[ 'scope' ])) {
+ $_attr[ 'scope' ] = trim($_attr[ 'scope' ], "'\"");
+ if (!isset($this->valid_scopes[ $_attr[ 'scope' ] ])) {
+ $compiler->trigger_template_error("illegal value '{$_attr['scope']}' for \"scope\" attribute", null,
+ true);
}
- if ($_attr['scope'] != 'local') {
- if ($_attr['scope'] == 'parent') {
+ if ($_attr[ 'scope' ] != 'local') {
+ if ($_attr[ 'scope' ] == 'parent') {
$_scope = Smarty::SCOPE_PARENT;
- } elseif ($_attr['scope'] == 'root') {
+ } elseif ($_attr[ 'scope' ] == 'root') {
$_scope = Smarty::SCOPE_ROOT;
- } elseif ($_attr['scope'] == 'tpl_root') {
+ } elseif ($_attr[ 'scope' ] == 'tpl_root') {
$_scope = Smarty::SCOPE_TPL_ROOT;
}
- $_scope += (isset($_attr['bubble_up']) && $_attr['bubble_up'] == 'false') ? 0 : Smarty::SCOPE_BUBBLE_UP;
+ $_scope += (isset($_attr[ 'bubble_up' ]) && $_attr[ 'bubble_up' ] == 'false') ? 0 :
+ Smarty::SCOPE_BUBBLE_UP;
}
}
diff --git a/libs/sysplugins/smarty_internal_compile_continue.php b/libs/sysplugins/smarty_internal_compile_continue.php
index 2ee04c94..ac41f418 100644
--- a/libs/sysplugins/smarty_internal_compile_continue.php
+++ b/libs/sysplugins/smarty_internal_compile_continue.php
@@ -48,22 +48,22 @@ class Smarty_Internal_Compile_Continue extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
- if (isset($_attr['levels'])) {
- if (!is_numeric($_attr['levels'])) {
+ if (isset($_attr[ 'levels' ])) {
+ if (!is_numeric($_attr[ 'levels' ])) {
$compiler->trigger_template_error('level attribute must be a numeric constant', null, true);
}
- $_levels = $_attr['levels'];
+ $_levels = $_attr[ 'levels' ];
} else {
$_levels = 1;
}
$level_count = $_levels;
$stack_count = count($compiler->_tag_stack) - 1;
while ($level_count > 0 && $stack_count >= 0) {
- if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {
+ if (isset($_is_loopy[ $compiler->_tag_stack[ $stack_count ][ 0 ] ])) {
$level_count --;
}
$stack_count --;
diff --git a/libs/sysplugins/smarty_internal_compile_debug.php b/libs/sysplugins/smarty_internal_compile_debug.php
index d73c81a1..1668e72e 100644
--- a/libs/sysplugins/smarty_internal_compile_debug.php
+++ b/libs/sysplugins/smarty_internal_compile_debug.php
@@ -34,7 +34,8 @@ class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase
$compiler->tag_nocache = true;
// display debug template
- $_output = "<?php \$_smarty_debug = new Smarty_Internal_Debug;\n \$_smarty_debug->display_debug(\$_smarty_tpl);\n";
+ $_output =
+ "<?php \$_smarty_debug = new Smarty_Internal_Debug;\n \$_smarty_debug->display_debug(\$_smarty_tpl);\n";
$_output .= "unset(\$_smarty_debug);\n?>";
return $_output;
}
diff --git a/libs/sysplugins/smarty_internal_compile_eval.php b/libs/sysplugins/smarty_internal_compile_eval.php
index 407482f0..abdc0f3b 100644
--- a/libs/sysplugins/smarty_internal_compile_eval.php
+++ b/libs/sysplugins/smarty_internal_compile_eval.php
@@ -23,6 +23,7 @@ class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase
* @see Smarty_Internal_CompileBase
*/
public $required_attributes = array('var');
+
/**
* Attribute definition: Overwrites base class.
*
@@ -30,6 +31,7 @@ class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase
* @see Smarty_Internal_CompileBase
*/
public $optional_attributes = array('assign');
+
/**
* Attribute definition: Overwrites base class.
*
@@ -52,13 +54,14 @@ class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase
$this->optional_attributes = array('assign');
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if (isset($_attr['assign'])) {
+ if (isset($_attr[ 'assign' ])) {
// output will be stored in a smarty variable instead of being displayed
- $_assign = $_attr['assign'];
+ $_assign = $_attr[ 'assign' ];
}
// create template object
- $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'." . $_attr['var'] . ", \$_smarty_tpl->smarty, \$_smarty_tpl);";
+ $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'." . $_attr[ 'var' ] .
+ ", \$_smarty_tpl->smarty, \$_smarty_tpl);";
//was there an assign attribute?
if (isset($_assign)) {
$_output .= "\$_smarty_tpl->assign($_assign,\$_template->fetch());";
diff --git a/libs/sysplugins/smarty_internal_compile_extends.php b/libs/sysplugins/smarty_internal_compile_extends.php
index 7ce3dcf6..2e4b543c 100644
--- a/libs/sysplugins/smarty_internal_compile_extends.php
+++ b/libs/sysplugins/smarty_internal_compile_extends.php
@@ -55,37 +55,37 @@ class Smarty_Internal_Compile_Extends extends Smarty_Internal_Compile_Shared_Inh
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', $compiler->parser->lex->line - 1);
}
- if (strpos($_attr['file'], '$_tmp') !== false) {
+ if (strpos($_attr[ 'file' ], '$_tmp') !== false) {
$compiler->trigger_template_error('illegal value for file attribute', $compiler->parser->lex->line - 1);
}
// add code to initialize inheritance
$this->registerInit($compiler, true);
- $file = trim($_attr['file'], '\'"');
+ $file = trim($_attr[ 'file' ], '\'"');
if (strlen($file) > 8 && substr($file, 0, 8) == 'extends:') {
// generate code for each template
$files = array_reverse(explode('|', substr($file, 8)));
$i = 0;
foreach ($files as $file) {
- if ($file[0] == '"') {
+ if ($file[ 0 ] == '"') {
$file = trim($file, '".');
} else {
$file = "'{$file}'";
}
$i ++;
- if ($i == count($files) && isset($_attr['extends_resource'])) {
+ if ($i == count($files) && isset($_attr[ 'extends_resource' ])) {
$this->compileEndChild($compiler);
}
$this->compileInclude($compiler, $file);
}
- if (!isset($_attr['extends_resource'])) {
+ if (!isset($_attr[ 'extends_resource' ])) {
$this->compileEndChild($compiler);
}
} else {
$this->compileEndChild($compiler);
- $this->compileInclude($compiler, $_attr['file']);
+ $this->compileInclude($compiler, $_attr[ 'file' ]);
}
$compiler->has_code = false;
return '';
diff --git a/libs/sysplugins/smarty_internal_compile_for.php b/libs/sysplugins/smarty_internal_compile_for.php
index 7b86d485..571f67a2 100644
--- a/libs/sysplugins/smarty_internal_compile_for.php
+++ b/libs/sysplugins/smarty_internal_compile_for.php
@@ -34,7 +34,7 @@ class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase
*/
public function compile($args, $compiler, $parameter)
{
- $compiler->loopNesting++;
+ $compiler->loopNesting ++;
if ($parameter == 0) {
$this->required_attributes = array('start', 'to');
$this->optional_attributes = array('max', 'step');
@@ -47,41 +47,41 @@ class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase
$output = "<?php\n";
if ($parameter == 1) {
- foreach ($_attr['start'] as $_statement) {
- if (is_array($_statement['var'])) {
- $var = $_statement['var']['var'];
- $index = $_statement['var']['smarty_internal_index'];
+ foreach ($_attr[ 'start' ] as $_statement) {
+ if (is_array($_statement[ 'var' ])) {
+ $var = $_statement[ 'var' ][ 'var' ];
+ $index = $_statement[ 'var' ][ 'smarty_internal_index' ];
} else {
- $var = $_statement['var'];
+ $var = $_statement[ 'var' ];
$index = '';
}
$output .= "\$_smarty_tpl->tpl_vars[$var] = new Smarty_Variable;\n";
$output .= "\$_smarty_tpl->tpl_vars[$var]->value{$index} = {$_statement['value']};\n";
}
- if (is_array($_attr['var'])) {
- $var = $_attr['var']['var'];
- $index = $_attr['var']['smarty_internal_index'];
+ if (is_array($_attr[ 'var' ])) {
+ $var = $_attr[ 'var' ][ 'var' ];
+ $index = $_attr[ 'var' ][ 'smarty_internal_index' ];
} else {
- $var = $_attr['var'];
+ $var = $_attr[ 'var' ];
$index = '';
}
$output .= "if ($_attr[ifexp]) {\nfor (\$_foo=true;$_attr[ifexp]; \$_smarty_tpl->tpl_vars[$var]->value{$index}$_attr[step]) {\n";
} else {
- $_statement = $_attr['start'];
- if (is_array($_statement['var'])) {
- $var = $_statement['var']['var'];
- $index = $_statement['var']['smarty_internal_index'];
+ $_statement = $_attr[ 'start' ];
+ if (is_array($_statement[ 'var' ])) {
+ $var = $_statement[ 'var' ][ 'var' ];
+ $index = $_statement[ 'var' ][ 'smarty_internal_index' ];
} else {
- $var = $_statement['var'];
+ $var = $_statement[ 'var' ];
$index = '';
}
$output .= "\$_smarty_tpl->tpl_vars[$var] = new Smarty_Variable;";
- if (isset($_attr['step'])) {
+ if (isset($_attr[ 'step' ])) {
$output .= "\$_smarty_tpl->tpl_vars[$var]->step = $_attr[step];";
} else {
$output .= "\$_smarty_tpl->tpl_vars[$var]->step = 1;";
}
- if (isset($_attr['max'])) {
+ if (isset($_attr[ 'max' ])) {
$output .= "\$_smarty_tpl->tpl_vars[$var]->total = (int) min(ceil((\$_smarty_tpl->tpl_vars[$var]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$var]->step)),$_attr[max]);\n";
} else {
$output .= "\$_smarty_tpl->tpl_vars[$var]->total = (int) ceil((\$_smarty_tpl->tpl_vars[$var]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$var]->step));\n";
@@ -149,7 +149,7 @@ class Smarty_Internal_Compile_Forclose extends Smarty_Internal_CompileBase
*/
public function compile($args, $compiler, $parameter)
{
- $compiler->loopNesting--;
+ $compiler->loopNesting --;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
// must endblock be nocache?
@@ -162,7 +162,7 @@ class Smarty_Internal_Compile_Forclose extends Smarty_Internal_CompileBase
$output = "<?php }\n";
if ($openTag != 'forelse') {
$output .= "}\n";
- }
+ }
$output .= "?>\n";
return $output;
}
diff --git a/libs/sysplugins/smarty_internal_compile_foreach.php b/libs/sysplugins/smarty_internal_compile_foreach.php
index 74ed9f7f..2ba41bbc 100644
--- a/libs/sysplugins/smarty_internal_compile_foreach.php
+++ b/libs/sysplugins/smarty_internal_compile_foreach.php
@@ -164,11 +164,11 @@ class Smarty_Internal_Compile_Foreach extends Smarty_Internal_Compile_Private_Fo
// maybe nocache because of nocache variables
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
$needTotal = isset($itemAttr[ 'show' ]) || isset($itemAttr[ 'total' ]) || isset($namedAttr[ 'total' ]) ||
- isset($namedAttr[ 'show' ]) || isset($itemAttr[ 'last' ]) || isset($namedAttr[ 'last' ]);
+ isset($namedAttr[ 'show' ]) || isset($itemAttr[ 'last' ]) || isset($namedAttr[ 'last' ]);
// generate output code
$output = "<?php\n";
$output .= "\$_from = \$_smarty_tpl->smarty->ext->_foreach->init(\$_smarty_tpl, $from, " .
- var_export($item, true);
+ var_export($item, true);
if ($name || $needTotal || $key) {
$output .= ', ' . var_export($needTotal, true);
}
diff --git a/libs/sysplugins/smarty_internal_compile_function.php b/libs/sysplugins/smarty_internal_compile_function.php
index 28f33594..0d95e71e 100644
--- a/libs/sysplugins/smarty_internal_compile_function.php
+++ b/libs/sysplugins/smarty_internal_compile_function.php
@@ -53,16 +53,17 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
- $compiler->loopNesting++;
+ $compiler->loopNesting ++;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
- unset($_attr['nocache']);
- $_name = trim($_attr['name'], "'\"");
- $compiler->parent_compiler->tpl_function[$_name] = $compiler->parent_compiler->template->tpl_function[$_name] = array();
+ unset($_attr[ 'nocache' ]);
+ $_name = trim($_attr[ 'name' ], "'\"");
+ $compiler->parent_compiler->tpl_function[ $_name ] =
+ $compiler->parent_compiler->template->tpl_function[ $_name ] = array();
$save = array($_attr, $compiler->parser->current_buffer, $compiler->template->compiled->has_nocache_code,
$compiler->template->caching);
$this->openTag($compiler, 'function', $save);
@@ -100,17 +101,22 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
- $compiler->loopNesting--;
+ $compiler->loopNesting --;
$this->compiler = $compiler;
$saved_data = $this->closeTag($compiler, array('function'));
- $_attr = $saved_data[0];
- $_name = trim($_attr['name'], "'\"");
- $compiler->parent_compiler->tpl_function[$_name]['called_functions'] = $compiler->parent_compiler->template->tpl_function[$_name]['called_functions'] = $compiler->called_functions;
- $compiler->parent_compiler->tpl_function[$_name]['compiled_filepath'] = $compiler->parent_compiler->template->tpl_function[$_name]['compiled_filepath'] = $compiler->parent_compiler->template->compiled->filepath;
- $compiler->parent_compiler->tpl_function[$_name]['uid'] = $compiler->parent_compiler->template->tpl_function[$_name]['uid'] = $compiler->template->source->uid;
+ $_attr = $saved_data[ 0 ];
+ $_name = trim($_attr[ 'name' ], "'\"");
+ $compiler->parent_compiler->tpl_function[ $_name ][ 'called_functions' ] =
+ $compiler->parent_compiler->template->tpl_function[ $_name ][ 'called_functions' ] =
+ $compiler->called_functions;
+ $compiler->parent_compiler->tpl_function[ $_name ][ 'compiled_filepath' ] =
+ $compiler->parent_compiler->template->tpl_function[ $_name ][ 'compiled_filepath' ] =
+ $compiler->parent_compiler->template->compiled->filepath;
+ $compiler->parent_compiler->tpl_function[ $_name ][ 'uid' ] =
+ $compiler->parent_compiler->template->tpl_function[ $_name ][ 'uid' ] = $compiler->template->source->uid;
$compiler->called_functions = array();
$_parameter = $_attr;
- unset($_parameter['name']);
+ unset($_parameter[ 'name' ]);
// default parameter
$_paramsArray = array();
foreach ($_parameter as $_key => $_value) {
@@ -133,7 +139,8 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
$_funcName = "smarty_template_function_{$_name}_{$compiler->template->compiled->nocache_hash}";
$_funcNameCaching = $_funcName . '_nocache';
if ($compiler->template->compiled->has_nocache_code) {
- $compiler->parent_compiler->tpl_function[$_name]['call_name_caching'] = $compiler->parent_compiler->template->tpl_function[$_name]['call_name_caching'] = $_funcNameCaching;
+ $compiler->parent_compiler->tpl_function[ $_name ][ 'call_name_caching' ] =
+ $compiler->parent_compiler->template->tpl_function[ $_name ][ 'call_name_caching' ] = $_funcNameCaching;
$output = "<?php\n";
$output .= "/* {$_funcNameCaching} */\n";
$output .= "if (!function_exists('{$_funcNameCaching}')) {\n";
@@ -147,7 +154,9 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
$output .= "echo \"/*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/<?php ";
$output .= "\\\$saved_tpl_vars = \\\$_smarty_tpl->tpl_vars;\nforeach (\$params as \\\$key => \\\$value) {\n\\\$_smarty_tpl->tpl_vars[\\\$key] = new Smarty_Variable(\\\$value);\n}\n?>";
$output .= "/*/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/\n\";?>";
- $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output));
+ $compiler->parser->current_buffer->append_subtree($compiler->parser,
+ new Smarty_Internal_ParseTree_Tag($compiler->parser,
+ $output));
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
$output = "<?php echo \"/*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%*/<?php ";
$output .= "foreach (Smarty::\\\$global_tpl_vars as \\\$key => \\\$value){\n";
@@ -158,11 +167,16 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
$output .= "\$_smarty_tpl->tpl_vars = array_pop(\$_smarty_tpl->_cache['saved_tpl_vars']);\n}\n}\n";
$output .= "/*/ {$_funcName}_nocache */\n\n";
$output .= "?>\n";
- $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output));
- $_functionCode = new Smarty_Internal_ParseTree_Tag($compiler->parser, preg_replace_callback("/((<\?php )?echo '\/\*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%\*\/([\S\s]*?)\/\*\/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%\*\/';(\?>\n)?)/", array($this,
- 'removeNocache'), $_functionCode->to_smarty_php($compiler->parser)));
+ $compiler->parser->current_buffer->append_subtree($compiler->parser,
+ new Smarty_Internal_ParseTree_Tag($compiler->parser,
+ $output));
+ $_functionCode = new Smarty_Internal_ParseTree_Tag($compiler->parser,
+ preg_replace_callback("/((<\?php )?echo '\/\*%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%\*\/([\S\s]*?)\/\*\/%%SmartyNocache:{$compiler->template->compiled->nocache_hash}%%\*\/';(\?>\n)?)/",
+ array($this, 'removeNocache'),
+ $_functionCode->to_smarty_php($compiler->parser)));
}
- $compiler->parent_compiler->tpl_function[$_name]['call_name'] = $compiler->parent_compiler->template->tpl_function[$_name]['call_name'] = $_funcName;
+ $compiler->parent_compiler->tpl_function[ $_name ][ 'call_name' ] =
+ $compiler->parent_compiler->template->tpl_function[ $_name ][ 'call_name' ] = $_funcName;
$output = "<?php\n";
$output .= "/* {$_funcName} */\n";
$output .= "if (!function_exists('{$_funcName}')) {\n";
@@ -170,29 +184,34 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
$output .= "\$saved_tpl_vars = \$_smarty_tpl->tpl_vars;\n";
$output .= $_paramsCode;
$output .= "foreach (\$params as \$key => \$value) {\n\$_smarty_tpl->tpl_vars[\$key] = new Smarty_Variable(\$value);\n}?>";
- $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output));
+ $compiler->parser->current_buffer->append_subtree($compiler->parser,
+ new Smarty_Internal_ParseTree_Tag($compiler->parser,
+ $output));
$compiler->parser->current_buffer->append_subtree($compiler->parser, $_functionCode);
$output = "<?php foreach (Smarty::\$global_tpl_vars as \$key => \$value){\n";
$output .= "if (!isset(\$_smarty_tpl->tpl_vars[\$key]) || \$_smarty_tpl->tpl_vars[\$key] === \$value) \$saved_tpl_vars[\$key] = \$value;\n}\n";
$output .= "\$_smarty_tpl->tpl_vars = \$saved_tpl_vars;\n}\n}\n";
$output .= "/*/ {$_funcName} */\n\n";
$output .= "?>\n";
- $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $output));
+ $compiler->parser->current_buffer->append_subtree($compiler->parser,
+ new Smarty_Internal_ParseTree_Tag($compiler->parser,
+ $output));
$compiler->parent_compiler->blockOrFunctionCode .= $compiler->parser->current_buffer->to_smarty_php($compiler->parser);
// nocache plugins must be copied
- if (!empty($compiler->template->compiled->required_plugins['nocache'])) {
- foreach ($compiler->template->compiled->required_plugins['nocache'] as $plugin => $tmp) {
+ if (!empty($compiler->template->compiled->required_plugins[ 'nocache' ])) {
+ foreach ($compiler->template->compiled->required_plugins[ 'nocache' ] as $plugin => $tmp) {
foreach ($tmp as $type => $data) {
- $compiler->parent_compiler->template->compiled->required_plugins['compiled'][$plugin][$type] = $data;
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin ][ $type ] =
+ $data;
}
}
}
// restore old buffer
- $compiler->parser->current_buffer = $saved_data[1];
+ $compiler->parser->current_buffer = $saved_data[ 1 ];
// restore old status
- $compiler->template->compiled->has_nocache_code = $saved_data[2];
- $compiler->template->caching = $saved_data[3];
+ $compiler->template->compiled->has_nocache_code = $saved_data[ 2 ];
+ $compiler->template->caching = $saved_data[ 3 ];
return true;
}
@@ -203,7 +222,9 @@ class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase
*/
function removeNocache($match)
{
- $code = preg_replace("/((<\?php )?echo '\/\*%%SmartyNocache:{$this->compiler->template->compiled->nocache_hash}%%\*\/)|(\/\*\/%%SmartyNocache:{$this->compiler->template->compiled->nocache_hash}%%\*\/';(\?>\n)?)/", '', $match[0]);
+ $code =
+ preg_replace("/((<\?php )?echo '\/\*%%SmartyNocache:{$this->compiler->template->compiled->nocache_hash}%%\*\/)|(\/\*\/%%SmartyNocache:{$this->compiler->template->compiled->nocache_hash}%%\*\/';(\?>\n)?)/",
+ '', $match[ 0 ]);
$code = str_replace(array('\\\'', '\\\\\''), array('\'', '\\\''), $code);
return $code;
}
diff --git a/libs/sysplugins/smarty_internal_compile_if.php b/libs/sysplugins/smarty_internal_compile_if.php
index 84bafc5d..4286e703 100644
--- a/libs/sysplugins/smarty_internal_compile_if.php
+++ b/libs/sysplugins/smarty_internal_compile_if.php
@@ -38,37 +38,38 @@ class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase
$compiler->trigger_template_error("missing if condition", null, true);
}
- if (is_array($parameter['if condition'])) {
+ if (is_array($parameter[ 'if condition' ])) {
if ($compiler->nocache) {
$_nocache = ',true';
// create nocache var to make it know for further compiling
- if (is_array($parameter['if condition']['var'])) {
- $var = trim($parameter['if condition']['var']['var'], "'");
+ if (is_array($parameter[ 'if condition' ][ 'var' ])) {
+ $var = trim($parameter[ 'if condition' ][ 'var' ][ 'var' ], "'");
} else {
- $var = trim($parameter['if condition']['var'], "'");
+ $var = trim($parameter[ 'if condition' ][ 'var' ], "'");
}
- if (isset($compiler->template->tpl_vars[$var])) {
- $compiler->template->tpl_vars[$var]->nocache = true;
+ if (isset($compiler->template->tpl_vars[ $var ])) {
+ $compiler->template->tpl_vars[ $var ]->nocache = true;
} else {
- $compiler->template->tpl_vars[$var] = new Smarty_Variable(null, true);
+ $compiler->template->tpl_vars[ $var ] = new Smarty_Variable(null, true);
}
} else {
$_nocache = '';
}
- if (is_array($parameter['if condition']['var'])) {
- $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] .
- "]) || !is_array(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] .
- "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" . $parameter['if condition']['var']['var'] .
- "$_nocache);\n";
- $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" .
- $parameter['if condition']['var']['smarty_internal_index'] . " = " .
- $parameter['if condition']['value'] . ") {?>";
+ if (is_array($parameter[ 'if condition' ][ 'var' ])) {
+ $_output =
+ "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]) || !is_array(\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" .
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] . "$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value" . $parameter[ 'if condition' ][ 'var' ][ 'smarty_internal_index' ] . " = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
} else {
- $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] .
- "])) \$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] .
- "] = new Smarty_Variable(null{$_nocache});";
- $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " .
- $parameter['if condition']['value'] . ") {?>";
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] .
+ "])) \$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] .
+ "] = new Smarty_Variable(null{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] . "]->value = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
}
return $_output;
@@ -133,20 +134,20 @@ class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase
$compiler->trigger_template_error("missing elseif condition", null, true);
}
- if (is_array($parameter['if condition'])) {
+ if (is_array($parameter[ 'if condition' ])) {
$condition_by_assign = true;
if ($compiler->nocache) {
$_nocache = ',true';
// create nocache var to make it know for further compiling
- if (is_array($parameter['if condition']['var'])) {
- $var = trim($parameter['if condition']['var']['var'], "'");
+ if (is_array($parameter[ 'if condition' ][ 'var' ])) {
+ $var = trim($parameter[ 'if condition' ][ 'var' ][ 'var' ], "'");
} else {
- $var = trim($parameter['if condition']['var'], "'");
+ $var = trim($parameter[ 'if condition' ][ 'var' ], "'");
}
- if (isset($compiler->template->tpl_vars[$var])) {
- $compiler->template->tpl_vars[$var]->nocache = true;
+ if (isset($compiler->template->tpl_vars[ $var ])) {
+ $compiler->template->tpl_vars[ $var ]->nocache = true;
} else {
- $compiler->template->tpl_vars[$var] = new Smarty_Variable(null, true);
+ $compiler->template->tpl_vars[ $var ] = new Smarty_Variable(null, true);
}
} else {
$_nocache = '';
@@ -158,21 +159,23 @@ class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase
if (empty($compiler->prefix_code)) {
if ($condition_by_assign) {
$this->openTag($compiler, 'elseif', array($nesting + 1, $compiler->tag_nocache));
- if (is_array($parameter['if condition']['var'])) {
+ if (is_array($parameter[ 'if condition' ][ 'var' ])) {
$_output = "<?php } else { if (!isset(\$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var']['var'] . "]) || !is_array(\$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var']['var'] .
- "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" .
- $parameter['if condition']['var']['var'] . "$_nocache);\n";
- $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" .
- $parameter['if condition']['var']['smarty_internal_index'] . " = " .
- $parameter['if condition']['value'] . ") {?>";
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]) || !is_array(\$_smarty_tpl->tpl_vars[" .
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" .
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] . "$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value" . $parameter[ 'if condition' ][ 'var' ][ 'smarty_internal_index' ] . " = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
} else {
- $_output = "<?php } else { if (!isset(\$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var'] . "])) \$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var'] . "] = new Smarty_Variable(null{$_nocache});";
- $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " .
- $parameter['if condition']['value'] . ") {?>";
+ $_output =
+ "<?php } else { if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] .
+ "])) \$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] .
+ "] = new Smarty_Variable(null{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] . "]->value = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
}
return $_output;
@@ -190,24 +193,25 @@ class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase
$tmp = $compiler->appendCode("<?php } else {?>", $tmp);
$this->openTag($compiler, 'elseif', array($nesting + 1, $compiler->tag_nocache));
if ($condition_by_assign) {
- if (is_array($parameter['if condition']['var'])) {
+ if (is_array($parameter[ 'if condition' ][ 'var' ])) {
$_output = $compiler->appendCode($tmp, "<?php if (!isset(\$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var']['var'] .
- "]) || !is_array(\$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var']['var'] .
- "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" .
- $parameter['if condition']['var']['var'] . "$_nocache);\n");
- $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" .
- $parameter['if condition']['var']['smarty_internal_index'] . " = " .
- $parameter['if condition']['value'] . ") {?>";
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]) || !is_array(\$_smarty_tpl->tpl_vars[" .
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" .
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "$_nocache);\n");
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value" . $parameter[ 'if condition' ][ 'var' ][ 'smarty_internal_index' ] . " = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
} else {
$_output = $compiler->appendCode($tmp, "<?php if (!isset(\$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var'] .
- "])) \$_smarty_tpl->tpl_vars[" .
- $parameter['if condition']['var'] .
- "] = new Smarty_Variable(null{$_nocache});");
- $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " .
- $parameter['if condition']['value'] . ") {?>";
+ $parameter[ 'if condition' ][ 'var' ] .
+ "])) \$_smarty_tpl->tpl_vars[" .
+ $parameter[ 'if condition' ][ 'var' ] .
+ "] = new Smarty_Variable(null{$_nocache});");
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] . "]->value = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
}
return $_output;
diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php
index 13a06894..733bdee1 100644
--- a/libs/sysplugins/smarty_internal_compile_include.php
+++ b/libs/sysplugins/smarty_internal_compile_include.php
@@ -58,8 +58,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
*
* @var array
*/
- public $valid_scopes = array('local' => true, 'parent' => true, 'root' => true,
- 'tpl_root' => true);
+ public $valid_scopes = array('local' => true, 'parent' => true, 'root' => true, 'tpl_root' => true);
/**
* Compiles code for the {include} tag
@@ -76,13 +75,13 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- $hashResourceName = $fullResourceName = $source_resource = $_attr['file'];
+ $hashResourceName = $fullResourceName = $source_resource = $_attr[ 'file' ];
$variable_template = false;
$cache_tpl = false;
// parse resource_name
if (preg_match('/^([\'"])(([A-Za-z0-9_\-]{2,})[:])?(([^$()]+)|(.+))\1$/', $source_resource, $match)) {
- $type = !empty($match[3]) ? $match[3] : $compiler->template->smarty->default_resource_type;
- $name = !empty($match[5]) ? $match[5] : $match[6];
+ $type = !empty($match[ 3 ]) ? $match[ 3 ] : $compiler->template->smarty->default_resource_type;
+ $name = !empty($match[ 5 ]) ? $match[ 5 ] : $match[ 6 ];
$handler = Smarty_Resource::load($compiler->smarty, $type);
if ($handler->recompiled || $handler->uncompiled) {
$variable_template = true;
@@ -91,40 +90,41 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
if ($type != 'string') {
$fullResourceName = "{$type}:{$name}";
$compiled = $compiler->parent_compiler->template->compiled;
- if (isset($compiled->includes[$fullResourceName])) {
- $compiled->includes[$fullResourceName] ++;
+ if (isset($compiled->includes[ $fullResourceName ])) {
+ $compiled->includes[ $fullResourceName ] ++;
$cache_tpl = true;
} else {
- $compiled->includes[$fullResourceName] = 1;
+ $compiled->includes[ $fullResourceName ] = 1;
}
$fullResourceName = '"' . $fullResourceName . '"';
}
}
- if (empty($match[5])) {
+ if (empty($match[ 5 ])) {
$variable_template = true;
}
} else {
$variable_template = true;
}
- if (isset($_attr['assign'])) {
+ if (isset($_attr[ 'assign' ])) {
// output will be stored in a smarty variable instead of being displayed
- $_assign = $_attr['assign'];
+ $_assign = $_attr[ 'assign' ];
}
// scope setup
$_scope = Smarty::SCOPE_LOCAL;
- if (isset($_attr['scope'])) {
- $_attr['scope'] = trim($_attr['scope'], "'\"");
- if (!isset($this->valid_scopes[$_attr['scope']])) {
- $compiler->trigger_template_error("illegal value '{$_attr['scope']}' for \"scope\" attribute", null, true);
+ if (isset($_attr[ 'scope' ])) {
+ $_attr[ 'scope' ] = trim($_attr[ 'scope' ], "'\"");
+ if (!isset($this->valid_scopes[ $_attr[ 'scope' ] ])) {
+ $compiler->trigger_template_error("illegal value '{$_attr['scope']}' for \"scope\" attribute", null,
+ true);
}
- if ($_attr['scope'] != 'local') {
- if ($_attr['scope'] == 'parent') {
+ if ($_attr[ 'scope' ] != 'local') {
+ if ($_attr[ 'scope' ] == 'parent') {
$_scope = Smarty::SCOPE_PARENT;
- } elseif ($_attr['scope'] == 'root') {
+ } elseif ($_attr[ 'scope' ] == 'root') {
$_scope = Smarty::SCOPE_ROOT;
- } elseif ($_attr['scope'] == 'tpl_root') {
+ } elseif ($_attr[ 'scope' ] == 'tpl_root') {
$_scope = Smarty::SCOPE_TPL_ROOT;
}
$_scope += (isset($_attr[ 'bubble_up' ]) && $_attr[ 'bubble_up' ] == 'false') ? 0 :
@@ -141,7 +141,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
// assume caching is off
$_caching = Smarty::CACHING_OFF;
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->tag_nocache = true;
}
@@ -153,10 +153,10 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
}
// flag if included template code should be merged into caller
- $merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) &&
- !$compiler->template->source->handler->recompiled;
+ $merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $_attr[ 'inline' ] === true) &&
+ !$compiler->template->source->handler->recompiled;
- if ($merge_compiled_includes && $_attr['inline'] !== true) {
+ if ($merge_compiled_includes && $_attr[ 'inline' ] !== true) {
// variable template name ?
if ($variable_template) {
$merge_compiled_includes = false;
@@ -166,10 +166,11 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
}
}
// variable compile_id?
- if (isset($_attr['compile_id'])) {
- if (!((substr_count($_attr['compile_id'], '"') == 2 || substr_count($_attr['compile_id'], "'") == 2 ||
- is_numeric($_attr['compile_id']))) || substr_count($_attr['compile_id'], '(') != 0 ||
- substr_count($_attr['compile_id'], '$_smarty_tpl->') != 0
+ if (isset($_attr[ 'compile_id' ])) {
+ if (!((substr_count($_attr[ 'compile_id' ], '"') == 2 ||
+ substr_count($_attr[ 'compile_id' ], "'") == 2 || is_numeric($_attr[ 'compile_id' ]))) ||
+ substr_count($_attr[ 'compile_id' ], '(') != 0 ||
+ substr_count($_attr[ 'compile_id' ], '$_smarty_tpl->') != 0
) {
$merge_compiled_includes = false;
if ($compiler->template->caching) {
@@ -186,28 +187,28 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
* a call in nocache mode.
*
*/
- if ($_attr['nocache'] !== true && $_attr['caching']) {
- $_caching = $_new_caching = (int) $_attr['caching'];
+ if ($_attr[ 'nocache' ] !== true && $_attr[ 'caching' ]) {
+ $_caching = $_new_caching = (int) $_attr[ 'caching' ];
$call_nocache = true;
} else {
$_new_caching = Smarty::CACHING_LIFETIME_CURRENT;
}
- if (isset($_attr['cache_lifetime'])) {
- $_cache_lifetime = $_attr['cache_lifetime'];
+ if (isset($_attr[ 'cache_lifetime' ])) {
+ $_cache_lifetime = $_attr[ 'cache_lifetime' ];
$call_nocache = true;
$_caching = $_new_caching;
} else {
$_cache_lifetime = '$_smarty_tpl->cache_lifetime';
}
- if (isset($_attr['cache_id'])) {
- $_cache_id = $_attr['cache_id'];
+ if (isset($_attr[ 'cache_id' ])) {
+ $_cache_id = $_attr[ 'cache_id' ];
$call_nocache = true;
$_caching = $_new_caching;
} else {
$_cache_id = '$_smarty_tpl->cache_id';
}
- if (isset($_attr['compile_id'])) {
- $_compile_id = $_attr['compile_id'];
+ if (isset($_attr[ 'compile_id' ])) {
+ $_compile_id = $_attr[ 'compile_id' ];
} else {
$_compile_id = '$_smarty_tpl->compile_id';
}
@@ -219,10 +220,10 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$has_compiled_template = false;
if ($merge_compiled_includes) {
- $c_id = isset($_attr['compile_id']) ? $_attr['compile_id'] : $compiler->template->compile_id;
+ $c_id = isset($_attr[ 'compile_id' ]) ? $_attr[ 'compile_id' ] : $compiler->template->compile_id;
// we must observe different compile_id and caching
$t_hash = sha1($c_id . ($_caching ? '--caching' : '--nocaching'));
- if (!isset($compiler->parent_compiler->mergedSubTemplatesData[$hashResourceName][$t_hash])) {
+ if (!isset($compiler->parent_compiler->mergedSubTemplatesData[ $hashResourceName ][ $t_hash ])) {
$has_compiled_template =
$this->compileInlineTemplate($compiler, $fullResourceName, $_caching, $hashResourceName, $t_hash,
$c_id);
@@ -231,7 +232,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
}
}
// delete {include} standard attributes
- unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['compile_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline'], $_attr['bubble_up']);
+ unset($_attr[ 'file' ], $_attr[ 'assign' ], $_attr[ 'cache_id' ], $_attr[ 'compile_id' ], $_attr[ 'cache_lifetime' ], $_attr[ 'nocache' ], $_attr[ 'caching' ], $_attr[ 'scope' ], $_attr[ 'inline' ], $_attr[ 'bubble_up' ]);
// remaining attributes must be assigned as smarty variable
$_vars_nc = '';
if (!empty($_attr)) {
@@ -250,7 +251,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$_vars = 'array()';
}
$update_compile_id = $compiler->template->caching && !$compiler->tag_nocache && !$compiler->nocache &&
- $_compile_id != '$_smarty_tpl->compile_id';
+ $_compile_id != '$_smarty_tpl->compile_id';
if ($has_compiled_template && !$call_nocache) {
$_output = "<?php\n";
if ($update_compile_id) {
@@ -315,11 +316,12 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
{
$compiler->smarty->allow_ambiguous_resources = true;
/* @var Smarty_Internal_Template $tpl */
- $tpl =
- new $compiler->smarty->template_class (trim($fullResourceName, '"\''), $compiler->smarty, $compiler->template,
- $compiler->template->cache_id, $c_id, $_caching);
+ $tpl = new $compiler->smarty->template_class (trim($fullResourceName, '"\''), $compiler->smarty,
+ $compiler->template, $compiler->template->cache_id, $c_id,
+ $_caching);
if (!($tpl->source->handler->uncompiled) && $tpl->source->exists) {
- $compiler->parent_compiler->mergedSubTemplatesData[$hashResourceName][$t_hash]['uid'] = $tpl->source->uid;
+ $compiler->parent_compiler->mergedSubTemplatesData[ $hashResourceName ][ $t_hash ][ 'uid' ] =
+ $tpl->source->uid;
if (isset($compiler->template->ext->_inheritance)) {
$tpl->ext->_inheritance = clone $compiler->template->ext->_inheritance;
}
@@ -327,17 +329,18 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$tpl->compiled->nocache_hash = $compiler->parent_compiler->template->compiled->nocache_hash;
$tpl->loadCompiler();
// save unique function name
- $compiler->parent_compiler->mergedSubTemplatesData[$hashResourceName][$t_hash]['func'] =
+ $compiler->parent_compiler->mergedSubTemplatesData[ $hashResourceName ][ $t_hash ][ 'func' ] =
$tpl->compiled->unifunc = 'content_' . str_replace(array('.', ','), '_', uniqid('', true));
// make sure whole chain gets compiled
$tpl->mustCompile = true;
- $compiler->parent_compiler->mergedSubTemplatesData[$hashResourceName][$t_hash]['nocache_hash'] =
+ $compiler->parent_compiler->mergedSubTemplatesData[ $hashResourceName ][ $t_hash ][ 'nocache_hash' ] =
$tpl->compiled->nocache_hash;
if ($compiler->template->source->type == 'file') {
$sourceInfo = $compiler->template->source->filepath;
} else {
$basename = $compiler->template->source->handler->getBasename($compiler->template->source);
- $sourceInfo = $compiler->template->source->type .':' . ($basename ? $basename : $compiler->template->source->name);
+ $sourceInfo = $compiler->template->source->type . ':' .
+ ($basename ? $basename : $compiler->template->source->name);
}
// get compiled code
$compiled_code = "<?php\n\n";
@@ -358,7 +361,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
$compiled_code);
$compiler->template->compiled->has_nocache_code = true;
}
- $compiler->parent_compiler->mergedSubTemplatesCode[$tpl->compiled->unifunc] = $compiled_code;
+ $compiler->parent_compiler->mergedSubTemplatesCode[ $tpl->compiled->unifunc ] = $compiled_code;
return true;
} else {
return false;
diff --git a/libs/sysplugins/smarty_internal_compile_include_php.php b/libs/sysplugins/smarty_internal_compile_include_php.php
index e7e62997..a2edd42b 100644
--- a/libs/sysplugins/smarty_internal_compile_include_php.php
+++ b/libs/sysplugins/smarty_internal_compile_include_php.php
@@ -64,7 +64,7 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase
$_smarty_tpl = $compiler->template;
$_filepath = false;
$_file = null;
- eval('$_file = @' . $_attr['file'] . ';');
+ eval('$_file = @' . $_attr[ 'file' ] . ';');
if (!isset($compiler->smarty->security_policy) && file_exists($_file)) {
$_filepath = $compiler->smarty->_realpath($_file, true);
} else {
@@ -91,13 +91,13 @@ class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase
$compiler->smarty->security_policy->isTrustedPHPDir($_filepath);
}
- if (isset($_attr['assign'])) {
+ if (isset($_attr[ 'assign' ])) {
// output will be stored in a smarty variable instead of being displayed
- $_assign = $_attr['assign'];
+ $_assign = $_attr[ 'assign' ];
}
$_once = '_once';
- if (isset($_attr['once'])) {
- if ($_attr['once'] == 'false') {
+ if (isset($_attr[ 'once' ])) {
+ if ($_attr[ 'once' ] == 'false') {
$_once = '';
}
}
diff --git a/libs/sysplugins/smarty_internal_compile_insert.php b/libs/sysplugins/smarty_internal_compile_insert.php
index 5c753ffa..dbccbac3 100644
--- a/libs/sysplugins/smarty_internal_compile_insert.php
+++ b/libs/sysplugins/smarty_internal_compile_insert.php
@@ -66,24 +66,24 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
$_output = '<?php ';
// save possible attributes
- eval('$_name = @' . $_attr['name'] . ';');
- if (isset($_attr['assign'])) {
+ eval('$_name = @' . $_attr[ 'name' ] . ';');
+ if (isset($_attr[ 'assign' ])) {
// output will be stored in a smarty variable instead of being displayed
- $_assign = $_attr['assign'];
+ $_assign = $_attr[ 'assign' ];
// create variable to make sure that the compiler knows about its nocache status
- $var = trim($_attr['assign'], "'");
- if (isset($compiler->template->tpl_vars[$var])) {
- $compiler->template->tpl_vars[$var]->nocache = true;
+ $var = trim($_attr[ 'assign' ], "'");
+ if (isset($compiler->template->tpl_vars[ $var ])) {
+ $compiler->template->tpl_vars[ $var ]->nocache = true;
} else {
- $compiler->template->tpl_vars[$var] = new Smarty_Variable(null, true);
+ $compiler->template->tpl_vars[ $var ] = new Smarty_Variable(null, true);
}
}
- if (isset($_attr['script'])) {
+ if (isset($_attr[ 'script' ])) {
// script which must be included
$_function = "smarty_insert_{$_name}";
$_smarty_tpl = $compiler->template;
$_filepath = false;
- eval('$_script = @' . $_attr['script'] . ';');
+ eval('$_script = @' . $_attr[ 'script' ] . ';');
if (!isset($compiler->smarty->security_policy) && file_exists($_script)) {
$_filepath = $_script;
} else {
@@ -109,7 +109,8 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
$_output .= "require_once '{$_filepath}' ;";
require_once $_filepath;
if (!is_callable($_function)) {
- $compiler->trigger_template_error(" {insert} function '{$_function}' is not callable in script file '{$_script}'", null, true);
+ $compiler->trigger_template_error(" {insert} function '{$_function}' is not callable in script file '{$_script}'",
+ null, true);
}
} else {
$_filepath = 'null';
@@ -118,12 +119,13 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase
if (!is_callable($_function)) {
// try plugin
if (!$_function = $compiler->getPlugin($_name, 'insert')) {
- $compiler->trigger_template_error("{insert} no function or plugin found for '{$_name}'", null, true);
+ $compiler->trigger_template_error("{insert} no function or plugin found for '{$_name}'", null,
+ true);
}
}
}
// delete {insert} standard attributes
- unset($_attr['name'], $_attr['assign'], $_attr['script'], $_attr['nocache']);
+ unset($_attr[ 'name' ], $_attr[ 'assign' ], $_attr[ 'script' ], $_attr[ 'nocache' ]);
// convert attributes into parameter array string
$_paramsArray = array();
foreach ($_attr as $_key => $_value) {
diff --git a/libs/sysplugins/smarty_internal_compile_ldelim.php b/libs/sysplugins/smarty_internal_compile_ldelim.php
index 8c6b701e..7251dcd6 100644
--- a/libs/sysplugins/smarty_internal_compile_ldelim.php
+++ b/libs/sysplugins/smarty_internal_compile_ldelim.php
@@ -29,7 +29,7 @@ class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
// this tag does not return compiled code
diff --git a/libs/sysplugins/smarty_internal_compile_private_block_plugin.php b/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
index 30f5d1cf..758b3320 100644
--- a/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
+++ b/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
@@ -66,8 +66,7 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
$output .= "if (!is_callable({$callable})) {\nthrow new SmartyException('block tag \'{$tag}\' not callable or registered');\n}\n";
}
$output .= "\$_smarty_tpl->smarty->_cache['_tag_stack'][] = array('{$tag}', {$_params});\n";
- $output .=
- "\$_block_repeat{$this->nesting}=true;\necho {$callback}({$_params}, null, \$_smarty_tpl, \$_block_repeat{$this->nesting});\nwhile (\$_block_repeat{$this->nesting}) {\nob_start();\n?>";
+ $output .= "\$_block_repeat{$this->nesting}=true;\necho {$callback}({$_params}, null, \$_smarty_tpl, \$_block_repeat{$this->nesting});\nwhile (\$_block_repeat{$this->nesting}) {\nob_start();\n?>";
$this->openTag($compiler, $tag, array($_params, $compiler->nocache, $callback));
// maybe nocache because of nocache variables or nocache plugin
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
@@ -90,11 +89,11 @@ class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_Compi
$mod_pre = "ob_start();\n";
$mod_post = 'echo ' . $compiler->compileTag('private_modifier', array(),
array('modifierlist' => $parameter[ 'modifier_list' ],
- 'value' => 'ob_get_clean()')) . ";\n";
+ 'value' => 'ob_get_clean()')) . ";\n";
}
$output = "<?php " . $mod_content . "\$_block_repeat{$this->nesting}=false;\n" . $mod_pre .
- "echo {$callback}({$_params}, " . $mod_content2 .
- ", \$_smarty_tpl, \$_block_repeat{$this->nesting});\n" . $mod_post . "}\n";
+ "echo {$callback}({$_params}, " . $mod_content2 .
+ ", \$_smarty_tpl, \$_block_repeat{$this->nesting});\n" . $mod_post . "}\n";
$output .= "array_pop(\$_smarty_tpl->smarty->_cache['_tag_stack']);";
$output .= "?>";
$this->nesting --;
diff --git a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
index 4c5dfd8f..bf569be3 100644
--- a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
+++ b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php
@@ -110,11 +110,11 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
public function buildPropertyPreg($named, $attributes)
{
if ($named) {
- $this->resultOffsets['named'] = $this->startOffset + 3;
+ $this->resultOffsets[ 'named' ] = $this->startOffset + 3;
$this->propertyPreg .= "([\$]smarty[.]{$this->tagName}[.]{$attributes['name']}[.](";
$properties = $this->nameProperties;
} else {
- $this->resultOffsets['item'] = $this->startOffset + 3;
+ $this->resultOffsets[ 'item' ] = $this->startOffset + 3;
$this->propertyPreg .= "([\$]{$attributes['item']}[@](";
$properties = $this->itemProperties;
}
@@ -140,8 +140,8 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
preg_match_all($this->propertyPreg, $source, $match, PREG_SET_ORDER);
foreach ($this->resultOffsets as $key => $offset) {
foreach ($match as $m) {
- if (isset($m[$offset]) && !empty($m[$offset])) {
- $this->matchResults[$key][strtolower($m[$offset])] = true;
+ if (isset($m[ $offset ]) && !empty($m[ $offset ])) {
+ $this->matchResults[ $key ][ strtolower($m[ $offset ]) ] = true;
}
}
}
@@ -173,9 +173,11 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
$_content = $nextCompiler->template->source->getContent();
if ($_content != '') {
// run pre filter if required
- if ((isset($nextCompiler->smarty->autoload_filters['pre']) ||
- isset($nextCompiler->smarty->registered_filters['pre']))) {
- $_content = $nextCompiler->smarty->ext->_filterHandler->runFilter('pre', $_content, $nextCompiler->template);
+ if ((isset($nextCompiler->smarty->autoload_filters[ 'pre' ]) ||
+ isset($nextCompiler->smarty->registered_filters[ 'pre' ]))
+ ) {
+ $_content = $nextCompiler->smarty->ext->_filterHandler->runFilter('pre', $_content,
+ $nextCompiler->template);
}
$this->matchProperty($_content);
}
@@ -190,7 +192,6 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com
*/
public function matchBlockSource(Smarty_Internal_TemplateCompilerBase $compiler)
{
-
}
/**
diff --git a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
index 0d0ab813..36e6e9f8 100644
--- a/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
+++ b/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
@@ -35,25 +35,25 @@ class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_Co
/**
* Compiles code for the execution of function plugin
*
- * @param array $args array with attributes from parser
- * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
- * @param string $tag name of function plugin
- * @param string $function PHP function name
+ * @param array $args array with attributes from parser
+ * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function plugin
+ * @param string $function PHP function name
*
* @return string compiled code
*/
- public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $function)
+ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter, $tag, $function)
{
// This tag does create output
$compiler->has_output = true;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->tag_nocache = true;
}
- unset($_attr['nocache']);
+ unset($_attr[ 'nocache' ]);
// convert attributes into parameter array string
$_paramsArray = array();
foreach ($_attr as $_key => $_value) {
diff --git a/libs/sysplugins/smarty_internal_compile_private_modifier.php b/libs/sysplugins/smarty_internal_compile_private_modifier.php
index 9594d2ae..9ee33dae 100644
--- a/libs/sysplugins/smarty_internal_compile_private_modifier.php
+++ b/libs/sysplugins/smarty_internal_compile_private_modifier.php
@@ -31,15 +31,15 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- $output = $parameter['value'];
+ $output = $parameter[ 'value' ];
// loop over list of modifiers
- foreach ($parameter['modifierlist'] as $single_modifier) {
- $modifier = $single_modifier[0];
- $single_modifier[0] = $output;
+ foreach ($parameter[ 'modifierlist' ] as $single_modifier) {
+ $modifier = $single_modifier[ 0 ];
+ $single_modifier[ 0 ] = $output;
$params = implode(',', $single_modifier);
// check if we know already the type of modifier
- if (isset($compiler->known_modifier_type[$modifier])) {
- $modifier_types = array($compiler->known_modifier_type[$modifier]);
+ if (isset($compiler->known_modifier_type[ $modifier ])) {
+ $modifier_types = array($compiler->known_modifier_type[ $modifier ]);
} else {
$modifier_types = array(1, 2, 3, 4, 5, 6);
}
@@ -47,27 +47,30 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
switch ($type) {
case 1:
// registered modifier
- if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier])) {
- $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];
+ if (isset($compiler->smarty->registered_plugins[ Smarty::PLUGIN_MODIFIER ][ $modifier ])) {
+ $function =
+ $compiler->smarty->registered_plugins[ Smarty::PLUGIN_MODIFIER ][ $modifier ][ 0 ];
if (!is_array($function)) {
$output = "{$function}({$params})";
} else {
- if (is_object($function[0])) {
+ if (is_object($function[ 0 ])) {
$output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' .
- $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')';
+ $modifier . '\'][0][0]->' . $function[ 1 ] . '(' . $params . ')';
} else {
- $output = $function[0] . '::' . $function[1] . '(' . $params . ')';
+ $output = $function[ 0 ] . '::' . $function[ 1 ] . '(' . $params . ')';
}
}
- $compiler->known_modifier_type[$modifier] = $type;
+ $compiler->known_modifier_type[ $modifier ] = $type;
break 2;
}
break;
case 2:
// registered modifier compiler
- if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIERCOMPILER][$modifier][0])) {
- $output = call_user_func($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIERCOMPILER][$modifier][0], $single_modifier, $compiler->smarty);
- $compiler->known_modifier_type[$modifier] = $type;
+ if (isset($compiler->smarty->registered_plugins[ Smarty::PLUGIN_MODIFIERCOMPILER ][ $modifier ][ 0 ])) {
+ $output =
+ call_user_func($compiler->smarty->registered_plugins[ Smarty::PLUGIN_MODIFIERCOMPILER ][ $modifier ][ 0 ],
+ $single_modifier, $compiler->smarty);
+ $compiler->known_modifier_type[ $modifier ] = $type;
break 2;
}
break;
@@ -81,7 +84,7 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
$plugin = 'smarty_modifiercompiler_' . $modifier;
$output = $plugin($single_modifier, $compiler);
}
- $compiler->known_modifier_type[$modifier] = $type;
+ $compiler->known_modifier_type[ $modifier ] = $type;
break 2;
}
break;
@@ -94,7 +97,7 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
) {
$output = "{$function}({$params})";
}
- $compiler->known_modifier_type[$modifier] = $type;
+ $compiler->known_modifier_type[ $modifier ] = $type;
break 2;
}
break;
@@ -107,17 +110,17 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
) {
$output = "{$modifier}({$params})";
}
- $compiler->known_modifier_type[$modifier] = $type;
+ $compiler->known_modifier_type[ $modifier ] = $type;
break 2;
}
break;
case 6:
// default plugin handler
- if (isset($compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier]) ||
+ if (isset($compiler->default_handler_plugins[ Smarty::PLUGIN_MODIFIER ][ $modifier ]) ||
(is_callable($compiler->smarty->default_plugin_handler_func) &&
- $compiler->getPluginFromDefaultHandler($modifier, Smarty::PLUGIN_MODIFIER))
+ $compiler->getPluginFromDefaultHandler($modifier, Smarty::PLUGIN_MODIFIER))
) {
- $function = $compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];
+ $function = $compiler->default_handler_plugins[ Smarty::PLUGIN_MODIFIER ][ $modifier ][ 0 ];
// check if modifier allowed
if (!is_object($compiler->smarty->security_policy) ||
$compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)
@@ -125,27 +128,28 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa
if (!is_array($function)) {
$output = "{$function}({$params})";
} else {
- if (is_object($function[0])) {
- $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' .
- $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')';
+ if (is_object($function[ 0 ])) {
+ $output =
+ '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' .
+ $modifier . '\'][0][0]->' . $function[ 1 ] . '(' . $params . ')';
} else {
- $output = $function[0] . '::' . $function[1] . '(' . $params . ')';
+ $output = $function[ 0 ] . '::' . $function[ 1 ] . '(' . $params . ')';
}
}
}
- if (isset($compiler->parent_compiler->template->compiled->required_plugins['nocache'][$modifier][Smarty::PLUGIN_MODIFIER]['file']) ||
- isset($compiler->parent_compiler->template->compiled->required_plugins['compiled'][$modifier][Smarty::PLUGIN_MODIFIER]['file'])
+ if (isset($compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $modifier ][ Smarty::PLUGIN_MODIFIER ][ 'file' ]) ||
+ isset($compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $modifier ][ Smarty::PLUGIN_MODIFIER ][ 'file' ])
) {
// was a plugin
- $compiler->known_modifier_type[$modifier] = 4;
+ $compiler->known_modifier_type[ $modifier ] = 4;
} else {
- $compiler->known_modifier_type[$modifier] = $type;
+ $compiler->known_modifier_type[ $modifier ] = $type;
}
break 2;
}
}
}
- if (!isset($compiler->known_modifier_type[$modifier])) {
+ if (!isset($compiler->known_modifier_type[ $modifier ])) {
$compiler->trigger_template_error("unknown modifier \"" . $modifier . "\"", null, true);
}
}
diff --git a/libs/sysplugins/smarty_internal_compile_private_object_function.php b/libs/sysplugins/smarty_internal_compile_private_object_function.php
index e306e0f6..77e54cdc 100644
--- a/libs/sysplugins/smarty_internal_compile_private_object_function.php
+++ b/libs/sysplugins/smarty_internal_compile_private_object_function.php
@@ -27,11 +27,11 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
/**
* Compiles code for the execution of function plugin
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
- * @param string $tag name of function
- * @param string $method name of method to call
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function
+ * @param string $method name of method to call
*
* @return string compiled code
*/
@@ -39,19 +39,19 @@ class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_Co
{
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->tag_nocache = true;
}
- unset($_attr['nocache']);
+ unset($_attr[ 'nocache' ]);
$_assign = null;
- if (isset($_attr['assign'])) {
- $_assign = $_attr['assign'];
- unset($_attr['assign']);
+ if (isset($_attr[ 'assign' ])) {
+ $_assign = $_attr[ 'assign' ];
+ unset($_attr[ 'assign' ]);
}
// method or property ?
- if (method_exists($compiler->smarty->registered_objects[$tag][0], $method)) {
+ if (method_exists($compiler->smarty->registered_objects[ $tag ][ 0 ], $method)) {
// convert attributes into parameter array string
- if ($compiler->smarty->registered_objects[$tag][2]) {
+ if ($compiler->smarty->registered_objects[ $tag ][ 2 ]) {
$_paramsArray = array();
foreach ($_attr as $_key => $_value) {
if (is_int($_key)) {
diff --git a/libs/sysplugins/smarty_internal_compile_private_php.php b/libs/sysplugins/smarty_internal_compile_private_php.php
index 14036f1c..65d16a9d 100644
--- a/libs/sysplugins/smarty_internal_compile_private_php.php
+++ b/libs/sysplugins/smarty_internal_compile_private_php.php
@@ -40,59 +40,69 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
$compiler->has_code = false;
- if ($_attr['type'] == 'xml') {
+ if ($_attr[ 'type' ] == 'xml') {
$compiler->tag_nocache = true;
$save = $compiler->template->compiled->has_nocache_code;
- $output = addcslashes($_attr['code'], "'\\");
- $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $compiler->processNocacheCode("<?php echo '" .
- $output .
- "';?>", true)));
+ $output = addcslashes($_attr[ 'code' ], "'\\");
+ $compiler->parser->current_buffer->append_subtree($compiler->parser,
+ new Smarty_Internal_ParseTree_Tag($compiler->parser,
+ $compiler->processNocacheCode("<?php echo '" .
+ $output .
+ "';?>",
+ true)));
$compiler->template->compiled->has_nocache_code = $save;
return '';
}
- if ($_attr['type'] != 'tag') {
+ if ($_attr[ 'type' ] != 'tag') {
if ($compiler->php_handling == Smarty::PHP_REMOVE) {
return '';
} elseif ($compiler->php_handling == Smarty::PHP_QUOTE) {
- $output = preg_replace_callback('#(<\?(?:php|=)?)|(<%)|(<script\s+language\s*=\s*["\']?\s*php\s*["\']?\s*>)|(\?>)|(%>)|(<\/script>)#i', array($this,
- 'quote'), $_attr['code']);
- $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Text($output));
+ $output =
+ preg_replace_callback('#(<\?(?:php|=)?)|(<%)|(<script\s+language\s*=\s*["\']?\s*php\s*["\']?\s*>)|(\?>)|(%>)|(<\/script>)#i',
+ array($this, 'quote'), $_attr[ 'code' ]);
+ $compiler->parser->current_buffer->append_subtree($compiler->parser,
+ new Smarty_Internal_ParseTree_Text($output));
return '';
- } elseif ($compiler->php_handling == Smarty::PHP_PASSTHRU || $_attr['type'] == 'unmatched') {
+ } elseif ($compiler->php_handling == Smarty::PHP_PASSTHRU || $_attr[ 'type' ] == 'unmatched') {
$compiler->tag_nocache = true;
$save = $compiler->template->compiled->has_nocache_code;
- $output = addcslashes($_attr['code'], "'\\");
- $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $compiler->processNocacheCode("<?php echo '" .
- $output .
- "';?>", true)));
+ $output = addcslashes($_attr[ 'code' ], "'\\");
+ $compiler->parser->current_buffer->append_subtree($compiler->parser,
+ new Smarty_Internal_ParseTree_Tag($compiler->parser,
+ $compiler->processNocacheCode("<?php echo '" .
+ $output .
+ "';?>",
+ true)));
$compiler->template->compiled->has_nocache_code = $save;
return '';
} elseif ($compiler->php_handling == Smarty::PHP_ALLOW) {
if (!($compiler->smarty instanceof SmartyBC)) {
- $compiler->trigger_template_error('$smarty->php_handling PHP_ALLOW not allowed. Use SmartyBC to enable it', null, true);
+ $compiler->trigger_template_error('$smarty->php_handling PHP_ALLOW not allowed. Use SmartyBC to enable it',
+ null, true);
}
$compiler->has_code = true;
- return $_attr['code'];
+ return $_attr[ 'code' ];
} else {
$compiler->trigger_template_error('Illegal $smarty->php_handling value', null, true);
}
} else {
$compiler->has_code = true;
if (!($compiler->smarty instanceof SmartyBC)) {
- $compiler->trigger_template_error('{php}{/php} tags not allowed. Use SmartyBC to enable them', null, true);
+ $compiler->trigger_template_error('{php}{/php} tags not allowed. Use SmartyBC to enable them', null,
+ true);
}
$ldel = preg_quote($compiler->smarty->left_delimiter, '#');
$rdel = preg_quote($compiler->smarty->right_delimiter, '#');
- preg_match("#^({$ldel}php\\s*)((.)*?)({$rdel})#", $_attr['code'], $match);
- if (!empty($match[2])) {
- if ('nocache' == trim($match[2])) {
+ preg_match("#^({$ldel}php\\s*)((.)*?)({$rdel})#", $_attr[ 'code' ], $match);
+ if (!empty($match[ 2 ])) {
+ if ('nocache' == trim($match[ 2 ])) {
$compiler->tag_nocache = true;
} else {
$compiler->trigger_template_error("illegal value of option flag \"{$match[2]}\"", null, true);
}
}
- return preg_replace(array("#^{$ldel}\\s*php\\s*(.)*?{$rdel}#",
- "#{$ldel}\\s*/\\s*php\\s*{$rdel}$#"), array('<?php ', '?>'), $_attr['code']);
+ return preg_replace(array("#^{$ldel}\\s*php\\s*(.)*?{$rdel}#", "#{$ldel}\\s*/\\s*php\\s*{$rdel}$#"),
+ array('<?php ', '?>'), $_attr[ 'code' ]);
}
}
@@ -152,14 +162,15 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
$start = $lex->counter + strlen($lex->value);
$body = true;
if (preg_match('~' . preg_quote($closeTag, '~') . '~i', $lex->data, $match, PREG_OFFSET_CAPTURE, $start)) {
- $close = $match[0][1];
+ $close = $match[ 0 ][ 1 ];
} else {
$lex->compiler->trigger_template_error("missing closing tag '{$closeTag}'");
}
while ($body) {
- if (preg_match('~([/][*])|([/][/][^\n]*)|(\'[^\'\\\\]*(?:\\.[^\'\\\\]*)*\')|("[^"\\\\]*(?:\\.[^"\\\\]*)*")~', $lex->data, $match, PREG_OFFSET_CAPTURE, $start)) {
- $value = $match[0][0];
- $from = $pos = $match[0][1];
+ if (preg_match('~([/][*])|([/][/][^\n]*)|(\'[^\'\\\\]*(?:\\.[^\'\\\\]*)*\')|("[^"\\\\]*(?:\\.[^"\\\\]*)*")~',
+ $lex->data, $match, PREG_OFFSET_CAPTURE, $start)) {
+ $value = $match[ 0 ][ 0 ];
+ $from = $pos = $match[ 0 ][ 1 ];
if ($pos > $close) {
$body = false;
} else {
@@ -168,15 +179,15 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
if ($phpCommentStart) {
$phpCommentEnd = preg_match('~([*][/])~', $lex->data, $match, PREG_OFFSET_CAPTURE, $start);
if ($phpCommentEnd) {
- $pos2 = $match[0][1];
- $start = $pos2 + strlen($match[0][0]);
+ $pos2 = $match[ 0 ][ 1 ];
+ $start = $pos2 + strlen($match[ 0 ][ 0 ]);
}
}
while ($close > $pos && $close < $start) {
- if (preg_match('~' . preg_quote($closeTag, '~') .
- '~i', $lex->data, $match, PREG_OFFSET_CAPTURE, $from)) {
- $close = $match[0][1];
- $from = $close + strlen($match[0][0]);
+ if (preg_match('~' . preg_quote($closeTag, '~') . '~i', $lex->data, $match, PREG_OFFSET_CAPTURE,
+ $from)) {
+ $close = $match[ 0 ][ 1 ];
+ $from = $close + strlen($match[ 0 ][ 0 ]);
} else {
$lex->compiler->trigger_template_error("missing closing tag '{$closeTag}'");
}
@@ -204,6 +215,6 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
*/
private function quote($match)
{
- return htmlspecialchars($match[0], ENT_QUOTES);
+ return htmlspecialchars($match[ 0 ], ENT_QUOTES);
}
}
diff --git a/libs/sysplugins/smarty_internal_compile_private_print_expression.php b/libs/sysplugins/smarty_internal_compile_private_print_expression.php
index c0c089bf..13b1e855 100644
--- a/libs/sysplugins/smarty_internal_compile_private_print_expression.php
+++ b/libs/sysplugins/smarty_internal_compile_private_print_expression.php
@@ -47,58 +47,63 @@ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_C
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
// nocache option
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->tag_nocache = true;
}
- if (isset($_attr['assign'])) {
+ if (isset($_attr[ 'assign' ])) {
// assign output to variable
$output = "<?php \$_smarty_tpl->assign({$_attr['assign']},{$parameter['value']});?>";
} else {
// display value
- $output = $parameter['value'];
+ $output = $parameter[ 'value' ];
// tag modifier
- if (!empty($parameter['modifierlist'])) {
- $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifierlist'],
- 'value' => $output));
+ if (!empty($parameter[ 'modifierlist' ])) {
+ $output = $compiler->compileTag('private_modifier', array(),
+ array('modifierlist' => $parameter[ 'modifierlist' ],
+ 'value' => $output));
}
- if (!$_attr['nofilter']) {
+ if (!$_attr[ 'nofilter' ]) {
// default modifier
if (!empty($compiler->smarty->default_modifiers)) {
if (empty($compiler->default_modifier_list)) {
$modifierlist = array();
foreach ($compiler->smarty->default_modifiers as $key => $single_default_modifier) {
- preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|:|[^:]+)/', $single_default_modifier, $mod_array);
- for ($i = 0, $count = count($mod_array[0]); $i < $count; $i ++) {
- if ($mod_array[0][$i] != ':') {
- $modifierlist[$key][] = $mod_array[0][$i];
+ preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|:|[^:]+)/',
+ $single_default_modifier, $mod_array);
+ for ($i = 0, $count = count($mod_array[ 0 ]); $i < $count; $i ++) {
+ if ($mod_array[ 0 ][ $i ] != ':') {
+ $modifierlist[ $key ][] = $mod_array[ 0 ][ $i ];
}
}
}
$compiler->default_modifier_list = $modifierlist;
}
- $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => $compiler->default_modifier_list,
- 'value' => $output));
+ $output = $compiler->compileTag('private_modifier', array(),
+ array('modifierlist' => $compiler->default_modifier_list,
+ 'value' => $output));
}
// autoescape html
if ($compiler->template->smarty->escape_html) {
$output = "htmlspecialchars({$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
}
// loop over registered filters
- if (!empty($compiler->template->smarty->registered_filters[Smarty::FILTER_VARIABLE])) {
- foreach ($compiler->template->smarty->registered_filters[Smarty::FILTER_VARIABLE] as $key =>
+ if (!empty($compiler->template->smarty->registered_filters[ Smarty::FILTER_VARIABLE ])) {
+ foreach ($compiler->template->smarty->registered_filters[ Smarty::FILTER_VARIABLE ] as $key =>
$function) {
if (!is_array($function)) {
$output = "{$function}({$output},\$_smarty_tpl)";
- } elseif (is_object($function[0])) {
- $output = "\$_smarty_tpl->smarty->registered_filters[Smarty::FILTER_VARIABLE]['{$key}'][0]->{$function[1]}({$output},\$_smarty_tpl)";
+ } elseif (is_object($function[ 0 ])) {
+ $output =
+ "\$_smarty_tpl->smarty->registered_filters[Smarty::FILTER_VARIABLE]['{$key}'][0]->{$function[1]}({$output},\$_smarty_tpl)";
} else {
$output = "{$function[0]}::{$function[1]}({$output},\$_smarty_tpl)";
}
}
}
// auto loaded filters
- if (isset($compiler->smarty->autoload_filters[Smarty::FILTER_VARIABLE])) {
- foreach ((array) $compiler->template->smarty->autoload_filters[Smarty::FILTER_VARIABLE] as $name) {
+ if (isset($compiler->smarty->autoload_filters[ Smarty::FILTER_VARIABLE ])) {
+ foreach ((array) $compiler->template->smarty->autoload_filters[ Smarty::FILTER_VARIABLE ] as $name)
+ {
$result = $this->compile_output_filter($compiler, $name, $output);
if ($result !== false) {
$output = $result;
@@ -110,12 +115,12 @@ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_C
}
foreach ($compiler->variable_filters as $filter) {
if (count($filter) == 1 &&
- ($result = $this->compile_output_filter($compiler, $filter[0], $output)) !== false
+ ($result = $this->compile_output_filter($compiler, $filter[ 0 ], $output)) !== false
) {
$output = $result;
} else {
- $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => array($filter),
- 'value' => $output));
+ $output = $compiler->compileTag('private_modifier', array(),
+ array('modifierlist' => array($filter), 'value' => $output));
}
}
}
@@ -140,11 +145,15 @@ class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_C
$path = $compiler->smarty->loadPlugin($plugin_name, false);
if ($path) {
if ($compiler->template->caching) {
- $compiler->parent_compiler->template->compiled->required_plugins['nocache'][$name][Smarty::FILTER_VARIABLE]['file'] = $path;
- $compiler->parent_compiler->template->compiled->required_plugins['nocache'][$name][Smarty::FILTER_VARIABLE]['function'] = $plugin_name;
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $name ][ Smarty::FILTER_VARIABLE ][ 'file' ] =
+ $path;
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'nocache' ][ $name ][ Smarty::FILTER_VARIABLE ][ 'function' ] =
+ $plugin_name;
} else {
- $compiler->parent_compiler->template->compiled->required_plugins['compiled'][$name][Smarty::FILTER_VARIABLE]['file'] = $path;
- $compiler->parent_compiler->template->compiled->required_plugins['compiled'][$name][Smarty::FILTER_VARIABLE]['function'] = $plugin_name;
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $name ][ Smarty::FILTER_VARIABLE ][ 'file' ] =
+ $path;
+ $compiler->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $name ][ Smarty::FILTER_VARIABLE ][ 'function' ] =
+ $plugin_name;
}
} else {
// not found
diff --git a/libs/sysplugins/smarty_internal_compile_private_registered_block.php b/libs/sysplugins/smarty_internal_compile_private_registered_block.php
index ee253f5c..987bc96f 100644
--- a/libs/sysplugins/smarty_internal_compile_private_registered_block.php
+++ b/libs/sysplugins/smarty_internal_compile_private_registered_block.php
@@ -28,28 +28,30 @@ class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_C
*/
public function setup(Smarty_Internal_TemplateCompilerBase $compiler, $_attr, $tag, $function)
{
- if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag])) {
- $tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag];
- $callback = $tag_info[ 0 ];
+ if (isset($compiler->smarty->registered_plugins[ Smarty::PLUGIN_BLOCK ][ $tag ])) {
+ $tag_info = $compiler->smarty->registered_plugins[ Smarty::PLUGIN_BLOCK ][ $tag ];
+ $callback = $tag_info[ 0 ];
if (is_array($callback)) {
if (is_object($callback[ 0 ])) {
$callable = "array(\$_block_plugin{$this->nesting}, '{$callback[1]}')";
- $callback = array("\$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0][0]", "->{$callback[1]}");
+ $callback =
+ array("\$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0][0]", "->{$callback[1]}");
} else {
$callable = "array(\$_block_plugin{$this->nesting}, '{$callback[1]}')";
- $callback = array("\$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0][0]", "::{$callback[1]}");
+ $callback =
+ array("\$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0][0]", "::{$callback[1]}");
}
} else {
$callable = "\$_block_plugin{$this->nesting}";
$callback = array("\$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0]", '');
}
} else {
- $tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_BLOCK][$tag];
- $callback = $tag_info[ 0 ];
+ $tag_info = $compiler->default_handler_plugins[ Smarty::PLUGIN_BLOCK ][ $tag ];
+ $callback = $tag_info[ 0 ];
if (is_array($callback)) {
- $callable = "array('{$callback[0]}', '{$callback[1]}')";
- $callback = "{$callback[1]}::{$callback[1]}";
- } else {
+ $callable = "array('{$callback[0]}', '{$callback[1]}')";
+ $callback = "{$callback[1]}::{$callback[1]}";
+ } else {
$callable = null;
}
}
diff --git a/libs/sysplugins/smarty_internal_compile_private_registered_function.php b/libs/sysplugins/smarty_internal_compile_private_registered_function.php
index 6bddc752..88639336 100644
--- a/libs/sysplugins/smarty_internal_compile_private_registered_function.php
+++ b/libs/sysplugins/smarty_internal_compile_private_registered_function.php
@@ -27,10 +27,10 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
/**
* Compiles code for the execution of a registered function
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
- * @param string $tag name of function
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function
*
* @return string compiled code
*/
@@ -40,23 +40,23 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
$compiler->has_output = true;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache']) {
+ if ($_attr[ 'nocache' ]) {
$compiler->tag_nocache = true;
}
- unset($_attr['nocache']);
- if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {
- $tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag];
+ unset($_attr[ 'nocache' ]);
+ if (isset($compiler->smarty->registered_plugins[ Smarty::PLUGIN_FUNCTION ][ $tag ])) {
+ $tag_info = $compiler->smarty->registered_plugins[ Smarty::PLUGIN_FUNCTION ][ $tag ];
} else {
- $tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_FUNCTION][$tag];
+ $tag_info = $compiler->default_handler_plugins[ Smarty::PLUGIN_FUNCTION ][ $tag ];
}
// not cachable?
- $compiler->tag_nocache = $compiler->tag_nocache || !$tag_info[1];
+ $compiler->tag_nocache = $compiler->tag_nocache || !$tag_info[ 1 ];
// convert attributes into parameter array string
$_paramsArray = array();
foreach ($_attr as $_key => $_value) {
if (is_int($_key)) {
$_paramsArray[] = "$_key=>$_value";
- } elseif ($compiler->template->caching && in_array($_key, $tag_info[2])) {
+ } elseif ($compiler->template->caching && in_array($_key, $tag_info[ 2 ])) {
$_value = str_replace("'", "^#^", $_value);
$_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";
} else {
@@ -64,12 +64,13 @@ class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Interna
}
}
$_params = 'array(' . implode(",", $_paramsArray) . ')';
- $function = $tag_info[0];
+ $function = $tag_info[ 0 ];
// compile code
if (!is_array($function)) {
$output = "<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
- } elseif (is_object($function[0])) {
- $output = "<?php echo \$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl);?>\n";
+ } elseif (is_object($function[ 0 ])) {
+ $output =
+ "<?php echo \$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl);?>\n";
} else {
$output = "<?php echo {$function[0]}::{$function[1]}({$_params},\$_smarty_tpl);?>\n";
}
diff --git a/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/libs/sysplugins/smarty_internal_compile_private_special_variable.php
index b83e824a..bb0de054 100644
--- a/libs/sysplugins/smarty_internal_compile_private_special_variable.php
+++ b/libs/sysplugins/smarty_internal_compile_private_special_variable.php
@@ -85,7 +85,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
return 'dirname($_smarty_tpl->source->filepath)';
case 'version':
- return "Smarty::SMARTY_VERSION";
+ return "Smarty::SMARTY_VERSION";
case 'const':
if (isset($compiler->smarty->security_policy) &&
diff --git a/libs/sysplugins/smarty_internal_compile_rdelim.php b/libs/sysplugins/smarty_internal_compile_rdelim.php
index b30c7362..2e6b43c1 100644
--- a/libs/sysplugins/smarty_internal_compile_rdelim.php
+++ b/libs/sysplugins/smarty_internal_compile_rdelim.php
@@ -20,7 +20,7 @@ class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase
* Compiles code for the {rdelim} tag
* This tag does output the right delimiter.
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
@@ -29,7 +29,7 @@ class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
$_attr = $this->getAttributes($compiler, $args);
- if ($_attr['nocache'] === true) {
+ if ($_attr[ 'nocache' ] === true) {
$compiler->trigger_template_error('nocache option not allowed', null, true);
}
// this tag does not return compiled code
diff --git a/libs/sysplugins/smarty_internal_compile_section.php b/libs/sysplugins/smarty_internal_compile_section.php
index 6c55e35d..ac3faefe 100644
--- a/libs/sysplugins/smarty_internal_compile_section.php
+++ b/libs/sysplugins/smarty_internal_compile_section.php
@@ -59,8 +59,8 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
*
* @var array
*/
- public $nameProperties = array('first', 'last', 'index', 'iteration', 'show', 'total', 'rownum',
- 'index_prev', 'index_next', 'loop');
+ public $nameProperties = array('first', 'last', 'index', 'iteration', 'show', 'total', 'rownum', 'index_prev',
+ 'index_next', 'loop');
/**
* {section} tag has no item properties
@@ -87,11 +87,11 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
- $compiler->loopNesting++;
+ $compiler->loopNesting ++;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
- $attributes = array('name' => $compiler->getId($_attr['name']));
- unset($_attr['name']);
+ $attributes = array('name' => $compiler->getId($_attr[ 'name' ]));
+ unset($_attr[ 'name' ]);
foreach ($attributes as $a => $v) {
if ($v === false) {
$compiler->trigger_template_error("'{$a}' attribute/variable has illegal value", null, true);
@@ -103,22 +103,23 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
// maybe nocache because of nocache variables
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
- $initLocal = array('saved' => "isset(\$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}']) ? \$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}'] : false",);
+ $initLocal =
+ array('saved' => "isset(\$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}']) ? \$_smarty_tpl->tpl_vars['__smarty_section_{$attributes['name']}'] : false",);
$initNamedProperty = array();
$initFor = array();
$incFor = array();
$cmpFor = array();
- $propValue = array('index' => "{$sectionVar}->value['index']", 'show' => 'true', 'step' => 1,
+ $propValue = array('index' => "{$sectionVar}->value['index']", 'show' => 'true', 'step' => 1,
'iteration' => "{$local}iteration",
);
$propType = array('index' => 2, 'iteration' => 2, 'show' => 0, 'step' => 0,);
// search for used tag attributes
$this->scanForProperties($attributes, $compiler);
- if (!empty($this->matchResults['named'])) {
- $namedAttr = $this->matchResults['named'];
+ if (!empty($this->matchResults[ 'named' ])) {
+ $namedAttr = $this->matchResults[ 'named' ];
}
- $namedAttr['index'] = true;
+ $namedAttr[ 'index' ] = true;
$output = "<?php\n";
foreach ($_attr as $attr_name => $attr_value) {
switch ($attr_name) {
@@ -130,13 +131,13 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
$v = "(is_array(@\$_loop=$attr_value) ? count(\$_loop) : max(0, (int) \$_loop))";
$t = 1;
}
- if (isset($namedAttr['loop'])) {
- $initNamedProperty['loop'] = "'loop' => {$v}";
+ if (isset($namedAttr[ 'loop' ])) {
+ $initNamedProperty[ 'loop' ] = "'loop' => {$v}";
if ($t == 1) {
$v = "{$sectionVar}->value['loop']";
}
} elseif ($t == 1) {
- $initLocal['loop'] = $v;
+ $initLocal[ 'loop' ] = $v;
$v = "{$local}loop";
}
break;
@@ -156,7 +157,7 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
$t = 0;
break;
}
- $initLocal['step'] = "((int)@$attr_value) == 0 ? 1 : (int)@$attr_value";
+ $initLocal[ 'step' ] = "((int)@$attr_value) == 0 ? 1 : (int)@$attr_value";
$v = "{$local}step";
$t = 2;
break;
@@ -175,169 +176,171 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
if ($t == 3 && $compiler->getId($attr_value)) {
$t = 1;
}
- $propValue[$attr_name] = $v;
- $propType[$attr_name] = $t;
+ $propValue[ $attr_name ] = $v;
+ $propType[ $attr_name ] = $t;
}
- if (isset($namedAttr['step'])) {
- $initNamedProperty['step'] = $propValue['step'];
+ if (isset($namedAttr[ 'step' ])) {
+ $initNamedProperty[ 'step' ] = $propValue[ 'step' ];
}
- if (isset($namedAttr['iteration'])) {
- $propValue['iteration'] = "{$sectionVar}->value['iteration']";
+ if (isset($namedAttr[ 'iteration' ])) {
+ $propValue[ 'iteration' ] = "{$sectionVar}->value['iteration']";
}
- $incFor['iteration'] = "{$propValue['iteration']}++";
- $initFor['iteration'] = "{$propValue['iteration']} = 1";
+ $incFor[ 'iteration' ] = "{$propValue['iteration']}++";
+ $initFor[ 'iteration' ] = "{$propValue['iteration']} = 1";
- if ($propType['step'] == 0) {
- if ($propValue['step'] == 1) {
- $incFor['index'] = "{$sectionVar}->value['index']++";
- } elseif ($propValue['step'] > 1) {
- $incFor['index'] = "{$sectionVar}->value['index'] += {$propValue['step']}";
+ if ($propType[ 'step' ] == 0) {
+ if ($propValue[ 'step' ] == 1) {
+ $incFor[ 'index' ] = "{$sectionVar}->value['index']++";
+ } elseif ($propValue[ 'step' ] > 1) {
+ $incFor[ 'index' ] = "{$sectionVar}->value['index'] += {$propValue['step']}";
} else {
- $incFor['index'] = "{$sectionVar}->value['index'] -= " . - $propValue['step'];
+ $incFor[ 'index' ] = "{$sectionVar}->value['index'] -= " . - $propValue[ 'step' ];
}
} else {
- $incFor['index'] = "{$sectionVar}->value['index'] += {$propValue['step']}";
+ $incFor[ 'index' ] = "{$sectionVar}->value['index'] += {$propValue['step']}";
}
- if (!isset($propValue['max'])) {
- $propValue['max'] = $propValue['loop'];
- $propType['max'] = $propType['loop'];
- } elseif ($propType['max'] != 0) {
- $propValue['max'] = "{$propValue['max']} < 0 ? {$propValue['loop']} : {$propValue['max']}";
- $propType['max'] = 1;
+ if (!isset($propValue[ 'max' ])) {
+ $propValue[ 'max' ] = $propValue[ 'loop' ];
+ $propType[ 'max' ] = $propType[ 'loop' ];
+ } elseif ($propType[ 'max' ] != 0) {
+ $propValue[ 'max' ] = "{$propValue['max']} < 0 ? {$propValue['loop']} : {$propValue['max']}";
+ $propType[ 'max' ] = 1;
} else {
- if ($propValue['max'] < 0) {
- $propValue['max'] = $propValue['loop'];
- $propType['max'] = $propType['loop'];
+ if ($propValue[ 'max' ] < 0) {
+ $propValue[ 'max' ] = $propValue[ 'loop' ];
+ $propType[ 'max' ] = $propType[ 'loop' ];
}
}
- if (!isset($propValue['start'])) {
- $start_code = array(1 => "{$propValue['step']} > 0 ? ", 2 => '0', 3 => ' : ', 4 => $propValue['loop'],
- 5 => ' - 1');
- if ($propType['loop'] == 0) {
- $start_code[5] = '';
- $start_code[4] = $propValue['loop'] - 1;
+ if (!isset($propValue[ 'start' ])) {
+ $start_code =
+ array(1 => "{$propValue['step']} > 0 ? ", 2 => '0', 3 => ' : ', 4 => $propValue[ 'loop' ], 5 => ' - 1');
+ if ($propType[ 'loop' ] == 0) {
+ $start_code[ 5 ] = '';
+ $start_code[ 4 ] = $propValue[ 'loop' ] - 1;
}
- if ($propType['step'] == 0) {
- if ($propValue['step'] > 0) {
+ if ($propType[ 'step' ] == 0) {
+ if ($propValue[ 'step' ] > 0) {
$start_code = array(1 => '0');
- $propType['start'] = 0;
+ $propType[ 'start' ] = 0;
} else {
- $start_code[1] = $start_code[2] = $start_code[3] = '';
- $propType['start'] = $propType['loop'];
+ $start_code[ 1 ] = $start_code[ 2 ] = $start_code[ 3 ] = '';
+ $propType[ 'start' ] = $propType[ 'loop' ];
}
} else {
- $propType['start'] = 1;
+ $propType[ 'start' ] = 1;
}
- $propValue['start'] = join('', $start_code);
+ $propValue[ 'start' ] = join('', $start_code);
} else {
- $start_code = array(1 => "{$propValue['start']} < 0 ? ", 2 => 'max(', 3 => "{$propValue['step']} > 0 ? ",
- 4 => '0', 5 => ' : ', 6 => '-1', 7 => ', ',
- 8 => "{$propValue['start']} + {$propValue['loop']}", 10 => ')', 11 => ' : ',
- 12 => 'min(', 13 => $propValue['start'], 14 => ', ',
- 15 => "{$propValue['step']} > 0 ? ", 16 => $propValue['loop'], 17 => ' : ',
- 18 => $propType['loop'] == 0 ? $propValue['loop'] - 1 : "{$propValue['loop']} - 1",
- 19 => ')');
- if ($propType['step'] == 0) {
- $start_code[3] = $start_code[5] = $start_code[15] = $start_code[17] = '';
- if ($propValue['step'] > 0) {
- $start_code[6] = $start_code[18] = '';
+ $start_code =
+ array(1 => "{$propValue['start']} < 0 ? ", 2 => 'max(', 3 => "{$propValue['step']} > 0 ? ", 4 => '0',
+ 5 => ' : ', 6 => '-1', 7 => ', ', 8 => "{$propValue['start']} + {$propValue['loop']}", 10 => ')',
+ 11 => ' : ', 12 => 'min(', 13 => $propValue[ 'start' ], 14 => ', ',
+ 15 => "{$propValue['step']} > 0 ? ", 16 => $propValue[ 'loop' ], 17 => ' : ',
+ 18 => $propType[ 'loop' ] == 0 ? $propValue[ 'loop' ] - 1 : "{$propValue['loop']} - 1",
+ 19 => ')');
+ if ($propType[ 'step' ] == 0) {
+ $start_code[ 3 ] = $start_code[ 5 ] = $start_code[ 15 ] = $start_code[ 17 ] = '';
+ if ($propValue[ 'step' ] > 0) {
+ $start_code[ 6 ] = $start_code[ 18 ] = '';
} else {
- $start_code[4] = $start_code[16] = '';
+ $start_code[ 4 ] = $start_code[ 16 ] = '';
}
}
- if ($propType['start'] == 0) {
- if ($propType['loop'] == 0) {
- $start_code[8] = $propValue['start'] + $propValue['loop'];
+ if ($propType[ 'start' ] == 0) {
+ if ($propType[ 'loop' ] == 0) {
+ $start_code[ 8 ] = $propValue[ 'start' ] + $propValue[ 'loop' ];
}
- $propType['start'] = $propType['step'] + $propType['loop'];
- $start_code[1] = '';
- if ($propValue['start'] < 0) {
+ $propType[ 'start' ] = $propType[ 'step' ] + $propType[ 'loop' ];
+ $start_code[ 1 ] = '';
+ if ($propValue[ 'start' ] < 0) {
for ($i = 11; $i <= 19; $i ++) {
- $start_code[$i] = '';
+ $start_code[ $i ] = '';
}
- if ($propType['start'] == 0) {
- $start_code = array(max($propValue['step'] > 0 ? 0 : - 1, $propValue['start'] +
- $propValue['loop']));
+ if ($propType[ 'start' ] == 0) {
+ $start_code = array(max($propValue[ 'step' ] > 0 ? 0 : - 1,
+ $propValue[ 'start' ] + $propValue[ 'loop' ]));
}
} else {
for ($i = 1; $i <= 11; $i ++) {
- $start_code[$i] = '';
+ $start_code[ $i ] = '';
}
- if ($propType['start'] == 0) {
- $start_code = array(min($propValue['step'] > 0 ? $propValue['loop'] : $propValue['loop'] -
- 1, $propValue['start']));
+ if ($propType[ 'start' ] == 0) {
+ $start_code =
+ array(min($propValue[ 'step' ] > 0 ? $propValue[ 'loop' ] : $propValue[ 'loop' ] - 1,
+ $propValue[ 'start' ]));
}
}
}
- $propValue['start'] = join('', $start_code);
+ $propValue[ 'start' ] = join('', $start_code);
}
- if ($propType['start'] != 0) {
- $initLocal['start'] = $propValue['start'];
- $propValue['start'] = "{$local}start";
+ if ($propType[ 'start' ] != 0) {
+ $initLocal[ 'start' ] = $propValue[ 'start' ];
+ $propValue[ 'start' ] = "{$local}start";
}
- $initFor['index'] = "{$sectionVar}->value['index'] = {$propValue['start']}";
+ $initFor[ 'index' ] = "{$sectionVar}->value['index'] = {$propValue['start']}";
- if (!isset($_attr['start']) && !isset($_attr['step']) && !isset($_attr['max'])) {
- $propValue['total'] = $propValue['loop'];
- $propType['total'] = $propType['loop'];
+ if (!isset($_attr[ 'start' ]) && !isset($_attr[ 'step' ]) && !isset($_attr[ 'max' ])) {
+ $propValue[ 'total' ] = $propValue[ 'loop' ];
+ $propType[ 'total' ] = $propType[ 'loop' ];
} else {
- $propType['total'] = $propType['start'] + $propType['loop'] + $propType['step'] + $propType['max'];
- if ($propType['total'] == 0) {
- $propValue['total'] = min(ceil(($propValue['step'] > 0 ? $propValue['loop'] -
- $propValue['start'] : (int) $propValue['start'] + 1) /
- abs($propValue['step'])), $propValue['max']);
+ $propType[ 'total' ] =
+ $propType[ 'start' ] + $propType[ 'loop' ] + $propType[ 'step' ] + $propType[ 'max' ];
+ if ($propType[ 'total' ] == 0) {
+ $propValue[ 'total' ] =
+ min(ceil(($propValue[ 'step' ] > 0 ? $propValue[ 'loop' ] - $propValue[ 'start' ] :
+ (int) $propValue[ 'start' ] + 1) / abs($propValue[ 'step' ])), $propValue[ 'max' ]);
} else {
- $total_code = array(1 => 'min(', 2 => 'ceil(', 3 => '(', 4 => "{$propValue['step']} > 0 ? ",
- 5 => $propValue['loop'], 6 => ' - ', 7 => $propValue['start'], 8 => ' : ',
- 9 => $propValue['start'], 10 => '+ 1', 11 => ')', 12 => '/ ', 13 => 'abs(',
- 14 => $propValue['step'], 15 => ')', 16 => ')', 17 => ", {$propValue['max']})",);
- if (!isset($propValue['max'])) {
- $total_code[1] = $total_code[17] = '';
+ $total_code = array(1 => 'min(', 2 => 'ceil(', 3 => '(', 4 => "{$propValue['step']} > 0 ? ",
+ 5 => $propValue[ 'loop' ], 6 => ' - ', 7 => $propValue[ 'start' ], 8 => ' : ',
+ 9 => $propValue[ 'start' ], 10 => '+ 1', 11 => ')', 12 => '/ ', 13 => 'abs(',
+ 14 => $propValue[ 'step' ], 15 => ')', 16 => ')', 17 => ", {$propValue['max']})",);
+ if (!isset($propValue[ 'max' ])) {
+ $total_code[ 1 ] = $total_code[ 17 ] = '';
}
- if ($propType['loop'] + $propType['start'] == 0) {
- $total_code[5] = $propValue['loop'] - $propValue['start'];
- $total_code[6] = $total_code[7] = '';
+ if ($propType[ 'loop' ] + $propType[ 'start' ] == 0) {
+ $total_code[ 5 ] = $propValue[ 'loop' ] - $propValue[ 'start' ];
+ $total_code[ 6 ] = $total_code[ 7 ] = '';
}
- if ($propType['start'] == 0) {
- $total_code[9] = (int) $propValue['start'] + 1;
- $total_code[10] = '';
+ if ($propType[ 'start' ] == 0) {
+ $total_code[ 9 ] = (int) $propValue[ 'start' ] + 1;
+ $total_code[ 10 ] = '';
}
- if ($propType['step'] == 0) {
- $total_code[13] = $total_code[15] = '';
- if ($propValue['step'] == 1 || $propValue['step'] == - 1) {
- $total_code[2] = $total_code[12] = $total_code[14] = $total_code[16] = '';
- } elseif ($propValue['step'] < 0) {
- $total_code[14] = - $propValue['step'];
+ if ($propType[ 'step' ] == 0) {
+ $total_code[ 13 ] = $total_code[ 15 ] = '';
+ if ($propValue[ 'step' ] == 1 || $propValue[ 'step' ] == - 1) {
+ $total_code[ 2 ] = $total_code[ 12 ] = $total_code[ 14 ] = $total_code[ 16 ] = '';
+ } elseif ($propValue[ 'step' ] < 0) {
+ $total_code[ 14 ] = - $propValue[ 'step' ];
}
- $total_code[4] = '';
- if ($propValue['step'] > 0) {
- $total_code[8] = $total_code[9] = $total_code[10] = '';
+ $total_code[ 4 ] = '';
+ if ($propValue[ 'step' ] > 0) {
+ $total_code[ 8 ] = $total_code[ 9 ] = $total_code[ 10 ] = '';
} else {
- $total_code[5] = $total_code[6] = $total_code[7] = $total_code[8] = '';
+ $total_code[ 5 ] = $total_code[ 6 ] = $total_code[ 7 ] = $total_code[ 8 ] = '';
}
}
- $propValue['total'] = join('', $total_code);
+ $propValue[ 'total' ] = join('', $total_code);
}
}
if (isset($namedAttr[ 'loop' ])) {
$initNamedProperty[ 'loop' ] = "'loop' => {$propValue['total']}";
}
- if (isset($namedAttr['total'])) {
- $initNamedProperty['total'] = "'total' => {$propValue['total']}";
- if ($propType['total'] > 0) {
- $propValue['total'] = "{$sectionVar}->value['total']";
+ if (isset($namedAttr[ 'total' ])) {
+ $initNamedProperty[ 'total' ] = "'total' => {$propValue['total']}";
+ if ($propType[ 'total' ] > 0) {
+ $propValue[ 'total' ] = "{$sectionVar}->value['total']";
}
- } elseif ($propType['total'] > 0) {
- $initLocal['total'] = $propValue['total'];
- $propValue['total'] = "{$local}total";
+ } elseif ($propType[ 'total' ] > 0) {
+ $initLocal[ 'total' ] = $propValue[ 'total' ];
+ $propValue[ 'total' ] = "{$local}total";
}
- $cmpFor['iteration'] = "{$propValue['iteration']} <= {$propValue['total']}";
+ $cmpFor[ 'iteration' ] = "{$propValue['iteration']} <= {$propValue['total']}";
foreach ($initLocal as $key => $code) {
$output .= "{$local}{$key} = {$code};\n";
@@ -346,17 +349,17 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
$_vars = 'array(' . join(', ', $initNamedProperty) . ')';
$output .= "{$sectionVar} = new Smarty_Variable({$_vars});\n";
$cond_code = "{$propValue['total']} != 0";
- if ($propType['total'] == 0) {
- if ($propValue['total'] == 0) {
+ if ($propType[ 'total' ] == 0) {
+ if ($propValue[ 'total' ] == 0) {
$cond_code = 'false';
} else {
$cond_code = 'true';
}
}
- if ($propType['show'] > 0) {
+ if ($propType[ 'show' ] > 0) {
$output .= "{$local}show = {$propValue['show']} ? {$cond_code} : false;\n";
$output .= "if ({$local}show) {\n";
- } elseif ($propValue['show'] == 'true') {
+ } elseif ($propValue[ 'show' ] == 'true') {
$output .= "if ({$cond_code}) {\n";
} else {
$output .= "if (false) {\n";
@@ -365,19 +368,19 @@ class Smarty_Internal_Compile_Section extends Smarty_Internal_Compile_Private_Fo
$jcmp = join(', ', $cmpFor);
$jinc = join(', ', $incFor);
$output .= "for ({$jinit}; {$jcmp}; {$jinc}){\n";
- if (isset($namedAttr['rownum'])) {
+ if (isset($namedAttr[ 'rownum' ])) {
$output .= "{$sectionVar}->value['rownum'] = {$propValue['iteration']};\n";
}
- if (isset($namedAttr['index_prev'])) {
+ if (isset($namedAttr[ 'index_prev' ])) {
$output .= "{$sectionVar}->value['index_prev'] = {$propValue['index']} - {$propValue['step']};\n";
}
- if (isset($namedAttr['index_next'])) {
+ if (isset($namedAttr[ 'index_next' ])) {
$output .= "{$sectionVar}->value['index_next'] = {$propValue['index']} + {$propValue['step']};\n";
}
- if (isset($namedAttr['first'])) {
+ if (isset($namedAttr[ 'first' ])) {
$output .= "{$sectionVar}->value['first'] = ({$propValue['iteration']} == 1);\n";
}
- if (isset($namedAttr['last'])) {
+ if (isset($namedAttr[ 'last' ])) {
$output .= "{$sectionVar}->value['last'] = ({$propValue['iteration']} == {$propValue['total']});\n";
}
$output .= "?>";
@@ -432,14 +435,14 @@ class Smarty_Internal_Compile_Sectionclose extends Smarty_Internal_CompileBase
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
- $compiler->loopNesting--;
+ $compiler->loopNesting --;
// must endblock be nocache?
if ($compiler->nocache) {
$compiler->tag_nocache = true;
}
- list($openTag, $compiler->nocache, $local, $sectionVar) = $this->closeTag($compiler, array('section',
- 'sectionelse'));
+ list($openTag, $compiler->nocache, $local, $sectionVar) =
+ $this->closeTag($compiler, array('section', 'sectionelse'));
$output = "<?php\n";
if ($openTag == 'sectionelse') {
diff --git a/libs/sysplugins/smarty_internal_compile_setfilter.php b/libs/sysplugins/smarty_internal_compile_setfilter.php
index 05086595..1f3ba8d4 100644
--- a/libs/sysplugins/smarty_internal_compile_setfilter.php
+++ b/libs/sysplugins/smarty_internal_compile_setfilter.php
@@ -19,16 +19,16 @@ class Smarty_Internal_Compile_Setfilter extends Smarty_Internal_CompileBase
/**
* Compiles code for setfilter tag
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $parameter array with compilation parameter
*
* @return string compiled code
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
$compiler->variable_filter_stack[] = $compiler->variable_filters;
- $compiler->variable_filters = $parameter['modifier_list'];
+ $compiler->variable_filters = $parameter[ 'modifier_list' ];
// this tag does not return compiled code
$compiler->has_code = false;
@@ -48,7 +48,7 @@ class Smarty_Internal_Compile_Setfilterclose extends Smarty_Internal_CompileBase
* Compiles code for the {/setfilter} tag
* This tag does not generate compiled output. It resets variable filter.
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
diff --git a/libs/sysplugins/smarty_internal_compile_shared_inheritance.php b/libs/sysplugins/smarty_internal_compile_shared_inheritance.php
index c7bf1f8f..d2089760 100644
--- a/libs/sysplugins/smarty_internal_compile_shared_inheritance.php
+++ b/libs/sysplugins/smarty_internal_compile_shared_inheritance.php
@@ -24,11 +24,11 @@ class Smarty_Internal_Compile_Shared_Inheritance extends Smarty_Internal_Compile
*/
public function registerInit(Smarty_Internal_TemplateCompilerBase $compiler, $initChildSequence = false)
{
- if ($initChildSequence || !isset($compiler->_cache['inheritanceInit'])) {
+ if ($initChildSequence || !isset($compiler->_cache[ 'inheritanceInit' ])) {
$compiler->registerPostCompileCallback(array('Smarty_Internal_Compile_Shared_Inheritance', 'postCompile'),
array($initChildSequence), 'inheritanceInit', $initChildSequence);
- $compiler->_cache['inheritanceInit'] = true;
+ $compiler->_cache[ 'inheritanceInit' ] = true;
}
}
@@ -41,6 +41,6 @@ class Smarty_Internal_Compile_Shared_Inheritance extends Smarty_Internal_Compile
static function postCompile(Smarty_Internal_TemplateCompilerBase $compiler, $initChildSequence = false)
{
$compiler->prefixCompiledCode .= "<?php \$_smarty_tpl->ext->_inheritance->init(\$_smarty_tpl, " .
- var_export($initChildSequence, true) . ");\n?>\n";
+ var_export($initChildSequence, true) . ");\n?>\n";
}
} \ No newline at end of file
diff --git a/libs/sysplugins/smarty_internal_compile_while.php b/libs/sysplugins/smarty_internal_compile_while.php
index 9678ede5..2563a406 100644
--- a/libs/sysplugins/smarty_internal_compile_while.php
+++ b/libs/sysplugins/smarty_internal_compile_while.php
@@ -19,16 +19,16 @@ class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase
/**
* Compiles code for the {while} tag
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
- * @param array $parameter array with compilation parameter
+ * @param array $parameter array with compilation parameter
*
* @return string compiled code
* @throws \SmartyCompilerException
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
{
- $compiler->loopNesting++;
+ $compiler->loopNesting ++;
// check and get attributes
$_attr = $this->getAttributes($compiler, $args);
$this->openTag($compiler, 'while', $compiler->nocache);
@@ -40,41 +40,42 @@ class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase
// maybe nocache because of nocache variables
$compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
$_output = "<?php\n";
- if (is_array($parameter['if condition'])) {
+ if (is_array($parameter[ 'if condition' ])) {
if ($compiler->nocache) {
$_nocache = ',true';
// create nocache var to make it know for further compiling
- if (is_array($parameter['if condition']['var'])) {
- $var = trim($parameter['if condition']['var']['var'], "'");
+ if (is_array($parameter[ 'if condition' ][ 'var' ])) {
+ $var = trim($parameter[ 'if condition' ][ 'var' ][ 'var' ], "'");
} else {
- $var = trim($parameter['if condition']['var'], "'");
+ $var = trim($parameter[ 'if condition' ][ 'var' ], "'");
}
- if (isset($compiler->template->tpl_vars[$var])) {
- $compiler->template->tpl_vars[$var]->nocache = true;
+ if (isset($compiler->template->tpl_vars[ $var ])) {
+ $compiler->template->tpl_vars[ $var ]->nocache = true;
} else {
- $compiler->template->tpl_vars[$var] = new Smarty_Variable(null, true);
+ $compiler->template->tpl_vars[ $var ] = new Smarty_Variable(null, true);
}
} else {
$_nocache = '';
}
- if (is_array($parameter['if condition']['var'])) {
- $_output .= "if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] .
- "]) || !is_array(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] .
- "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" . $parameter['if condition']['var']['var'] .
- "$_nocache);\n";
- $_output .= "while (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" .
- $parameter['if condition']['var']['smarty_internal_index'] . " = " .
- $parameter['if condition']['value'] . ") {?>";
+ if (is_array($parameter[ 'if condition' ][ 'var' ])) {
+ $_output .= "if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]) || !is_array(\$_smarty_tpl->tpl_vars[" .
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value)) \$_smarty_tpl->_createLocalArrayVariable(" .
+ $parameter[ 'if condition' ][ 'var' ][ 'var' ] . "$_nocache);\n";
+ $_output .= "while (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ][ 'var' ] .
+ "]->value" . $parameter[ 'if condition' ][ 'var' ][ 'smarty_internal_index' ] . " = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
} else {
- $_output .= "if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] .
- "])) \$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] .
- "] = new Smarty_Variable(null{$_nocache});";
- $_output .= "while (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " .
- $parameter['if condition']['value'] . ") {?>";
+ $_output .= "if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] .
+ "])) \$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] .
+ "] = new Smarty_Variable(null{$_nocache});";
+ $_output .= "while (\$_smarty_tpl->tpl_vars[" . $parameter[ 'if condition' ][ 'var' ] . "]->value = " .
+ $parameter[ 'if condition' ][ 'value' ] . ") {?>";
}
} else {
$_output .= "while ({$parameter['if condition']}) {?>";
- }
+ }
return $_output;
}
}
@@ -90,14 +91,14 @@ class Smarty_Internal_Compile_Whileclose extends Smarty_Internal_CompileBase
/**
* Compiles code for the {/while} tag
*
- * @param array $args array with attributes from parser
+ * @param array $args array with attributes from parser
* @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object
*
* @return string compiled code
*/
public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler)
{
- $compiler->loopNesting--;
+ $compiler->loopNesting --;
// must endblock be nocache?
if ($compiler->nocache) {
$compiler->tag_nocache = true;
diff --git a/libs/sysplugins/smarty_internal_compilebase.php b/libs/sysplugins/smarty_internal_compilebase.php
index 0803f27a..95cdd678 100644
--- a/libs/sysplugins/smarty_internal_compilebase.php
+++ b/libs/sysplugins/smarty_internal_compilebase.php
@@ -65,10 +65,10 @@ abstract class Smarty_Internal_CompileBase
if (!is_array($mixed)) {
// option flag ?
if (in_array(trim($mixed, '\'"'), $this->option_flags)) {
- $_indexed_attr[trim($mixed, '\'"')] = true;
+ $_indexed_attr[ trim($mixed, '\'"') ] = true;
// shorthand attribute ?
- } elseif (isset($this->shorttag_order[$key])) {
- $_indexed_attr[$this->shorttag_order[$key]] = $mixed;
+ } elseif (isset($this->shorttag_order[ $key ])) {
+ $_indexed_attr[ $this->shorttag_order[ $key ] ] = $mixed;
} else {
// too many shorthands
$compiler->trigger_template_error('too many shorthand attributes', null, true);
@@ -77,20 +77,22 @@ abstract class Smarty_Internal_CompileBase
} else {
$kv = each($mixed);
// option flag?
- if (in_array($kv['key'], $this->option_flags)) {
- if (is_bool($kv['value'])) {
- $_indexed_attr[$kv['key']] = $kv['value'];
- } elseif (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) {
- if (trim($kv['value']) == 'true') {
- $_indexed_attr[$kv['key']] = true;
+ if (in_array($kv[ 'key' ], $this->option_flags)) {
+ if (is_bool($kv[ 'value' ])) {
+ $_indexed_attr[ $kv[ 'key' ] ] = $kv[ 'value' ];
+ } elseif (is_string($kv[ 'value' ]) &&
+ in_array(trim($kv[ 'value' ], '\'"'), array('true', 'false'))
+ ) {
+ if (trim($kv[ 'value' ]) == 'true') {
+ $_indexed_attr[ $kv[ 'key' ] ] = true;
} else {
- $_indexed_attr[$kv['key']] = false;
+ $_indexed_attr[ $kv[ 'key' ] ] = false;
}
- } elseif (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
- if ($kv['value'] == 1) {
- $_indexed_attr[$kv['key']] = true;
+ } elseif (is_numeric($kv[ 'value' ]) && in_array($kv[ 'value' ], array(0, 1))) {
+ if ($kv[ 'value' ] == 1) {
+ $_indexed_attr[ $kv[ 'key' ] ] = true;
} else {
- $_indexed_attr[$kv['key']] = false;
+ $_indexed_attr[ $kv[ 'key' ] ] = false;
}
} else {
$compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", null, true);
@@ -98,7 +100,7 @@ abstract class Smarty_Internal_CompileBase
// must be named attribute
} else {
reset($mixed);
- $_indexed_attr[key($mixed)] = $mixed[key($mixed)];
+ $_indexed_attr[ key($mixed) ] = $mixed[ key($mixed) ];
}
}
}
@@ -119,8 +121,8 @@ abstract class Smarty_Internal_CompileBase
}
// default 'false' for all option flags not set
foreach ($this->option_flags as $flag) {
- if (!isset($_indexed_attr[$flag])) {
- $_indexed_attr[$flag] = false;
+ if (!isset($_indexed_attr[ $flag ])) {
+ $_indexed_attr[ $flag ] = false;
}
}
diff --git a/libs/sysplugins/smarty_internal_config_file_compiler.php b/libs/sysplugins/smarty_internal_config_file_compiler.php
index 56d3b066..61328ce2 100644
--- a/libs/sysplugins/smarty_internal_config_file_compiler.php
+++ b/libs/sysplugins/smarty_internal_config_file_compiler.php
@@ -87,8 +87,8 @@ class Smarty_Internal_Config_File_Compiler
$this->lexer_class = $lexer_class;
$this->parser_class = $parser_class;
$this->smarty = $smarty;
- $this->config_data['sections'] = array();
- $this->config_data['vars'] = array();
+ $this->config_data[ 'sections' ] = array();
+ $this->config_data[ 'vars' ] = array();
}
/**
@@ -101,16 +101,16 @@ class Smarty_Internal_Config_File_Compiler
public function compileTemplate(Smarty_Internal_Template $template)
{
$this->template = $template;
- $this->template->compiled->file_dependency[$this->template->source->uid] = array($this->template->source->filepath,
- $this->template->source->getTimeStamp(),
- $this->template->source->type);
+ $this->template->compiled->file_dependency[ $this->template->source->uid ] =
+ array($this->template->source->filepath, $this->template->source->getTimeStamp(),
+ $this->template->source->type);
if ($this->smarty->debugging) {
$this->smarty->_debug->start_compile($this->template);
}
// init the lexer/parser to compile the config file
/* @var Smarty_Internal_ConfigFileLexer $lex */
- $lex = new $this->lexer_class(str_replace(array("\r\n", "\r"), "\n", $template->source->getContent()) .
- "\n", $this);
+ $lex = new $this->lexer_class(str_replace(array("\r\n", "\r"), "\n", $template->source->getContent()) . "\n",
+ $this);
/* @var Smarty_Internal_ConfigFileParser $parser */
$parser = new $this->parser_class($lex, $this);
@@ -141,12 +141,13 @@ class Smarty_Internal_Config_File_Compiler
$this->smarty->_debug->end_compile($this->template);
}
// template header code
- $template_header = "<?php /* Smarty version " . Smarty::SMARTY_VERSION . ", created on " .
- strftime("%Y-%m-%d %H:%M:%S") . "\n";
+ $template_header =
+ "<?php /* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") .
+ "\n";
$template_header .= " compiled from \"" . $this->template->source->filepath . "\" */ ?>\n";
$code = '<?php $_smarty_tpl->smarty->ext->configLoad->_loadConfigVars($_smarty_tpl, ' .
- var_export($this->config_data, true) . '); ?>';
+ var_export($this->config_data, true) . '); ?>';
return $template_header . $this->template->smarty->ext->_codeFrame->create($this->template, $code);
}
@@ -170,20 +171,21 @@ class Smarty_Internal_Config_File_Compiler
// $line--;
}
$match = preg_split("/\n/", $this->lex->data);
- $error_text = "Syntax error in config file '{$this->template->source->filepath}' on line {$line} '{$match[$line - 1]}' ";
+ $error_text =
+ "Syntax error in config file '{$this->template->source->filepath}' on line {$line} '{$match[$line - 1]}' ";
if (isset($args)) {
// individual error message
$error_text .= $args;
} else {
// expected token from parser
foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {
- $exp_token = $this->parser->yyTokenName[$token];
- if (isset($this->lex->smarty_token_names[$exp_token])) {
+ $exp_token = $this->parser->yyTokenName[ $token ];
+ if (isset($this->lex->smarty_token_names[ $exp_token ])) {
// token type from lexer
- $expect[] = '"' . $this->lex->smarty_token_names[$exp_token] . '"';
+ $expect[] = '"' . $this->lex->smarty_token_names[ $exp_token ] . '"';
} else {
// otherwise internal token name
- $expect[] = $this->parser->yyTokenName[$token];
+ $expect[] = $this->parser->yyTokenName[ $token ];
}
}
// output parser error message
diff --git a/libs/sysplugins/smarty_internal_configfilelexer.php b/libs/sysplugins/smarty_internal_configfilelexer.php
index e62728c2..eb42f0d9 100644
--- a/libs/sysplugins/smarty_internal_configfilelexer.php
+++ b/libs/sysplugins/smarty_internal_configfilelexer.php
@@ -144,7 +144,7 @@ class Smarty_Internal_Configfilelexer
$this->data = $data . "\n"; //now all lines are \n-terminated
$this->counter = 0;
if (preg_match('/^\xEF\xBB\xBF/', $this->data, $match)) {
- $this->counter += strlen($match[0]);
+ $this->counter += strlen($match[ 0 ]);
}
$this->line = 1;
$this->compiler = $compiler;
@@ -179,23 +179,31 @@ class Smarty_Internal_Configfilelexer
public function yypushstate($state)
{
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sState push %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
+ fprintf($this->yyTraceFILE, "%sState push %s\n", $this->yyTracePrompt,
+ isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] :
+ $this->_yy_state);
}
array_push($this->_yy_stack, $this->_yy_state);
$this->_yy_state = $state;
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
+ fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt,
+ isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] :
+ $this->_yy_state);
}
}
public function yypopstate()
{
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sState pop %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
+ fprintf($this->yyTraceFILE, "%sState pop %s\n", $this->yyTracePrompt,
+ isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] :
+ $this->_yy_state);
}
$this->_yy_state = array_pop($this->_yy_stack);
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
+ fprintf($this->yyTraceFILE, "%snew State %s\n", $this->yyTracePrompt,
+ isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] :
+ $this->_yy_state);
}
}
@@ -203,14 +211,17 @@ class Smarty_Internal_Configfilelexer
{
$this->_yy_state = $state;
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sState set %s\n", $this->yyTracePrompt, isset($this->state_name[$this->_yy_state]) ? $this->state_name[$this->_yy_state] : $this->_yy_state);
+ fprintf($this->yyTraceFILE, "%sState set %s\n", $this->yyTracePrompt,
+ isset($this->state_name[ $this->_yy_state ]) ? $this->state_name[ $this->_yy_state ] :
+ $this->_yy_state);
}
}
public function yylex1()
{
if (!isset($this->yy_global_pattern1)) {
- $this->yy_global_pattern1 = "/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/isS";
+ $this->yy_global_pattern1 =
+ "/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/isS";
}
if ($this->counter >= strlen($this->data)) {
return false; // end of input
@@ -219,13 +230,14 @@ class Smarty_Internal_Configfilelexer
do {
if (preg_match($this->yy_global_pattern1, $this->data, $yymatches, null, $this->counter)) {
$yysubmatches = $yymatches;
- if (strlen($yysubmatches[0]) < 200) {
+ if (strlen($yysubmatches[ 0 ]) < 200) {
$yymatches = preg_grep("/(.|\s)+/", $yysubmatches);
} else {
$yymatches = array_filter($yymatches, 'strlen');
}
if (empty($yymatches)) {
- throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state START');
+ throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' .
+ substr($this->data, $this->counter, 5) . '... state START');
}
next($yymatches); // skip global match
$this->token = key($yymatches); // token number
@@ -250,10 +262,11 @@ class Smarty_Internal_Configfilelexer
continue;
}
} else {
- throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]);
+ throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const START = 1;
@@ -312,7 +325,8 @@ class Smarty_Internal_Configfilelexer
public function yylex2()
{
if (!isset($this->yy_global_pattern2)) {
- $this->yy_global_pattern2 = "/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS";
+ $this->yy_global_pattern2 =
+ "/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/isS";
}
if ($this->counter >= strlen($this->data)) {
return false; // end of input
@@ -321,13 +335,14 @@ class Smarty_Internal_Configfilelexer
do {
if (preg_match($this->yy_global_pattern2, $this->data, $yymatches, null, $this->counter)) {
$yysubmatches = $yymatches;
- if (strlen($yysubmatches[0]) < 200) {
+ if (strlen($yysubmatches[ 0 ]) < 200) {
$yymatches = preg_grep("/(.|\s)+/", $yysubmatches);
} else {
$yymatches = array_filter($yymatches, 'strlen');
}
if (empty($yymatches)) {
- throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state VALUE');
+ throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' .
+ substr($this->data, $this->counter, 5) . '... state VALUE');
}
next($yymatches); // skip global match
$this->token = key($yymatches); // token number
@@ -352,10 +367,11 @@ class Smarty_Internal_Configfilelexer
continue;
}
} else {
- throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]);
+ throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const VALUE = 2;
@@ -404,8 +420,8 @@ class Smarty_Internal_Configfilelexer
function yy_r2_7()
{
- if (!$this->configBooleanize || !in_array(strtolower($this->value), Array("true", "false", "on", "off", "yes",
- "no"))
+ if (!$this->configBooleanize ||
+ !in_array(strtolower($this->value), Array("true", "false", "on", "off", "yes", "no"))
) {
$this->yypopstate();
$this->yypushstate(self::NAKED_STRING_VALUE);
@@ -443,13 +459,14 @@ class Smarty_Internal_Configfilelexer
do {
if (preg_match($this->yy_global_pattern3, $this->data, $yymatches, null, $this->counter)) {
$yysubmatches = $yymatches;
- if (strlen($yysubmatches[0]) < 200) {
+ if (strlen($yysubmatches[ 0 ]) < 200) {
$yymatches = preg_grep("/(.|\s)+/", $yysubmatches);
} else {
$yymatches = array_filter($yymatches, 'strlen');
}
if (empty($yymatches)) {
- throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state NAKED_STRING_VALUE');
+ throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' .
+ substr($this->data, $this->counter, 5) . '... state NAKED_STRING_VALUE');
}
next($yymatches); // skip global match
$this->token = key($yymatches); // token number
@@ -474,10 +491,11 @@ class Smarty_Internal_Configfilelexer
continue;
}
} else {
- throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]);
+ throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const NAKED_STRING_VALUE = 3;
@@ -501,13 +519,14 @@ class Smarty_Internal_Configfilelexer
do {
if (preg_match($this->yy_global_pattern4, $this->data, $yymatches, null, $this->counter)) {
$yysubmatches = $yymatches;
- if (strlen($yysubmatches[0]) < 200) {
+ if (strlen($yysubmatches[ 0 ]) < 200) {
$yymatches = preg_grep("/(.|\s)+/", $yysubmatches);
} else {
$yymatches = array_filter($yymatches, 'strlen');
}
if (empty($yymatches)) {
- throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state COMMENT');
+ throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' .
+ substr($this->data, $this->counter, 5) . '... state COMMENT');
}
next($yymatches); // skip global match
$this->token = key($yymatches); // token number
@@ -532,10 +551,11 @@ class Smarty_Internal_Configfilelexer
continue;
}
} else {
- throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]);
+ throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const COMMENT = 4;
@@ -571,13 +591,14 @@ class Smarty_Internal_Configfilelexer
do {
if (preg_match($this->yy_global_pattern5, $this->data, $yymatches, null, $this->counter)) {
$yysubmatches = $yymatches;
- if (strlen($yysubmatches[0]) < 200) {
+ if (strlen($yysubmatches[ 0 ]) < 200) {
$yymatches = preg_grep("/(.|\s)+/", $yysubmatches);
} else {
$yymatches = array_filter($yymatches, 'strlen');
}
if (empty($yymatches)) {
- throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state SECTION');
+ throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' .
+ substr($this->data, $this->counter, 5) . '... state SECTION');
}
next($yymatches); // skip global match
$this->token = key($yymatches); // token number
@@ -602,10 +623,11 @@ class Smarty_Internal_Configfilelexer
continue;
}
} else {
- throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]);
+ throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const SECTION = 5;
@@ -635,13 +657,14 @@ class Smarty_Internal_Configfilelexer
do {
if (preg_match($this->yy_global_pattern6, $this->data, $yymatches, null, $this->counter)) {
$yysubmatches = $yymatches;
- if (strlen($yysubmatches[0]) < 200) {
+ if (strlen($yysubmatches[ 0 ]) < 200) {
$yymatches = preg_grep("/(.|\s)+/", $yysubmatches);
} else {
$yymatches = array_filter($yymatches, 'strlen');
}
if (empty($yymatches)) {
- throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' . substr($this->data, $this->counter, 5) . '... state TRIPPLE');
+ throw new Exception('Error: lexing failed because a rule matched' . ' an empty string. Input "' .
+ substr($this->data, $this->counter, 5) . '... state TRIPPLE');
}
next($yymatches); // skip global match
$this->token = key($yymatches); // token number
@@ -666,10 +689,11 @@ class Smarty_Internal_Configfilelexer
continue;
}
} else {
- throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[$this->counter]);
+ throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const TRIPPLE = 6;
@@ -687,8 +711,8 @@ class Smarty_Internal_Configfilelexer
$to = strlen($this->data);
preg_match("/\"\"\"[ \t\r]*[\n#;]/", $this->data, $match, PREG_OFFSET_CAPTURE, $this->counter);
- if (isset($match[0][1])) {
- $to = $match[0][1];
+ if (isset($match[ 0 ][ 1 ])) {
+ $to = $match[ 0 ][ 1 ];
} else {
$this->compiler->trigger_template_error("missing or misspelled literal closing tag");
}
diff --git a/libs/sysplugins/smarty_internal_configfileparser.php b/libs/sysplugins/smarty_internal_configfileparser.php
index 69aaf990..9e2ac133 100644
--- a/libs/sysplugins/smarty_internal_configfileparser.php
+++ b/libs/sysplugins/smarty_internal_configfileparser.php
@@ -28,18 +28,18 @@ class TPC_yyToken implements ArrayAccess
public function offsetExists($offset)
{
- return isset($this->metadata[$offset]);
+ return isset($this->metadata[ $offset ]);
}
public function offsetGet($offset)
{
- return $this->metadata[$offset];
+ return $this->metadata[ $offset ];
}
public function offsetSet($offset, $value)
{
if ($offset === null) {
- if (isset($value[0])) {
+ if (isset($value[ 0 ])) {
$x = ($value instanceof TPC_yyToken) ? $value->metadata : $value;
$this->metadata = array_merge($this->metadata, $x);
@@ -52,16 +52,16 @@ class TPC_yyToken implements ArrayAccess
}
if ($value instanceof TPC_yyToken) {
if ($value->metadata) {
- $this->metadata[$offset] = $value->metadata;
+ $this->metadata[ $offset ] = $value->metadata;
}
} elseif ($value) {
- $this->metadata[$offset] = $value;
+ $this->metadata[ $offset ] = $value;
}
}
public function offsetUnset($offset)
{
- unset($this->metadata[$offset]);
+ unset($this->metadata[ $offset ]);
}
}
@@ -226,9 +226,9 @@ class Smarty_Internal_Configfileparser
$str = "";
foreach ($ss as $s) {
- if (strlen($s) === 2 && $s[0] === '\\') {
- if (isset(self::$escapes_single[$s[1]])) {
- $s = self::$escapes_single[$s[1]];
+ if (strlen($s) === 2 && $s[ 0 ] === '\\') {
+ if (isset(self::$escapes_single[ $s[ 1 ] ])) {
+ $s = self::$escapes_single[ $s[ 1 ] ];
}
}
$str .= $s;
@@ -269,14 +269,14 @@ class Smarty_Internal_Configfileparser
*/
private function set_var(Array $var, Array &$target_array)
{
- $key = $var["key"];
- $value = $var["value"];
+ $key = $var[ "key" ];
+ $value = $var[ "value" ];
- if ($this->configOverwrite || !isset($target_array['vars'][$key])) {
- $target_array['vars'][$key] = $value;
+ if ($this->configOverwrite || !isset($target_array[ 'vars' ][ $key ])) {
+ $target_array[ 'vars' ][ $key ] = $value;
} else {
- settype($target_array['vars'][$key], 'array');
- $target_array['vars'][$key][] = $value;
+ settype($target_array[ 'vars' ][ $key ], 'array');
+ $target_array[ 'vars' ][ $key ][] = $value;
}
}
@@ -287,8 +287,8 @@ class Smarty_Internal_Configfileparser
*/
private function add_global_vars(Array $vars)
{
- if (!isset($this->compiler->config_data['vars'])) {
- $this->compiler->config_data['vars'] = Array();
+ if (!isset($this->compiler->config_data[ 'vars' ])) {
+ $this->compiler->config_data[ 'vars' ] = Array();
}
foreach ($vars as $var) {
$this->set_var($var, $this->compiler->config_data);
@@ -303,11 +303,11 @@ class Smarty_Internal_Configfileparser
*/
private function add_section_vars($section_name, Array $vars)
{
- if (!isset($this->compiler->config_data['sections'][$section_name]['vars'])) {
- $this->compiler->config_data['sections'][$section_name]['vars'] = Array();
+ if (!isset($this->compiler->config_data[ 'sections' ][ $section_name ][ 'vars' ])) {
+ $this->compiler->config_data[ 'sections' ][ $section_name ][ 'vars' ] = Array();
}
foreach ($vars as $var) {
- $this->set_var($var, $this->compiler->config_data['sections'][$section_name]);
+ $this->set_var($var, $this->compiler->config_data[ 'sections' ][ $section_name ]);
}
}
@@ -356,17 +356,17 @@ class Smarty_Internal_Configfileparser
const YY_SZ_ACTTAB = 38;
static public $yy_action = array(29, 30, 34, 33, 24, 13, 19, 25, 35, 21, 59, 8, 3, 1, 20, 12, 14, 31, 20, 12, 15,
- 17, 23, 18, 27, 26, 4, 5, 6, 32, 2, 11, 28, 22, 16, 9, 7, 10,);
+ 17, 23, 18, 27, 26, 4, 5, 6, 32, 2, 11, 28, 22, 16, 9, 7, 10,);
static public $yy_lookahead = array(7, 8, 9, 10, 11, 12, 5, 27, 15, 16, 20, 21, 23, 23, 17, 18, 13, 14, 17, 18, 15,
- 2, 17, 4, 25, 26, 6, 3, 3, 14, 23, 1, 24, 17, 2, 25, 22, 25,);
+ 2, 17, 4, 25, 26, 6, 3, 3, 14, 23, 1, 24, 17, 2, 25, 22, 25,);
const YY_SHIFT_USE_DFLT = - 8;
const YY_SHIFT_MAX = 19;
static public $yy_shift_ofst = array(- 8, 1, 1, 1, - 7, - 3, - 3, 30, - 8, - 8, - 8, 19, 5, 3, 15, 16, 24, 25, 32,
- 20,);
+ 20,);
const YY_REDUCE_USE_DFLT = - 21;
@@ -375,13 +375,15 @@ class Smarty_Internal_Configfileparser
static public $yy_reduce_ofst = array(- 10, - 1, - 1, - 1, - 20, 10, 12, 8, 14, 7, - 11,);
static public $yyExpectedTokens = array(array(), array(5, 17, 18,), array(5, 17, 18,), array(5, 17, 18,),
- array(7, 8, 9, 10, 11, 12, 15, 16,), array(17, 18,), array(17, 18,), array(1,), array(), array(), array(),
- array(2, 4,), array(15, 17,), array(13, 14,), array(14,), array(17,), array(3,), array(3,), array(2,),
- array(6,), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(),);
+ array(7, 8, 9, 10, 11, 12, 15, 16,), array(17, 18,), array(17, 18,),
+ array(1,), array(), array(), array(), array(2, 4,), array(15, 17,),
+ array(13, 14,), array(14,), array(17,), array(3,), array(3,), array(2,),
+ array(6,), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(),);
static public $yy_default = array(44, 37, 41, 40, 58, 58, 58, 36, 39, 44, 44, 58, 58, 58, 58, 58, 58, 58, 58, 58,
- 55, 54, 57, 56, 50, 45, 43, 42, 38, 46, 47, 52, 51, 49, 48, 53,);
+ 55, 54, 57, 56, 50, 45, 43, 42, 38, 46, 47, 52, 51, 49, 48, 53,);
const YYNOCODE = 29;
@@ -425,18 +427,21 @@ class Smarty_Internal_Configfileparser
public $yystack = array(); /* The parser's stack */
public $yyTokenName = array('$', 'OPENB', 'SECTION', 'CLOSEB', 'DOT', 'ID', 'EQUAL', 'FLOAT', 'INT', 'BOOL',
- 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING', 'TRIPPLE_QUOTES', 'TRIPPLE_TEXT', 'TRIPPLE_QUOTES_END',
- 'NAKED_STRING', 'OTHER', 'NEWLINE', 'COMMENTSTART', 'error', 'start', 'global_vars', 'sections', 'var_list',
- 'section', 'newline', 'var', 'value',);
+ 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING', 'TRIPPLE_QUOTES', 'TRIPPLE_TEXT',
+ 'TRIPPLE_QUOTES_END', 'NAKED_STRING', 'OTHER', 'NEWLINE', 'COMMENTSTART', 'error',
+ 'start', 'global_vars', 'sections', 'var_list', 'section', 'newline', 'var', 'value',);
public static $yyRuleName = array('start ::= global_vars sections', 'global_vars ::= var_list',
- 'sections ::= sections section', 'sections ::=', 'section ::= OPENB SECTION CLOSEB newline var_list',
- 'section ::= OPENB DOT SECTION CLOSEB newline var_list', 'var_list ::= var_list newline',
- 'var_list ::= var_list var', 'var_list ::=', 'var ::= ID EQUAL value', 'value ::= FLOAT', 'value ::= INT',
- 'value ::= BOOL', 'value ::= SINGLE_QUOTED_STRING', 'value ::= DOUBLE_QUOTED_STRING',
- 'value ::= TRIPPLE_QUOTES TRIPPLE_TEXT TRIPPLE_QUOTES_END', 'value ::= TRIPPLE_QUOTES TRIPPLE_QUOTES_END',
- 'value ::= NAKED_STRING', 'value ::= OTHER', 'newline ::= NEWLINE', 'newline ::= COMMENTSTART NEWLINE',
- 'newline ::= COMMENTSTART NAKED_STRING NEWLINE',);
+ 'sections ::= sections section', 'sections ::=',
+ 'section ::= OPENB SECTION CLOSEB newline var_list',
+ 'section ::= OPENB DOT SECTION CLOSEB newline var_list',
+ 'var_list ::= var_list newline', 'var_list ::= var_list var', 'var_list ::=',
+ 'var ::= ID EQUAL value', 'value ::= FLOAT', 'value ::= INT', 'value ::= BOOL',
+ 'value ::= SINGLE_QUOTED_STRING', 'value ::= DOUBLE_QUOTED_STRING',
+ 'value ::= TRIPPLE_QUOTES TRIPPLE_TEXT TRIPPLE_QUOTES_END',
+ 'value ::= TRIPPLE_QUOTES TRIPPLE_QUOTES_END', 'value ::= NAKED_STRING',
+ 'value ::= OTHER', 'newline ::= NEWLINE', 'newline ::= COMMENTSTART NEWLINE',
+ 'newline ::= COMMENTSTART NAKED_STRING NEWLINE',);
public function tokenName($tokenType)
{
@@ -444,7 +449,7 @@ class Smarty_Internal_Configfileparser
return 'End of Input';
}
if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
- return $this->yyTokenName[$tokenType];
+ return $this->yyTokenName[ $tokenType ];
} else {
return "Unknown";
}
@@ -465,7 +470,7 @@ class Smarty_Internal_Configfileparser
}
$yytos = array_pop($this->yystack);
if ($this->yyTraceFILE && $this->yyidx >= 0) {
- fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . "\n");
+ fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n");
}
$yymajor = $yytos->major;
self::yy_destructor($yymajor, $yytos->minor);
@@ -488,14 +493,14 @@ class Smarty_Internal_Configfileparser
{
static $res3 = array();
static $res4 = array();
- $state = $this->yystack[$this->yyidx]->stateno;
- $expected = self::$yyExpectedTokens[$state];
- if (isset($res3[$state][$token])) {
- if ($res3[$state][$token]) {
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ $expected = self::$yyExpectedTokens[ $state ];
+ if (isset($res3[ $state ][ $token ])) {
+ if ($res3[ $state ][ $token ]) {
return $expected;
}
} else {
- if ($res3[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) {
+ if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
return $expected;
}
}
@@ -515,18 +520,21 @@ class Smarty_Internal_Configfileparser
return array_unique($expected);
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno][1];
- $nextstate = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno][0]);
- if (isset(self::$yyExpectedTokens[$nextstate])) {
- $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
- if (isset($res4[$nextstate][$token])) {
- if ($res4[$nextstate][$token]) {
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
+ $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset(self::$yyExpectedTokens[ $nextstate ])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]);
+ if (isset($res4[ $nextstate ][ $token ])) {
+ if ($res4[ $nextstate ][ $token ]) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return array_unique($expected);
}
} else {
- if ($res4[$nextstate][$token] = in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
+ if ($res4[ $nextstate ][ $token ] =
+ in_array($token, self::$yyExpectedTokens[ $nextstate ], true)
+ ) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return array_unique($expected);
@@ -538,8 +546,8 @@ class Smarty_Internal_Configfileparser
$this->yyidx ++;
$x = new TPC_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno][0];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
@@ -556,10 +564,12 @@ class Smarty_Internal_Configfileparser
} else {
$yyact = $nextstate;
}
- } while (true);
+ }
+ while (true);
}
break;
- } while (true);
+ }
+ while (true);
$this->yyidx = $yyidx;
$this->yystack = $stack;
@@ -573,13 +583,13 @@ class Smarty_Internal_Configfileparser
if ($token === 0) {
return true; // 0 is not part of this
}
- $state = $this->yystack[$this->yyidx]->stateno;
- if (isset($res[$state][$token])) {
- if ($res[$state][$token]) {
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ if (isset($res[ $state ][ $token ])) {
+ if ($res[ $state ][ $token ]) {
return true;
}
} else {
- if ($res[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) {
+ if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
return true;
}
}
@@ -599,16 +609,20 @@ class Smarty_Internal_Configfileparser
return true;
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno][1];
- $nextstate = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno][0]);
- if (isset($res2[$nextstate][$token])) {
- if ($res2[$nextstate][$token]) {
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
+ $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset($res2[ $nextstate ][ $token ])) {
+ if ($res2[ $nextstate ][ $token ]) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
}
} else {
- if ($res2[$nextstate][$token] = (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true))) {
+ if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) &&
+ in_array($token, self::$yyExpectedTokens[ $nextstate ],
+ true))
+ ) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
@@ -619,8 +633,8 @@ class Smarty_Internal_Configfileparser
$this->yyidx ++;
$x = new TPC_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno][0];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
@@ -641,10 +655,12 @@ class Smarty_Internal_Configfileparser
} else {
$yyact = $nextstate;
}
- } while (true);
+ }
+ while (true);
}
break;
- } while (true);
+ }
+ while (true);
$this->yyidx = $yyidx;
$this->yystack = $stack;
@@ -653,33 +669,37 @@ class Smarty_Internal_Configfileparser
public function yy_find_shift_action($iLookAhead)
{
- $stateno = $this->yystack[$this->yyidx]->stateno;
+ $stateno = $this->yystack[ $this->yyidx ]->stateno;
/* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
- if (!isset(self::$yy_shift_ofst[$stateno])) {
+ if (!isset(self::$yy_shift_ofst[ $stateno ])) {
// no shift actions
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
- $i = self::$yy_shift_ofst[$stateno];
+ $i = self::$yy_shift_ofst[ $stateno ];
if ($i === self::YY_SHIFT_USE_DFLT) {
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
- if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) {
- if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) {
+ if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) &&
+ ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0
+ ) {
if ($this->yyTraceFILE) {
- fwrite($this->yyTraceFILE, $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[$iLookAhead] . " => " . $this->yyTokenName[$iFallback] . "\n");
+ fwrite($this->yyTraceFILE,
+ $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " .
+ $this->yyTokenName[ $iFallback ] . "\n");
}
return $this->yy_find_shift_action($iFallback);
}
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
@@ -687,21 +707,21 @@ class Smarty_Internal_Configfileparser
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
- if (!isset(self::$yy_reduce_ofst[$stateno])) {
- return self::$yy_default[$stateno];
+ if (!isset(self::$yy_reduce_ofst[ $stateno ])) {
+ return self::$yy_default[ $stateno ];
}
- $i = self::$yy_reduce_ofst[$stateno];
+ $i = self::$yy_reduce_ofst[ $stateno ];
if ($i == self::YY_REDUCE_USE_DFLT) {
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
- if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) {
- return self::$yy_default[$stateno];
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) {
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
@@ -732,22 +752,24 @@ class Smarty_Internal_Configfileparser
fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState);
fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
for ($i = 1; $i <= $this->yyidx; $i ++) {
- fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[$this->yystack[$i]->major]);
+ fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]);
}
fwrite($this->yyTraceFILE, "\n");
}
}
public static $yyRuleInfo = array(array(0 => 20, 1 => 2), array(0 => 21, 1 => 1), array(0 => 22, 1 => 2),
- array(0 => 22, 1 => 0), array(0 => 24, 1 => 5), array(0 => 24, 1 => 6), array(0 => 23, 1 => 2),
- array(0 => 23, 1 => 2), array(0 => 23, 1 => 0), array(0 => 26, 1 => 3), array(0 => 27, 1 => 1),
- array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1),
- array(0 => 27, 1 => 3), array(0 => 27, 1 => 2), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1),
- array(0 => 25, 1 => 1), array(0 => 25, 1 => 2), array(0 => 25, 1 => 3),);
+ array(0 => 22, 1 => 0), array(0 => 24, 1 => 5), array(0 => 24, 1 => 6),
+ array(0 => 23, 1 => 2), array(0 => 23, 1 => 2), array(0 => 23, 1 => 0),
+ array(0 => 26, 1 => 3), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1),
+ array(0 => 27, 1 => 1), array(0 => 27, 1 => 1), array(0 => 27, 1 => 1),
+ array(0 => 27, 1 => 3), array(0 => 27, 1 => 2), array(0 => 27, 1 => 1),
+ array(0 => 27, 1 => 1), array(0 => 25, 1 => 1), array(0 => 25, 1 => 2),
+ array(0 => 25, 1 => 3),);
- public static $yyReduceMap = array(0 => 0, 2 => 0, 3 => 0, 19 => 0, 20 => 0, 21 => 0, 1 => 1, 4 => 4, 5 => 5,
- 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13,
- 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 17,);
+ public static $yyReduceMap = array(0 => 0, 2 => 0, 3 => 0, 19 => 0, 20 => 0, 21 => 0, 1 => 1, 4 => 4, 5 => 5,
+ 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14,
+ 15 => 15, 16 => 16, 17 => 17, 18 => 17,);
#line 261 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r0()
@@ -758,14 +780,14 @@ class Smarty_Internal_Configfileparser
#line 266 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r1()
{
- $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor);
+ $this->add_global_vars($this->yystack[ $this->yyidx + 0 ]->minor);
$this->_retvalue = null;
}
#line 280 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r4()
{
- $this->add_section_vars($this->yystack[$this->yyidx + - 3]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ $this->add_section_vars($this->yystack[ $this->yyidx + - 3 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
$this->_retvalue = null;
}
@@ -773,7 +795,8 @@ class Smarty_Internal_Configfileparser
function yy_r5()
{
if ($this->configReadHidden) {
- $this->add_section_vars($this->yystack[$this->yyidx + - 3]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ $this->add_section_vars($this->yystack[ $this->yyidx + - 3 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor);
}
$this->_retvalue = null;
}
@@ -781,13 +804,14 @@ class Smarty_Internal_Configfileparser
#line 293 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r6()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
}
#line 297 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r7()
{
- $this->_retvalue = array_merge($this->yystack[$this->yyidx + - 1]->minor, Array($this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue =
+ array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, Array($this->yystack[ $this->yyidx + 0 ]->minor));
}
#line 301 "../smarty/lexer/smarty_internal_configfileparser.y"
@@ -799,44 +823,44 @@ class Smarty_Internal_Configfileparser
#line 307 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r9()
{
- $this->_retvalue = Array("key" => $this->yystack[$this->yyidx + - 2]->minor,
- "value" => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = Array("key" => $this->yystack[ $this->yyidx + - 2 ]->minor,
+ "value" => $this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 312 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r10()
{
- $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = (float) $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 316 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r11()
{
- $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = (int) $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 320 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r12()
{
- $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->parse_bool($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 324 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r13()
{
- $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = self::parse_single_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 328 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r14()
{
- $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = self::parse_double_quoted_string($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 332 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r15()
{
- $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + - 1]->minor);
+ $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[ $this->yyidx + - 1 ]->minor);
}
#line 336 "../smarty/lexer/smarty_internal_configfileparser.y"
@@ -848,7 +872,7 @@ class Smarty_Internal_Configfileparser
#line 340 "../smarty/lexer/smarty_internal_configfileparser.y"
function yy_r17()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
private $_retvalue;
@@ -856,24 +880,25 @@ class Smarty_Internal_Configfileparser
public function yy_reduce($yyruleno)
{
if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) {
- fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]);
+ fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno,
+ self::$yyRuleName[ $yyruleno ]);
}
$this->_retvalue = $yy_lefthand_side = null;
- if (isset(self::$yyReduceMap[$yyruleno])) {
+ if (isset(self::$yyReduceMap[ $yyruleno ])) {
// call the action
$this->_retvalue = null;
- $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}();
$yy_lefthand_side = $this->_retvalue;
}
- $yygoto = self::$yyRuleInfo[$yyruleno][0];
- $yysize = self::$yyRuleInfo[$yyruleno][1];
+ $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ];
$this->yyidx -= $yysize;
for ($i = $yysize; $i; $i --) {
// pop all of the right-hand side parameters
array_pop($this->yystack);
}
- $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
+ $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto);
if ($yyact < self::YYNSTATE) {
if (!$this->yyTraceFILE && $yysize) {
$this->yyidx ++;
@@ -881,7 +906,7 @@ class Smarty_Internal_Configfileparser
$x->stateno = $yyact;
$x->major = $yygoto;
$x->minor = $yy_lefthand_side;
- $this->yystack[$this->yyidx] = $x;
+ $this->yystack[ $this->yyidx ] = $x;
} else {
$this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
}
@@ -940,7 +965,7 @@ class Smarty_Internal_Configfileparser
$yyendofinput = ($yymajor == 0);
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[$yymajor]);
+ fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]);
}
do {
@@ -967,15 +992,17 @@ class Smarty_Internal_Configfileparser
if ($this->yyerrcnt < 0) {
$this->yy_syntax_error($yymajor, $yytokenvalue);
}
- $yymx = $this->yystack[$this->yyidx]->major;
+ $yymx = $this->yystack[ $this->yyidx ]->major;
if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) {
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, $this->yyTokenName[$yymajor]);
+ fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt,
+ $this->yyTokenName[ $yymajor ]);
}
$this->yy_destructor($yymajor, $yytokenvalue);
$yymajor = self::YYNOCODE;
} else {
- while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) {
+ while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL &&
+ ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) {
$this->yy_pop_parser_stack();
}
if ($this->yyidx < 0 || $yymajor == 0) {
@@ -1004,7 +1031,8 @@ class Smarty_Internal_Configfileparser
$this->yy_accept();
$yymajor = self::YYNOCODE;
}
- } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
+ }
+ while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
}
}
diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php
index 44cf56ed..57d2dca5 100644
--- a/libs/sysplugins/smarty_internal_data.php
+++ b/libs/sysplugins/smarty_internal_data.php
@@ -15,7 +15,6 @@
* @subpackage Template
*
* @property int $scope
-
* The following methods will be dynamically loaded by the extension handler when they are called.
* They are located in a corresponding Smarty_Internal_Method_xxxx class
*
@@ -97,7 +96,7 @@ class Smarty_Internal_Data
if (is_array($tpl_var)) {
foreach ($tpl_var as $_key => $_val) {
if ($_key != '') {
- $this->tpl_vars[$_key] = new Smarty_Variable($_val, $nocache);
+ $this->tpl_vars[ $_key ] = new Smarty_Variable($_val, $nocache);
if ($this->_objType == 2 && $this->scope) {
$this->ext->_updateScope->updateScope($this, $_key);
}
@@ -105,7 +104,7 @@ class Smarty_Internal_Data
}
} else {
if ($tpl_var != '') {
- $this->tpl_vars[$tpl_var] = new Smarty_Variable($value, $nocache);
+ $this->tpl_vars[ $tpl_var ] = new Smarty_Variable($value, $nocache);
if ($this->_objType == 2 && $this->scope) {
$this->ext->_updateScope->updateScope($this, $tpl_var);
}
@@ -195,18 +194,20 @@ class Smarty_Internal_Data
/**
* gets the object of a Smarty variable
*
- * @param string $variable the name of the Smarty variable
- * @param Smarty_Internal_Data $_ptr optional pointer to data object
- * @param boolean $searchParents search also in parent data
- * @param bool $error_enable
+ * @param string $variable the name of the Smarty variable
+ * @param Smarty_Internal_Data $_ptr optional pointer to data object
+ * @param boolean $searchParents search also in parent data
+ * @param bool $error_enable
*
* @return Smarty_Variable|Smarty_Undefined_Variable the object of the variable
* @deprecated since 3.1.28 please use Smarty_Internal_Data::getTemplateVars() instead.
*/
- public function getVariable($variable = null, Smarty_Internal_Data $_ptr = null, $searchParents = true, $error_enable = true){
+ public function getVariable($variable = null, Smarty_Internal_Data $_ptr = null, $searchParents = true,
+ $error_enable = true)
+ {
return $this->ext->getTemplateVars->_getVariable($this, $variable, $_ptr, $searchParents, $error_enable);
}
-
+
/**
* Follow the parent chain an merge template and config variables
*
diff --git a/libs/sysplugins/smarty_internal_debug.php b/libs/sysplugins/smarty_internal_debug.php
index 0cbd5495..d5cd60df 100644
--- a/libs/sysplugins/smarty_internal_debug.php
+++ b/libs/sysplugins/smarty_internal_debug.php
@@ -55,10 +55,10 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
if (isset($mode)) {
$this->index ++;
$this->offset ++;
- $this->template_data[$this->index] = null;
+ $this->template_data[ $this->index ] = null;
}
$key = $this->get_key($template);
- $this->template_data[$this->index][$key]['start_template_time'] = microtime(true);
+ $this->template_data[ $this->index ][ $key ][ 'start_template_time' ] = microtime(true);
}
/**
@@ -69,8 +69,8 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
public function end_template(Smarty_Internal_Template $template)
{
$key = $this->get_key($template);
- $this->template_data[$this->index][$key]['total_time'] +=
- microtime(true) - $this->template_data[$this->index][$key]['start_template_time'];
+ $this->template_data[ $this->index ][ $key ][ 'total_time' ] +=
+ microtime(true) - $this->template_data[ $this->index ][ $key ][ 'start_template_time' ];
//$this->template_data[$this->index][$key]['properties'] = $template->properties;
}
@@ -84,24 +84,24 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
static $_is_stringy = array('string' => true, 'eval' => true);
if (!empty($template->compiler->trace_uid)) {
$key = $template->compiler->trace_uid;
- if (!isset($this->template_data[$this->index][$key])) {
- if (isset($_is_stringy[$template->source->type])) {
- $this->template_data[$this->index][$key]['name'] =
+ if (!isset($this->template_data[ $this->index ][ $key ])) {
+ if (isset($_is_stringy[ $template->source->type ])) {
+ $this->template_data[ $this->index ][ $key ][ 'name' ] =
'\'' . substr($template->source->name, 0, 25) . '...\'';
} else {
- $this->template_data[$this->index][$key]['name'] = $template->source->filepath;
+ $this->template_data[ $this->index ][ $key ][ 'name' ] = $template->source->filepath;
}
- $this->template_data[$this->index][$key]['compile_time'] = 0;
- $this->template_data[$this->index][$key]['render_time'] = 0;
- $this->template_data[$this->index][$key]['cache_time'] = 0;
+ $this->template_data[ $this->index ][ $key ][ 'compile_time' ] = 0;
+ $this->template_data[ $this->index ][ $key ][ 'render_time' ] = 0;
+ $this->template_data[ $this->index ][ $key ][ 'cache_time' ] = 0;
}
} else {
- if (isset($this->ignore_uid[$template->source->uid])) {
+ if (isset($this->ignore_uid[ $template->source->uid ])) {
return;
}
$key = $this->get_key($template);
}
- $this->template_data[$this->index][$key]['start_time'] = microtime(true);
+ $this->template_data[ $this->index ][ $key ][ 'start_time' ] = microtime(true);
}
/**
@@ -114,14 +114,14 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
if (!empty($template->compiler->trace_uid)) {
$key = $template->compiler->trace_uid;
} else {
- if (isset($this->ignore_uid[$template->source->uid])) {
+ if (isset($this->ignore_uid[ $template->source->uid ])) {
return;
}
$key = $this->get_key($template);
}
- $this->template_data[$this->index][$key]['compile_time'] +=
- microtime(true) - $this->template_data[$this->index][$key]['start_time'];
+ $this->template_data[ $this->index ][ $key ][ 'compile_time' ] +=
+ microtime(true) - $this->template_data[ $this->index ][ $key ][ 'start_time' ];
}
/**
@@ -132,7 +132,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
public function start_render(Smarty_Internal_Template $template)
{
$key = $this->get_key($template);
- $this->template_data[$this->index][$key]['start_time'] = microtime(true);
+ $this->template_data[ $this->index ][ $key ][ 'start_time' ] = microtime(true);
}
/**
@@ -143,8 +143,8 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
public function end_render(Smarty_Internal_Template $template)
{
$key = $this->get_key($template);
- $this->template_data[$this->index][$key]['render_time'] +=
- microtime(true) - $this->template_data[$this->index][$key]['start_time'];
+ $this->template_data[ $this->index ][ $key ][ 'render_time' ] +=
+ microtime(true) - $this->template_data[ $this->index ][ $key ][ 'start_time' ];
}
/**
@@ -155,7 +155,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
public function start_cache(Smarty_Internal_Template $template)
{
$key = $this->get_key($template);
- $this->template_data[$this->index][$key]['start_time'] = microtime(true);
+ $this->template_data[ $this->index ][ $key ][ 'start_time' ] = microtime(true);
}
/**
@@ -166,8 +166,8 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
public function end_cache(Smarty_Internal_Template $template)
{
$key = $this->get_key($template);
- $this->template_data[$this->index][$key]['cache_time'] +=
- microtime(true) - $this->template_data[$this->index][$key]['start_time'];
+ $this->template_data[ $this->index ][ $key ][ 'cache_time' ] +=
+ microtime(true) - $this->template_data[ $this->index ][ $key ][ 'start_time' ];
}
/**
@@ -244,7 +244,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$_template->assign('template_name', $obj->source->type . ':' . $obj->source->name);
}
if ($obj->_objType == 1 || $full) {
- $_template->assign('template_data', $this->template_data[$this->index]);
+ $_template->assign('template_data', $this->template_data[ $this->index ]);
} else {
$_template->assign('template_data', null);
}
@@ -273,53 +273,53 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
{
$config_vars = array();
foreach ($obj->config_vars as $key => $var) {
- $config_vars[$key]['value'] = $var;
+ $config_vars[ $key ][ 'value' ] = $var;
if ($obj->_objType == 2) {
- $config_vars[$key]['scope'] = $obj->source->type . ':' . $obj->source->name;
+ $config_vars[ $key ][ 'scope' ] = $obj->source->type . ':' . $obj->source->name;
} elseif ($obj->_objType == 4) {
- $tpl_vars[$key]['scope'] = $obj->dataObjectName;
+ $tpl_vars[ $key ][ 'scope' ] = $obj->dataObjectName;
} else {
- $config_vars[$key]['scope'] = 'Smarty object';
+ $config_vars[ $key ][ 'scope' ] = 'Smarty object';
}
}
$tpl_vars = array();
foreach ($obj->tpl_vars as $key => $var) {
foreach ($var as $varkey => $varvalue) {
if ($varkey == 'value') {
- $tpl_vars[$key][$varkey] = $varvalue;
+ $tpl_vars[ $key ][ $varkey ] = $varvalue;
} else {
if ($varkey == 'nocache') {
if ($varvalue == true) {
- $tpl_vars[$key][$varkey] = $varvalue;
+ $tpl_vars[ $key ][ $varkey ] = $varvalue;
}
} else {
if ($varkey != 'scope' || $varvalue !== 0) {
- $tpl_vars[$key]['attributes'][$varkey] = $varvalue;
+ $tpl_vars[ $key ][ 'attributes' ][ $varkey ] = $varvalue;
}
}
}
}
if ($obj->_objType == 2) {
- $tpl_vars[$key]['scope'] = $obj->source->type . ':' . $obj->source->name;
+ $tpl_vars[ $key ][ 'scope' ] = $obj->source->type . ':' . $obj->source->name;
} elseif ($obj->_objType == 4) {
- $tpl_vars[$key]['scope'] = $obj->dataObjectName;
+ $tpl_vars[ $key ][ 'scope' ] = $obj->dataObjectName;
} else {
- $tpl_vars[$key]['scope'] = 'Smarty object';
+ $tpl_vars[ $key ][ 'scope' ] = 'Smarty object';
}
}
if (isset($obj->parent)) {
$parent = $this->get_debug_vars($obj->parent);
foreach ($parent->tpl_vars as $name => $pvar) {
- if (isset($tpl_vars[$name]) && $tpl_vars[$name]['value'] === $pvar['value']) {
- $tpl_vars[$name]['scope'] = $pvar['scope'];
+ if (isset($tpl_vars[ $name ]) && $tpl_vars[ $name ][ 'value' ] === $pvar[ 'value' ]) {
+ $tpl_vars[ $name ][ 'scope' ] = $pvar[ 'scope' ];
}
}
$tpl_vars = array_merge($parent->tpl_vars, $tpl_vars);
foreach ($parent->config_vars as $name => $pvar) {
- if (isset($config_vars[$name]) && $config_vars[$name]['value'] === $pvar['value']) {
- $config_vars[$name]['scope'] = $pvar['scope'];
+ if (isset($config_vars[ $name ]) && $config_vars[ $name ][ 'value' ] === $pvar[ 'value' ]) {
+ $config_vars[ $name ][ 'scope' ] = $pvar[ 'scope' ];
}
}
$config_vars = array_merge($parent->config_vars, $config_vars);
@@ -328,20 +328,20 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
if (!array_key_exists($key, $tpl_vars)) {
foreach ($var as $varkey => $varvalue) {
if ($varkey == 'value') {
- $tpl_vars[$key][$varkey] = $varvalue;
+ $tpl_vars[ $key ][ $varkey ] = $varvalue;
} else {
if ($varkey == 'nocache') {
if ($varvalue == true) {
- $tpl_vars[$key][$varkey] = $varvalue;
+ $tpl_vars[ $key ][ $varkey ] = $varvalue;
}
} else {
if ($varkey != 'scope' || $varvalue !== 0) {
- $tpl_vars[$key]['attributes'][$varkey] = $varvalue;
+ $tpl_vars[ $key ][ 'attributes' ][ $varkey ] = $varvalue;
}
}
}
}
- $tpl_vars[$key]['scope'] = 'Global';
+ $tpl_vars[ $key ][ 'scope' ] = 'Global';
}
}
}
@@ -364,19 +364,19 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$template->source->filepath;
}
$key = $template->source->uid;
- if (isset($this->template_data[$this->index][$key])) {
+ if (isset($this->template_data[ $this->index ][ $key ])) {
return $key;
} else {
- if (isset($_is_stringy[$template->source->type])) {
- $this->template_data[$this->index][$key]['name'] =
+ if (isset($_is_stringy[ $template->source->type ])) {
+ $this->template_data[ $this->index ][ $key ][ 'name' ] =
'\'' . substr($template->source->name, 0, 25) . '...\'';
} else {
- $this->template_data[$this->index][$key]['name'] = $template->source->filepath;
+ $this->template_data[ $this->index ][ $key ][ 'name' ] = $template->source->filepath;
}
- $this->template_data[$this->index][$key]['compile_time'] = 0;
- $this->template_data[$this->index][$key]['render_time'] = 0;
- $this->template_data[$this->index][$key]['cache_time'] = 0;
- $this->template_data[$this->index][$key]['total_time'] = 0;
+ $this->template_data[ $this->index ][ $key ][ 'compile_time' ] = 0;
+ $this->template_data[ $this->index ][ $key ][ 'render_time' ] = 0;
+ $this->template_data[ $this->index ][ $key ][ 'cache_time' ] = 0;
+ $this->template_data[ $this->index ][ $key ][ 'total_time' ] = 0;
return $key;
}
@@ -393,7 +393,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
if ($template->source->uid == '') {
$template->source->filepath;
}
- $this->ignore_uid[$template->source->uid] = true;
+ $this->ignore_uid[ $template->source->uid ] = true;
}
/**
@@ -403,8 +403,8 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
*/
public function debugUrl(Smarty $smarty)
{
- if (isset($_SERVER['QUERY_STRING'])) {
- $_query_string = $_SERVER['QUERY_STRING'];
+ if (isset($_SERVER[ 'QUERY_STRING' ])) {
+ $_query_string = $_SERVER[ 'QUERY_STRING' ];
} else {
$_query_string = '';
}
@@ -422,7 +422,7 @@ class Smarty_Internal_Debug extends Smarty_Internal_Data
$smarty->debugging = true;
}
} else {
- if (isset($_COOKIE['SMARTY_DEBUG'])) {
+ if (isset($_COOKIE[ 'SMARTY_DEBUG' ])) {
$smarty->debugging = true;
}
}
diff --git a/libs/sysplugins/smarty_internal_extension_clear.php b/libs/sysplugins/smarty_internal_extension_clear.php
index df80c752..adfe287c 100644
--- a/libs/sysplugins/smarty_internal_extension_clear.php
+++ b/libs/sysplugins/smarty_internal_extension_clear.php
@@ -77,13 +77,13 @@ class Smarty_Internal_Extension_Clear
$_parts_count = count($_parts);
// check name
if (isset($resource_name)) {
- if ($_parts[$_parts_count - 1] != $_resourcename_parts) {
+ if ($_parts[ $_parts_count - 1 ] != $_resourcename_parts) {
continue;
}
}
// check compile id
- if (isset($_compile_id) && (!isset($_parts[$_parts_count - 2 - $_compile_id_offset]) ||
- $_parts[$_parts_count - 2 - $_compile_id_offset] != $_compile_id)
+ if (isset($_compile_id) && (!isset($_parts[ $_parts_count - 2 - $_compile_id_offset ]) ||
+ $_parts[ $_parts_count - 2 - $_compile_id_offset ] != $_compile_id)
) {
continue;
}
@@ -96,7 +96,7 @@ class Smarty_Internal_Extension_Clear
continue;
}
for ($i = 0; $i < $_cache_id_parts_count; $i ++) {
- if ($_parts[$i] != $_cache_id_parts[$i]) {
+ if ($_parts[ $i ] != $_cache_id_parts[ $i ]) {
continue 2;
}
}
@@ -105,7 +105,7 @@ class Smarty_Internal_Extension_Clear
if (isset($exp_time)) {
if ($exp_time < 0) {
preg_match('#\'cache_lifetime\' =>\s*(\d*)#', file_get_contents($_file), $match);
- if ($_time < (@filemtime($_file) + $match[1])) {
+ if ($_time < (@filemtime($_file) + $match[ 1 ])) {
continue;
}
} else {
diff --git a/libs/sysplugins/smarty_internal_extension_handler.php b/libs/sysplugins/smarty_internal_extension_handler.php
index 65fd4bdb..71f06de6 100644
--- a/libs/sysplugins/smarty_internal_extension_handler.php
+++ b/libs/sysplugins/smarty_internal_extension_handler.php
@@ -10,26 +10,26 @@
* @subpackage PluginsInternal
* @author Uwe Tews
*
- * @property Smarty_Internal_Runtime_Inheritance $_inheritance
- * @property Smarty_Internal_Runtime_TplFunction $_tplFunction
- * @property Smarty_Internal_Runtime_Foreach $_foreach
- * @property Smarty_Internal_Runtime_WriteFile $_writeFile
- * @property Smarty_Internal_Runtime_CodeFrame $_codeFrame
- * @property Smarty_Internal_Runtime_FilterHandler $_filterHandler
- * @property Smarty_Internal_Runtime_GetIncludePath $_getIncludePath
- * @property Smarty_Internal_Runtime_UpdateScope $_updateScope
- * @property Smarty_Internal_Runtime_CacheModify $_cacheModify
- * @property Smarty_Internal_Runtime_UpdateCache $_updateCache
- * @property Smarty_Internal_Method_GetTemplateVars $getTemplateVars
- * @property Smarty_Internal_Method_Append $append
- * @property Smarty_Internal_Method_AppendByRef $appendByRef
- * @property Smarty_Internal_Method_AssignGlobal $assignGlobal
- * @property Smarty_Internal_Method_AssignByRef $assignByRef
- * @property Smarty_Internal_Method_LoadFilter $loadFilter
- * @property Smarty_Internal_Method_LoadPlugin $loadPlugin
- * @property Smarty_Internal_Method_RegisterFilter $registerFilter
- * @property Smarty_Internal_Method_RegisterObject $registerObject
- * @property Smarty_Internal_Method_RegisterPlugin $registerPlugin
+ * @property Smarty_Internal_Runtime_Inheritance $_inheritance
+ * @property Smarty_Internal_Runtime_TplFunction $_tplFunction
+ * @property Smarty_Internal_Runtime_Foreach $_foreach
+ * @property Smarty_Internal_Runtime_WriteFile $_writeFile
+ * @property Smarty_Internal_Runtime_CodeFrame $_codeFrame
+ * @property Smarty_Internal_Runtime_FilterHandler $_filterHandler
+ * @property Smarty_Internal_Runtime_GetIncludePath $_getIncludePath
+ * @property Smarty_Internal_Runtime_UpdateScope $_updateScope
+ * @property Smarty_Internal_Runtime_CacheModify $_cacheModify
+ * @property Smarty_Internal_Runtime_UpdateCache $_updateCache
+ * @property Smarty_Internal_Method_GetTemplateVars $getTemplateVars
+ * @property Smarty_Internal_Method_Append $append
+ * @property Smarty_Internal_Method_AppendByRef $appendByRef
+ * @property Smarty_Internal_Method_AssignGlobal $assignGlobal
+ * @property Smarty_Internal_Method_AssignByRef $assignByRef
+ * @property Smarty_Internal_Method_LoadFilter $loadFilter
+ * @property Smarty_Internal_Method_LoadPlugin $loadPlugin
+ * @property Smarty_Internal_Method_RegisterFilter $registerFilter
+ * @property Smarty_Internal_Method_RegisterObject $registerObject
+ * @property Smarty_Internal_Method_RegisterPlugin $registerPlugin
*/
class Smarty_Internal_Extension_Handler
{
@@ -43,8 +43,8 @@ class Smarty_Internal_Extension_Handler
* @var array
*/
private $_property_info = array('AutoloadFilters' => 0, 'DefaultModifiers' => 0, 'ConfigVars' => 0,
- 'DebugTemplate' => 0, 'RegisteredObject' => 0, 'StreamVariable' => 0,
- 'TemplateVars' => 0,);#
+ 'DebugTemplate' => 0, 'RegisteredObject' => 0, 'StreamVariable' => 0,
+ 'TemplateVars' => 0,);#
private $resolvedProperties = array();
@@ -65,22 +65,22 @@ class Smarty_Internal_Extension_Handler
if (!isset($smarty->ext->$name)) {
$class = 'Smarty_Internal_Method_' . ucfirst($name);
if (preg_match('/^(set|get)([A-Z].*)$/', $name, $match)) {
- if (!isset($this->_property_info[$prop = $match[2]])) {
+ if (!isset($this->_property_info[ $prop = $match[ 2 ] ])) {
// convert camel case to underscored name
- $this->resolvedProperties[$prop] = $pn = strtolower(join('_',
- preg_split('/([A-Z][^A-Z]*)/', $prop, - 1,
- PREG_SPLIT_NO_EMPTY |
- PREG_SPLIT_DELIM_CAPTURE)));
- $this->_property_info[$prop] = property_exists($data, $pn) ? 1 :
+ $this->resolvedProperties[ $prop ] = $pn = strtolower(join('_',
+ preg_split('/([A-Z][^A-Z]*)/', $prop,
+ - 1, PREG_SPLIT_NO_EMPTY |
+ PREG_SPLIT_DELIM_CAPTURE)));
+ $this->_property_info[ $prop ] = property_exists($data, $pn) ? 1 :
($data->_objType == 2 && property_exists($smarty, $pn) ? 2 : 0);
}
- if ($this->_property_info[$prop]) {
- $pn = $this->resolvedProperties[$prop];
- if ($match[1] == 'get') {
- return $this->_property_info[$prop] == 1 ? $data->$pn : $data->smarty->$pn;
+ if ($this->_property_info[ $prop ]) {
+ $pn = $this->resolvedProperties[ $prop ];
+ if ($match[ 1 ] == 'get') {
+ return $this->_property_info[ $prop ] == 1 ? $data->$pn : $data->smarty->$pn;
} else {
- return $this->_property_info[$prop] == 1 ? $data->$pn = $args[0] :
- $data->smarty->$pn = $args[0];
+ return $this->_property_info[ $prop ] == 1 ? $data->$pn = $args[ 0 ] :
+ $data->smarty->$pn = $args[ 0 ];
}
} elseif (!class_exists($class)) {
throw new SmartyException("property '$pn' does not exist.");
@@ -93,7 +93,7 @@ class Smarty_Internal_Extension_Handler
$callback = array($smarty->ext->$name, $name);
}
array_unshift($args, $data);
- if (isset($callback) && $callback[0]->objMap | $data->_objType) {
+ if (isset($callback) && $callback[ 0 ]->objMap | $data->_objType) {
return call_user_func_array($callback, $args);
}
return call_user_func_array(array(new Smarty_Internal_Undefined(), $name), $args);
diff --git a/libs/sysplugins/smarty_internal_method_addautoloadfilters.php b/libs/sysplugins/smarty_internal_method_addautoloadfilters.php
index b739f0e3..67ce1a9b 100644
--- a/libs/sysplugins/smarty_internal_method_addautoloadfilters.php
+++ b/libs/sysplugins/smarty_internal_method_addautoloadfilters.php
@@ -31,18 +31,19 @@ class Smarty_Internal_Method_AddAutoloadFilters extends Smarty_Internal_Method_S
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
if ($type !== null) {
$this->_checkFilterType($type);
- if (!empty($smarty->autoload_filters[$type])) {
- $smarty->autoload_filters[$type] = array_merge($smarty->autoload_filters[$type], (array) $filters);
+ if (!empty($smarty->autoload_filters[ $type ])) {
+ $smarty->autoload_filters[ $type ] = array_merge($smarty->autoload_filters[ $type ], (array) $filters);
} else {
- $smarty->autoload_filters[$type] = (array) $filters;
+ $smarty->autoload_filters[ $type ] = (array) $filters;
}
} else {
foreach ((array) $filters as $type => $value) {
$this->_checkFilterType($type);
- if (!empty($smarty->autoload_filters[$type])) {
- $smarty->autoload_filters[$type] = array_merge($smarty->autoload_filters[$type], (array) $value);
+ if (!empty($smarty->autoload_filters[ $type ])) {
+ $smarty->autoload_filters[ $type ] =
+ array_merge($smarty->autoload_filters[ $type ], (array) $value);
} else {
- $smarty->autoload_filters[$type] = (array) $value;
+ $smarty->autoload_filters[ $type ] = (array) $value;
}
}
}
diff --git a/libs/sysplugins/smarty_internal_method_append.php b/libs/sysplugins/smarty_internal_method_append.php
index 43df8803..88db1a61 100644
--- a/libs/sysplugins/smarty_internal_method_append.php
+++ b/libs/sysplugins/smarty_internal_method_append.php
@@ -44,25 +44,25 @@ class Smarty_Internal_Method_Append
}
} else {
if ($tpl_var != '' && isset($value)) {
- if (!isset($data->tpl_vars[$tpl_var])) {
+ if (!isset($data->tpl_vars[ $tpl_var ])) {
$tpl_var_inst = $data->ext->getTemplateVars->_getVariable($data, $tpl_var, null, true, false);
if ($tpl_var_inst instanceof Smarty_Undefined_Variable) {
- $data->tpl_vars[$tpl_var] = new Smarty_Variable(null, $nocache);
+ $data->tpl_vars[ $tpl_var ] = new Smarty_Variable(null, $nocache);
} else {
- $data->tpl_vars[$tpl_var] = clone $tpl_var_inst;
+ $data->tpl_vars[ $tpl_var ] = clone $tpl_var_inst;
}
}
- if (!(is_array($data->tpl_vars[$tpl_var]->value) ||
- $data->tpl_vars[$tpl_var]->value instanceof ArrayAccess)
+ if (!(is_array($data->tpl_vars[ $tpl_var ]->value) ||
+ $data->tpl_vars[ $tpl_var ]->value instanceof ArrayAccess)
) {
- settype($data->tpl_vars[$tpl_var]->value, 'array');
+ settype($data->tpl_vars[ $tpl_var ]->value, 'array');
}
if ($merge && is_array($value)) {
foreach ($value as $_mkey => $_mval) {
- $data->tpl_vars[$tpl_var]->value[$_mkey] = $_mval;
+ $data->tpl_vars[ $tpl_var ]->value[ $_mkey ] = $_mval;
}
} else {
- $data->tpl_vars[$tpl_var]->value[] = $value;
+ $data->tpl_vars[ $tpl_var ]->value[] = $value;
}
}
if ($data->_objType == 2 && $data->scope) {
diff --git a/libs/sysplugins/smarty_internal_method_appendbyref.php b/libs/sysplugins/smarty_internal_method_appendbyref.php
index 124bb803..35c2b677 100644
--- a/libs/sysplugins/smarty_internal_method_appendbyref.php
+++ b/libs/sysplugins/smarty_internal_method_appendbyref.php
@@ -28,18 +28,18 @@ class Smarty_Internal_Method_AppendByRef
public static function appendByRef(Smarty_Internal_Data $data, $tpl_var, &$value, $merge = false)
{
if ($tpl_var != '' && isset($value)) {
- if (!isset($data->tpl_vars[$tpl_var])) {
- $data->tpl_vars[$tpl_var] = new Smarty_Variable();
+ if (!isset($data->tpl_vars[ $tpl_var ])) {
+ $data->tpl_vars[ $tpl_var ] = new Smarty_Variable();
}
- if (!is_array($data->tpl_vars[$tpl_var]->value)) {
- settype($data->tpl_vars[$tpl_var]->value, 'array');
+ if (!is_array($data->tpl_vars[ $tpl_var ]->value)) {
+ settype($data->tpl_vars[ $tpl_var ]->value, 'array');
}
if ($merge && is_array($value)) {
foreach ($value as $_key => $_val) {
- $data->tpl_vars[$tpl_var]->value[$_key] = &$value[$_key];
+ $data->tpl_vars[ $tpl_var ]->value[ $_key ] = &$value[ $_key ];
}
} else {
- $data->tpl_vars[$tpl_var]->value[] = &$value;
+ $data->tpl_vars[ $tpl_var ]->value[] = &$value;
}
if ($data->_objType == 2 && $data->scope) {
$data->ext->_updateScope->updateScope($data, $tpl_var);
diff --git a/libs/sysplugins/smarty_internal_method_assignbyref.php b/libs/sysplugins/smarty_internal_method_assignbyref.php
index a97125e3..4a83044a 100644
--- a/libs/sysplugins/smarty_internal_method_assignbyref.php
+++ b/libs/sysplugins/smarty_internal_method_assignbyref.php
@@ -25,8 +25,8 @@ class Smarty_Internal_Method_AssignByRef
public function assignByRef(Smarty_Internal_Data $data, $tpl_var, &$value, $nocache)
{
if ($tpl_var != '') {
- $data->tpl_vars[$tpl_var] = new Smarty_Variable(null, $nocache);
- $data->tpl_vars[$tpl_var]->value = &$value;
+ $data->tpl_vars[ $tpl_var ] = new Smarty_Variable(null, $nocache);
+ $data->tpl_vars[ $tpl_var ]->value = &$value;
if ($data->_objType == 2 && $data->scope) {
$data->ext->_updateScope->updateScope($data, $tpl_var);
}
diff --git a/libs/sysplugins/smarty_internal_method_assignglobal.php b/libs/sysplugins/smarty_internal_method_assignglobal.php
index 23b13b3a..aae3ed7e 100644
--- a/libs/sysplugins/smarty_internal_method_assignglobal.php
+++ b/libs/sysplugins/smarty_internal_method_assignglobal.php
@@ -18,23 +18,23 @@ class Smarty_Internal_Method_AssignGlobal
*/
public $objMap = 7;
- /**
+ /**
* assigns a global Smarty variable
*
* @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data
- * @param string $varName the global variable name
- * @param mixed $value the value to assign
- * @param boolean $nocache if true any output of this variable will be not cached
+ * @param string $varName the global variable name
+ * @param mixed $value the value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
*
* @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
*/
public function assignGlobal(Smarty_Internal_Data $data, $varName, $value = null, $nocache = false)
{
if ($varName != '') {
- Smarty::$global_tpl_vars[$varName] = new Smarty_Variable($value, $nocache);
+ Smarty::$global_tpl_vars[ $varName ] = new Smarty_Variable($value, $nocache);
$ptr = $data;
while ($ptr->_objType == 2) {
- $ptr->tpl_vars[$varName] = clone Smarty::$global_tpl_vars[$varName];
+ $ptr->tpl_vars[ $varName ] = clone Smarty::$global_tpl_vars[ $varName ];
$ptr = $ptr->parent;
}
}
diff --git a/libs/sysplugins/smarty_internal_method_clearassign.php b/libs/sysplugins/smarty_internal_method_clearassign.php
index 3a7bd1e4..060a2ac4 100644
--- a/libs/sysplugins/smarty_internal_method_clearassign.php
+++ b/libs/sysplugins/smarty_internal_method_clearassign.php
@@ -33,10 +33,10 @@ class Smarty_Internal_Method_ClearAssign
{
if (is_array($tpl_var)) {
foreach ($tpl_var as $curr_var) {
- unset($data->tpl_vars[$curr_var]);
+ unset($data->tpl_vars[ $curr_var ]);
}
} else {
- unset($data->tpl_vars[$tpl_var]);
+ unset($data->tpl_vars[ $tpl_var ]);
}
return $data;
diff --git a/libs/sysplugins/smarty_internal_method_clearcache.php b/libs/sysplugins/smarty_internal_method_clearcache.php
index 74d3e9d5..95649a77 100644
--- a/libs/sysplugins/smarty_internal_method_clearcache.php
+++ b/libs/sysplugins/smarty_internal_method_clearcache.php
@@ -33,7 +33,8 @@ class Smarty_Internal_Method_ClearCache
*
* @return integer number of cache files deleted
*/
- public function clearCache(Smarty $smarty, $template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null)
+ public function clearCache(Smarty $smarty, $template_name, $cache_id = null, $compile_id = null, $exp_time = null,
+ $type = null)
{
$smarty->_clearTemplateCache();
// load cache resource and call clear
diff --git a/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
index cc0dc06f..27a84042 100644
--- a/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
+++ b/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
@@ -90,14 +90,15 @@ class Smarty_Internal_Method_ClearCompiledTemplate
}
} else {
$unlink = false;
- if ((!isset($_compile_id) || (isset($_filepath[$_compile_id_part_length]) &&
- $a = !strncmp($_filepath, $_compile_id_part, $_compile_id_part_length))) &&
- (!isset($resource_name) || (isset($_filepath[$_resource_part_1_length]) &&
- substr_compare($_filepath, $_resource_part_1, - $_resource_part_1_length,
- $_resource_part_1_length) == 0) ||
- (isset($_filepath[$_resource_part_2_length]) &&
- substr_compare($_filepath, $_resource_part_2, - $_resource_part_2_length,
- $_resource_part_2_length) == 0))
+ if ((!isset($_compile_id) || (isset($_filepath[ $_compile_id_part_length ]) && $a =
+ !strncmp($_filepath, $_compile_id_part, $_compile_id_part_length))) &&
+ (!isset($resource_name) || (isset($_filepath[ $_resource_part_1_length ]) &&
+ substr_compare($_filepath, $_resource_part_1,
+ - $_resource_part_1_length, $_resource_part_1_length) ==
+ 0) || (isset($_filepath[ $_resource_part_2_length ]) &&
+ substr_compare($_filepath, $_resource_part_2,
+ - $_resource_part_2_length,
+ $_resource_part_2_length) == 0))
) {
if (isset($exp_time)) {
if (time() - @filemtime($_filepath) >= $exp_time) {
diff --git a/libs/sysplugins/smarty_internal_method_clearconfig.php b/libs/sysplugins/smarty_internal_method_clearconfig.php
index 9c6167f4..37124780 100644
--- a/libs/sysplugins/smarty_internal_method_clearconfig.php
+++ b/libs/sysplugins/smarty_internal_method_clearconfig.php
@@ -32,7 +32,7 @@ class Smarty_Internal_Method_ClearConfig
public function clearConfig(Smarty_Internal_Data $data, $name = null)
{
if (isset($name)) {
- unset($data->config_vars[$name]);
+ unset($data->config_vars[ $name ]);
} else {
$data->config_vars = array();
}
diff --git a/libs/sysplugins/smarty_internal_method_compileallconfig.php b/libs/sysplugins/smarty_internal_method_compileallconfig.php
index 4d6be65c..c924edca 100644
--- a/libs/sysplugins/smarty_internal_method_compileallconfig.php
+++ b/libs/sysplugins/smarty_internal_method_compileallconfig.php
@@ -25,7 +25,8 @@ class Smarty_Internal_Method_CompileAllConfig extends Smarty_Internal_Method_Com
*
* @return integer number of template files recompiled
*/
- public function compileAllConfig(Smarty $smarty, $extension = '.conf', $force_compile = false, $time_limit = 0, $max_errors = null)
+ public function compileAllConfig(Smarty $smarty, $extension = '.conf', $force_compile = false, $time_limit = 0,
+ $max_errors = null)
{
return $this->compileAll($smarty, $extension, $force_compile, $time_limit, $max_errors, true);
}
diff --git a/libs/sysplugins/smarty_internal_method_compilealltemplates.php b/libs/sysplugins/smarty_internal_method_compilealltemplates.php
index 95a500c4..96343112 100644
--- a/libs/sysplugins/smarty_internal_method_compilealltemplates.php
+++ b/libs/sysplugins/smarty_internal_method_compilealltemplates.php
@@ -31,7 +31,8 @@ class Smarty_Internal_Method_CompileAllTemplates
*
* @return integer number of template files recompiled
*/
- public function compileAllTemplates(Smarty $smarty, $extension = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null)
+ public function compileAllTemplates(Smarty $smarty, $extension = '.tpl', $force_compile = false, $time_limit = 0,
+ $max_errors = null)
{
return $this->compileAll($smarty, $extension, $force_compile, $time_limit, $max_errors);
}
@@ -48,7 +49,8 @@ class Smarty_Internal_Method_CompileAllTemplates
*
* @return int number of template files compiled
*/
- protected function compileAll(Smarty $smarty, $extension, $force_compile, $time_limit, $max_errors, $isConfig = false)
+ protected function compileAll(Smarty $smarty, $extension, $force_compile, $time_limit, $max_errors,
+ $isConfig = false)
{
// switch off time limit
if (function_exists('set_time_limit')) {
@@ -81,7 +83,8 @@ class Smarty_Internal_Method_CompileAllTemplates
/* @var Smarty_Internal_Template $_tpl */
$_tpl = new $smarty->template_class($_file, $_smarty);
$_tpl->caching = Smarty::CACHING_OFF;
- $_tpl->source = $isConfig ? Smarty_Template_Config::load($_tpl) : Smarty_Template_Source::load($_tpl);
+ $_tpl->source =
+ $isConfig ? Smarty_Template_Config::load($_tpl) : Smarty_Template_Source::load($_tpl);
if ($_tpl->mustCompile()) {
$_tpl->compileTemplateSource();
$_count ++;
diff --git a/libs/sysplugins/smarty_internal_method_configload.php b/libs/sysplugins/smarty_internal_method_configload.php
index b7d4283e..559d40c4 100644
--- a/libs/sysplugins/smarty_internal_method_configload.php
+++ b/libs/sysplugins/smarty_internal_method_configload.php
@@ -67,7 +67,7 @@ class Smarty_Internal_Method_ConfigLoad
$confObj->compiled = Smarty_Template_Compiled::load($confObj);
$confObj->compiled->render($confObj);
if ($data->_objType == 2) {
- $data->compiled->file_dependency[$confObj->source->uid] =
+ $data->compiled->file_dependency[ $confObj->source->uid ] =
array($confObj->source->filepath, $confObj->source->getTimeStamp(), $confObj->source->type);
}
}
@@ -130,25 +130,25 @@ class Smarty_Internal_Method_ConfigLoad
public function _assignConfigVars(Smarty_Internal_Data $scope_ptr, Smarty_Internal_Template $tpl, $_config_vars)
{
// copy global config vars
- foreach ($_config_vars['vars'] as $variable => $value) {
- if ($tpl->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
- $scope_ptr->config_vars[$variable] = $value;
+ foreach ($_config_vars[ 'vars' ] as $variable => $value) {
+ if ($tpl->smarty->config_overwrite || !isset($scope_ptr->config_vars[ $variable ])) {
+ $scope_ptr->config_vars[ $variable ] = $value;
} else {
- $scope_ptr->config_vars[$variable] =
- array_merge((array) $scope_ptr->config_vars[$variable], (array) $value);
+ $scope_ptr->config_vars[ $variable ] =
+ array_merge((array) $scope_ptr->config_vars[ $variable ], (array) $value);
}
}
// scan sections
$sections = $tpl->source->config_sections;
if (!empty($sections)) {
foreach ((array) $sections as $tpl_section) {
- if (isset($_config_vars['sections'][$tpl_section])) {
- foreach ($_config_vars['sections'][$tpl_section]['vars'] as $variable => $value) {
- if ($tpl->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
- $scope_ptr->config_vars[$variable] = $value;
+ if (isset($_config_vars[ 'sections' ][ $tpl_section ])) {
+ foreach ($_config_vars[ 'sections' ][ $tpl_section ][ 'vars' ] as $variable => $value) {
+ if ($tpl->smarty->config_overwrite || !isset($scope_ptr->config_vars[ $variable ])) {
+ $scope_ptr->config_vars[ $variable ] = $value;
} else {
- $scope_ptr->config_vars[$variable] =
- array_merge((array) $scope_ptr->config_vars[$variable], (array) $value);
+ $scope_ptr->config_vars[ $variable ] =
+ array_merge((array) $scope_ptr->config_vars[ $variable ], (array) $value);
}
}
}
@@ -169,9 +169,9 @@ class Smarty_Internal_Method_ConfigLoad
{
$_ptr = $tpl;
while ($_ptr !== null) {
- if (isset($_ptr->config_vars[$varName])) {
+ if (isset($_ptr->config_vars[ $varName ])) {
// found it, return it
- return $_ptr->config_vars[$varName];
+ return $_ptr->config_vars[ $varName ];
}
// not found, try at parent
$_ptr = $_ptr->parent;
diff --git a/libs/sysplugins/smarty_internal_method_getautoloadfilters.php b/libs/sysplugins/smarty_internal_method_getautoloadfilters.php
index e1a7801f..87d4604a 100644
--- a/libs/sysplugins/smarty_internal_method_getautoloadfilters.php
+++ b/libs/sysplugins/smarty_internal_method_getautoloadfilters.php
@@ -30,7 +30,7 @@ class Smarty_Internal_Method_GetAutoloadFilters extends Smarty_Internal_Method_S
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
if ($type !== null) {
$this->_checkFilterType($type);
- return isset($smarty->autoload_filters[$type]) ? $smarty->autoload_filters[$type] : array();
+ return isset($smarty->autoload_filters[ $type ]) ? $smarty->autoload_filters[ $type ] : array();
}
return $smarty->autoload_filters;
}
diff --git a/libs/sysplugins/smarty_internal_method_getconfigvars.php b/libs/sysplugins/smarty_internal_method_getconfigvars.php
index b1567216..b75cf817 100644
--- a/libs/sysplugins/smarty_internal_method_getconfigvars.php
+++ b/libs/sysplugins/smarty_internal_method_getconfigvars.php
@@ -36,8 +36,8 @@ class Smarty_Internal_Method_GetConfigVars
$var_array = array();
while ($_ptr !== null) {
if (isset($varname)) {
- if (isset($_ptr->config_vars[$varname])) {
- return $_ptr->config_vars[$varname];
+ if (isset($_ptr->config_vars[ $varname ])) {
+ return $_ptr->config_vars[ $varname ];
}
} else {
$var_array = array_merge($_ptr->config_vars, $var_array);
diff --git a/libs/sysplugins/smarty_internal_method_getdebugtemplate.php b/libs/sysplugins/smarty_internal_method_getdebugtemplate.php
index 3c3432ce..40696c65 100644
--- a/libs/sysplugins/smarty_internal_method_getdebugtemplate.php
+++ b/libs/sysplugins/smarty_internal_method_getdebugtemplate.php
@@ -22,7 +22,7 @@ class Smarty_Internal_Method_GetDebugTemplate
* return name of debugging template
*
* @api Smarty::getDebugTemplate()
-
+ *
* @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
*
* @return string
diff --git a/libs/sysplugins/smarty_internal_method_getregisteredobject.php b/libs/sysplugins/smarty_internal_method_getregisteredobject.php
index be0c0dba..872dbd80 100644
--- a/libs/sysplugins/smarty_internal_method_getregisteredobject.php
+++ b/libs/sysplugins/smarty_internal_method_getregisteredobject.php
@@ -33,12 +33,12 @@ class Smarty_Internal_Method_GetRegisteredObject
public function getRegisteredObject(Smarty_Internal_TemplateBase $obj, $object_name)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- if (!isset($smarty->registered_objects[$object_name])) {
+ if (!isset($smarty->registered_objects[ $object_name ])) {
throw new SmartyException("'$object_name' is not a registered object");
}
- if (!is_object($smarty->registered_objects[$object_name][0])) {
+ if (!is_object($smarty->registered_objects[ $object_name ][ 0 ])) {
throw new SmartyException("registered '$object_name' is not an object");
}
- return $smarty->registered_objects[$object_name][0];
+ return $smarty->registered_objects[ $object_name ][ 0 ];
}
} \ No newline at end of file
diff --git a/libs/sysplugins/smarty_internal_method_gettags.php b/libs/sysplugins/smarty_internal_method_gettags.php
index dd9e8d1c..ea727fdb 100644
--- a/libs/sysplugins/smarty_internal_method_gettags.php
+++ b/libs/sysplugins/smarty_internal_method_gettags.php
@@ -48,14 +48,14 @@ class Smarty_Internal_Method_GetTags
}
if (isset($tpl)) {
$tpl->smarty = clone $tpl->smarty;
- $tpl->smarty->_cache['get_used_tags'] = true;
- $tpl->_cache['used_tags'] = array();
+ $tpl->smarty->_cache[ 'get_used_tags' ] = true;
+ $tpl->_cache[ 'used_tags' ] = array();
$tpl->smarty->merge_compiled_includes = false;
$tpl->smarty->disableSecurity();
$tpl->caching = false;
$tpl->loadCompiler();
$tpl->compiler->compileTemplate($tpl);
- return $tpl->_cache['used_tags'];
+ return $tpl->_cache[ 'used_tags' ];
}
throw new SmartyException("Missing template specification");
}
diff --git a/libs/sysplugins/smarty_internal_method_gettemplatevars.php b/libs/sysplugins/smarty_internal_method_gettemplatevars.php
index 235bece4..1759646f 100644
--- a/libs/sysplugins/smarty_internal_method_gettemplatevars.php
+++ b/libs/sysplugins/smarty_internal_method_gettemplatevars.php
@@ -25,13 +25,14 @@ class Smarty_Internal_Method_GetTemplateVars
* @link http://www.smarty.net/docs/en/api.get.template.vars.tpl
*
* @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data
- * @param string $varName variable name or null
- * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $_ptr optional pointer to data object
+ * @param string $varName variable name or null
+ * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $_ptr optional pointer to data object
* @param bool $searchParents include parent templates?
*
* @return mixed variable value or or array of variables
*/
- public function getTemplateVars(Smarty_Internal_Data $data, $varName = null, Smarty_Internal_Data $_ptr = null, $searchParents = true)
+ public function getTemplateVars(Smarty_Internal_Data $data, $varName = null, Smarty_Internal_Data $_ptr = null,
+ $searchParents = true)
{
if (isset($varName)) {
$_var = $this->_getVariable($data, $varName, $_ptr, $searchParents, false);
@@ -48,7 +49,7 @@ class Smarty_Internal_Method_GetTemplateVars
while ($_ptr !== null) {
foreach ($_ptr->tpl_vars AS $key => $var) {
if (!array_key_exists($key, $_result)) {
- $_result[$key] = $var->value;
+ $_result[ $key ] = $var->value;
}
}
// not found, try at parent
@@ -61,7 +62,7 @@ class Smarty_Internal_Method_GetTemplateVars
if ($searchParents && isset(Smarty::$global_tpl_vars)) {
foreach (Smarty::$global_tpl_vars AS $key => $var) {
if (!array_key_exists($key, $_result)) {
- $_result[$key] = $var->value;
+ $_result[ $key ] = $var->value;
}
}
}
@@ -73,22 +74,23 @@ class Smarty_Internal_Method_GetTemplateVars
* gets the object of a Smarty variable
*
* @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data
- * @param string $varName the name of the Smarty variable
- * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $_ptr optional pointer to data object
- * @param bool $searchParents search also in parent data
+ * @param string $varName the name of the Smarty variable
+ * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $_ptr optional pointer to data object
+ * @param bool $searchParents search also in parent data
* @param bool $errorEnable
*
* @return \Smarty_Variable
*/
- public function _getVariable(Smarty_Internal_Data $data, $varName, Smarty_Internal_Data $_ptr = null, $searchParents = true, $errorEnable = true)
+ public function _getVariable(Smarty_Internal_Data $data, $varName, Smarty_Internal_Data $_ptr = null,
+ $searchParents = true, $errorEnable = true)
{
if ($_ptr === null) {
$_ptr = $data;
}
while ($_ptr !== null) {
- if (isset($_ptr->tpl_vars[$varName])) {
+ if (isset($_ptr->tpl_vars[ $varName ])) {
// found it, return it
- return $_ptr->tpl_vars[$varName];
+ return $_ptr->tpl_vars[ $varName ];
}
// not found, try at parent
if ($searchParents) {
@@ -97,9 +99,9 @@ class Smarty_Internal_Method_GetTemplateVars
$_ptr = null;
}
}
- if (isset(Smarty::$global_tpl_vars[$varName])) {
+ if (isset(Smarty::$global_tpl_vars[ $varName ])) {
// found it, return it
- return Smarty::$global_tpl_vars[$varName];
+ return Smarty::$global_tpl_vars[ $varName ];
}
/* @var \Smarty $smarty */
$smarty = isset($data->smarty) ? $data->smarty : $data;
diff --git a/libs/sysplugins/smarty_internal_method_loadfilter.php b/libs/sysplugins/smarty_internal_method_loadfilter.php
index 7fb11179..4fdbdac3 100644
--- a/libs/sysplugins/smarty_internal_method_loadfilter.php
+++ b/libs/sysplugins/smarty_internal_method_loadfilter.php
@@ -46,7 +46,7 @@ class Smarty_Internal_Method_LoadFilter
$_plugin = "smarty_{$type}filter_{$name}";
$_filter_name = $_plugin;
if (is_callable($_plugin)) {
- $smarty->registered_filters[$type][$_filter_name] = $_plugin;
+ $smarty->registered_filters[ $type ][ $_filter_name ] = $_plugin;
return true;
}
if ($smarty->loadPlugin($_plugin)) {
@@ -54,7 +54,7 @@ class Smarty_Internal_Method_LoadFilter
$_plugin = array($_plugin, 'execute');
}
if (is_callable($_plugin)) {
- $smarty->registered_filters[$type][$_filter_name] = $_plugin;
+ $smarty->registered_filters[ $type ][ $_filter_name ] = $_plugin;
return true;
}
}
@@ -70,7 +70,7 @@ class Smarty_Internal_Method_LoadFilter
*/
public function _checkFilterType($type)
{
- if (!isset($this->filterTypes[$type])) {
+ if (!isset($this->filterTypes[ $type ])) {
throw new SmartyException("Illegal filter type \"{$type}\"");
}
}
diff --git a/libs/sysplugins/smarty_internal_method_loadplugin.php b/libs/sysplugins/smarty_internal_method_loadplugin.php
index c153f55f..50f3bfc2 100644
--- a/libs/sysplugins/smarty_internal_method_loadplugin.php
+++ b/libs/sysplugins/smarty_internal_method_loadplugin.php
@@ -39,21 +39,21 @@ class Smarty_Internal_Method_LoadPlugin
if (!preg_match('#^smarty_((internal)|([^_]+))_(.+)$#i', $plugin_name, $match)) {
throw new SmartyException("plugin {$plugin_name} is not a valid name format");
}
- if (!empty($match[2])) {
+ if (!empty($match[ 2 ])) {
$file = SMARTY_SYSPLUGINS_DIR . strtolower($plugin_name) . '.php';
- if (isset($this->plugin_files[$file])) {
- if ($this->plugin_files[$file] !== false) {
- return $this->plugin_files[$file];
+ if (isset($this->plugin_files[ $file ])) {
+ if ($this->plugin_files[ $file ] !== false) {
+ return $this->plugin_files[ $file ];
} else {
return false;
}
} else {
if (is_file($file)) {
- $this->plugin_files[$file] = $file;
+ $this->plugin_files[ $file ] = $file;
require_once($file);
return $file;
} else {
- $this->plugin_files[$file] = false;
+ $this->plugin_files[ $file ] = false;
return false;
}
}
@@ -62,16 +62,16 @@ class Smarty_Internal_Method_LoadPlugin
$_plugin_filename = "{$match[1]}.{$match[4]}.php";
$_lower_filename = strtolower($_plugin_filename);
if (isset($this->plugin_files)) {
- if (isset($this->plugin_files['plugins_dir'][$_lower_filename])) {
- if (!$smarty->use_include_path || $this->plugin_files['plugins_dir'][$_lower_filename] !== false) {
- return $this->plugin_files['plugins_dir'][$_lower_filename];
+ if (isset($this->plugin_files[ 'plugins_dir' ][ $_lower_filename ])) {
+ if (!$smarty->use_include_path || $this->plugin_files[ 'plugins_dir' ][ $_lower_filename ] !== false) {
+ return $this->plugin_files[ 'plugins_dir' ][ $_lower_filename ];
}
}
if (!$smarty->use_include_path || $smarty->ext->_getIncludePath->isNewIncludePath($smarty)) {
- unset($this->plugin_files['include_path']);
+ unset($this->plugin_files[ 'include_path' ]);
} else {
- if (isset($this->plugin_files['include_path'][$_lower_filename])) {
- return $this->plugin_files['include_path'][$_lower_filename];
+ if (isset($this->plugin_files[ 'include_path' ][ $_lower_filename ])) {
+ return $this->plugin_files[ 'include_path' ][ $_lower_filename ];
}
}
}
@@ -80,17 +80,17 @@ class Smarty_Internal_Method_LoadPlugin
$_file_names[] = $_lower_filename;
}
$_p_dirs = $smarty->getPluginsDir();
- if (!isset($this->plugin_files['plugins_dir'][$_lower_filename])) {
+ if (!isset($this->plugin_files[ 'plugins_dir' ][ $_lower_filename ])) {
// loop through plugin dirs and find the plugin
foreach ($_p_dirs as $_plugin_dir) {
foreach ($_file_names as $name) {
$file = $_plugin_dir . $name;
if (is_file($file)) {
- $this->plugin_files['plugins_dir'][$_lower_filename] = $file;
+ $this->plugin_files[ 'plugins_dir' ][ $_lower_filename ] = $file;
require_once($file);
return $file;
}
- $this->plugin_files['plugins_dir'][$_lower_filename] = false;
+ $this->plugin_files[ 'plugins_dir' ][ $_lower_filename ] = false;
}
}
}
@@ -98,7 +98,7 @@ class Smarty_Internal_Method_LoadPlugin
foreach ($_file_names as $_file_name) {
// try PHP include_path
$file = $smarty->ext->_getIncludePath->getIncludePath($_p_dirs, $_file_name, $smarty);
- $this->plugin_files['include_path'][$_lower_filename] = $file;
+ $this->plugin_files[ 'include_path' ][ $_lower_filename ] = $file;
if ($file !== false) {
require_once($file);
return $file;
diff --git a/libs/sysplugins/smarty_internal_method_mustcompile.php b/libs/sysplugins/smarty_internal_method_mustcompile.php
index 341de8b3..718b0a10 100644
--- a/libs/sysplugins/smarty_internal_method_mustcompile.php
+++ b/libs/sysplugins/smarty_internal_method_mustcompile.php
@@ -40,8 +40,10 @@ class Smarty_Internal_Method_MustCompile
}
if ($_template->mustCompile === null) {
$_template->mustCompile = (!$_template->source->handler->uncompiled &&
- ($_template->smarty->force_compile || $_template->source->handler->recompiled || !$_template->compiled->exists ||
- ($_template->smarty->compile_check && $_template->compiled->getTimeStamp() < $_template->source->getTimeStamp())));
+ ($_template->smarty->force_compile || $_template->source->handler->recompiled ||
+ !$_template->compiled->exists || ($_template->smarty->compile_check &&
+ $_template->compiled->getTimeStamp() <
+ $_template->source->getTimeStamp())));
}
return $_template->mustCompile;
diff --git a/libs/sysplugins/smarty_internal_method_registercacheresource.php b/libs/sysplugins/smarty_internal_method_registercacheresource.php
index 55c5090a..a3ab426a 100644
--- a/libs/sysplugins/smarty_internal_method_registercacheresource.php
+++ b/libs/sysplugins/smarty_internal_method_registercacheresource.php
@@ -30,10 +30,11 @@ class Smarty_Internal_Method_RegisterCacheResource
*
* @return \Smarty|\Smarty_Internal_Template
*/
- public function registerCacheResource(Smarty_Internal_TemplateBase $obj, $name, Smarty_CacheResource $resource_handler)
+ public function registerCacheResource(Smarty_Internal_TemplateBase $obj, $name,
+ Smarty_CacheResource $resource_handler)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- $smarty->registered_cache_resources[$name] = $resource_handler;
+ $smarty->registered_cache_resources[ $name ] = $resource_handler;
return $obj;
}
} \ No newline at end of file
diff --git a/libs/sysplugins/smarty_internal_method_registerclass.php b/libs/sysplugins/smarty_internal_method_registerclass.php
index d2e5e20b..de89b4c0 100644
--- a/libs/sysplugins/smarty_internal_method_registerclass.php
+++ b/libs/sysplugins/smarty_internal_method_registerclass.php
@@ -40,7 +40,7 @@ class Smarty_Internal_Method_RegisterClass
throw new SmartyException("Undefined class '$class_impl' in register template class");
}
// register the class
- $smarty->registered_classes[$class_name] = $class_impl;
+ $smarty->registered_classes[ $class_name ] = $class_impl;
return $obj;
}
} \ No newline at end of file
diff --git a/libs/sysplugins/smarty_internal_method_registerdefaulttemplatehandler.php b/libs/sysplugins/smarty_internal_method_registerdefaulttemplatehandler.php
index 40979e7a..262d7e8c 100644
--- a/libs/sysplugins/smarty_internal_method_registerdefaulttemplatehandler.php
+++ b/libs/sysplugins/smarty_internal_method_registerdefaulttemplatehandler.php
@@ -53,8 +53,8 @@ class Smarty_Internal_Method_RegisterDefaultTemplateHandler
$default_handler = $source->smarty->default_template_handler_func;
}
$_content = $_timestamp = null;
- $_return = call_user_func_array($default_handler, array($source->type, $source->name, &$_content, &$_timestamp,
- $source->smarty));
+ $_return = call_user_func_array($default_handler,
+ array($source->type, $source->name, &$_content, &$_timestamp, $source->smarty));
if (is_string($_return)) {
$source->exists = is_file($_return);
if ($source->exists) {
diff --git a/libs/sysplugins/smarty_internal_method_registerfilter.php b/libs/sysplugins/smarty_internal_method_registerfilter.php
index 84b2c263..7c8a12ac 100644
--- a/libs/sysplugins/smarty_internal_method_registerfilter.php
+++ b/libs/sysplugins/smarty_internal_method_registerfilter.php
@@ -48,7 +48,7 @@ class Smarty_Internal_Method_RegisterFilter
if (!is_callable($callback)) {
throw new SmartyException("{$type}filter \"{$name}\" not callable");
}
- $smarty->registered_filters[$type][$name] = $callback;
+ $smarty->registered_filters[ $type ][ $name ] = $callback;
return $obj;
}
@@ -62,9 +62,9 @@ class Smarty_Internal_Method_RegisterFilter
public function _getFilterName($function_name)
{
if (is_array($function_name)) {
- $_class_name = (is_object($function_name[0]) ? get_class($function_name[0]) : $function_name[0]);
+ $_class_name = (is_object($function_name[ 0 ]) ? get_class($function_name[ 0 ]) : $function_name[ 0 ]);
- return $_class_name . '_' . $function_name[1];
+ return $_class_name . '_' . $function_name[ 1 ];
} elseif (is_string($function_name)) {
return $function_name;
} else {
@@ -81,7 +81,7 @@ class Smarty_Internal_Method_RegisterFilter
*/
public function _checkFilterType($type)
{
- if (!isset($this->filterTypes[$type])) {
+ if (!isset($this->filterTypes[ $type ])) {
throw new SmartyException("Illegal filter type \"{$type}\"");
}
}
diff --git a/libs/sysplugins/smarty_internal_method_registerobject.php b/libs/sysplugins/smarty_internal_method_registerobject.php
index f27f1720..dcebd92b 100644
--- a/libs/sysplugins/smarty_internal_method_registerobject.php
+++ b/libs/sysplugins/smarty_internal_method_registerobject.php
@@ -44,7 +44,8 @@ class Smarty_Internal_Method_RegisterObject
* @return \Smarty|\Smarty_Internal_Template
* @throws \SmartyException
*/
- public function registerObject(Smarty_Internal_TemplateBase $obj, $object_name, $object, $allowed_methods_properties = array(), $format = true, $block_methods = array())
+ public function registerObject(Smarty_Internal_TemplateBase $obj, $object_name, $object,
+ $allowed_methods_properties = array(), $format = true, $block_methods = array())
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
// test if allowed methods callable
@@ -64,8 +65,8 @@ class Smarty_Internal_Method_RegisterObject
}
}
// register the object
- $smarty->registered_objects[$object_name] = array($object, (array) $allowed_methods_properties,
- (boolean) $format, (array) $block_methods);
+ $smarty->registered_objects[ $object_name ] =
+ array($object, (array) $allowed_methods_properties, (boolean) $format, (array) $block_methods);
return $obj;
}
} \ No newline at end of file
diff --git a/libs/sysplugins/smarty_internal_method_registerplugin.php b/libs/sysplugins/smarty_internal_method_registerplugin.php
index 95814581..b86abbfa 100644
--- a/libs/sysplugins/smarty_internal_method_registerplugin.php
+++ b/libs/sysplugins/smarty_internal_method_registerplugin.php
@@ -35,15 +35,16 @@ class Smarty_Internal_Method_RegisterPlugin
* @return \Smarty|\Smarty_Internal_Template
* @throws SmartyException when the plugin tag is invalid
*/
- public function registerPlugin(Smarty_Internal_TemplateBase $obj, $type, $name, $callback, $cacheable = true, $cache_attr = null)
+ public function registerPlugin(Smarty_Internal_TemplateBase $obj, $type, $name, $callback, $cacheable = true,
+ $cache_attr = null)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- if (isset($smarty->registered_plugins[$type][$name])) {
+ if (isset($smarty->registered_plugins[ $type ][ $name ])) {
throw new SmartyException("Plugin tag \"{$name}\" already registered");
} elseif (!is_callable($callback)) {
throw new SmartyException("Plugin \"{$name}\" not callable");
} else {
- $smarty->registered_plugins[$type][$name] = array($callback, (bool) $cacheable, (array) $cache_attr);
+ $smarty->registered_plugins[ $type ][ $name ] = array($callback, (bool) $cacheable, (array) $cache_attr);
}
return $obj;
}
diff --git a/libs/sysplugins/smarty_internal_method_registerresource.php b/libs/sysplugins/smarty_internal_method_registerresource.php
index 43246ee9..31555b3a 100644
--- a/libs/sysplugins/smarty_internal_method_registerresource.php
+++ b/libs/sysplugins/smarty_internal_method_registerresource.php
@@ -37,8 +37,8 @@ class Smarty_Internal_Method_RegisterResource
public function registerResource(Smarty_Internal_TemplateBase $obj, $name, $resource_handler)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- $smarty->registered_resources[$name] = $resource_handler instanceof
- Smarty_Resource ? $resource_handler : array($resource_handler, false);
+ $smarty->registered_resources[ $name ] =
+ $resource_handler instanceof Smarty_Resource ? $resource_handler : array($resource_handler, false);
return $obj;
}
} \ No newline at end of file
diff --git a/libs/sysplugins/smarty_internal_method_setautoloadfilters.php b/libs/sysplugins/smarty_internal_method_setautoloadfilters.php
index b1f965cd..04a901a0 100644
--- a/libs/sysplugins/smarty_internal_method_setautoloadfilters.php
+++ b/libs/sysplugins/smarty_internal_method_setautoloadfilters.php
@@ -44,7 +44,7 @@ class Smarty_Internal_Method_SetAutoloadFilters
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
if ($type !== null) {
$this->_checkFilterType($type);
- $smarty->autoload_filters[$type] = (array) $filters;
+ $smarty->autoload_filters[ $type ] = (array) $filters;
} else {
foreach ((array) $filters as $type => $value) {
$this->_checkFilterType($type);
@@ -63,7 +63,7 @@ class Smarty_Internal_Method_SetAutoloadFilters
*/
public function _checkFilterType($type)
{
- if (!isset($this->filterTypes[$type])) {
+ if (!isset($this->filterTypes[ $type ])) {
throw new SmartyException("Illegal filter type \"{$type}\"");
}
}
diff --git a/libs/sysplugins/smarty_internal_method_unloadfilter.php b/libs/sysplugins/smarty_internal_method_unloadfilter.php
index e3d966e1..3ca0eaee 100644
--- a/libs/sysplugins/smarty_internal_method_unloadfilter.php
+++ b/libs/sysplugins/smarty_internal_method_unloadfilter.php
@@ -28,12 +28,12 @@ class Smarty_Internal_Method_UnloadFilter extends Smarty_Internal_Method_LoadFil
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
$this->_checkFilterType($type);
- if (isset($smarty->registered_filters[$type])) {
+ if (isset($smarty->registered_filters[ $type ])) {
$_filter_name = "smarty_{$type}filter_{$name}";
- if (isset($smarty->registered_filters[$type][$_filter_name])) {
- unset ($smarty->registered_filters[$type][$_filter_name]);
- if (empty($smarty->registered_filters[$type])) {
- unset($smarty->registered_filters[$type]);
+ if (isset($smarty->registered_filters[ $type ][ $_filter_name ])) {
+ unset ($smarty->registered_filters[ $type ][ $_filter_name ]);
+ if (empty($smarty->registered_filters[ $type ])) {
+ unset($smarty->registered_filters[ $type ]);
}
}
}
diff --git a/libs/sysplugins/smarty_internal_method_unregistercacheresource.php b/libs/sysplugins/smarty_internal_method_unregistercacheresource.php
index c6999f7b..11680578 100644
--- a/libs/sysplugins/smarty_internal_method_unregistercacheresource.php
+++ b/libs/sysplugins/smarty_internal_method_unregistercacheresource.php
@@ -32,8 +32,8 @@ class Smarty_Internal_Method_UnregisterCacheResource
public function unregisterCacheResource(Smarty_Internal_TemplateBase $obj, $name)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- if (isset($smarty->registered_cache_resources[$name])) {
- unset($smarty->registered_cache_resources[$name]);
+ if (isset($smarty->registered_cache_resources[ $name ])) {
+ unset($smarty->registered_cache_resources[ $name ]);
}
return $obj;
}
diff --git a/libs/sysplugins/smarty_internal_method_unregisterfilter.php b/libs/sysplugins/smarty_internal_method_unregisterfilter.php
index c80ae9a6..ec69c553 100644
--- a/libs/sysplugins/smarty_internal_method_unregisterfilter.php
+++ b/libs/sysplugins/smarty_internal_method_unregisterfilter.php
@@ -28,12 +28,12 @@ class Smarty_Internal_Method_UnregisterFilter extends Smarty_Internal_Method_Reg
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
$this->_checkFilterType($type);
- if (isset($smarty->registered_filters[$type])) {
+ if (isset($smarty->registered_filters[ $type ])) {
$name = is_string($callback) ? $callback : $this->_getFilterName($callback);
- if (isset($smarty->registered_filters[$type][$name])) {
- unset($smarty->registered_filters[$type][$name]);
- if (empty($smarty->registered_filters[$type])) {
- unset($smarty->registered_filters[$type]);
+ if (isset($smarty->registered_filters[ $type ][ $name ])) {
+ unset($smarty->registered_filters[ $type ][ $name ]);
+ if (empty($smarty->registered_filters[ $type ])) {
+ unset($smarty->registered_filters[ $type ]);
}
}
}
diff --git a/libs/sysplugins/smarty_internal_method_unregisterobject.php b/libs/sysplugins/smarty_internal_method_unregisterobject.php
index a9433168..56c531ed 100644
--- a/libs/sysplugins/smarty_internal_method_unregisterobject.php
+++ b/libs/sysplugins/smarty_internal_method_unregisterobject.php
@@ -32,8 +32,8 @@ class Smarty_Internal_Method_UnregisterObject
public function unregisterObject(Smarty_Internal_TemplateBase $obj, $object_name)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- if (isset($smarty->registered_objects[$object_name])) {
- unset($smarty->registered_objects[$object_name]);
+ if (isset($smarty->registered_objects[ $object_name ])) {
+ unset($smarty->registered_objects[ $object_name ]);
}
return $obj;
}
diff --git a/libs/sysplugins/smarty_internal_method_unregisterplugin.php b/libs/sysplugins/smarty_internal_method_unregisterplugin.php
index 06cb2d35..3fd8b147 100644
--- a/libs/sysplugins/smarty_internal_method_unregisterplugin.php
+++ b/libs/sysplugins/smarty_internal_method_unregisterplugin.php
@@ -25,16 +25,16 @@ class Smarty_Internal_Method_UnregisterPlugin
* @link http://www.smarty.net/docs/en/api.unregister.plugin.tpl
*
* @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
- * @param string $type plugin type
- * @param string $name name of template tag
+ * @param string $type plugin type
+ * @param string $name name of template tag
*
* @return \Smarty|\Smarty_Internal_Template
- */
+ */
public function unregisterPlugin(Smarty_Internal_TemplateBase $obj, $type, $name)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- if (isset($smarty->registered_plugins[$type][$name])) {
- unset($smarty->registered_plugins[$type][$name]);
+ if (isset($smarty->registered_plugins[ $type ][ $name ])) {
+ unset($smarty->registered_plugins[ $type ][ $name ]);
}
return $obj;
}
diff --git a/libs/sysplugins/smarty_internal_method_unregisterresource.php b/libs/sysplugins/smarty_internal_method_unregisterresource.php
index 767bd74a..f53d9bc4 100644
--- a/libs/sysplugins/smarty_internal_method_unregisterresource.php
+++ b/libs/sysplugins/smarty_internal_method_unregisterresource.php
@@ -25,15 +25,15 @@ class Smarty_Internal_Method_UnregisterResource
* @link http://www.smarty.net/docs/en/api.unregister.resource.tpl
*
* @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj
- * @param string $type name of resource type
- *
+ * @param string $type name of resource type
+ *
* @return \Smarty|\Smarty_Internal_Template
*/
public function unregisterResource(Smarty_Internal_TemplateBase $obj, $type)
{
$smarty = isset($obj->smarty) ? $obj->smarty : $obj;
- if (isset($smarty->registered_resources[$type])) {
- unset($smarty->registered_resources[$type]);
+ if (isset($smarty->registered_resources[ $type ])) {
+ unset($smarty->registered_resources[ $type ]);
}
return $obj;
}
diff --git a/libs/sysplugins/smarty_internal_nocache_insert.php b/libs/sysplugins/smarty_internal_nocache_insert.php
index b3d5fa86..6762c289 100644
--- a/libs/sysplugins/smarty_internal_nocache_insert.php
+++ b/libs/sysplugins/smarty_internal_nocache_insert.php
@@ -37,7 +37,8 @@ class Smarty_Internal_Nocache_Insert
}
// call insert
if (isset($_assign)) {
- $_output .= "\$_smarty_tpl->assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>";
+ $_output .= "\$_smarty_tpl->assign('{$_assign}' , {$_function} (" . var_export($_attr, true) .
+ ",\$_smarty_tpl), true);?>";
} else {
$_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>";
}
@@ -46,6 +47,7 @@ class Smarty_Internal_Nocache_Insert
$_tpl = $_tpl->parent;
}
- return "/*%%SmartyNocache:{$_tpl->compiled->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->compiled->nocache_hash}%%*/";
+ return "/*%%SmartyNocache:{$_tpl->compiled->nocache_hash}%%*/" . $_output .
+ "/*/%%SmartyNocache:{$_tpl->compiled->nocache_hash}%%*/";
}
}
diff --git a/libs/sysplugins/smarty_internal_parsetree_dq.php b/libs/sysplugins/smarty_internal_parsetree_dq.php
index 607389cb..8c2e0d99 100644
--- a/libs/sysplugins/smarty_internal_parsetree_dq.php
+++ b/libs/sysplugins/smarty_internal_parsetree_dq.php
@@ -40,13 +40,20 @@ class Smarty_Internal_ParseTree_Dq extends Smarty_Internal_ParseTree
public function append_subtree(Smarty_Internal_Templateparser $parser, Smarty_Internal_ParseTree $subtree)
{
$last_subtree = count($this->subtrees) - 1;
- if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof Smarty_Internal_ParseTree_Tag && $this->subtrees[$last_subtree]->saved_block_nesting < $parser->block_nesting_level) {
+ if ($last_subtree >= 0 && $this->subtrees[ $last_subtree ] instanceof Smarty_Internal_ParseTree_Tag &&
+ $this->subtrees[ $last_subtree ]->saved_block_nesting < $parser->block_nesting_level
+ ) {
if ($subtree instanceof Smarty_Internal_ParseTree_Code) {
- $this->subtrees[$last_subtree]->data = $parser->compiler->appendCode($this->subtrees[$last_subtree]->data, '<?php echo ' . $subtree->data . ';?>');
+ $this->subtrees[ $last_subtree ]->data =
+ $parser->compiler->appendCode($this->subtrees[ $last_subtree ]->data,
+ '<?php echo ' . $subtree->data . ';?>');
} elseif ($subtree instanceof Smarty_Internal_ParseTree_DqContent) {
- $this->subtrees[$last_subtree]->data = $parser->compiler->appendCode($this->subtrees[$last_subtree]->data, '<?php echo "' . $subtree->data . '";?>');
+ $this->subtrees[ $last_subtree ]->data =
+ $parser->compiler->appendCode($this->subtrees[ $last_subtree ]->data,
+ '<?php echo "' . $subtree->data . '";?>');
} else {
- $this->subtrees[$last_subtree]->data = $parser->compiler->appendCode($this->subtrees[$last_subtree]->data, $subtree->data);
+ $this->subtrees[ $last_subtree ]->data =
+ $parser->compiler->appendCode($this->subtrees[ $last_subtree ]->data, $subtree->data);
}
} else {
$this->subtrees[] = $subtree;
diff --git a/libs/sysplugins/smarty_internal_parsetree_template.php b/libs/sysplugins/smarty_internal_parsetree_template.php
index 623ae51a..f6032351 100644
--- a/libs/sysplugins/smarty_internal_parsetree_template.php
+++ b/libs/sysplugins/smarty_internal_parsetree_template.php
@@ -88,15 +88,15 @@ class Smarty_Internal_ParseTree_Template extends Smarty_Internal_ParseTree
{
$code = '';
for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key ++) {
- if ($this->subtrees[$key] instanceof Smarty_Internal_ParseTree_Text) {
- $subtree = $this->subtrees[$key]->to_smarty_php($parser);
- while ($key + 1 < $cnt && ($this->subtrees[$key + 1] instanceof Smarty_Internal_ParseTree_Text ||
- $this->subtrees[$key + 1]->data == '')) {
+ if ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Text) {
+ $subtree = $this->subtrees[ $key ]->to_smarty_php($parser);
+ while ($key + 1 < $cnt && ($this->subtrees[ $key + 1 ] instanceof Smarty_Internal_ParseTree_Text ||
+ $this->subtrees[ $key + 1 ]->data == '')) {
$key ++;
- if ($this->subtrees[$key]->data == '') {
+ if ($this->subtrees[ $key ]->data == '') {
continue;
}
- $subtree .= $this->subtrees[$key]->to_smarty_php($parser);
+ $subtree .= $this->subtrees[ $key ]->to_smarty_php($parser);
}
if ($subtree == '') {
continue;
@@ -105,15 +105,15 @@ class Smarty_Internal_ParseTree_Template extends Smarty_Internal_ParseTree
$subtree);
continue;
}
- if ($this->subtrees[$key] instanceof Smarty_Internal_ParseTree_Tag) {
- $subtree = $this->subtrees[$key]->to_smarty_php($parser);
- while ($key + 1 < $cnt && ($this->subtrees[$key + 1] instanceof Smarty_Internal_ParseTree_Tag ||
- $this->subtrees[$key + 1]->data == '')) {
+ if ($this->subtrees[ $key ] instanceof Smarty_Internal_ParseTree_Tag) {
+ $subtree = $this->subtrees[ $key ]->to_smarty_php($parser);
+ while ($key + 1 < $cnt && ($this->subtrees[ $key + 1 ] instanceof Smarty_Internal_ParseTree_Tag ||
+ $this->subtrees[ $key + 1 ]->data == '')) {
$key ++;
- if ($this->subtrees[$key]->data == '') {
+ if ($this->subtrees[ $key ]->data == '') {
continue;
}
- $subtree = $parser->compiler->appendCode($subtree, $this->subtrees[$key]->to_smarty_php($parser));
+ $subtree = $parser->compiler->appendCode($subtree, $this->subtrees[ $key ]->to_smarty_php($parser));
}
if ($subtree == '') {
continue;
@@ -121,7 +121,7 @@ class Smarty_Internal_ParseTree_Template extends Smarty_Internal_ParseTree
$code .= $subtree;
continue;
}
- $code .= $this->subtrees[$key]->to_smarty_php($parser);
+ $code .= $this->subtrees[ $key ]->to_smarty_php($parser);
}
return $code;
}
diff --git a/libs/sysplugins/smarty_internal_resource_file.php b/libs/sysplugins/smarty_internal_resource_file.php
index a7aa50cd..784a0fa3 100644
--- a/libs/sysplugins/smarty_internal_resource_file.php
+++ b/libs/sysplugins/smarty_internal_resource_file.php
@@ -30,21 +30,23 @@ class Smarty_Internal_Resource_File extends Smarty_Resource
{
$file = $source->name;
// absolute file ?
- if ($file[0] == '/' || $file[1] == ':') {
+ if ($file[ 0 ] == '/' || $file[ 1 ] == ':') {
$file = $source->smarty->_realpath($file, true);
return is_file($file) ? $file : false;
}
// go relative to a given template?
- if ($file[0] == '.' && $_template && isset($_template->parent) && $_template->parent->_objType == 2 &&
+ if ($file[ 0 ] == '.' && $_template && isset($_template->parent) && $_template->parent->_objType == 2 &&
preg_match('#^[.]{1,2}[\\\/]#', $file)
) {
if ($_template->parent->source->type != 'file' && $_template->parent->source->type != 'extends' &&
- !isset($_template->parent->_cache['allow_relative_path'])
+ !isset($_template->parent->_cache[ 'allow_relative_path' ])
) {
throw new SmartyException("Template '{$file}' cannot be relative to template of resource type '{$_template->parent->source->type}'");
}
// if we are inside an {block} tag the path must be relative to current template
- if (isset($_template->ext->_inheritance) && $_template->ext->_inheritance->blockNesting && $_template->parent->parent->_objType == 2) {
+ if (isset($_template->ext->_inheritance) && $_template->ext->_inheritance->blockNesting &&
+ $_template->parent->parent->_objType == 2
+ ) {
$path = dirname($_template->parent->parent->source->filepath) . DS . $file;
} else {
$path = dirname($_template->parent->source->filepath) . DS . $file;
@@ -61,25 +63,25 @@ class Smarty_Internal_Resource_File extends Smarty_Resource
$_directories = $source->smarty->getTemplateDir(null, $source->isConfig);
// template_dir index?
- if ($file[0] == '[' && preg_match('#^\[([^\]]+)\](.+)$#', $file, $fileMatch)) {
- $file = $fileMatch[2];
- $_indices = explode(',', $fileMatch[1]);
+ if ($file[ 0 ] == '[' && preg_match('#^\[([^\]]+)\](.+)$#', $file, $fileMatch)) {
+ $file = $fileMatch[ 2 ];
+ $_indices = explode(',', $fileMatch[ 1 ]);
$_index_dirs = array();
foreach ($_indices as $index) {
$index = trim($index);
// try string indexes
- if (isset($_directories[$index])) {
- $_index_dirs[] = $_directories[$index];
+ if (isset($_directories[ $index ])) {
+ $_index_dirs[] = $_directories[ $index ];
} elseif (is_numeric($index)) {
// try numeric index
$index = (int) $index;
- if (isset($_directories[$index])) {
- $_index_dirs[] = $_directories[$index];
+ if (isset($_directories[ $index ])) {
+ $_index_dirs[] = $_directories[ $index ];
} else {
// try at location index
$keys = array_keys($_directories);
- if (isset($_directories[$keys[$index]])) {
- $_index_dirs[] = $_directories[$keys[$index]];
+ if (isset($_directories[ $keys[ $index ] ])) {
+ $_index_dirs[] = $_directories[ $keys[ $index ] ];
}
}
}
@@ -128,7 +130,8 @@ class Smarty_Internal_Resource_File extends Smarty_Resource
$source->smarty->security_policy->isTrustedResourceDir($source->filepath, $source->isConfig);
}
$source->exists = true;
- $source->uid = sha1($source->filepath . ($source->isConfig ? $source->smarty->_joined_config_dir : $source->smarty->_joined_template_dir));
+ $source->uid = sha1($source->filepath . ($source->isConfig ? $source->smarty->_joined_config_dir :
+ $source->smarty->_joined_template_dir));
if ($source->smarty->compile_check == 1) {
$source->timestamp = filemtime($source->filepath);
}
diff --git a/libs/sysplugins/smarty_internal_resource_php.php b/libs/sysplugins/smarty_internal_resource_php.php
index 62680625..bdcce934 100644
--- a/libs/sysplugins/smarty_internal_resource_php.php
+++ b/libs/sysplugins/smarty_internal_resource_php.php
@@ -17,6 +17,7 @@ class Smarty_Internal_Resource_Php extends Smarty_Internal_Resource_File
* @var bool
*/
public $uncompiled = true;
+
/**
* container for short_open_tag directive's value before executing PHP templates
*
@@ -31,10 +32,8 @@ class Smarty_Internal_Resource_Php extends Smarty_Internal_Resource_File
*/
public $hasCompiledHandler = true;
-
/**
* Create a new PHP Resource
-
*/
public function __construct()
{
diff --git a/libs/sysplugins/smarty_internal_resource_registered.php b/libs/sysplugins/smarty_internal_resource_registered.php
index 5f6ebc29..186fcddd 100644
--- a/libs/sysplugins/smarty_internal_resource_registered.php
+++ b/libs/sysplugins/smarty_internal_resource_registered.php
@@ -60,7 +60,8 @@ class Smarty_Internal_Resource_Registered extends Smarty_Resource
{
// return timestamp
$time_stamp = false;
- call_user_func_array($source->smarty->registered_resources[$source->type][0][1], array($source->name, &$time_stamp, $source->smarty));
+ call_user_func_array($source->smarty->registered_resources[ $source->type ][ 0 ][ 1 ],
+ array($source->name, &$time_stamp, $source->smarty));
return is_numeric($time_stamp) ? (int) $time_stamp : $time_stamp;
}
@@ -77,7 +78,8 @@ class Smarty_Internal_Resource_Registered extends Smarty_Resource
{
// return template string
$content = null;
- $t = call_user_func_array($source->smarty->registered_resources[$source->type][0][0], array($source->name, &$content, $source->smarty));
+ $t = call_user_func_array($source->smarty->registered_resources[ $source->type ][ 0 ][ 0 ],
+ array($source->name, &$content, $source->smarty));
if (is_bool($t) && !$t) {
throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
}
diff --git a/libs/sysplugins/smarty_internal_runtime_cachemodify.php b/libs/sysplugins/smarty_internal_runtime_cachemodify.php
index eb8d0cef..a91874a9 100644
--- a/libs/sysplugins/smarty_internal_runtime_cachemodify.php
+++ b/libs/sysplugins/smarty_internal_runtime_cachemodify.php
@@ -13,15 +13,15 @@ class Smarty_Internal_Runtime_CacheModify
/**
* check client side cache
*
- * @param \Smarty_Template_Cached $cached
+ * @param \Smarty_Template_Cached $cached
* @param \Smarty_Internal_Template $_template
- * @param string $content
+ * @param string $content
*/
public function cacheModifiedCheck(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template, $content)
{
$_isCached = $_template->isCached() && !$_template->compiled->has_nocache_code;
$_last_modified_date =
- @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
+ @substr($_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ], 0, strpos($_SERVER[ 'HTTP_IF_MODIFIED_SINCE' ], 'GMT') + 3);
if ($_isCached && $cached->timestamp <= strtotime($_last_modified_date)) {
switch (PHP_SAPI) {
case 'cgi': // php-cgi < 5.3
@@ -32,19 +32,19 @@ class Smarty_Internal_Runtime_CacheModify
case 'cli':
if ( /* ^phpunit */
- !empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']) /* phpunit$ */
+ !empty($_SERVER[ 'SMARTY_PHPUNIT_DISABLE_HEADERS' ]) /* phpunit$ */
) {
- $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';
+ $_SERVER[ 'SMARTY_PHPUNIT_HEADERS' ][] = '304 Not Modified';
}
break;
default:
if ( /* ^phpunit */
- !empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']) /* phpunit$ */
+ !empty($_SERVER[ 'SMARTY_PHPUNIT_DISABLE_HEADERS' ]) /* phpunit$ */
) {
- $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';
+ $_SERVER[ 'SMARTY_PHPUNIT_HEADERS' ][] = '304 Not Modified';
} else {
- header($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
+ header($_SERVER[ 'SERVER_PROTOCOL' ] . ' 304 Not Modified');
}
break;
}
@@ -52,9 +52,9 @@ class Smarty_Internal_Runtime_CacheModify
switch (PHP_SAPI) {
case 'cli':
if ( /* ^phpunit */
- !empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS']) /* phpunit$ */
+ !empty($_SERVER[ 'SMARTY_PHPUNIT_DISABLE_HEADERS' ]) /* phpunit$ */
) {
- $_SERVER['SMARTY_PHPUNIT_HEADERS'][] =
+ $_SERVER[ 'SMARTY_PHPUNIT_HEADERS' ][] =
'Last-Modified: ' . gmdate('D, d M Y H:i:s', $cached->timestamp) . ' GMT';
}
break;
diff --git a/libs/sysplugins/smarty_internal_runtime_codeframe.php b/libs/sysplugins/smarty_internal_runtime_codeframe.php
index 10ad35eb..810a036e 100644
--- a/libs/sysplugins/smarty_internal_runtime_codeframe.php
+++ b/libs/sysplugins/smarty_internal_runtime_codeframe.php
@@ -48,10 +48,10 @@ class Smarty_Internal_Runtime_CodeFrame
}
$output = "<?php\n";
$output .= "/* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") .
- "\n from \"" . $_template->source->filepath . "\" */\n\n";
+ "\n from \"" . $_template->source->filepath . "\" */\n\n";
$output .= "/* @var Smarty_Internal_Template \$_smarty_tpl */\n";
$dec = "\$_smarty_tpl->_decodeProperties(\$_smarty_tpl, " . var_export($properties, true) . ',' .
- ($cache ? 'true' : 'false') . ")";
+ ($cache ? 'true' : 'false') . ")";
$output .= "if ({$dec}) {\n";
$output .= "function {$properties['unifunc']} (Smarty_Internal_Template \$_smarty_tpl) {\n";
// include code for plugins
diff --git a/libs/sysplugins/smarty_internal_runtime_filterhandler.php b/libs/sysplugins/smarty_internal_runtime_filterhandler.php
index 9af26675..f6cfa7c4 100644
--- a/libs/sysplugins/smarty_internal_runtime_filterhandler.php
+++ b/libs/sysplugins/smarty_internal_runtime_filterhandler.php
@@ -33,8 +33,8 @@ class Smarty_Internal_Runtime_FilterHandler
public function runFilter($type, $content, Smarty_Internal_Template $template)
{
// loop over autoload filters of specified type
- if (!empty($template->smarty->autoload_filters[$type])) {
- foreach ((array) $template->smarty->autoload_filters[$type] as $name) {
+ if (!empty($template->smarty->autoload_filters[ $type ])) {
+ foreach ((array) $template->smarty->autoload_filters[ $type ] as $name) {
$plugin_name = "Smarty_{$type}filter_{$name}";
if (function_exists($plugin_name)) {
$callback = $plugin_name;
@@ -58,9 +58,9 @@ class Smarty_Internal_Runtime_FilterHandler
}
}
// loop over registered filters of specified type
- if (!empty($template->smarty->registered_filters[$type])) {
- foreach ($template->smarty->registered_filters[$type] as $key => $name) {
- $content = call_user_func($template->smarty->registered_filters[$type][$key], $content, $template);
+ if (!empty($template->smarty->registered_filters[ $type ])) {
+ foreach ($template->smarty->registered_filters[ $type ] as $key => $name) {
+ $content = call_user_func($template->smarty->registered_filters[ $type ][ $key ], $content, $template);
}
}
// return filtered output
diff --git a/libs/sysplugins/smarty_internal_runtime_getincludepath.php b/libs/sysplugins/smarty_internal_runtime_getincludepath.php
index 72149cd3..9eae1822 100644
--- a/libs/sysplugins/smarty_internal_runtime_getincludepath.php
+++ b/libs/sysplugins/smarty_internal_runtime_getincludepath.php
@@ -121,50 +121,52 @@ class Smarty_Internal_Runtime_GetIncludePath
public function getIncludePath($dirs, $file, Smarty $smarty)
{
//if (!(isset($this->_has_stream_include) ? $this->_has_stream_include : $this->_has_stream_include = false)) {
- if (!(isset($this->_has_stream_include) ? $this->_has_stream_include : $this->_has_stream_include = function_exists('stream_resolve_include_path'))) {
- $this->isNewIncludePath($smarty);
+ if (!(isset($this->_has_stream_include) ? $this->_has_stream_include :
+ $this->_has_stream_include = function_exists('stream_resolve_include_path'))
+ ) {
+ $this->isNewIncludePath($smarty);
}
// try PHP include_path
foreach ($dirs as $dir) {
- $dir_n = isset($this->number[$dir]) ? $this->number[$dir] : $this->number[$dir] = $this->counter ++;
- if (isset($this->isFile[$dir_n][$file])) {
- if ($this->isFile[$dir_n][$file]) {
- return $this->isFile[$dir_n][$file];
+ $dir_n = isset($this->number[ $dir ]) ? $this->number[ $dir ] : $this->number[ $dir ] = $this->counter ++;
+ if (isset($this->isFile[ $dir_n ][ $file ])) {
+ if ($this->isFile[ $dir_n ][ $file ]) {
+ return $this->isFile[ $dir_n ][ $file ];
} else {
continue;
}
}
- if (isset($this->_user_dirs[$dir_n])) {
- if (false === $this->_user_dirs[$dir_n]) {
+ if (isset($this->_user_dirs[ $dir_n ])) {
+ if (false === $this->_user_dirs[ $dir_n ]) {
continue;
} else {
- $dir = $this->_user_dirs[$dir_n];
+ $dir = $this->_user_dirs[ $dir_n ];
}
} else {
- if ($dir[0] == '/' || $dir[1] == ':') {
+ if ($dir[ 0 ] == '/' || $dir[ 1 ] == ':') {
$dir = str_ireplace(getcwd(), '.', $dir);
- if ($dir[0] == '/' || $dir[1] == ':') {
- $this->_user_dirs[$dir_n] = false;
+ if ($dir[ 0 ] == '/' || $dir[ 1 ] == ':') {
+ $this->_user_dirs[ $dir_n ] = false;
continue;
}
}
$dir = substr($dir, 2);
- $this->_user_dirs[$dir_n] = $dir;
+ $this->_user_dirs[ $dir_n ] = $dir;
}
if ($this->_has_stream_include) {
$path = stream_resolve_include_path($dir . (isset($file) ? $file : ''));
if ($path) {
- return $this->isFile[$dir_n][$file] = $path;
+ return $this->isFile[ $dir_n ][ $file ] = $path;
}
} else {
foreach ($this->_include_dirs as $key => $_i_path) {
- $path = isset($this->isPath[$key][$dir_n]) ? $this->isPath[$key][$dir_n] : $this->isPath[$key][$dir_n] = is_dir($_dir_path = $_i_path .
- $dir) ? $_dir_path : false;
+ $path = isset($this->isPath[ $key ][ $dir_n ]) ? $this->isPath[ $key ][ $dir_n ] :
+ $this->isPath[ $key ][ $dir_n ] = is_dir($_dir_path = $_i_path . $dir) ? $_dir_path : false;
if ($path === false) {
continue;
}
if (isset($file)) {
- $_file = $this->isFile[$dir_n][$file] = (is_file($path . $file)) ? $path . $file : false;
+ $_file = $this->isFile[ $dir_n ][ $file ] = (is_file($path . $file)) ? $path . $file : false;
if ($_file) {
return $_file;
}
diff --git a/libs/sysplugins/smarty_internal_runtime_tplfunction.php b/libs/sysplugins/smarty_internal_runtime_tplfunction.php
index 634ed5dc..d3fb3c51 100644
--- a/libs/sysplugins/smarty_internal_runtime_tplfunction.php
+++ b/libs/sysplugins/smarty_internal_runtime_tplfunction.php
@@ -22,14 +22,14 @@ class Smarty_Internal_Runtime_TplFunction
*/
public function callTemplateFunction(Smarty_Internal_Template $tpl, $name, $params, $nocache)
{
- if (isset($tpl->tpl_function[$name])) {
+ if (isset($tpl->tpl_function[ $name ])) {
if (!$tpl->caching || ($tpl->caching && $nocache)) {
- $function = $tpl->tpl_function[$name]['call_name'];
+ $function = $tpl->tpl_function[ $name ][ 'call_name' ];
} else {
- if (isset($tpl->tpl_function[$name]['call_name_caching'])) {
- $function = $tpl->tpl_function[$name]['call_name_caching'];
+ if (isset($tpl->tpl_function[ $name ][ 'call_name_caching' ])) {
+ $function = $tpl->tpl_function[ $name ][ 'call_name_caching' ];
} else {
- $function = $tpl->tpl_function[$name]['call_name'];
+ $function = $tpl->tpl_function[ $name ][ 'call_name' ];
}
}
if (function_exists($function)) {
@@ -57,17 +57,17 @@ class Smarty_Internal_Runtime_TplFunction
*/
public function addTplFuncToCache(Smarty_Internal_Template $tpl, $_name, $_function)
{
- $funcParam = $tpl->tpl_function[$_name];
- if (is_file($funcParam['compiled_filepath'])) {
+ $funcParam = $tpl->tpl_function[ $_name ];
+ if (is_file($funcParam[ 'compiled_filepath' ])) {
// read compiled file
- $code = file_get_contents($funcParam['compiled_filepath']);
+ $code = file_get_contents($funcParam[ 'compiled_filepath' ]);
// grab template function
if (preg_match("/\/\* {$_function} \*\/([\S\s]*?)\/\*\/ {$_function} \*\//", $code, $match)) {
// grab source info from file dependency
preg_match("/\s*'{$funcParam['uid']}'([\S\s]*?)\),/", $code, $match1);
unset($code);
// make PHP function known
- eval($match[0]);
+ eval($match[ 0 ]);
if (function_exists($_function)) {
// search cache file template
$tplPtr = $tpl;
@@ -83,9 +83,11 @@ class Smarty_Internal_Runtime_TplFunction
if (!preg_match("/'{$funcParam['uid']}'(.*?)'nocache_hash'/", $content, $match2)) {
$content = preg_replace("/('file_dependency'(.*?)\()/", "\\1{$match1[0]}", $content);
}
- $tplPtr->smarty->ext->_updateCache->write($cache, $tplPtr, preg_replace('/\s*\?>\s*$/', "\n", $content) . "\n" .
- preg_replace(array('/^\s*<\?php\s+/', '/\s*\?>\s*$/'), "\n",
- $match[0]));
+ $tplPtr->smarty->ext->_updateCache->write($cache, $tplPtr,
+ preg_replace('/\s*\?>\s*$/', "\n", $content) .
+ "\n" . preg_replace(array('/^\s*<\?php\s+/',
+ '/\s*\?>\s*$/'), "\n",
+ $match[ 0 ]));
}
}
return true;
diff --git a/libs/sysplugins/smarty_internal_runtime_updatecache.php b/libs/sysplugins/smarty_internal_runtime_updatecache.php
index 77eaf361..7f7f410f 100644
--- a/libs/sysplugins/smarty_internal_runtime_updatecache.php
+++ b/libs/sysplugins/smarty_internal_runtime_updatecache.php
@@ -34,7 +34,7 @@ class Smarty_Internal_Runtime_UpdateCache
$no_output_filter)
{
$content = ob_get_clean();
- unset($cached->hashes[$_template->compiled->nocache_hash]);
+ unset($cached->hashes[ $_template->compiled->nocache_hash ]);
if (!empty($cached->hashes)) {
$hash_array = array();
foreach ($cached->hashes as $hash => $foo) {
@@ -56,14 +56,14 @@ class Smarty_Internal_Runtime_UpdateCache
// escape PHP tags in template content
$content .= preg_replace('/(<%|%>|<\?php|<\?|\?>|<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>)/',
"<?php echo '\$1'; ?>\n", $curr_split);
- if (isset($cache_parts[0][$curr_idx])) {
+ if (isset($cache_parts[ 0 ][ $curr_idx ])) {
$_template->cached->has_nocache_code = true;
- $content .= $cache_parts[1][$curr_idx];
+ $content .= $cache_parts[ 1 ][ $curr_idx ];
}
}
if (!$no_output_filter && !$_template->cached->has_nocache_code &&
- (isset($_template->smarty->autoload_filters['output']) ||
- isset($_template->smarty->registered_filters['output']))
+ (isset($_template->smarty->autoload_filters[ 'output' ]) ||
+ isset($_template->smarty->registered_filters[ 'output' ]))
) {
$content = $_template->smarty->ext->_filterHandler->runFilter('output', $content, $_template);
}
@@ -123,7 +123,7 @@ class Smarty_Internal_Runtime_UpdateCache
public function writeCachedContent(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template, $content)
{
if ($_template->source->handler->recompiled || !($_template->caching == Smarty::CACHING_LIFETIME_CURRENT ||
- $_template->caching == Smarty::CACHING_LIFETIME_SAVED)
+ $_template->caching == Smarty::CACHING_LIFETIME_SAVED)
) {
// don't write cache file
return false;
diff --git a/libs/sysplugins/smarty_internal_runtime_writefile.php b/libs/sysplugins/smarty_internal_runtime_writefile.php
index 05c97378..cf35e3c0 100644
--- a/libs/sysplugins/smarty_internal_runtime_writefile.php
+++ b/libs/sysplugins/smarty_internal_runtime_writefile.php
@@ -30,7 +30,8 @@ class Smarty_Internal_Runtime_WriteFile
$_error_reporting = error_reporting();
error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING);
$_file_perms = property_exists($smarty, '_file_perms') ? $smarty->_file_perms : 0644;
- $_dir_perms = property_exists($smarty, '_dir_perms') ? (isset($smarty->_dir_perms) ? $smarty->_dir_perms : 0777) : 0771;
+ $_dir_perms =
+ property_exists($smarty, '_dir_perms') ? (isset($smarty->_dir_perms) ? $smarty->_dir_perms : 0777) : 0771;
if ($_file_perms !== null) {
$old_umask = umask(0);
}
@@ -46,7 +47,7 @@ class Smarty_Internal_Runtime_WriteFile
if (!file_put_contents($_tmp_file, $_contents)) {
error_reporting($_error_reporting);
throw new SmartyException("unable to write file {$_tmp_file}");
- }
+ }
/*
* Windows' rename() fails if the destination exists,
diff --git a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
index 559051bd..8cd37dd5 100644
--- a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
+++ b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
@@ -109,7 +109,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
while ($this->parser->lex->yylex()) {
if ($this->smarty->_parserdebug) {
echo "<pre>Line {$this->parser->lex->line} Parsing {$this->parser->yyTokenName[$this->parser->lex->token]} Token " .
- htmlentities($this->parser->lex->value) . "</pre>";
+ htmlentities($this->parser->lex->value) . "</pre>";
}
$this->parser->doParse($this->parser->lex->token, $this->parser->lex->value);
}
@@ -129,8 +129,8 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
// call post compile callbacks
foreach ($this->postCompileCallbacks as $cb) {
$parameter = $cb;
- $parameter[0] = $this;
- call_user_func_array($cb[0], $parameter);
+ $parameter[ 0 ] = $this;
+ call_user_func_array($cb[ 0 ], $parameter);
}
// return compiled code
return $this->prefixCompiledCode . $this->parser->retvalue . $this->postfixCompiledCode;
@@ -150,8 +150,8 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
{
array_unshift($parameter, $callback);
if (isset($key)) {
- if ($replace || !isset($this->postCompileCallbacks[$key])) {
- $this->postCompileCallbacks[$key] = $parameter;
+ if ($replace || !isset($this->postCompileCallbacks[ $key ])) {
+ $this->postCompileCallbacks[ $key ] = $parameter;
}
} else {
$this->postCompileCallbacks[] = $parameter;
@@ -165,6 +165,6 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
*/
public function unregisterPostCompileCallback($key)
{
- unset($this->postCompileCallbacks[$key]);
+ unset($this->postCompileCallbacks[ $key ]);
}
}
diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php
index 1adc102d..eff15d8b 100644
--- a/libs/sysplugins/smarty_internal_template.php
+++ b/libs/sysplugins/smarty_internal_template.php
@@ -169,7 +169,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
} else {
if ((!$this->caching || $this->cached->has_nocache_code || $this->source->handler->recompiled) &&
!$no_output_filter && (isset($this->smarty->autoload_filters[ 'output' ]) ||
- isset($this->smarty->registered_filters[ 'output' ]))
+ isset($this->smarty->registered_filters[ 'output' ]))
) {
echo $this->smarty->ext->_filterHandler->runFilter('output', ob_get_clean(), $this);
} else {
@@ -205,7 +205,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
if (!$no_output_filter &&
(!$this->caching || $this->cached->has_nocache_code || $this->source->handler->recompiled) &&
(isset($this->smarty->autoload_filters[ 'output' ]) ||
- isset($this->smarty->registered_filters[ 'output' ]))
+ isset($this->smarty->registered_filters[ 'output' ]))
) {
return $this->smarty->ext->_filterHandler->runFilter('output', ob_get_clean(), $this);
}
@@ -315,8 +315,8 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
if (!isset($tpl->smarty->_cache[ 'tplObjects' ][ $tpl->templateId ]) && !$tpl->source->handler->recompiled) {
// if template is called multiple times set flag to to cache template objects
$forceTplCache = $forceTplCache ||
- (isset($tpl->smarty->_cache[ 'subTplInfo' ][ $tpl->template_resource ]) &&
- $tpl->smarty->_cache[ 'subTplInfo' ][ $tpl->template_resource ] > 1);
+ (isset($tpl->smarty->_cache[ 'subTplInfo' ][ $tpl->template_resource ]) &&
+ $tpl->smarty->_cache[ 'subTplInfo' ][ $tpl->template_resource ] > 1);
// check if template object should be cached
if ($tpl->_isParentTemplate() && isset($tpl->smarty->_cache[ 'tplObjects' ][ $tpl->parent->templateId ]) ||
$forceTplCache
@@ -420,7 +420,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
} else {
$this->tpl_vars[ $varName ] = clone $this->tpl_vars[ $varName ];
if (!(is_array($this->tpl_vars[ $varName ]->value) ||
- $this->tpl_vars[ $varName ]->value instanceof ArrayAccess)
+ $this->tpl_vars[ $varName ]->value instanceof ArrayAccess)
) {
settype($this->tpl_vars[ $varName ]->value, 'array');
}
@@ -446,7 +446,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
// new version must rebuild
$is_valid = false;
} elseif ($is_valid && !empty($properties[ 'file_dependency' ]) &&
- ((!$cache && $tpl->smarty->compile_check) || $tpl->smarty->compile_check == 1)
+ ((!$cache && $tpl->smarty->compile_check) || $tpl->smarty->compile_check == 1)
) {
// check file dependencies at compiled code
foreach ($properties[ 'file_dependency' ] as $_file_to_check) {
diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php
index 0b4812d6..5d55144a 100644
--- a/libs/sysplugins/smarty_internal_templatebase.php
+++ b/libs/sysplugins/smarty_internal_templatebase.php
@@ -85,10 +85,10 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
/**
* fetches a rendered Smarty template
*
- * @param string $template the resource handle of the template file or template object
- * @param mixed $cache_id cache id to be used with this template
- * @param mixed $compile_id compile id to be used with this template
- * @param object $parent next higher level of Smarty variables
+ * @param string $template the resource handle of the template file or template object
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
*
* @throws Exception
* @throws SmartyException
@@ -139,7 +139,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
* @param mixed $cache_id cache id to be used with this template
* @param mixed $compile_id compile id to be used with this template
* @param object $parent next higher level of Smarty variables
- * @param string $function function type 0 = fetch, 1 = display, 2 = isCache
+ * @param string $function function type 0 = fetch, 1 = display, 2 = isCache
*
* @return mixed
* @throws \Exception
@@ -174,8 +174,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
$level = ob_get_level();
try {
$_smarty_old_error_level =
- isset($smarty->error_reporting) ? error_reporting($smarty->error_reporting) :
- null;
+ isset($smarty->error_reporting) ? error_reporting($smarty->error_reporting) : null;
if ($function == 2) {
if ($template->caching) {
// return cache status of template
@@ -183,7 +182,7 @@ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data
$template->loadCached();
}
$result = $template->cached->isCached($template);
- $template->smarty->_cache['isCached'][$template->_getTemplateId()] = $template;
+ $template->smarty->_cache[ 'isCached' ][ $template->_getTemplateId() ] = $template;
} else {
return false;
}
diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php
index 22b7e9ff..e2303bc0 100644
--- a/libs/sysplugins/smarty_internal_templatecompilerbase.php
+++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php
@@ -550,7 +550,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
$method = $parameter[ 'object_method' ];
if (!in_array($method, $this->smarty->registered_objects[ $tag ][ 3 ]) &&
(empty($this->smarty->registered_objects[ $tag ][ 1 ]) ||
- in_array($method, $this->smarty->registered_objects[ $tag ][ 1 ]))
+ in_array($method, $this->smarty->registered_objects[ $tag ][ 1 ]))
) {
return $this->callTagCompiler('private_object_function', $args, $parameter, $tag, $method);
} elseif (in_array($method, $this->smarty->registered_objects[ $tag ][ 3 ])) {
@@ -601,7 +601,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
if ($plugin_type == Smarty::PLUGIN_COMPILER &&
$this->smarty->loadPlugin('smarty_compiler_' . $tag) &&
(!isset($this->smarty->security_policy) ||
- $this->smarty->security_policy->isTrustedTag($tag, $this))
+ $this->smarty->security_policy->isTrustedTag($tag, $this))
) {
$plugin = 'smarty_compiler_' . $tag;
if (is_callable($plugin)) {
@@ -760,7 +760,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
// not a variable variable
$var = trim($variable, '\'');
$this->tag_nocache = $this->tag_nocache |
- $this->template->ext->getTemplateVars->_getVariable($this->template, $var, null, true, false)->nocache;
+ $this->template->ext->getTemplateVars->_getVariable($this->template, $var, null, true,
+ false)->nocache;
// todo $this->template->compiled->properties['variables'][$var] = $this->tag_nocache | $this->nocache;
}
return '$_smarty_tpl->tpl_vars[' . $variable . ']->value';
@@ -813,12 +814,10 @@ abstract class Smarty_Internal_TemplateCompilerBase
$expressions = array(// replace multiple spaces between tags by a single space
// can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements
- '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1\2',
+ '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1\2',
// remove spaces between attributes (but not in attribute values!)
'#(([a-z0-9]\s*=\s*("[^"]*?")|(\'[^\']*?\'))|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \5',
- '#^\s+<#Ss' => '<',
- '#>\s+$#Ss' => '>',
- $this->stripRegEx => '');
+ '#^\s+<#Ss' => '<', '#>\s+$#Ss' => '>', $this->stripRegEx => '');
$text = preg_replace(array_keys($expressions), array_values($expressions), $text);
$_offset = 0;
@@ -1041,7 +1040,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
$_output = addcslashes($content, '\'\\');
$_output = str_replace("^#^", "'", $_output);
$_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output .
- "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n";
+ "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n";
// make sure we include modifier plugins for nocache code
foreach ($this->modifier_plugins as $plugin_name => $dummy) {
if (isset($this->parent_compiler->template->compiled->required_plugins[ 'compiled' ][ $plugin_name ][ 'modifier' ])) {
@@ -1097,7 +1096,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
*
* @param string $varName
*/
- public function setNocacheInVariable($varName){
+ public function setNocacheInVariable($varName)
+ {
// create nocache var to make it know for further compiling
if ($_var = $this->getId($varName)) {
if (isset($this->template->tpl_vars[ $_var ])) {
@@ -1116,7 +1116,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
* @return int|string
* @throws \SmartyCompilerException
*/
- public function convertScope($_attr, $validScopes){
+ public function convertScope($_attr, $validScopes)
+ {
$_scope = Smarty::SCOPE_LOCAL;
if (isset($_attr[ 'scope' ])) {
$_scopeName = trim($_attr[ 'scope' ], "'\"");
@@ -1149,7 +1150,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
public function makeNocacheCode($code)
{
return "echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/<?php " .
- str_replace("^#^", "'", addcslashes($code, '\'\\')) . "?>/*/%%SmartyNocache:{$this->nocache_hash}%%*/';\n";
+ str_replace("^#^", "'", addcslashes($code, '\'\\')) .
+ "?>/*/%%SmartyNocache:{$this->nocache_hash}%%*/';\n";
}
/**
@@ -1228,7 +1230,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
*
* @return string
*/
- public function getVarExport($value) {
+ public function getVarExport($value)
+ {
return preg_replace('/\s/', '', var_export($value, true));
}
@@ -1239,7 +1242,8 @@ abstract class Smarty_Internal_TemplateCompilerBase
*
* @return bool|int
*/
- public function isVariable($value){
+ public function isVariable($value)
+ {
if (is_string($value)) {
return preg_match('/[$(]/', $value);
}
@@ -1247,7 +1251,7 @@ abstract class Smarty_Internal_TemplateCompilerBase
return false;
}
if (is_array($value)) {
- foreach ($value as $k => $v) {
+ foreach ($value as $k => $v) {
if ($this->isVariable($k) || $this->isVariable($v)) {
return true;
}
diff --git a/libs/sysplugins/smarty_internal_templatelexer.php b/libs/sysplugins/smarty_internal_templatelexer.php
index f9900e0a..d93c2743 100644
--- a/libs/sysplugins/smarty_internal_templatelexer.php
+++ b/libs/sysplugins/smarty_internal_templatelexer.php
@@ -178,21 +178,20 @@ class Smarty_Internal_Templatelexer
* @var array
*/
public $smarty_token_names = array( // Text for parser error messages
- 'NOT' => '(!,not)', 'OPENP' => '(', 'CLOSEP' => ')',
- 'OPENB' => '[', 'CLOSEB' => ']', 'PTR' => '->', 'APTR' => '=>',
- 'EQUAL' => '=', 'NUMBER' => 'number', 'UNIMATH' => '+" , "-',
- 'MATH' => '*" , "/" , "%', 'INCDEC' => '++" , "--',
- 'SPACE' => ' ', 'DOLLAR' => '$', 'SEMICOLON' => ';',
- 'COLON' => ':', 'DOUBLECOLON' => '::', 'AT' => '@', 'HATCH' => '#',
- 'QUOTE' => '"', 'BACKTICK' => '`', 'VERT' => '"|" modifier',
- 'DOT' => '.', 'COMMA' => '","', 'QMARK' => '"?"',
- 'ID' => 'id, name', 'TEXT' => 'text',
- 'LDELSLASH' => '{/..} closing tag', 'LDEL' => '{...} Smarty tag',
- 'COMMENT' => 'comment', 'AS' => 'as', 'TO' => 'to',
- 'PHP' => '"<?php", "<%", "{php}" tag',
- 'LOGOP' => '"<", "==" ... logical operator',
- 'TLOGOP' => '"lt", "eq" ... logical operator; "is div by" ... if condition',
- 'SCOND' => '"is even" ... if condition',);
+ 'NOT' => '(!,not)', 'OPENP' => '(', 'CLOSEP' => ')', 'OPENB' => '[',
+ 'CLOSEB' => ']', 'PTR' => '->', 'APTR' => '=>', 'EQUAL' => '=',
+ 'NUMBER' => 'number', 'UNIMATH' => '+" , "-', 'MATH' => '*" , "/" , "%',
+ 'INCDEC' => '++" , "--', 'SPACE' => ' ', 'DOLLAR' => '$',
+ 'SEMICOLON' => ';', 'COLON' => ':', 'DOUBLECOLON' => '::', 'AT' => '@',
+ 'HATCH' => '#', 'QUOTE' => '"', 'BACKTICK' => '`',
+ 'VERT' => '"|" modifier', 'DOT' => '.', 'COMMA' => '","',
+ 'QMARK' => '"?"', 'ID' => 'id, name', 'TEXT' => 'text',
+ 'LDELSLASH' => '{/..} closing tag', 'LDEL' => '{...} Smarty tag',
+ 'COMMENT' => 'comment', 'AS' => 'as', 'TO' => 'to',
+ 'PHP' => '"<?php", "<%", "{php}" tag',
+ 'LOGOP' => '"<", "==" ... logical operator',
+ 'TLOGOP' => '"lt", "eq" ... logical operator; "is div by" ... if condition',
+ 'SCOND' => '"is even" ... if condition',);
/**
* constructor
@@ -334,7 +333,8 @@ class Smarty_Internal_Templatelexer
throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const TEXT = 1;
@@ -470,7 +470,8 @@ class Smarty_Internal_Templatelexer
throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const TAG = 2;
@@ -558,7 +559,7 @@ class Smarty_Internal_Templatelexer
{
if (!isset($this->yy_global_pattern3)) {
$this->yy_global_pattern3 = "/\G(\\s*" . $this->rdel . ")|\G(" . $this->ldel .
- "\\s*)|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\\s+(not\\s+)?(odd|even|div)\\s+by))\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G([\S\s])/isS";
+ "\\s*)|\G([\"])|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G([$]smarty\\.block\\.(child|parent))|\G([$][0-9]*[a-zA-Z_]\\w*)|\G([$])|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*(([!=][=]{1,2})|([<][=>]?)|([>][=]?)|[&|]{2})\\s*)|\G(\\s+(eq|ne|neq|gt|ge|gte|lt|le|lte|mod|and|or|xor|(is\\s+(not\\s+)?(odd|even|div)\\s+by))\\s+)|\G(\\s+is\\s+(not\\s+)?(odd|even))|\G(([!]\\s*)|(not\\s+))|\G([(](int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)[)]\\s*)|\G(\\s*[(]\\s*)|\G(\\s*[)])|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*[-][>]\\s*)|\G(\\s*[=][>]\\s*)|\G(\\s*[=]\\s*)|\G(([+]|[-]){2})|\G(\\s*([+]|[-])\\s*)|\G(\\s*([*]{1,2}|[%\/^&]|[<>]{2})\\s*)|\G([@])|\G([#])|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s*[=]\\s*)|\G(([0-9]*[a-zA-Z_]\\w*)?(\\\\[0-9]*[a-zA-Z_]\\w*)+)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G([`])|\G([|])|\G([.])|\G(\\s*[,]\\s*)|\G(\\s*[;]\\s*)|\G([:]{2})|\G(\\s*[:]\\s*)|\G(\\s*[?]\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+)|\G([\S\s])/isS";
}
if ($this->counter >= strlen($this->data)) {
return false; // end of input
@@ -602,7 +603,8 @@ class Smarty_Internal_Templatelexer
throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const TAGBODY = 3;
@@ -940,7 +942,8 @@ class Smarty_Internal_Templatelexer
throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const LITERAL = 4;
@@ -1031,7 +1034,8 @@ class Smarty_Internal_Templatelexer
throw new Exception('Unexpected input at line' . $this->line . ': ' . $this->data[ $this->counter ]);
}
break;
- } while (true);
+ }
+ while (true);
} // end function
const DOUBLEQUOTEDSTRING = 5;
diff --git a/libs/sysplugins/smarty_internal_templateparser.php b/libs/sysplugins/smarty_internal_templateparser.php
index aefb381d..934dfb6e 100644
--- a/libs/sysplugins/smarty_internal_templateparser.php
+++ b/libs/sysplugins/smarty_internal_templateparser.php
@@ -28,18 +28,18 @@ class TP_yyToken implements ArrayAccess
public function offsetExists($offset)
{
- return isset($this->metadata[$offset]);
+ return isset($this->metadata[ $offset ]);
}
public function offsetGet($offset)
{
- return $this->metadata[$offset];
+ return $this->metadata[ $offset ];
}
public function offsetSet($offset, $value)
{
if ($offset === null) {
- if (isset($value[0])) {
+ if (isset($value[ 0 ])) {
$x = ($value instanceof TP_yyToken) ? $value->metadata : $value;
$this->metadata = array_merge($this->metadata, $x);
@@ -52,16 +52,16 @@ class TP_yyToken implements ArrayAccess
}
if ($value instanceof TP_yyToken) {
if ($value->metadata) {
- $this->metadata[$offset] = $value->metadata;
+ $this->metadata[ $offset ] = $value->metadata;
}
} elseif ($value) {
- $this->metadata[$offset] = $value;
+ $this->metadata[ $offset ] = $value;
}
}
public function offsetUnset($offset)
{
- unset($this->metadata[$offset]);
+ unset($this->metadata[ $offset ]);
}
}
@@ -383,328 +383,467 @@ class Smarty_Internal_Templateparser
const YY_SZ_ACTTAB = 2021;
- static public $yy_action = array(
- 242, 10, 131, 178, 255, 76, 157, 5, 83, 293, 12, 149, 152, 116, 292, 93, 331, 217, 284, 295, 221, 331, 226, 36,
- 21, 169, 35, 43, 308, 99, 26, 42, 39, 294, 235, 244, 30, 200, 187, 80, 1, 251, 320, 206, 442, 123, 53, 242, 10,
- 130, 98, 255, 194, 399, 5, 83, 442, 240, 298, 107, 116, 310, 174, 220, 217, 36, 295, 221, 399, 208, 135, 21, 26,
- 161, 43, 399, 8, 174, 42, 39, 294, 235, 218, 331, 200, 187, 80, 1, 312, 320, 11, 290, 313, 53, 242, 10, 133,
- 306, 255, 205, 187, 5, 83, 264, 266, 267, 211, 116, 353, 220, 52, 217, 298, 295, 221, 206, 226, 220, 21, 290,
- 290, 43, 321, 36, 249, 42, 39, 294, 235, 244, 26, 200, 206, 80, 1, 11, 320, 283, 52, 52, 53, 242, 10, 132, 248,
- 255, 205, 455, 5, 83, 84, 301, 151, 455, 116, 323, 92, 36, 217, 2, 295, 221, 331, 226, 26, 21, 290, 304, 43,
- 137, 36, 111, 42, 39, 294, 235, 244, 26, 200, 187, 80, 1, 225, 320, 320, 52, 123, 53, 242, 10, 133, 98, 255,
- 193, 175, 5, 83, 177, 280, 273, 234, 116, 310, 23, 278, 217, 13, 295, 221, 320, 203, 223, 21, 290, 442, 43, 138,
- 187, 326, 42, 39, 294, 235, 244, 216, 200, 442, 80, 1, 4, 320, 329, 52, 15, 53, 242, 10, 134, 91, 255, 205, 176,
- 5, 83, 293, 12, 16, 90, 116, 292, 300, 99, 217, 241, 295, 221, 320, 226, 215, 28, 213, 201, 43, 105, 187, 286,
- 42, 39, 294, 235, 244, 215, 200, 214, 80, 1, 105, 320, 11, 135, 285, 53, 242, 10, 133, 8, 255, 205, 164, 5, 83,
- 442, 215, 19, 239, 116, 99, 105, 331, 217, 6, 295, 221, 442, 192, 311, 21, 182, 289, 43, 308, 443, 32, 42, 39,
- 294, 235, 244, 296, 200, 17, 80, 1, 443, 320, 262, 107, 26, 53, 242, 10, 133, 122, 255, 191, 172, 5, 83, 183,
- 188, 148, 231, 116, 223, 168, 331, 217, 181, 295, 221, 331, 226, 206, 21, 331, 141, 43, 308, 206, 38, 42, 39,
- 294, 235, 244, 331, 200, 188, 80, 1, 187, 320, 155, 206, 308, 53, 242, 10, 133, 25, 255, 198, 188, 5, 83, 206,
- 145, 160, 308, 116, 228, 146, 206, 217, 180, 295, 221, 331, 226, 286, 21, 331, 359, 43, 179, 289, 38, 42, 39,
- 294, 235, 244, 250, 200, 271, 80, 1, 272, 320, 122, 94, 103, 53, 242, 10, 129, 3, 255, 205, 144, 5, 83, 185,
- 289, 170, 99, 116, 270, 322, 331, 217, 184, 295, 221, 331, 226, 99, 7, 171, 35, 43, 308, 89, 105, 42, 39, 294,
- 235, 244, 120, 200, 328, 80, 1, 187, 320, 82, 223, 4, 53, 242, 10, 134, 142, 255, 205, 107, 5, 83, 309, 324,
- 302, 20, 116, 316, 206, 291, 217, 290, 295, 221, 33, 226, 277, 28, 399, 243, 43, 257, 219, 189, 42, 39, 294,
- 235, 244, 110, 200, 140, 80, 399, 147, 320, 253, 327, 258, 53, 399, 14, 236, 220, 207, 154, 113, 65, 108, 319,
- 159, 238, 311, 98, 471, 471, 330, 237, 279, 471, 210, 325, 245, 299, 310, 86, 308, 143, 268, 263, 259, 260, 269,
- 177, 204, 287, 136, 242, 10, 150, 87, 255, 320, 139, 5, 83, 293, 12, 22, 195, 116, 292, 247, 258, 217, 153, 295,
- 221, 220, 207, 36, 126, 50, 104, 109, 112, 88, 26, 98, 246, 397, 330, 237, 85, 212, 210, 325, 245, 258, 310,
- 102, 299, 299, 220, 207, 397, 113, 65, 108, 320, 299, 134, 397, 98, 222, 442, 330, 237, 299, 299, 210, 325, 245,
- 258, 310, 299, 299, 442, 220, 207, 299, 126, 69, 108, 299, 288, 31, 299, 98, 299, 299, 330, 237, 299, 299, 210,
- 325, 245, 80, 310, 299, 320, 299, 258, 299, 299, 209, 299, 220, 207, 299, 126, 69, 108, 206, 299, 299, 455, 98,
- 299, 206, 330, 237, 455, 365, 210, 325, 245, 299, 310, 355, 227, 258, 299, 299, 299, 199, 220, 207, 36, 126, 64,
- 104, 299, 214, 36, 26, 98, 299, 442, 330, 237, 26, 299, 210, 325, 245, 258, 310, 471, 471, 442, 220, 207, 471,
- 126, 69, 108, 293, 12, 299, 299, 98, 292, 299, 330, 237, 299, 299, 210, 325, 245, 36, 310, 163, 299, 258, 299,
- 299, 26, 202, 220, 207, 299, 126, 44, 108, 471, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245,
- 299, 310, 299, 299, 258, 134, 299, 299, 252, 220, 207, 206, 126, 72, 108, 299, 299, 299, 299, 98, 299, 396, 330,
- 237, 299, 299, 210, 325, 245, 258, 310, 299, 299, 299, 220, 207, 396, 126, 74, 108, 254, 299, 80, 396, 98, 320,
- 299, 330, 237, 299, 297, 210, 325, 245, 299, 310, 299, 242, 9, 299, 299, 255, 299, 258, 5, 83, 299, 299, 220,
- 207, 116, 126, 68, 108, 217, 299, 295, 221, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 258,
- 299, 299, 299, 299, 220, 207, 299, 100, 70, 108, 299, 303, 29, 299, 98, 299, 299, 330, 237, 299, 297, 210, 325,
- 245, 299, 310, 299, 242, 9, 299, 299, 255, 299, 299, 5, 83, 299, 299, 299, 299, 116, 299, 299, 258, 217, 299,
- 295, 221, 220, 207, 299, 126, 66, 108, 299, 299, 299, 299, 98, 293, 12, 330, 237, 299, 292, 210, 325, 245, 299,
- 310, 258, 299, 299, 305, 29, 220, 207, 299, 126, 60, 108, 299, 293, 12, 299, 98, 299, 292, 330, 237, 299, 299,
- 210, 325, 245, 299, 310, 232, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 49, 108, 299, 299, 299, 299, 98,
- 299, 299, 330, 237, 299, 230, 210, 325, 245, 299, 310, 258, 167, 299, 299, 299, 220, 207, 299, 126, 58, 108,
- 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 97,
- 299, 81, 45, 106, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258,
- 299, 206, 299, 299, 220, 207, 299, 126, 63, 108, 299, 186, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325,
- 245, 299, 310, 258, 299, 299, 299, 299, 220, 197, 299, 114, 59, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237,
- 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 126, 55, 108, 299, 299, 299, 299, 98,
- 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126,
- 57, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282,
- 220, 95, 299, 81, 48, 106, 233, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299,
- 256, 275, 282, 220, 207, 299, 126, 78, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245,
- 299, 310, 299, 299, 258, 299, 206, 18, 299, 220, 207, 299, 96, 61, 108, 299, 299, 299, 299, 98, 299, 299, 330,
- 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220, 207, 299, 126, 47, 108, 299, 41, 40, 37,
- 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 126, 75, 108,
- 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258, 299, 206, 299,
- 299, 220, 207, 299, 126, 64, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310,
- 258, 299, 299, 299, 299, 220, 207, 299, 126, 56, 108, 317, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210,
- 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 115, 46, 108, 299, 299, 299, 299, 98, 299, 299, 330,
- 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 79, 108, 299,
- 190, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220, 207,
- 299, 126, 62, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256,
- 275, 282, 220, 207, 299, 126, 71, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299,
- 310, 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 101, 67, 108, 299, 318, 299, 299, 98, 299, 299, 330, 237,
- 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220, 207, 299, 126, 77, 108, 299, 41, 40, 37, 98,
- 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 196, 299, 126, 54, 108,
- 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258, 299, 206, 299,
- 299, 220, 207, 299, 126, 73, 108, 299, 274, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310,
- 258, 299, 299, 299, 299, 220, 224, 299, 118, 299, 108, 299, 41, 40, 37, 98, 299, 299, 299, 261, 299, 299, 210,
- 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 224, 299, 128, 299, 108, 299, 299, 299, 299, 98, 299, 299,
- 229, 315, 206, 299, 210, 325, 245, 299, 310, 299, 471, 471, 307, 27, 299, 471, 455, 526, 51, 265, 266, 267, 211,
- 299, 299, 220, 299, 36, 299, 409, 409, 299, 299, 299, 26, 299, 299, 299, 299, 41, 40, 37, 206, 299, 455, 299,
- 455, 299, 471, 299, 455, 299, 299, 299, 299, 299, 256, 275, 282, 229, 299, 299, 117, 299, 442, 299, 409, 409,
- 409, 471, 471, 299, 299, 299, 471, 455, 442, 299, 299, 41, 40, 37, 299, 409, 409, 409, 299, 299, 299, 299, 299,
- 299, 299, 299, 299, 299, 256, 275, 282, 299, 299, 299, 299, 455, 299, 455, 258, 471, 299, 455, 281, 220, 224,
- 299, 127, 299, 108, 299, 299, 299, 299, 98, 299, 299, 299, 299, 299, 299, 210, 325, 245, 258, 310, 206, 156,
- 299, 220, 224, 175, 121, 299, 108, 299, 299, 331, 299, 98, 23, 278, 299, 299, 299, 299, 210, 325, 245, 34, 310,
- 36, 299, 299, 187, 299, 299, 299, 26, 299, 299, 258, 299, 41, 40, 37, 220, 224, 299, 125, 299, 108, 299, 299,
- 299, 299, 98, 299, 299, 229, 256, 275, 282, 210, 325, 245, 299, 310, 299, 471, 471, 258, 31, 299, 471, 455, 220,
- 224, 299, 124, 299, 108, 299, 299, 299, 299, 98, 299, 299, 299, 299, 299, 299, 210, 325, 245, 258, 310, 206,
- 299, 299, 220, 224, 455, 119, 455, 108, 471, 299, 455, 299, 98, 299, 299, 229, 299, 299, 24, 210, 325, 245, 299,
- 310, 299, 471, 471, 299, 471, 471, 471, 455, 299, 471, 455, 206, 41, 40, 37, 299, 299, 299, 471, 471, 299, 299,
- 299, 471, 455, 299, 299, 276, 299, 256, 275, 282, 299, 299, 299, 455, 36, 455, 455, 471, 455, 455, 471, 26, 455,
- 299, 206, 403, 41, 40, 37, 206, 455, 299, 455, 299, 471, 403, 455, 403, 299, 299, 403, 299, 299, 256, 275, 282,
- 299, 403, 299, 403, 299, 403, 299, 299, 299, 299, 299, 299, 299, 299, 223, 41, 40, 37, 299, 299, 41, 40, 37,
- 299, 299, 299, 299, 299, 299, 299, 299, 173, 256, 275, 282, 175, 314, 256, 275, 282, 299, 331, 166, 299, 23,
- 278, 175, 162, 299, 299, 299, 175, 331, 299, 299, 23, 278, 331, 187, 299, 23, 278, 158, 299, 299, 299, 175, 299,
- 299, 187, 299, 299, 331, 165, 187, 23, 278, 175, 299, 299, 299, 299, 299, 331, 299, 299, 23, 278, 299, 187, 299,
- 299, 299, 299, 299, 299, 299, 299, 299, 299, 187,
- );
+ static public $yy_action = array(242, 10, 131, 178, 255, 76, 157, 5, 83, 293, 12, 149, 152, 116, 292, 93, 331, 217,
+ 284, 295, 221, 331, 226, 36, 21, 169, 35, 43, 308, 99, 26, 42, 39, 294, 235, 244,
+ 30, 200, 187, 80, 1, 251, 320, 206, 442, 123, 53, 242, 10, 130, 98, 255, 194, 399,
+ 5, 83, 442, 240, 298, 107, 116, 310, 174, 220, 217, 36, 295, 221, 399, 208, 135,
+ 21, 26, 161, 43, 399, 8, 174, 42, 39, 294, 235, 218, 331, 200, 187, 80, 1, 312,
+ 320, 11, 290, 313, 53, 242, 10, 133, 306, 255, 205, 187, 5, 83, 264, 266, 267, 211,
+ 116, 353, 220, 52, 217, 298, 295, 221, 206, 226, 220, 21, 290, 290, 43, 321, 36,
+ 249, 42, 39, 294, 235, 244, 26, 200, 206, 80, 1, 11, 320, 283, 52, 52, 53, 242, 10,
+ 132, 248, 255, 205, 455, 5, 83, 84, 301, 151, 455, 116, 323, 92, 36, 217, 2, 295,
+ 221, 331, 226, 26, 21, 290, 304, 43, 137, 36, 111, 42, 39, 294, 235, 244, 26, 200,
+ 187, 80, 1, 225, 320, 320, 52, 123, 53, 242, 10, 133, 98, 255, 193, 175, 5, 83,
+ 177, 280, 273, 234, 116, 310, 23, 278, 217, 13, 295, 221, 320, 203, 223, 21, 290,
+ 442, 43, 138, 187, 326, 42, 39, 294, 235, 244, 216, 200, 442, 80, 1, 4, 320, 329,
+ 52, 15, 53, 242, 10, 134, 91, 255, 205, 176, 5, 83, 293, 12, 16, 90, 116, 292, 300,
+ 99, 217, 241, 295, 221, 320, 226, 215, 28, 213, 201, 43, 105, 187, 286, 42, 39,
+ 294, 235, 244, 215, 200, 214, 80, 1, 105, 320, 11, 135, 285, 53, 242, 10, 133, 8,
+ 255, 205, 164, 5, 83, 442, 215, 19, 239, 116, 99, 105, 331, 217, 6, 295, 221, 442,
+ 192, 311, 21, 182, 289, 43, 308, 443, 32, 42, 39, 294, 235, 244, 296, 200, 17, 80,
+ 1, 443, 320, 262, 107, 26, 53, 242, 10, 133, 122, 255, 191, 172, 5, 83, 183, 188,
+ 148, 231, 116, 223, 168, 331, 217, 181, 295, 221, 331, 226, 206, 21, 331, 141, 43,
+ 308, 206, 38, 42, 39, 294, 235, 244, 331, 200, 188, 80, 1, 187, 320, 155, 206, 308,
+ 53, 242, 10, 133, 25, 255, 198, 188, 5, 83, 206, 145, 160, 308, 116, 228, 146, 206,
+ 217, 180, 295, 221, 331, 226, 286, 21, 331, 359, 43, 179, 289, 38, 42, 39, 294,
+ 235, 244, 250, 200, 271, 80, 1, 272, 320, 122, 94, 103, 53, 242, 10, 129, 3, 255,
+ 205, 144, 5, 83, 185, 289, 170, 99, 116, 270, 322, 331, 217, 184, 295, 221, 331,
+ 226, 99, 7, 171, 35, 43, 308, 89, 105, 42, 39, 294, 235, 244, 120, 200, 328, 80, 1,
+ 187, 320, 82, 223, 4, 53, 242, 10, 134, 142, 255, 205, 107, 5, 83, 309, 324, 302,
+ 20, 116, 316, 206, 291, 217, 290, 295, 221, 33, 226, 277, 28, 399, 243, 43, 257,
+ 219, 189, 42, 39, 294, 235, 244, 110, 200, 140, 80, 399, 147, 320, 253, 327, 258,
+ 53, 399, 14, 236, 220, 207, 154, 113, 65, 108, 319, 159, 238, 311, 98, 471, 471,
+ 330, 237, 279, 471, 210, 325, 245, 299, 310, 86, 308, 143, 268, 263, 259, 260, 269,
+ 177, 204, 287, 136, 242, 10, 150, 87, 255, 320, 139, 5, 83, 293, 12, 22, 195, 116,
+ 292, 247, 258, 217, 153, 295, 221, 220, 207, 36, 126, 50, 104, 109, 112, 88, 26,
+ 98, 246, 397, 330, 237, 85, 212, 210, 325, 245, 258, 310, 102, 299, 299, 220, 207,
+ 397, 113, 65, 108, 320, 299, 134, 397, 98, 222, 442, 330, 237, 299, 299, 210, 325,
+ 245, 258, 310, 299, 299, 442, 220, 207, 299, 126, 69, 108, 299, 288, 31, 299, 98,
+ 299, 299, 330, 237, 299, 299, 210, 325, 245, 80, 310, 299, 320, 299, 258, 299, 299,
+ 209, 299, 220, 207, 299, 126, 69, 108, 206, 299, 299, 455, 98, 299, 206, 330, 237,
+ 455, 365, 210, 325, 245, 299, 310, 355, 227, 258, 299, 299, 299, 199, 220, 207, 36,
+ 126, 64, 104, 299, 214, 36, 26, 98, 299, 442, 330, 237, 26, 299, 210, 325, 245,
+ 258, 310, 471, 471, 442, 220, 207, 471, 126, 69, 108, 293, 12, 299, 299, 98, 292,
+ 299, 330, 237, 299, 299, 210, 325, 245, 36, 310, 163, 299, 258, 299, 299, 26, 202,
+ 220, 207, 299, 126, 44, 108, 471, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299,
+ 210, 325, 245, 299, 310, 299, 299, 258, 134, 299, 299, 252, 220, 207, 206, 126, 72,
+ 108, 299, 299, 299, 299, 98, 299, 396, 330, 237, 299, 299, 210, 325, 245, 258, 310,
+ 299, 299, 299, 220, 207, 396, 126, 74, 108, 254, 299, 80, 396, 98, 320, 299, 330,
+ 237, 299, 297, 210, 325, 245, 299, 310, 299, 242, 9, 299, 299, 255, 299, 258, 5,
+ 83, 299, 299, 220, 207, 116, 126, 68, 108, 217, 299, 295, 221, 98, 299, 299, 330,
+ 237, 299, 299, 210, 325, 245, 299, 310, 299, 258, 299, 299, 299, 299, 220, 207,
+ 299, 100, 70, 108, 299, 303, 29, 299, 98, 299, 299, 330, 237, 299, 297, 210, 325,
+ 245, 299, 310, 299, 242, 9, 299, 299, 255, 299, 299, 5, 83, 299, 299, 299, 299,
+ 116, 299, 299, 258, 217, 299, 295, 221, 220, 207, 299, 126, 66, 108, 299, 299, 299,
+ 299, 98, 293, 12, 330, 237, 299, 292, 210, 325, 245, 299, 310, 258, 299, 299, 305,
+ 29, 220, 207, 299, 126, 60, 108, 299, 293, 12, 299, 98, 299, 292, 330, 237, 299,
+ 299, 210, 325, 245, 299, 310, 232, 299, 258, 299, 206, 299, 299, 220, 207, 299,
+ 126, 49, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 230, 210, 325, 245,
+ 299, 310, 258, 167, 299, 299, 299, 220, 207, 299, 126, 58, 108, 299, 41, 40, 37,
+ 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282,
+ 220, 97, 299, 81, 45, 106, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299,
+ 210, 325, 245, 299, 310, 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 63,
+ 108, 299, 186, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310,
+ 258, 299, 299, 299, 299, 220, 197, 299, 114, 59, 108, 299, 41, 40, 37, 98, 299,
+ 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220,
+ 207, 299, 126, 55, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210,
+ 325, 245, 299, 310, 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 57, 108,
+ 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258,
+ 299, 256, 275, 282, 220, 95, 299, 81, 48, 106, 233, 41, 40, 37, 98, 299, 299, 330,
+ 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299,
+ 126, 78, 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245,
+ 299, 310, 299, 299, 258, 299, 206, 18, 299, 220, 207, 299, 96, 61, 108, 299, 299,
+ 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299,
+ 299, 299, 220, 207, 299, 126, 47, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237,
+ 299, 299, 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 126, 75,
+ 108, 299, 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310,
+ 299, 299, 258, 299, 206, 299, 299, 220, 207, 299, 126, 64, 108, 299, 299, 299, 299,
+ 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299,
+ 220, 207, 299, 126, 56, 108, 317, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299,
+ 210, 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 115, 46, 108, 299,
+ 299, 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299,
+ 258, 299, 206, 299, 299, 220, 207, 299, 126, 79, 108, 299, 190, 299, 299, 98, 299,
+ 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220,
+ 207, 299, 126, 62, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210,
+ 325, 245, 299, 310, 258, 299, 256, 275, 282, 220, 207, 299, 126, 71, 108, 299, 299,
+ 299, 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258,
+ 299, 206, 299, 299, 220, 207, 299, 101, 67, 108, 299, 318, 299, 299, 98, 299, 299,
+ 330, 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220, 207,
+ 299, 126, 77, 108, 299, 41, 40, 37, 98, 299, 299, 330, 237, 299, 299, 210, 325,
+ 245, 299, 310, 258, 299, 256, 275, 282, 220, 196, 299, 126, 54, 108, 299, 299, 299,
+ 299, 98, 299, 299, 330, 237, 299, 299, 210, 325, 245, 299, 310, 299, 299, 258, 299,
+ 206, 299, 299, 220, 207, 299, 126, 73, 108, 299, 274, 299, 299, 98, 299, 299, 330,
+ 237, 299, 299, 210, 325, 245, 299, 310, 258, 299, 299, 299, 299, 220, 224, 299,
+ 118, 299, 108, 299, 41, 40, 37, 98, 299, 299, 299, 261, 299, 299, 210, 325, 245,
+ 299, 310, 258, 299, 256, 275, 282, 220, 224, 299, 128, 299, 108, 299, 299, 299,
+ 299, 98, 299, 299, 229, 315, 206, 299, 210, 325, 245, 299, 310, 299, 471, 471, 307,
+ 27, 299, 471, 455, 526, 51, 265, 266, 267, 211, 299, 299, 220, 299, 36, 299, 409,
+ 409, 299, 299, 299, 26, 299, 299, 299, 299, 41, 40, 37, 206, 299, 455, 299, 455,
+ 299, 471, 299, 455, 299, 299, 299, 299, 299, 256, 275, 282, 229, 299, 299, 117,
+ 299, 442, 299, 409, 409, 409, 471, 471, 299, 299, 299, 471, 455, 442, 299, 299, 41,
+ 40, 37, 299, 409, 409, 409, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 256,
+ 275, 282, 299, 299, 299, 299, 455, 299, 455, 258, 471, 299, 455, 281, 220, 224,
+ 299, 127, 299, 108, 299, 299, 299, 299, 98, 299, 299, 299, 299, 299, 299, 210, 325,
+ 245, 258, 310, 206, 156, 299, 220, 224, 175, 121, 299, 108, 299, 299, 331, 299, 98,
+ 23, 278, 299, 299, 299, 299, 210, 325, 245, 34, 310, 36, 299, 299, 187, 299, 299,
+ 299, 26, 299, 299, 258, 299, 41, 40, 37, 220, 224, 299, 125, 299, 108, 299, 299,
+ 299, 299, 98, 299, 299, 229, 256, 275, 282, 210, 325, 245, 299, 310, 299, 471, 471,
+ 258, 31, 299, 471, 455, 220, 224, 299, 124, 299, 108, 299, 299, 299, 299, 98, 299,
+ 299, 299, 299, 299, 299, 210, 325, 245, 258, 310, 206, 299, 299, 220, 224, 455,
+ 119, 455, 108, 471, 299, 455, 299, 98, 299, 299, 229, 299, 299, 24, 210, 325, 245,
+ 299, 310, 299, 471, 471, 299, 471, 471, 471, 455, 299, 471, 455, 206, 41, 40, 37,
+ 299, 299, 299, 471, 471, 299, 299, 299, 471, 455, 299, 299, 276, 299, 256, 275,
+ 282, 299, 299, 299, 455, 36, 455, 455, 471, 455, 455, 471, 26, 455, 299, 206, 403,
+ 41, 40, 37, 206, 455, 299, 455, 299, 471, 403, 455, 403, 299, 299, 403, 299, 299,
+ 256, 275, 282, 299, 403, 299, 403, 299, 403, 299, 299, 299, 299, 299, 299, 299,
+ 299, 223, 41, 40, 37, 299, 299, 41, 40, 37, 299, 299, 299, 299, 299, 299, 299, 299,
+ 173, 256, 275, 282, 175, 314, 256, 275, 282, 299, 331, 166, 299, 23, 278, 175, 162,
+ 299, 299, 299, 175, 331, 299, 299, 23, 278, 331, 187, 299, 23, 278, 158, 299, 299,
+ 299, 175, 299, 299, 187, 299, 299, 331, 165, 187, 23, 278, 175, 299, 299, 299, 299,
+ 299, 331, 299, 299, 23, 278, 299, 187, 299, 299, 299, 299, 299, 299, 299, 299, 299,
+ 299, 187,);
- static public $yy_lookahead = array(
- 12, 13, 14, 80, 16, 17, 71, 19, 20, 12, 13, 71, 91, 25, 17, 75, 81, 29, 30, 31, 32, 81, 34, 26, 36, 28, 15, 39,
- 93, 18, 33, 43, 44, 45, 46, 47, 28, 49, 98, 51, 52, 70, 54, 1, 36, 74, 58, 12, 13, 14, 79, 16, 17, 11, 19, 20,
- 48, 86, 64, 48, 25, 90, 75, 69, 29, 26, 31, 32, 26, 34, 46, 36, 33, 71, 39, 33, 52, 75, 43, 44, 45, 46, 47, 81,
- 49, 98, 51, 52, 53, 54, 35, 22, 37, 58, 12, 13, 14, 103, 16, 17, 98, 19, 20, 63, 64, 65, 66, 25, 11, 69, 41, 29,
- 64, 31, 32, 1, 34, 69, 36, 22, 22, 39, 53, 26, 95, 43, 44, 45, 46, 47, 33, 49, 1, 51, 52, 35, 54, 37, 41, 41,
- 58, 12, 13, 14, 14, 16, 17, 46, 19, 20, 102, 103, 71, 52, 25, 11, 75, 26, 29, 36, 31, 32, 81, 34, 33, 36, 22,
- 17, 39, 14, 26, 48, 43, 44, 45, 46, 47, 33, 49, 98, 51, 52, 70, 54, 54, 41, 74, 58, 12, 13, 14, 79, 16, 17, 75,
- 19, 20, 8, 9, 10, 50, 25, 90, 84, 85, 29, 13, 31, 32, 54, 34, 46, 36, 22, 36, 39, 14, 98, 53, 43, 44, 45, 46,
- 47, 46, 49, 48, 51, 52, 36, 54, 53, 41, 21, 58, 12, 13, 14, 36, 16, 17, 75, 19, 20, 12, 13, 15, 35, 25, 17, 59,
- 18, 29, 22, 31, 32, 54, 34, 74, 36, 76, 77, 39, 79, 98, 99, 43, 44, 45, 46, 47, 74, 49, 76, 51, 52, 79, 54, 35,
- 46, 37, 58, 12, 13, 14, 52, 16, 17, 71, 19, 20, 36, 74, 15, 76, 25, 18, 79, 81, 29, 35, 31, 32, 48, 34, 92, 36,
- 94, 95, 39, 93, 36, 15, 43, 44, 45, 46, 47, 53, 49, 26, 51, 52, 48, 54, 89, 48, 33, 58, 12, 13, 14, 96, 16, 17,
- 71, 19, 20, 14, 98, 71, 17, 25, 46, 71, 81, 29, 75, 31, 32, 81, 34, 1, 36, 81, 71, 39, 93, 1, 2, 43, 44, 45, 46,
- 47, 81, 49, 98, 51, 52, 98, 54, 91, 1, 93, 58, 12, 13, 14, 28, 16, 17, 98, 19, 20, 1, 91, 71, 93, 25, 18, 71, 1,
- 29, 80, 31, 32, 81, 34, 99, 36, 81, 11, 39, 94, 95, 2, 43, 44, 45, 46, 47, 89, 49, 65, 51, 52, 68, 54, 96, 80,
- 79, 58, 12, 13, 14, 36, 16, 17, 71, 19, 20, 94, 95, 71, 18, 25, 53, 96, 81, 29, 75, 31, 32, 81, 34, 18, 36, 74,
- 15, 39, 93, 91, 79, 43, 44, 45, 46, 47, 17, 49, 17, 51, 52, 98, 54, 17, 46, 36, 58, 12, 13, 14, 51, 16, 17, 48,
- 19, 20, 17, 34, 17, 42, 25, 17, 1, 34, 29, 22, 31, 32, 23, 34, 37, 36, 11, 17, 39, 5, 17, 17, 43, 44, 45, 46,
- 47, 17, 49, 51, 51, 26, 27, 54, 11, 53, 64, 58, 33, 13, 14, 69, 70, 17, 72, 73, 74, 53, 91, 81, 92, 79, 12, 13,
- 82, 83, 9, 17, 86, 87, 88, 104, 90, 79, 93, 91, 3, 4, 5, 6, 7, 8, 100, 101, 79, 12, 13, 91, 79, 16, 54, 91, 19,
- 20, 12, 13, 13, 14, 25, 17, 17, 64, 29, 91, 31, 32, 69, 70, 26, 72, 73, 74, 78, 76, 79, 33, 79, 34, 11, 82, 83,
- 79, 15, 86, 87, 88, 64, 90, 67, 104, 104, 69, 70, 26, 72, 73, 74, 54, 104, 14, 33, 79, 17, 36, 82, 83, 104, 104,
- 86, 87, 88, 64, 90, 104, 104, 48, 69, 70, 104, 72, 73, 74, 104, 101, 15, 104, 79, 104, 104, 82, 83, 104, 104,
- 86, 87, 88, 51, 90, 104, 54, 104, 64, 104, 104, 97, 104, 69, 70, 104, 72, 73, 74, 1, 104, 104, 46, 79, 104, 1,
- 82, 83, 52, 11, 86, 87, 88, 104, 90, 11, 18, 64, 104, 104, 104, 97, 69, 70, 26, 72, 73, 74, 104, 76, 26, 33, 79,
- 104, 36, 82, 83, 33, 104, 86, 87, 88, 64, 90, 12, 13, 48, 69, 70, 17, 72, 73, 74, 12, 13, 104, 104, 79, 17, 104,
- 82, 83, 104, 104, 86, 87, 88, 26, 90, 28, 104, 64, 104, 104, 33, 97, 69, 70, 104, 72, 73, 74, 50, 104, 104, 104,
- 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 14, 104, 104, 17, 69, 70, 1, 72, 73, 74, 104,
- 104, 104, 104, 79, 104, 11, 82, 83, 104, 104, 86, 87, 88, 64, 90, 104, 104, 104, 69, 70, 26, 72, 73, 74, 49,
- 104, 51, 33, 79, 54, 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104, 12, 13, 14, 104, 16, 104, 64, 19, 20, 104,
- 104, 69, 70, 25, 72, 73, 74, 29, 104, 31, 32, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 64, 104,
- 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 58, 59, 104, 79, 104, 104, 82, 83, 104, 5, 86, 87, 88, 104, 90,
- 104, 12, 13, 14, 104, 16, 104, 104, 19, 20, 104, 104, 104, 104, 25, 104, 104, 64, 29, 104, 31, 32, 69, 70, 104,
- 72, 73, 74, 104, 104, 104, 104, 79, 12, 13, 82, 83, 104, 17, 86, 87, 88, 104, 90, 64, 104, 104, 58, 59, 69, 70,
- 104, 72, 73, 74, 104, 12, 13, 104, 79, 104, 17, 82, 83, 104, 104, 86, 87, 88, 104, 90, 50, 104, 64, 104, 1, 104,
- 104, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 50, 86, 87, 88, 104, 90, 64, 27,
- 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90,
- 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88,
- 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 11, 104, 104, 79, 104, 104, 82, 83, 104,
- 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39, 40, 79, 104, 104, 82,
- 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104,
- 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38,
- 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 37,
- 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74,
- 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 2, 104, 69, 70,
- 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104, 104,
- 104, 69, 70, 104, 72, 73, 74, 104, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55,
- 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104,
- 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87,
- 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 37, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104,
- 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83,
- 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 11, 104, 104, 79,
- 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39,
- 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104,
- 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72,
- 73, 74, 104, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70,
- 104, 72, 73, 74, 104, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69,
- 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104,
- 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90,
- 64, 104, 104, 104, 104, 69, 70, 104, 72, 104, 74, 104, 38, 39, 40, 79, 104, 104, 104, 83, 104, 104, 86, 87, 88,
- 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 104, 74, 104, 104, 104, 104, 79, 104, 104, 2, 83, 1, 104, 86, 87,
- 88, 104, 90, 104, 12, 13, 11, 15, 104, 17, 18, 61, 62, 63, 64, 65, 66, 104, 104, 69, 104, 26, 104, 1, 2, 104,
- 104, 104, 33, 104, 104, 104, 104, 38, 39, 40, 1, 104, 46, 104, 48, 104, 50, 104, 52, 104, 104, 104, 104, 104,
- 55, 56, 57, 2, 104, 104, 21, 104, 36, 104, 38, 39, 40, 12, 13, 104, 104, 104, 17, 18, 48, 104, 104, 38, 39, 40,
- 104, 55, 56, 57, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 55, 56, 57, 104, 104, 104, 104, 46, 104, 48,
- 64, 50, 104, 52, 53, 69, 70, 104, 72, 104, 74, 104, 104, 104, 104, 79, 104, 104, 104, 104, 104, 104, 86, 87, 88,
- 64, 90, 1, 71, 104, 69, 70, 75, 72, 104, 74, 104, 104, 81, 104, 79, 84, 85, 104, 104, 104, 104, 86, 87, 88, 24,
- 90, 26, 104, 104, 98, 104, 104, 104, 33, 104, 104, 64, 104, 38, 39, 40, 69, 70, 104, 72, 104, 74, 104, 104, 104,
- 104, 79, 104, 104, 2, 55, 56, 57, 86, 87, 88, 104, 90, 104, 12, 13, 64, 15, 104, 17, 18, 69, 70, 104, 72, 104,
- 74, 104, 104, 104, 104, 79, 104, 104, 104, 104, 104, 104, 86, 87, 88, 64, 90, 1, 104, 104, 69, 70, 46, 72, 48,
- 74, 50, 104, 52, 104, 79, 104, 104, 2, 104, 104, 2, 86, 87, 88, 104, 90, 104, 12, 13, 104, 12, 13, 17, 18, 104,
- 17, 18, 1, 38, 39, 40, 104, 104, 104, 12, 13, 104, 104, 104, 17, 18, 104, 104, 53, 104, 55, 56, 57, 104, 104,
- 104, 46, 26, 48, 46, 50, 48, 52, 50, 33, 52, 104, 1, 11, 38, 39, 40, 1, 46, 104, 48, 104, 50, 21, 52, 23, 104,
- 104, 26, 104, 104, 55, 56, 57, 104, 33, 104, 35, 104, 37, 104, 104, 104, 104, 104, 104, 104, 104, 46, 38, 39,
- 40, 104, 104, 38, 39, 40, 104, 104, 104, 104, 104, 104, 104, 104, 71, 55, 56, 57, 75, 59, 55, 56, 57, 104, 81,
- 71, 104, 84, 85, 75, 71, 104, 104, 104, 75, 81, 104, 104, 84, 85, 81, 98, 104, 84, 85, 71, 104, 104, 104, 75,
- 104, 104, 98, 104, 104, 81, 71, 98, 84, 85, 75, 104, 104, 104, 104, 104, 81, 104, 104, 84, 85, 104, 98, 104,
- 104, 104, 104, 104, 104, 104, 104, 104, 104, 98,
- );
+ static public $yy_lookahead = array(12, 13, 14, 80, 16, 17, 71, 19, 20, 12, 13, 71, 91, 25, 17, 75, 81, 29, 30, 31,
+ 32, 81, 34, 26, 36, 28, 15, 39, 93, 18, 33, 43, 44, 45, 46, 47, 28, 49, 98, 51,
+ 52, 70, 54, 1, 36, 74, 58, 12, 13, 14, 79, 16, 17, 11, 19, 20, 48, 86, 64, 48,
+ 25, 90, 75, 69, 29, 26, 31, 32, 26, 34, 46, 36, 33, 71, 39, 33, 52, 75, 43, 44,
+ 45, 46, 47, 81, 49, 98, 51, 52, 53, 54, 35, 22, 37, 58, 12, 13, 14, 103, 16, 17,
+ 98, 19, 20, 63, 64, 65, 66, 25, 11, 69, 41, 29, 64, 31, 32, 1, 34, 69, 36, 22,
+ 22, 39, 53, 26, 95, 43, 44, 45, 46, 47, 33, 49, 1, 51, 52, 35, 54, 37, 41, 41,
+ 58, 12, 13, 14, 14, 16, 17, 46, 19, 20, 102, 103, 71, 52, 25, 11, 75, 26, 29,
+ 36, 31, 32, 81, 34, 33, 36, 22, 17, 39, 14, 26, 48, 43, 44, 45, 46, 47, 33, 49,
+ 98, 51, 52, 70, 54, 54, 41, 74, 58, 12, 13, 14, 79, 16, 17, 75, 19, 20, 8, 9,
+ 10, 50, 25, 90, 84, 85, 29, 13, 31, 32, 54, 34, 46, 36, 22, 36, 39, 14, 98, 53,
+ 43, 44, 45, 46, 47, 46, 49, 48, 51, 52, 36, 54, 53, 41, 21, 58, 12, 13, 14, 36,
+ 16, 17, 75, 19, 20, 12, 13, 15, 35, 25, 17, 59, 18, 29, 22, 31, 32, 54, 34, 74,
+ 36, 76, 77, 39, 79, 98, 99, 43, 44, 45, 46, 47, 74, 49, 76, 51, 52, 79, 54, 35,
+ 46, 37, 58, 12, 13, 14, 52, 16, 17, 71, 19, 20, 36, 74, 15, 76, 25, 18, 79, 81,
+ 29, 35, 31, 32, 48, 34, 92, 36, 94, 95, 39, 93, 36, 15, 43, 44, 45, 46, 47, 53,
+ 49, 26, 51, 52, 48, 54, 89, 48, 33, 58, 12, 13, 14, 96, 16, 17, 71, 19, 20, 14,
+ 98, 71, 17, 25, 46, 71, 81, 29, 75, 31, 32, 81, 34, 1, 36, 81, 71, 39, 93, 1, 2,
+ 43, 44, 45, 46, 47, 81, 49, 98, 51, 52, 98, 54, 91, 1, 93, 58, 12, 13, 14, 28,
+ 16, 17, 98, 19, 20, 1, 91, 71, 93, 25, 18, 71, 1, 29, 80, 31, 32, 81, 34, 99,
+ 36, 81, 11, 39, 94, 95, 2, 43, 44, 45, 46, 47, 89, 49, 65, 51, 52, 68, 54, 96,
+ 80, 79, 58, 12, 13, 14, 36, 16, 17, 71, 19, 20, 94, 95, 71, 18, 25, 53, 96, 81,
+ 29, 75, 31, 32, 81, 34, 18, 36, 74, 15, 39, 93, 91, 79, 43, 44, 45, 46, 47, 17,
+ 49, 17, 51, 52, 98, 54, 17, 46, 36, 58, 12, 13, 14, 51, 16, 17, 48, 19, 20, 17,
+ 34, 17, 42, 25, 17, 1, 34, 29, 22, 31, 32, 23, 34, 37, 36, 11, 17, 39, 5, 17,
+ 17, 43, 44, 45, 46, 47, 17, 49, 51, 51, 26, 27, 54, 11, 53, 64, 58, 33, 13, 14,
+ 69, 70, 17, 72, 73, 74, 53, 91, 81, 92, 79, 12, 13, 82, 83, 9, 17, 86, 87, 88,
+ 104, 90, 79, 93, 91, 3, 4, 5, 6, 7, 8, 100, 101, 79, 12, 13, 91, 79, 16, 54, 91,
+ 19, 20, 12, 13, 13, 14, 25, 17, 17, 64, 29, 91, 31, 32, 69, 70, 26, 72, 73, 74,
+ 78, 76, 79, 33, 79, 34, 11, 82, 83, 79, 15, 86, 87, 88, 64, 90, 67, 104, 104,
+ 69, 70, 26, 72, 73, 74, 54, 104, 14, 33, 79, 17, 36, 82, 83, 104, 104, 86, 87,
+ 88, 64, 90, 104, 104, 48, 69, 70, 104, 72, 73, 74, 104, 101, 15, 104, 79, 104,
+ 104, 82, 83, 104, 104, 86, 87, 88, 51, 90, 104, 54, 104, 64, 104, 104, 97, 104,
+ 69, 70, 104, 72, 73, 74, 1, 104, 104, 46, 79, 104, 1, 82, 83, 52, 11, 86, 87,
+ 88, 104, 90, 11, 18, 64, 104, 104, 104, 97, 69, 70, 26, 72, 73, 74, 104, 76, 26,
+ 33, 79, 104, 36, 82, 83, 33, 104, 86, 87, 88, 64, 90, 12, 13, 48, 69, 70, 17,
+ 72, 73, 74, 12, 13, 104, 104, 79, 17, 104, 82, 83, 104, 104, 86, 87, 88, 26, 90,
+ 28, 104, 64, 104, 104, 33, 97, 69, 70, 104, 72, 73, 74, 50, 104, 104, 104, 79,
+ 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 14, 104, 104, 17,
+ 69, 70, 1, 72, 73, 74, 104, 104, 104, 104, 79, 104, 11, 82, 83, 104, 104, 86,
+ 87, 88, 64, 90, 104, 104, 104, 69, 70, 26, 72, 73, 74, 49, 104, 51, 33, 79, 54,
+ 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104, 12, 13, 14, 104, 16, 104, 64, 19,
+ 20, 104, 104, 69, 70, 25, 72, 73, 74, 29, 104, 31, 32, 79, 104, 104, 82, 83,
+ 104, 104, 86, 87, 88, 104, 90, 104, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73,
+ 74, 104, 58, 59, 104, 79, 104, 104, 82, 83, 104, 5, 86, 87, 88, 104, 90, 104,
+ 12, 13, 14, 104, 16, 104, 104, 19, 20, 104, 104, 104, 104, 25, 104, 104, 64, 29,
+ 104, 31, 32, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 12, 13, 82, 83,
+ 104, 17, 86, 87, 88, 104, 90, 64, 104, 104, 58, 59, 69, 70, 104, 72, 73, 74,
+ 104, 12, 13, 104, 79, 104, 17, 82, 83, 104, 104, 86, 87, 88, 104, 90, 50, 104,
+ 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104,
+ 82, 83, 104, 50, 86, 87, 88, 104, 90, 64, 27, 104, 104, 104, 69, 70, 104, 72,
+ 73, 74, 104, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90,
+ 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104,
+ 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70,
+ 104, 72, 73, 74, 104, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88,
+ 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39, 40, 79,
+ 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70,
+ 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88,
+ 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39,
+ 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57,
+ 69, 70, 104, 72, 73, 74, 37, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87,
+ 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104,
+ 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 2,
+ 104, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104,
+ 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104,
+ 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55,
+ 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104,
+ 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73,
+ 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64,
+ 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 37, 38, 39, 40, 79, 104, 104, 82,
+ 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74,
+ 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104,
+ 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 11, 104, 104, 79, 104,
+ 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104,
+ 72, 73, 74, 104, 38, 39, 40, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104,
+ 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104,
+ 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69,
+ 70, 104, 72, 73, 74, 104, 11, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87,
+ 88, 104, 90, 64, 104, 104, 104, 104, 69, 70, 104, 72, 73, 74, 104, 38, 39, 40,
+ 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69,
+ 70, 104, 72, 73, 74, 104, 104, 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87,
+ 88, 104, 90, 104, 104, 64, 104, 1, 104, 104, 69, 70, 104, 72, 73, 74, 104, 11,
+ 104, 104, 79, 104, 104, 82, 83, 104, 104, 86, 87, 88, 104, 90, 64, 104, 104,
+ 104, 104, 69, 70, 104, 72, 104, 74, 104, 38, 39, 40, 79, 104, 104, 104, 83, 104,
+ 104, 86, 87, 88, 104, 90, 64, 104, 55, 56, 57, 69, 70, 104, 72, 104, 74, 104,
+ 104, 104, 104, 79, 104, 104, 2, 83, 1, 104, 86, 87, 88, 104, 90, 104, 12, 13,
+ 11, 15, 104, 17, 18, 61, 62, 63, 64, 65, 66, 104, 104, 69, 104, 26, 104, 1, 2,
+ 104, 104, 104, 33, 104, 104, 104, 104, 38, 39, 40, 1, 104, 46, 104, 48, 104, 50,
+ 104, 52, 104, 104, 104, 104, 104, 55, 56, 57, 2, 104, 104, 21, 104, 36, 104, 38,
+ 39, 40, 12, 13, 104, 104, 104, 17, 18, 48, 104, 104, 38, 39, 40, 104, 55, 56,
+ 57, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 55, 56, 57, 104, 104, 104,
+ 104, 46, 104, 48, 64, 50, 104, 52, 53, 69, 70, 104, 72, 104, 74, 104, 104, 104,
+ 104, 79, 104, 104, 104, 104, 104, 104, 86, 87, 88, 64, 90, 1, 71, 104, 69, 70,
+ 75, 72, 104, 74, 104, 104, 81, 104, 79, 84, 85, 104, 104, 104, 104, 86, 87, 88,
+ 24, 90, 26, 104, 104, 98, 104, 104, 104, 33, 104, 104, 64, 104, 38, 39, 40, 69,
+ 70, 104, 72, 104, 74, 104, 104, 104, 104, 79, 104, 104, 2, 55, 56, 57, 86, 87,
+ 88, 104, 90, 104, 12, 13, 64, 15, 104, 17, 18, 69, 70, 104, 72, 104, 74, 104,
+ 104, 104, 104, 79, 104, 104, 104, 104, 104, 104, 86, 87, 88, 64, 90, 1, 104,
+ 104, 69, 70, 46, 72, 48, 74, 50, 104, 52, 104, 79, 104, 104, 2, 104, 104, 2, 86,
+ 87, 88, 104, 90, 104, 12, 13, 104, 12, 13, 17, 18, 104, 17, 18, 1, 38, 39, 40,
+ 104, 104, 104, 12, 13, 104, 104, 104, 17, 18, 104, 104, 53, 104, 55, 56, 57,
+ 104, 104, 104, 46, 26, 48, 46, 50, 48, 52, 50, 33, 52, 104, 1, 11, 38, 39, 40,
+ 1, 46, 104, 48, 104, 50, 21, 52, 23, 104, 104, 26, 104, 104, 55, 56, 57, 104,
+ 33, 104, 35, 104, 37, 104, 104, 104, 104, 104, 104, 104, 104, 46, 38, 39, 40,
+ 104, 104, 38, 39, 40, 104, 104, 104, 104, 104, 104, 104, 104, 71, 55, 56, 57,
+ 75, 59, 55, 56, 57, 104, 81, 71, 104, 84, 85, 75, 71, 104, 104, 104, 75, 81,
+ 104, 104, 84, 85, 81, 98, 104, 84, 85, 71, 104, 104, 104, 75, 104, 104, 98, 104,
+ 104, 81, 71, 98, 84, 85, 75, 104, 104, 104, 104, 104, 81, 104, 104, 84, 85, 104,
+ 98, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 98,);
const YY_SHIFT_USE_DFLT = - 13;
const YY_SHIFT_MAX = 236;
- static public $yy_shift_ofst = array(
- 542, 364, 82, 82, 82, 411, 364, 411, 35, - 12, - 12, 82, 82, 82, 82, 82, 82, 176, 82, 82, 129, 82, 82, 82, 317,
- 82, 82, 82, 82, 82, 82, 270, 82, 82, 82, 82, 176, 223, 223, 458, 458, 458, 458, 458, 1734, 1603, 1862, 1862,
- 1862, 1862, 1862, 542, 749, 803, 1897, 1448, 1531, 1199, 1643, 1826, 1365, 950, 1282, 1033, 1116, 1902, 1902,
- 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 660, 1902, 1089, 1089, 594, 666, 131, 202, 865, - 3, 703,
- 551, 551, 233, 202, 202, 131, 131, 357, 97, 484, 144, 920, 505, 42, 768, 189, 232, 11, 232, 278, 324, 428, 39,
- 372, 324, 39, 351, 384, 391, 294, 155, 114, 114, 114, 114, 417, 417, 114, 114, 114, 114, - 13, 1786, 1659, 1600,
- 1844, 1841, 1858, 552, 897, 519, 618, 24, 101, 39, 101, 24, 39, 24, 39, 130, 39, 39, 24, 39, 24, 24, 193, 24,
- 39, 39, 39, 24, 39, 39, 39, 130, 39, 39, 39, 130, 39, 130, 39, 231, 39, 39, 114, 114, 114, 526, 404, 417, 404,
- 114, 417, 390, 114, 417, - 13, - 13, - 13, - 13, - 13, 1630, 1888, 576, 178, 694, 191, 69, 8, 100, 275, 212,
- 243, 297, 265, 255, 150, 98, 165, 55, 123, 493, 479, 468, 456, 434, 482, 483, 473, 461, 502, 489, 457, 452, 466,
- 422, 421, 449, 442, 444, 462, 432, 467, 440, 464, 446, 390,
- );
+ static public $yy_shift_ofst = array(542, 364, 82, 82, 82, 411, 364, 411, 35, - 12, - 12, 82, 82, 82, 82, 82, 82,
+ 176, 82, 82, 129, 82, 82, 82, 317, 82, 82, 82, 82, 82, 82, 270, 82, 82, 82, 82,
+ 176, 223, 223, 458, 458, 458, 458, 458, 1734, 1603, 1862, 1862, 1862, 1862,
+ 1862, 542, 749, 803, 1897, 1448, 1531, 1199, 1643, 1826, 1365, 950, 1282, 1033,
+ 1116, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 660,
+ 1902, 1089, 1089, 594, 666, 131, 202, 865, - 3, 703, 551, 551, 233, 202, 202,
+ 131, 131, 357, 97, 484, 144, 920, 505, 42, 768, 189, 232, 11, 232, 278, 324,
+ 428, 39, 372, 324, 39, 351, 384, 391, 294, 155, 114, 114, 114, 114, 417, 417,
+ 114, 114, 114, 114, - 13, 1786, 1659, 1600, 1844, 1841, 1858, 552, 897, 519,
+ 618, 24, 101, 39, 101, 24, 39, 24, 39, 130, 39, 39, 24, 39, 24, 24, 193, 24,
+ 39, 39, 39, 24, 39, 39, 39, 130, 39, 39, 39, 130, 39, 130, 39, 231, 39, 39,
+ 114, 114, 114, 526, 404, 417, 404, 114, 417, 390, 114, 417, - 13, - 13, - 13,
+ - 13, - 13, 1630, 1888, 576, 178, 694, 191, 69, 8, 100, 275, 212, 243, 297,
+ 265, 255, 150, 98, 165, 55, 123, 493, 479, 468, 456, 434, 482, 483, 473, 461,
+ 502, 489, 457, 452, 466, 422, 421, 449, 442, 444, 462, 432, 467, 440, 464, 446,
+ 390,);
const YY_REDUCE_USE_DFLT = - 80;
const YY_REDUCE_MAX = 190;
- static public $yy_reduce_ofst = array(
- 1558, 451, 556, 640, 586, 506, 531, 615, 995, 939, 1078, 723, 1244, 968, 856, 912, 1354, 1134, 1105, 1161, 1051,
- 1217, 1022, 1188, 1300, 1466, 1383, 1271, 1327, 1437, 1410, 757, 698, 669, 885, 829, 785, 1493, 1520, 1761,
- 1706, 1669, 1644, 1736, 1880, 1665, 1896, 1911, 1665, 1891, 1922, 40, - 29, 48, 119, 119, 119, 119, 119, 119,
- 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 81, 119, 119, 119, 112, 2, - 60,
- 184, - 6, 264, 358, - 65, 217, 213, 218, 197, 284, 269, 166, 363, - 13, 363, 295, 342, - 13, - 13, 349, 281,
- 310, 295, 310, 323, 310, 316, 272, 236, 273, - 13, - 13, - 13, 320, 374, - 13, - 13, 366, - 13, 338, 310, - 13,
- - 13, - 13, - 13, - 13, 465, 465, 465, 465, 465, 465, 474, 450, 465, 465, 437, 469, 447, 453, 437, 447, 437,
- 447, 463, 447, 447, 437, 447, 437, 437, 481, 437, 447, 447, 447, 437, 447, 447, 447, 478, 447, 447, 447, 511,
- 447, 504, 447, 503, 447, 447, 241, 241, 241, 530, 300, 29, 300, 241, 29, 361, 241, 29, - 79, - 77, 314, 340,
- 436,
- );
+ static public $yy_reduce_ofst = array(1558, 451, 556, 640, 586, 506, 531, 615, 995, 939, 1078, 723, 1244, 968, 856,
+ 912, 1354, 1134, 1105, 1161, 1051, 1217, 1022, 1188, 1300, 1466, 1383, 1271,
+ 1327, 1437, 1410, 757, 698, 669, 885, 829, 785, 1493, 1520, 1761, 1706, 1669,
+ 1644, 1736, 1880, 1665, 1896, 1911, 1665, 1891, 1922, 40, - 29, 48, 119, 119,
+ 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119,
+ 119, 119, 119, 119, 119, 81, 119, 119, 119, 112, 2, - 60, 184, - 6, 264, 358,
+ - 65, 217, 213, 218, 197, 284, 269, 166, 363, - 13, 363, 295, 342, - 13, - 13,
+ 349, 281, 310, 295, 310, 323, 310, 316, 272, 236, 273, - 13, - 13, - 13, 320,
+ 374, - 13, - 13, 366, - 13, 338, 310, - 13, - 13, - 13, - 13, - 13, 465, 465,
+ 465, 465, 465, 465, 474, 450, 465, 465, 437, 469, 447, 453, 437, 447, 437,
+ 447, 463, 447, 447, 437, 447, 437, 437, 481, 437, 447, 447, 447, 437, 447,
+ 447, 447, 478, 447, 447, 447, 511, 447, 504, 447, 503, 447, 447, 241, 241,
+ 241, 530, 300, 29, 300, 241, 29, 361, 241, 29, - 79, - 77, 314, 340, 436,);
- static public $yyExpectedTokens = array(
- array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 53, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 52, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 54, 58,),
- array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45, 46, 47, 49, 51, 54, 58,),
- array(1, 24, 26, 33, 38, 39, 40, 55, 56, 57,), array(1, 11, 26, 33, 38, 39, 40, 55, 56, 57,),
- array(1, 26, 33, 38, 39, 40, 55, 56, 57,), array(1, 26, 33, 38, 39, 40, 55, 56, 57,),
- array(1, 26, 33, 38, 39, 40, 55, 56, 57,), array(1, 26, 33, 38, 39, 40, 55, 56, 57,),
- array(1, 26, 33, 38, 39, 40, 55, 56, 57,), array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,),
- array(14, 17, 49, 51, 54,), array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,),
- array(1, 38, 39, 40, 55, 56, 57, 59,), array(1, 11, 38, 39, 40, 55, 56, 57,),
- array(1, 11, 38, 39, 40, 55, 56, 57,), array(1, 2, 38, 39, 40, 55, 56, 57,),
- array(1, 21, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 53, 55, 56, 57,),
- array(1, 11, 38, 39, 40, 55, 56, 57,), array(1, 27, 38, 39, 40, 55, 56, 57,),
- array(1, 37, 38, 39, 40, 55, 56, 57,), array(1, 11, 38, 39, 40, 55, 56, 57,),
- array(1, 37, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
- array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
- array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
- array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
- array(1, 11, 18, 26, 33, 36, 48,), array(1, 38, 39, 40, 55, 56, 57,), array(38, 39, 40, 55, 56, 57,),
- array(38, 39, 40, 55, 56, 57,), array(14, 17, 51, 54,), array(1, 11, 26, 33,), array(1, 26, 33,),
- array(14, 36, 54,), array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,), array(12, 13, 17, 26, 28, 33,),
- array(12, 13, 17, 26, 28, 33,), array(12, 13, 17, 26, 33,), array(12, 13, 17, 26, 33,), array(18, 46, 52,),
- array(14, 36, 54,), array(14, 36, 54,), array(1, 26, 33,), array(1, 26, 33,), array(1, 2,),
- array(11, 22, 26, 33, 41,), array(1, 11, 26, 27, 33,), array(11, 22, 26, 33, 41,), array(12, 13, 17, 50,),
- array(13, 14, 17, 54,), array(1, 11, 26, 33,), array(1, 11, 26, 33,), array(8, 9, 10,), array(12, 13, 17,),
- array(15, 18, 48,), array(12, 13, 17,), array(15, 18, 48,), array(14, 17,), array(18, 48,), array(26, 33,),
- array(1, 18,), array(14, 17,), array(26, 33,), array(1, 28,), array(1, 53,), array(1, 11,), array(26, 33,),
- array(14, 54,), array(1,), array(1,), array(1,), array(1,), array(18,), array(18,), array(1,), array(1,),
- array(1,), array(1,), array(), array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,),
- array(2, 12, 13, 17, 18, 46, 48, 50, 52, 53,), array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,),
- array(2, 12, 13, 17, 18, 46, 48, 50, 52,), array(2, 12, 13, 17, 18, 46, 48, 50, 52,),
- array(12, 13, 17, 18, 46, 48, 50, 52,), array(13, 14, 17, 34, 54,), array(12, 13, 17, 50,), array(12, 13, 17,),
- array(15, 46, 52,), array(46, 52,), array(46, 52,), array(26, 33,), array(46, 52,), array(46, 52,),
- array(26, 33,), array(46, 52,), array(26, 33,), array(14, 54,), array(26, 33,), array(26, 33,), array(46, 52,),
- array(26, 33,), array(46, 52,), array(46, 52,), array(13, 36,), array(46, 52,), array(26, 33,), array(26, 33,),
- array(26, 33,), array(46, 52,), array(26, 33,), array(26, 33,), array(26, 33,), array(14, 54,), array(26, 33,),
- array(26, 33,), array(26, 33,), array(14, 54,), array(26, 33,), array(14, 54,), array(26, 33,), array(15, 22,),
- array(26, 33,), array(26, 33,), array(1,), array(1,), array(1,), array(9,), array(2,), array(18,), array(2,),
- array(1,), array(18,), array(36,), array(1,), array(18,), array(), array(), array(), array(), array(),
- array(1, 2, 36, 38, 39, 40, 48, 55, 56, 57,), array(11, 21, 23, 26, 33, 35, 37, 46,),
- array(11, 15, 26, 33, 36, 48,), array(36, 46, 48, 53,), array(12, 13, 17, 50,), array(22, 41, 59,),
- array(22, 41, 53,), array(28, 36, 48,), array(35, 37,), array(36, 48,), array(21, 35,), array(35, 37,),
- array(15, 46,), array(35, 53,), array(36, 48,), array(17, 50,), array(22, 41,), array(46, 53,), array(35, 37,),
- array(36, 48,), array(5,), array(17,), array(23,), array(37,), array(15,), array(17,), array(17,), array(53,),
- array(53,), array(11,), array(17,), array(51,), array(34,), array(22,), array(51,), array(46,), array(17,),
- array(17,), array(17,), array(17,), array(36,), array(17,), array(42,), array(17,), array(34,), array(36,),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- array(), array(), array(), array(), array(), array(), array(), array(), array(), array(), array(),
- );
+ static public $yyExpectedTokens = array(array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 53, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44,
+ 45, 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 30, 31, 32, 34, 36, 39, 43, 44,
+ 45, 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 52, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 54, 58,),
+ array(12, 13, 14, 16, 17, 19, 20, 25, 29, 31, 32, 34, 36, 39, 43, 44, 45,
+ 46, 47, 49, 51, 54, 58,),
+ array(1, 24, 26, 33, 38, 39, 40, 55, 56, 57,),
+ array(1, 11, 26, 33, 38, 39, 40, 55, 56, 57,),
+ array(1, 26, 33, 38, 39, 40, 55, 56, 57,),
+ array(1, 26, 33, 38, 39, 40, 55, 56, 57,),
+ array(1, 26, 33, 38, 39, 40, 55, 56, 57,),
+ array(1, 26, 33, 38, 39, 40, 55, 56, 57,),
+ array(1, 26, 33, 38, 39, 40, 55, 56, 57,),
+ array(3, 4, 5, 6, 7, 8, 12, 13, 16, 19, 20, 25, 29, 31, 32,),
+ array(14, 17, 49, 51, 54,),
+ array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,),
+ array(1, 38, 39, 40, 55, 56, 57, 59,),
+ array(1, 11, 38, 39, 40, 55, 56, 57,),
+ array(1, 11, 38, 39, 40, 55, 56, 57,), array(1, 2, 38, 39, 40, 55, 56, 57,),
+ array(1, 21, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 53, 55, 56, 57,),
+ array(1, 11, 38, 39, 40, 55, 56, 57,),
+ array(1, 27, 38, 39, 40, 55, 56, 57,),
+ array(1, 37, 38, 39, 40, 55, 56, 57,),
+ array(1, 11, 38, 39, 40, 55, 56, 57,),
+ array(1, 37, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(1, 38, 39, 40, 55, 56, 57,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(1, 11, 18, 26, 33, 36, 48,), array(1, 38, 39, 40, 55, 56, 57,),
+ array(38, 39, 40, 55, 56, 57,), array(38, 39, 40, 55, 56, 57,),
+ array(14, 17, 51, 54,), array(1, 11, 26, 33,), array(1, 26, 33,),
+ array(14, 36, 54,),
+ array(5, 12, 13, 14, 16, 19, 20, 25, 29, 31, 32, 58, 59,),
+ array(12, 13, 17, 26, 28, 33,), array(12, 13, 17, 26, 28, 33,),
+ array(12, 13, 17, 26, 33,), array(12, 13, 17, 26, 33,), array(18, 46, 52,),
+ array(14, 36, 54,), array(14, 36, 54,), array(1, 26, 33,),
+ array(1, 26, 33,), array(1, 2,), array(11, 22, 26, 33, 41,),
+ array(1, 11, 26, 27, 33,), array(11, 22, 26, 33, 41,),
+ array(12, 13, 17, 50,), array(13, 14, 17, 54,), array(1, 11, 26, 33,),
+ array(1, 11, 26, 33,), array(8, 9, 10,), array(12, 13, 17,),
+ array(15, 18, 48,), array(12, 13, 17,), array(15, 18, 48,), array(14, 17,),
+ array(18, 48,), array(26, 33,), array(1, 18,), array(14, 17,),
+ array(26, 33,), array(1, 28,), array(1, 53,), array(1, 11,), array(26, 33,),
+ array(14, 54,), array(1,), array(1,), array(1,), array(1,), array(18,),
+ array(18,), array(1,), array(1,), array(1,), array(1,), array(),
+ array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,),
+ array(2, 12, 13, 17, 18, 46, 48, 50, 52, 53,),
+ array(2, 12, 13, 15, 17, 18, 46, 48, 50, 52,),
+ array(2, 12, 13, 17, 18, 46, 48, 50, 52,),
+ array(2, 12, 13, 17, 18, 46, 48, 50, 52,),
+ array(12, 13, 17, 18, 46, 48, 50, 52,), array(13, 14, 17, 34, 54,),
+ array(12, 13, 17, 50,), array(12, 13, 17,), array(15, 46, 52,),
+ array(46, 52,), array(46, 52,), array(26, 33,), array(46, 52,),
+ array(46, 52,), array(26, 33,), array(46, 52,), array(26, 33,),
+ array(14, 54,), array(26, 33,), array(26, 33,), array(46, 52,),
+ array(26, 33,), array(46, 52,), array(46, 52,), array(13, 36,),
+ array(46, 52,), array(26, 33,), array(26, 33,), array(26, 33,),
+ array(46, 52,), array(26, 33,), array(26, 33,), array(26, 33,),
+ array(14, 54,), array(26, 33,), array(26, 33,), array(26, 33,),
+ array(14, 54,), array(26, 33,), array(14, 54,), array(26, 33,),
+ array(15, 22,), array(26, 33,), array(26, 33,), array(1,), array(1,),
+ array(1,), array(9,), array(2,), array(18,), array(2,), array(1,),
+ array(18,), array(36,), array(1,), array(18,), array(), array(), array(),
+ array(), array(), array(1, 2, 36, 38, 39, 40, 48, 55, 56, 57,),
+ array(11, 21, 23, 26, 33, 35, 37, 46,), array(11, 15, 26, 33, 36, 48,),
+ array(36, 46, 48, 53,), array(12, 13, 17, 50,), array(22, 41, 59,),
+ array(22, 41, 53,), array(28, 36, 48,), array(35, 37,), array(36, 48,),
+ array(21, 35,), array(35, 37,), array(15, 46,), array(35, 53,),
+ array(36, 48,), array(17, 50,), array(22, 41,), array(46, 53,),
+ array(35, 37,), array(36, 48,), array(5,), array(17,), array(23,),
+ array(37,), array(15,), array(17,), array(17,), array(53,), array(53,),
+ array(11,), array(17,), array(51,), array(34,), array(22,), array(51,),
+ array(46,), array(17,), array(17,), array(17,), array(17,), array(36,),
+ array(17,), array(42,), array(17,), array(34,), array(36,), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(), array(), array(),
+ array(), array(), array(), array(), array(), array(),);
- static public $yy_default = array(
- 335, 510, 490, 490, 490, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
- 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
- 393, 525, 360, 393, 357, 393, 369, 332, 525, 525, 525, 525, 525, 525, 525, 525, 525, 398, 525, 525, 525, 513,
- 405, 395, 404, 489, 398, 374, 400, 511, 488, 414, 432, 512, 421, 420, 525, 407, 393, 525, 525, 393, 393, 393,
- 393, 502, 525, 525, 393, 393, 383, 422, 407, 422, 455, 525, 407, 407, 525, 455, 445, 455, 445, 525, 445, 393,
- 387, 525, 371, 407, 407, 407, 393, 525, 417, 425, 389, 410, 499, 445, 423, 411, 407, 424, 497, 444, 444, 444,
- 444, 444, 444, 525, 457, 455, 471, 449, 448, 366, 450, 451, 379, 453, 378, 525, 368, 367, 452, 364, 483, 480,
- 455, 481, 358, 380, 362, 482, 373, 356, 361, 525, 382, 370, 377, 525, 372, 525, 354, 525, 381, 376, 439, 413,
- 384, 348, 492, 477, 491, 388, 503, 455, 390, 500, 455, 496, 496, 496, 455, 432, 428, 432, 432, 456, 422, 422,
- 432, 525, 440, 525, 525, 428, 525, 432, 525, 422, 428, 525, 525, 340, 525, 401, 525, 525, 525, 525, 435, 525,
- 525, 525, 525, 430, 422, 525, 428, 525, 525, 525, 525, 501, 525, 434, 525, 525, 471, 412, 391, 402, 418, 375,
- 352, 394, 435, 436, 460, 459, 471, 479, 437, 419, 442, 351, 443, 363, 504, 342, 438, 341, 343, 416, 441, 339,
- 334, 333, 336, 337, 338, 344, 468, 349, 347, 350, 476, 505, 469, 406, 415, 345, 346, 466, 506, 486, 385, 487,
- 495, 508, 509, 478, 426, 429, 474, 475, 427, 386, 507, 524, 523, 520, 518, 517, 493, 514, 494, 515, 516, 522,
- 473, 446, 447, 454, 470, 485, 519, 498, 458, 434, 461, 464, 472, 467, 484, 521, 431, 433, 465, 463, 409, 462,
- 408, 392,
- );
+ static public $yy_default = array(335, 510, 490, 490, 490, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
+ 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525,
+ 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 393, 525, 360, 393,
+ 357, 393, 369, 332, 525, 525, 525, 525, 525, 525, 525, 525, 525, 398, 525, 525,
+ 525, 513, 405, 395, 404, 489, 398, 374, 400, 511, 488, 414, 432, 512, 421, 420,
+ 525, 407, 393, 525, 525, 393, 393, 393, 393, 502, 525, 525, 393, 393, 383, 422,
+ 407, 422, 455, 525, 407, 407, 525, 455, 445, 455, 445, 525, 445, 393, 387, 525,
+ 371, 407, 407, 407, 393, 525, 417, 425, 389, 410, 499, 445, 423, 411, 407, 424,
+ 497, 444, 444, 444, 444, 444, 444, 525, 457, 455, 471, 449, 448, 366, 450, 451,
+ 379, 453, 378, 525, 368, 367, 452, 364, 483, 480, 455, 481, 358, 380, 362, 482,
+ 373, 356, 361, 525, 382, 370, 377, 525, 372, 525, 354, 525, 381, 376, 439, 413,
+ 384, 348, 492, 477, 491, 388, 503, 455, 390, 500, 455, 496, 496, 496, 455, 432,
+ 428, 432, 432, 456, 422, 422, 432, 525, 440, 525, 525, 428, 525, 432, 525, 422,
+ 428, 525, 525, 340, 525, 401, 525, 525, 525, 525, 435, 525, 525, 525, 525, 430,
+ 422, 525, 428, 525, 525, 525, 525, 501, 525, 434, 525, 525, 471, 412, 391, 402,
+ 418, 375, 352, 394, 435, 436, 460, 459, 471, 479, 437, 419, 442, 351, 443, 363,
+ 504, 342, 438, 341, 343, 416, 441, 339, 334, 333, 336, 337, 338, 344, 468, 349,
+ 347, 350, 476, 505, 469, 406, 415, 345, 346, 466, 506, 486, 385, 487, 495, 508,
+ 509, 478, 426, 429, 474, 475, 427, 386, 507, 524, 523, 520, 518, 517, 493, 514,
+ 494, 515, 516, 522, 473, 446, 447, 454, 470, 485, 519, 498, 458, 434, 461, 464,
+ 472, 467, 484, 521, 431, 433, 465, 463, 409, 462, 408, 392,);
const YYNOCODE = 105;
@@ -747,94 +886,125 @@ class Smarty_Internal_Templateparser
public $yyerrcnt; /* Shifts left before out of the error */
public $yystack = array(); /* The parser's stack */
- public $yyTokenName = array(
- '$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART', 'LITERALEND', 'LITERAL',
- 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL', 'SIMPLETAG', 'ID', 'PTR', 'LDELIF', 'LDELFOR', 'SEMICOLON',
- 'INCDEC', 'TO', 'STEP', 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', 'SMARTYBLOCKCHILDPARENT',
- 'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', 'CLOSEP', 'MATH', 'UNIMATH', 'ISIN', 'INSTANCEOF',
- 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT', 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH',
- 'OPENB', 'CLOSEB', 'DOLLAR', 'LOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', 'error', 'start', 'template',
- 'template_element', 'smartytag', 'literal', 'text_content', 'literal_elements', 'literal_element', 'tag',
- 'variable', 'attributes', 'value', 'expr', 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction',
- 'varvar', 'modparameters', 'attribute', 'ternary', 'array', 'lop', 'scond', 'ns1', 'function',
- 'doublequoted_with_quotes', 'static_class_access', 'object', 'arrayindex', 'indexdef', 'varvarele',
- 'objectchain', 'objectelement', 'method', 'params', 'modifier', 'modparameter', 'arrayelements', 'arrayelement',
- 'doublequoted', 'doublequotedcontent',
- );
+ public $yyTokenName = array('$', 'VERT', 'COLON', 'PHP', 'NOCACHE', 'TEXT', 'STRIPON', 'STRIPOFF', 'LITERALSTART',
+ 'LITERALEND', 'LITERAL', 'RDEL', 'SIMPELOUTPUT', 'LDEL', 'DOLLARID', 'EQUAL',
+ 'SIMPLETAG', 'ID', 'PTR', 'LDELIF', 'LDELFOR', 'SEMICOLON', 'INCDEC', 'TO', 'STEP',
+ 'LDELFOREACH', 'SPACE', 'AS', 'APTR', 'LDELSETFILTER', 'SMARTYBLOCKCHILDPARENT',
+ 'CLOSETAG', 'LDELSLASH', 'ATTR', 'INTEGER', 'COMMA', 'OPENP', 'CLOSEP', 'MATH',
+ 'UNIMATH', 'ISIN', 'INSTANCEOF', 'QMARK', 'NOT', 'TYPECAST', 'HEX', 'DOT',
+ 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'NAMESPACE', 'AT', 'HATCH', 'OPENB', 'CLOSEB',
+ 'DOLLAR', 'LOGOP', 'TLOGOP', 'SINGLECOND', 'QUOTE', 'BACKTICK', 'error', 'start',
+ 'template', 'template_element', 'smartytag', 'literal', 'text_content',
+ 'literal_elements', 'literal_element', 'tag', 'variable', 'attributes', 'value', 'expr',
+ 'varindexed', 'modifierlist', 'statement', 'statements', 'foraction', 'varvar',
+ 'modparameters', 'attribute', 'ternary', 'array', 'lop', 'scond', 'ns1', 'function',
+ 'doublequoted_with_quotes', 'static_class_access', 'object', 'arrayindex', 'indexdef',
+ 'varvarele', 'objectchain', 'objectelement', 'method', 'params', 'modifier',
+ 'modparameter', 'arrayelements', 'arrayelement', 'doublequoted',
+ 'doublequotedcontent',);
- public static $yyRuleName = array(
- 'start ::= template', 'template ::= template_element', 'template ::= template template_element', 'template ::=',
- 'template_element ::= smartytag', 'template_element ::= literal', 'template_element ::= PHP',
- 'template_element ::= NOCACHE', 'template_element ::= text_content', 'text_content ::= TEXT',
- 'text_content ::= text_content TEXT', 'template_element ::= STRIPON', 'template_element ::= STRIPOFF',
- 'literal ::= LITERALSTART LITERALEND', 'literal ::= LITERALSTART literal_elements LITERALEND',
- 'literal_elements ::= literal_elements literal_element', 'literal_elements ::=', 'literal_element ::= literal',
- 'literal_element ::= LITERAL', 'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable',
- 'tag ::= LDEL variable attributes', 'tag ::= LDEL value', 'tag ::= LDEL value attributes', 'tag ::= LDEL expr',
- 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value', 'tag ::= LDEL DOLLARID EQUAL expr',
- 'tag ::= LDEL DOLLARID EQUAL expr attributes', 'tag ::= LDEL varindexed EQUAL expr attributes',
- 'smartytag ::= SIMPLETAG', 'tag ::= LDEL ID attributes', 'tag ::= LDEL ID',
- 'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes',
- 'tag ::= LDEL ID PTR ID modifierlist attributes', 'tag ::= LDELIF expr', 'tag ::= LDELIF expr attributes',
- 'tag ::= LDELIF statement', 'tag ::= LDELIF statement attributes',
- 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes',
- 'foraction ::= EQUAL expr', 'foraction ::= INCDEC', 'tag ::= LDELFOR statement TO expr attributes',
- 'tag ::= LDELFOR statement TO expr STEP expr attributes', 'tag ::= LDELFOREACH attributes',
- 'tag ::= LDELFOREACH SPACE value AS varvar attributes',
- 'tag ::= LDELFOREACH SPACE value AS varvar APTR varvar attributes',
- 'tag ::= LDELFOREACH SPACE expr AS varvar attributes',
- 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes', 'tag ::= LDELSETFILTER ID modparameters',
- 'tag ::= LDELSETFILTER ID modparameters modifierlist', 'tag ::= LDEL SMARTYBLOCKCHILDPARENT',
- 'smartytag ::= CLOSETAG', 'tag ::= LDELSLASH ID', 'tag ::= LDELSLASH ID modifierlist',
- 'tag ::= LDELSLASH ID PTR ID', 'tag ::= LDELSLASH ID PTR ID modifierlist',
- 'attributes ::= attributes attribute', 'attributes ::= attribute', 'attributes ::=',
- 'attribute ::= SPACE ID EQUAL ID', 'attribute ::= ATTR expr', 'attribute ::= ATTR value',
- 'attribute ::= SPACE ID', 'attribute ::= SPACE expr', 'attribute ::= SPACE value',
- 'attribute ::= SPACE INTEGER EQUAL expr', 'statements ::= statement',
- 'statements ::= statements COMMA statement', 'statement ::= DOLLARID EQUAL INTEGER',
- 'statement ::= DOLLARID EQUAL expr', 'statement ::= varindexed EQUAL expr',
- 'statement ::= OPENP statement CLOSEP', 'expr ::= value', 'expr ::= ternary', 'expr ::= DOLLARID COLON ID',
- 'expr ::= expr MATH value', 'expr ::= expr UNIMATH value', 'expr ::= array', 'expr ::= expr modifierlist',
- 'expr ::= expr lop expr', 'expr ::= expr scond', 'expr ::= expr ISIN array', 'expr ::= expr ISIN value',
- 'expr ::= variable INSTANCEOF ns1', 'expr ::= variable INSTANCEOF variable',
- 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr',
- 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', 'value ::= variable', 'value ::= UNIMATH value',
- 'value ::= NOT value', 'value ::= TYPECAST value', 'value ::= variable INCDEC', 'value ::= HEX',
- 'value ::= INTEGER', 'value ::= INTEGER DOT INTEGER', 'value ::= INTEGER DOT', 'value ::= DOT INTEGER',
- 'value ::= ID', 'value ::= function', 'value ::= OPENP expr CLOSEP', 'value ::= SINGLEQUOTESTRING',
- 'value ::= doublequoted_with_quotes', 'value ::= varindexed DOUBLECOLON static_class_access',
- 'value ::= smartytag', 'value ::= value modifierlist', 'value ::= NAMESPACE',
- 'value ::= ns1 DOUBLECOLON static_class_access', 'ns1 ::= ID', 'ns1 ::= NAMESPACE', 'variable ::= DOLLARID',
- 'variable ::= varindexed', 'variable ::= varvar AT ID', 'variable ::= object', 'variable ::= HATCH ID HATCH',
- 'variable ::= HATCH ID HATCH arrayindex', 'variable ::= HATCH variable HATCH',
- 'variable ::= HATCH variable HATCH arrayindex', 'varindexed ::= DOLLARID arrayindex',
- 'varindexed ::= varvar arrayindex', 'arrayindex ::= arrayindex indexdef', 'arrayindex ::=',
- 'indexdef ::= DOT DOLLARID', 'indexdef ::= DOT varvar', 'indexdef ::= DOT varvar AT ID', 'indexdef ::= DOT ID',
- 'indexdef ::= DOT INTEGER', 'indexdef ::= DOT LDEL expr RDEL', 'indexdef ::= OPENB ID CLOSEB',
- 'indexdef ::= OPENB ID DOT ID CLOSEB', 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB',
- 'indexdef ::= OPENB INTEGER CLOSEB', 'indexdef ::= OPENB DOLLARID CLOSEB', 'indexdef ::= OPENB variable CLOSEB',
- 'indexdef ::= OPENB value CLOSEB', 'indexdef ::= OPENB expr CLOSEB', 'indexdef ::= OPENB CLOSEB',
- 'varvar ::= DOLLARID', 'varvar ::= DOLLAR', 'varvar ::= varvar varvarele', 'varvarele ::= ID',
- 'varvarele ::= SIMPELOUTPUT', 'varvarele ::= LDEL expr RDEL', 'object ::= varindexed objectchain',
- 'objectchain ::= objectelement', 'objectchain ::= objectchain objectelement',
- 'objectelement ::= PTR ID arrayindex', 'objectelement ::= PTR varvar arrayindex',
- 'objectelement ::= PTR LDEL expr RDEL arrayindex', 'objectelement ::= PTR ID LDEL expr RDEL arrayindex',
- 'objectelement ::= PTR method', 'function ::= ns1 OPENP params CLOSEP', 'method ::= ID OPENP params CLOSEP',
- 'method ::= DOLLARID OPENP params CLOSEP', 'params ::= params COMMA expr', 'params ::= expr', 'params ::=',
- 'modifierlist ::= modifierlist modifier modparameters', 'modifierlist ::= modifier modparameters',
- 'modifier ::= VERT AT ID', 'modifier ::= VERT ID', 'modparameters ::= modparameters modparameter',
- 'modparameters ::=', 'modparameter ::= COLON value', 'modparameter ::= COLON array',
- 'static_class_access ::= method', 'static_class_access ::= method objectchain', 'static_class_access ::= ID',
- 'static_class_access ::= DOLLARID arrayindex', 'static_class_access ::= DOLLARID arrayindex objectchain',
- 'lop ::= LOGOP', 'lop ::= TLOGOP', 'scond ::= SINGLECOND', 'array ::= OPENB arrayelements CLOSEB',
- 'arrayelements ::= arrayelement', 'arrayelements ::= arrayelements COMMA arrayelement', 'arrayelements ::=',
- 'arrayelement ::= value APTR expr', 'arrayelement ::= ID APTR expr', 'arrayelement ::= expr',
- 'doublequoted_with_quotes ::= QUOTE QUOTE', 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE',
- 'doublequoted ::= doublequoted doublequotedcontent', 'doublequoted ::= doublequotedcontent',
- 'doublequotedcontent ::= BACKTICK variable BACKTICK', 'doublequotedcontent ::= BACKTICK expr BACKTICK',
- 'doublequotedcontent ::= DOLLARID', 'doublequotedcontent ::= LDEL variable RDEL',
- 'doublequotedcontent ::= LDEL expr RDEL', 'doublequotedcontent ::= smartytag', 'doublequotedcontent ::= TEXT',
- );
+ public static $yyRuleName = array('start ::= template', 'template ::= template_element',
+ 'template ::= template template_element', 'template ::=',
+ 'template_element ::= smartytag', 'template_element ::= literal',
+ 'template_element ::= PHP', 'template_element ::= NOCACHE',
+ 'template_element ::= text_content', 'text_content ::= TEXT',
+ 'text_content ::= text_content TEXT', 'template_element ::= STRIPON',
+ 'template_element ::= STRIPOFF', 'literal ::= LITERALSTART LITERALEND',
+ 'literal ::= LITERALSTART literal_elements LITERALEND',
+ 'literal_elements ::= literal_elements literal_element', 'literal_elements ::=',
+ 'literal_element ::= literal', 'literal_element ::= LITERAL',
+ 'smartytag ::= tag RDEL', 'smartytag ::= SIMPELOUTPUT', 'tag ::= LDEL variable',
+ 'tag ::= LDEL variable attributes', 'tag ::= LDEL value',
+ 'tag ::= LDEL value attributes', 'tag ::= LDEL expr',
+ 'tag ::= LDEL expr attributes', 'tag ::= LDEL DOLLARID EQUAL value',
+ 'tag ::= LDEL DOLLARID EQUAL expr', 'tag ::= LDEL DOLLARID EQUAL expr attributes',
+ 'tag ::= LDEL varindexed EQUAL expr attributes', 'smartytag ::= SIMPLETAG',
+ 'tag ::= LDEL ID attributes', 'tag ::= LDEL ID',
+ 'tag ::= LDEL ID modifierlist attributes', 'tag ::= LDEL ID PTR ID attributes',
+ 'tag ::= LDEL ID PTR ID modifierlist attributes', 'tag ::= LDELIF expr',
+ 'tag ::= LDELIF expr attributes', 'tag ::= LDELIF statement',
+ 'tag ::= LDELIF statement attributes',
+ 'tag ::= LDELFOR statements SEMICOLON expr SEMICOLON varindexed foraction attributes',
+ 'foraction ::= EQUAL expr', 'foraction ::= INCDEC',
+ 'tag ::= LDELFOR statement TO expr attributes',
+ 'tag ::= LDELFOR statement TO expr STEP expr attributes',
+ 'tag ::= LDELFOREACH attributes',
+ 'tag ::= LDELFOREACH SPACE value AS varvar attributes',
+ 'tag ::= LDELFOREACH SPACE value AS varvar APTR varvar attributes',
+ 'tag ::= LDELFOREACH SPACE expr AS varvar attributes',
+ 'tag ::= LDELFOREACH SPACE expr AS varvar APTR varvar attributes',
+ 'tag ::= LDELSETFILTER ID modparameters',
+ 'tag ::= LDELSETFILTER ID modparameters modifierlist',
+ 'tag ::= LDEL SMARTYBLOCKCHILDPARENT', 'smartytag ::= CLOSETAG',
+ 'tag ::= LDELSLASH ID', 'tag ::= LDELSLASH ID modifierlist',
+ 'tag ::= LDELSLASH ID PTR ID', 'tag ::= LDELSLASH ID PTR ID modifierlist',
+ 'attributes ::= attributes attribute', 'attributes ::= attribute',
+ 'attributes ::=', 'attribute ::= SPACE ID EQUAL ID', 'attribute ::= ATTR expr',
+ 'attribute ::= ATTR value', 'attribute ::= SPACE ID', 'attribute ::= SPACE expr',
+ 'attribute ::= SPACE value', 'attribute ::= SPACE INTEGER EQUAL expr',
+ 'statements ::= statement', 'statements ::= statements COMMA statement',
+ 'statement ::= DOLLARID EQUAL INTEGER', 'statement ::= DOLLARID EQUAL expr',
+ 'statement ::= varindexed EQUAL expr', 'statement ::= OPENP statement CLOSEP',
+ 'expr ::= value', 'expr ::= ternary', 'expr ::= DOLLARID COLON ID',
+ 'expr ::= expr MATH value', 'expr ::= expr UNIMATH value', 'expr ::= array',
+ 'expr ::= expr modifierlist', 'expr ::= expr lop expr', 'expr ::= expr scond',
+ 'expr ::= expr ISIN array', 'expr ::= expr ISIN value',
+ 'expr ::= variable INSTANCEOF ns1', 'expr ::= variable INSTANCEOF variable',
+ 'ternary ::= OPENP expr CLOSEP QMARK DOLLARID COLON expr',
+ 'ternary ::= OPENP expr CLOSEP QMARK expr COLON expr', 'value ::= variable',
+ 'value ::= UNIMATH value', 'value ::= NOT value', 'value ::= TYPECAST value',
+ 'value ::= variable INCDEC', 'value ::= HEX', 'value ::= INTEGER',
+ 'value ::= INTEGER DOT INTEGER', 'value ::= INTEGER DOT', 'value ::= DOT INTEGER',
+ 'value ::= ID', 'value ::= function', 'value ::= OPENP expr CLOSEP',
+ 'value ::= SINGLEQUOTESTRING', 'value ::= doublequoted_with_quotes',
+ 'value ::= varindexed DOUBLECOLON static_class_access', 'value ::= smartytag',
+ 'value ::= value modifierlist', 'value ::= NAMESPACE',
+ 'value ::= ns1 DOUBLECOLON static_class_access', 'ns1 ::= ID',
+ 'ns1 ::= NAMESPACE', 'variable ::= DOLLARID', 'variable ::= varindexed',
+ 'variable ::= varvar AT ID', 'variable ::= object', 'variable ::= HATCH ID HATCH',
+ 'variable ::= HATCH ID HATCH arrayindex', 'variable ::= HATCH variable HATCH',
+ 'variable ::= HATCH variable HATCH arrayindex',
+ 'varindexed ::= DOLLARID arrayindex', 'varindexed ::= varvar arrayindex',
+ 'arrayindex ::= arrayindex indexdef', 'arrayindex ::=',
+ 'indexdef ::= DOT DOLLARID', 'indexdef ::= DOT varvar',
+ 'indexdef ::= DOT varvar AT ID', 'indexdef ::= DOT ID',
+ 'indexdef ::= DOT INTEGER', 'indexdef ::= DOT LDEL expr RDEL',
+ 'indexdef ::= OPENB ID CLOSEB', 'indexdef ::= OPENB ID DOT ID CLOSEB',
+ 'indexdef ::= OPENB SINGLEQUOTESTRING CLOSEB',
+ 'indexdef ::= OPENB INTEGER CLOSEB', 'indexdef ::= OPENB DOLLARID CLOSEB',
+ 'indexdef ::= OPENB variable CLOSEB', 'indexdef ::= OPENB value CLOSEB',
+ 'indexdef ::= OPENB expr CLOSEB', 'indexdef ::= OPENB CLOSEB',
+ 'varvar ::= DOLLARID', 'varvar ::= DOLLAR', 'varvar ::= varvar varvarele',
+ 'varvarele ::= ID', 'varvarele ::= SIMPELOUTPUT', 'varvarele ::= LDEL expr RDEL',
+ 'object ::= varindexed objectchain', 'objectchain ::= objectelement',
+ 'objectchain ::= objectchain objectelement',
+ 'objectelement ::= PTR ID arrayindex', 'objectelement ::= PTR varvar arrayindex',
+ 'objectelement ::= PTR LDEL expr RDEL arrayindex',
+ 'objectelement ::= PTR ID LDEL expr RDEL arrayindex',
+ 'objectelement ::= PTR method', 'function ::= ns1 OPENP params CLOSEP',
+ 'method ::= ID OPENP params CLOSEP', 'method ::= DOLLARID OPENP params CLOSEP',
+ 'params ::= params COMMA expr', 'params ::= expr', 'params ::=',
+ 'modifierlist ::= modifierlist modifier modparameters',
+ 'modifierlist ::= modifier modparameters', 'modifier ::= VERT AT ID',
+ 'modifier ::= VERT ID', 'modparameters ::= modparameters modparameter',
+ 'modparameters ::=', 'modparameter ::= COLON value',
+ 'modparameter ::= COLON array', 'static_class_access ::= method',
+ 'static_class_access ::= method objectchain', 'static_class_access ::= ID',
+ 'static_class_access ::= DOLLARID arrayindex',
+ 'static_class_access ::= DOLLARID arrayindex objectchain', 'lop ::= LOGOP',
+ 'lop ::= TLOGOP', 'scond ::= SINGLECOND', 'array ::= OPENB arrayelements CLOSEB',
+ 'arrayelements ::= arrayelement',
+ 'arrayelements ::= arrayelements COMMA arrayelement', 'arrayelements ::=',
+ 'arrayelement ::= value APTR expr', 'arrayelement ::= ID APTR expr',
+ 'arrayelement ::= expr', 'doublequoted_with_quotes ::= QUOTE QUOTE',
+ 'doublequoted_with_quotes ::= QUOTE doublequoted QUOTE',
+ 'doublequoted ::= doublequoted doublequotedcontent',
+ 'doublequoted ::= doublequotedcontent',
+ 'doublequotedcontent ::= BACKTICK variable BACKTICK',
+ 'doublequotedcontent ::= BACKTICK expr BACKTICK',
+ 'doublequotedcontent ::= DOLLARID', 'doublequotedcontent ::= LDEL variable RDEL',
+ 'doublequotedcontent ::= LDEL expr RDEL', 'doublequotedcontent ::= smartytag',
+ 'doublequotedcontent ::= TEXT',);
public function tokenName($tokenType)
{
@@ -842,7 +1012,7 @@ class Smarty_Internal_Templateparser
return 'End of Input';
}
if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
- return $this->yyTokenName[$tokenType];
+ return $this->yyTokenName[ $tokenType ];
} else {
return "Unknown";
}
@@ -863,7 +1033,7 @@ class Smarty_Internal_Templateparser
}
$yytos = array_pop($this->yystack);
if ($this->yyTraceFILE && $this->yyidx >= 0) {
- fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] . "\n");
+ fwrite($this->yyTraceFILE, $this->yyTracePrompt . 'Popping ' . $this->yyTokenName[ $yytos->major ] . "\n");
}
$yymajor = $yytos->major;
self::yy_destructor($yymajor, $yytos->minor);
@@ -886,14 +1056,14 @@ class Smarty_Internal_Templateparser
{
static $res3 = array();
static $res4 = array();
- $state = $this->yystack[$this->yyidx]->stateno;
- $expected = self::$yyExpectedTokens[$state];
- if (isset($res3[$state][$token])) {
- if ($res3[$state][$token]) {
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ $expected = self::$yyExpectedTokens[ $state ];
+ if (isset($res3[ $state ][ $token ])) {
+ if ($res3[ $state ][ $token ]) {
return $expected;
}
} else {
- if ($res3[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) {
+ if ($res3[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
return $expected;
}
}
@@ -913,20 +1083,20 @@ class Smarty_Internal_Templateparser
return array_unique($expected);
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno][1];
- $nextstate =
- $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno][0]);
- if (isset(self::$yyExpectedTokens[$nextstate])) {
- $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
- if (isset($res4[$nextstate][$token])) {
- if ($res4[$nextstate][$token]) {
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
+ $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset(self::$yyExpectedTokens[ $nextstate ])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[ $nextstate ]);
+ if (isset($res4[ $nextstate ][ $token ])) {
+ if ($res4[ $nextstate ][ $token ]) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return array_unique($expected);
}
} else {
- if ($res4[$nextstate][$token] =
- in_array($token, self::$yyExpectedTokens[$nextstate], true)
+ if ($res4[ $nextstate ][ $token ] =
+ in_array($token, self::$yyExpectedTokens[ $nextstate ], true)
) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
@@ -939,8 +1109,8 @@ class Smarty_Internal_Templateparser
$this->yyidx ++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno][0];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
@@ -976,13 +1146,13 @@ class Smarty_Internal_Templateparser
if ($token === 0) {
return true; // 0 is not part of this
}
- $state = $this->yystack[$this->yyidx]->stateno;
- if (isset($res[$state][$token])) {
- if ($res[$state][$token]) {
+ $state = $this->yystack[ $this->yyidx ]->stateno;
+ if (isset($res[ $state ][ $token ])) {
+ if ($res[ $state ][ $token ]) {
return true;
}
} else {
- if ($res[$state][$token] = in_array($token, self::$yyExpectedTokens[$state], true)) {
+ if ($res[ $state ][ $token ] = in_array($token, self::$yyExpectedTokens[ $state ], true)) {
return true;
}
}
@@ -1002,18 +1172,19 @@ class Smarty_Internal_Templateparser
return true;
}
$yyruleno = $yyact - self::YYNSTATE;
- $this->yyidx -= self::$yyRuleInfo[$yyruleno][1];
- $nextstate =
- $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, self::$yyRuleInfo[$yyruleno][0]);
- if (isset($res2[$nextstate][$token])) {
- if ($res2[$nextstate][$token]) {
+ $this->yyidx -= self::$yyRuleInfo[ $yyruleno ][ 1 ];
+ $nextstate = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno,
+ self::$yyRuleInfo[ $yyruleno ][ 0 ]);
+ if (isset($res2[ $nextstate ][ $token ])) {
+ if ($res2[ $nextstate ][ $token ]) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
return true;
}
} else {
- if ($res2[$nextstate][$token] =
- (isset(self::$yyExpectedTokens[$nextstate]) && in_array($token, self::$yyExpectedTokens[$nextstate], true))
+ if ($res2[ $nextstate ][ $token ] = (isset(self::$yyExpectedTokens[ $nextstate ]) &&
+ in_array($token, self::$yyExpectedTokens[ $nextstate ],
+ true))
) {
$this->yyidx = $yyidx;
$this->yystack = $stack;
@@ -1025,8 +1196,8 @@ class Smarty_Internal_Templateparser
$this->yyidx ++;
$x = new TP_yyStackEntry;
$x->stateno = $nextstate;
- $x->major = self::$yyRuleInfo[$yyruleno][0];
- $this->yystack[$this->yyidx] = $x;
+ $x->major = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $this->yystack[ $this->yyidx ] = $x;
continue 2;
} elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
$this->yyidx = $yyidx;
@@ -1061,35 +1232,37 @@ class Smarty_Internal_Templateparser
public function yy_find_shift_action($iLookAhead)
{
- $stateno = $this->yystack[$this->yyidx]->stateno;
+ $stateno = $this->yystack[ $this->yyidx ]->stateno;
/* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
- if (!isset(self::$yy_shift_ofst[$stateno])) {
+ if (!isset(self::$yy_shift_ofst[ $stateno ])) {
// no shift actions
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
- $i = self::$yy_shift_ofst[$stateno];
+ $i = self::$yy_shift_ofst[ $stateno ];
if ($i === self::YY_SHIFT_USE_DFLT) {
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
- if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) {
- if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) && ($iFallback =
- self::$yyFallback[$iLookAhead]) != 0
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) {
+ if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback) &&
+ ($iFallback = self::$yyFallback[ $iLookAhead ]) != 0
) {
if ($this->yyTraceFILE) {
- fwrite($this->yyTraceFILE, $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[$iLookAhead] . " => " . $this->yyTokenName[$iFallback] . "\n");
+ fwrite($this->yyTraceFILE,
+ $this->yyTracePrompt . "FALLBACK " . $this->yyTokenName[ $iLookAhead ] . " => " .
+ $this->yyTokenName[ $iFallback ] . "\n");
}
return $this->yy_find_shift_action($iFallback);
}
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
@@ -1097,21 +1270,21 @@ class Smarty_Internal_Templateparser
{
/* $stateno = $this->yystack[$this->yyidx]->stateno; */
- if (!isset(self::$yy_reduce_ofst[$stateno])) {
- return self::$yy_default[$stateno];
+ if (!isset(self::$yy_reduce_ofst[ $stateno ])) {
+ return self::$yy_default[ $stateno ];
}
- $i = self::$yy_reduce_ofst[$stateno];
+ $i = self::$yy_reduce_ofst[ $stateno ];
if ($i == self::YY_REDUCE_USE_DFLT) {
- return self::$yy_default[$stateno];
+ return self::$yy_default[ $stateno ];
}
if ($iLookAhead == self::YYNOCODE) {
return self::YY_NO_ACTION;
}
$i += $iLookAhead;
- if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[$i] != $iLookAhead) {
- return self::$yy_default[$stateno];
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB || self::$yy_lookahead[ $i ] != $iLookAhead) {
+ return self::$yy_default[ $stateno ];
} else {
- return self::$yy_action[$i];
+ return self::$yy_action[ $i ];
}
}
@@ -1142,85 +1315,105 @@ class Smarty_Internal_Templateparser
fprintf($this->yyTraceFILE, "%sShift %d\n", $this->yyTracePrompt, $yyNewState);
fprintf($this->yyTraceFILE, "%sStack:", $this->yyTracePrompt);
for ($i = 1; $i <= $this->yyidx; $i ++) {
- fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[$this->yystack[$i]->major]);
+ fprintf($this->yyTraceFILE, " %s", $this->yyTokenName[ $this->yystack[ $i ]->major ]);
}
fwrite($this->yyTraceFILE, "\n");
}
}
- public static $yyRuleInfo = array(
- array(0 => 61, 1 => 1), array(0 => 62, 1 => 1), array(0 => 62, 1 => 2), array(0 => 62, 1 => 0),
- array(0 => 63, 1 => 1), array(0 => 63, 1 => 1), array(0 => 63, 1 => 1), array(0 => 63, 1 => 1),
- array(0 => 63, 1 => 1), array(0 => 66, 1 => 1), array(0 => 66, 1 => 2), array(0 => 63, 1 => 1),
- array(0 => 63, 1 => 1), array(0 => 65, 1 => 2), array(0 => 65, 1 => 3), array(0 => 67, 1 => 2),
- array(0 => 67, 1 => 0), array(0 => 68, 1 => 1), array(0 => 68, 1 => 1), array(0 => 64, 1 => 2),
- array(0 => 64, 1 => 1), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 2),
- array(0 => 69, 1 => 3), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 4),
- array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 69, 1 => 5), array(0 => 64, 1 => 1),
- array(0 => 69, 1 => 3), array(0 => 69, 1 => 2), array(0 => 69, 1 => 4), array(0 => 69, 1 => 5),
- array(0 => 69, 1 => 6), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 2),
- array(0 => 69, 1 => 3), array(0 => 69, 1 => 8), array(0 => 78, 1 => 2), array(0 => 78, 1 => 1),
- array(0 => 69, 1 => 5), array(0 => 69, 1 => 7), array(0 => 69, 1 => 2), array(0 => 69, 1 => 6),
- array(0 => 69, 1 => 8), array(0 => 69, 1 => 6), array(0 => 69, 1 => 8), array(0 => 69, 1 => 3),
- array(0 => 69, 1 => 4), array(0 => 69, 1 => 2), array(0 => 64, 1 => 1), array(0 => 69, 1 => 2),
- array(0 => 69, 1 => 3), array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 71, 1 => 2),
- array(0 => 71, 1 => 1), array(0 => 71, 1 => 0), array(0 => 81, 1 => 4), array(0 => 81, 1 => 2),
- array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), array(0 => 81, 1 => 2),
- array(0 => 81, 1 => 4), array(0 => 77, 1 => 1), array(0 => 77, 1 => 3), array(0 => 76, 1 => 3),
- array(0 => 76, 1 => 3), array(0 => 76, 1 => 3), array(0 => 76, 1 => 3), array(0 => 73, 1 => 1),
- array(0 => 73, 1 => 1), array(0 => 73, 1 => 3), array(0 => 73, 1 => 3), array(0 => 73, 1 => 3),
- array(0 => 73, 1 => 1), array(0 => 73, 1 => 2), array(0 => 73, 1 => 3), array(0 => 73, 1 => 2),
- array(0 => 73, 1 => 3), array(0 => 73, 1 => 3), array(0 => 73, 1 => 3), array(0 => 73, 1 => 3),
- array(0 => 82, 1 => 7), array(0 => 82, 1 => 7), array(0 => 72, 1 => 1), array(0 => 72, 1 => 2),
- array(0 => 72, 1 => 2), array(0 => 72, 1 => 2), array(0 => 72, 1 => 2), array(0 => 72, 1 => 1),
- array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 2), array(0 => 72, 1 => 2),
- array(0 => 72, 1 => 1), array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 1),
- array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 1), array(0 => 72, 1 => 2),
- array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 86, 1 => 1), array(0 => 86, 1 => 1),
- array(0 => 70, 1 => 1), array(0 => 70, 1 => 1), array(0 => 70, 1 => 3), array(0 => 70, 1 => 1),
- array(0 => 70, 1 => 3), array(0 => 70, 1 => 4), array(0 => 70, 1 => 3), array(0 => 70, 1 => 4),
- array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), array(0 => 91, 1 => 2), array(0 => 91, 1 => 0),
- array(0 => 92, 1 => 2), array(0 => 92, 1 => 2), array(0 => 92, 1 => 4), array(0 => 92, 1 => 2),
- array(0 => 92, 1 => 2), array(0 => 92, 1 => 4), array(0 => 92, 1 => 3), array(0 => 92, 1 => 5),
- array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3),
- array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 2), array(0 => 79, 1 => 1),
- array(0 => 79, 1 => 1), array(0 => 79, 1 => 2), array(0 => 93, 1 => 1), array(0 => 93, 1 => 1),
- array(0 => 93, 1 => 3), array(0 => 90, 1 => 2), array(0 => 94, 1 => 1), array(0 => 94, 1 => 2),
- array(0 => 95, 1 => 3), array(0 => 95, 1 => 3), array(0 => 95, 1 => 5), array(0 => 95, 1 => 6),
- array(0 => 95, 1 => 2), array(0 => 87, 1 => 4), array(0 => 96, 1 => 4), array(0 => 96, 1 => 4),
- array(0 => 97, 1 => 3), array(0 => 97, 1 => 1), array(0 => 97, 1 => 0), array(0 => 75, 1 => 3),
- array(0 => 75, 1 => 2), array(0 => 98, 1 => 3), array(0 => 98, 1 => 2), array(0 => 80, 1 => 2),
- array(0 => 80, 1 => 0), array(0 => 99, 1 => 2), array(0 => 99, 1 => 2), array(0 => 89, 1 => 1),
- array(0 => 89, 1 => 2), array(0 => 89, 1 => 1), array(0 => 89, 1 => 2), array(0 => 89, 1 => 3),
- array(0 => 84, 1 => 1), array(0 => 84, 1 => 1), array(0 => 85, 1 => 1), array(0 => 83, 1 => 3),
- array(0 => 100, 1 => 1), array(0 => 100, 1 => 3), array(0 => 100, 1 => 0), array(0 => 101, 1 => 3),
- array(0 => 101, 1 => 3), array(0 => 101, 1 => 1), array(0 => 88, 1 => 2), array(0 => 88, 1 => 3),
- array(0 => 102, 1 => 2), array(0 => 102, 1 => 1), array(0 => 103, 1 => 3), array(0 => 103, 1 => 3),
- array(0 => 103, 1 => 1), array(0 => 103, 1 => 3), array(0 => 103, 1 => 3), array(0 => 103, 1 => 1),
- array(0 => 103, 1 => 1),
- );
+ public static $yyRuleInfo = array(array(0 => 61, 1 => 1), array(0 => 62, 1 => 1), array(0 => 62, 1 => 2),
+ array(0 => 62, 1 => 0), array(0 => 63, 1 => 1), array(0 => 63, 1 => 1),
+ array(0 => 63, 1 => 1), array(0 => 63, 1 => 1), array(0 => 63, 1 => 1),
+ array(0 => 66, 1 => 1), array(0 => 66, 1 => 2), array(0 => 63, 1 => 1),
+ array(0 => 63, 1 => 1), array(0 => 65, 1 => 2), array(0 => 65, 1 => 3),
+ array(0 => 67, 1 => 2), array(0 => 67, 1 => 0), array(0 => 68, 1 => 1),
+ array(0 => 68, 1 => 1), array(0 => 64, 1 => 2), array(0 => 64, 1 => 1),
+ array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 2),
+ array(0 => 69, 1 => 3), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 4), array(0 => 69, 1 => 4), array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 5), array(0 => 64, 1 => 1), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 2), array(0 => 69, 1 => 4), array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 6), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 2), array(0 => 69, 1 => 3), array(0 => 69, 1 => 8),
+ array(0 => 78, 1 => 2), array(0 => 78, 1 => 1), array(0 => 69, 1 => 5),
+ array(0 => 69, 1 => 7), array(0 => 69, 1 => 2), array(0 => 69, 1 => 6),
+ array(0 => 69, 1 => 8), array(0 => 69, 1 => 6), array(0 => 69, 1 => 8),
+ array(0 => 69, 1 => 3), array(0 => 69, 1 => 4), array(0 => 69, 1 => 2),
+ array(0 => 64, 1 => 1), array(0 => 69, 1 => 2), array(0 => 69, 1 => 3),
+ array(0 => 69, 1 => 4), array(0 => 69, 1 => 5), array(0 => 71, 1 => 2),
+ array(0 => 71, 1 => 1), array(0 => 71, 1 => 0), array(0 => 81, 1 => 4),
+ array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), array(0 => 81, 1 => 2),
+ array(0 => 81, 1 => 2), array(0 => 81, 1 => 2), array(0 => 81, 1 => 4),
+ array(0 => 77, 1 => 1), array(0 => 77, 1 => 3), array(0 => 76, 1 => 3),
+ array(0 => 76, 1 => 3), array(0 => 76, 1 => 3), array(0 => 76, 1 => 3),
+ array(0 => 73, 1 => 1), array(0 => 73, 1 => 1), array(0 => 73, 1 => 3),
+ array(0 => 73, 1 => 3), array(0 => 73, 1 => 3), array(0 => 73, 1 => 1),
+ array(0 => 73, 1 => 2), array(0 => 73, 1 => 3), array(0 => 73, 1 => 2),
+ array(0 => 73, 1 => 3), array(0 => 73, 1 => 3), array(0 => 73, 1 => 3),
+ array(0 => 73, 1 => 3), array(0 => 82, 1 => 7), array(0 => 82, 1 => 7),
+ array(0 => 72, 1 => 1), array(0 => 72, 1 => 2), array(0 => 72, 1 => 2),
+ array(0 => 72, 1 => 2), array(0 => 72, 1 => 2), array(0 => 72, 1 => 1),
+ array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 72, 1 => 2),
+ array(0 => 72, 1 => 2), array(0 => 72, 1 => 1), array(0 => 72, 1 => 1),
+ array(0 => 72, 1 => 3), array(0 => 72, 1 => 1), array(0 => 72, 1 => 1),
+ array(0 => 72, 1 => 3), array(0 => 72, 1 => 1), array(0 => 72, 1 => 2),
+ array(0 => 72, 1 => 1), array(0 => 72, 1 => 3), array(0 => 86, 1 => 1),
+ array(0 => 86, 1 => 1), array(0 => 70, 1 => 1), array(0 => 70, 1 => 1),
+ array(0 => 70, 1 => 3), array(0 => 70, 1 => 1), array(0 => 70, 1 => 3),
+ array(0 => 70, 1 => 4), array(0 => 70, 1 => 3), array(0 => 70, 1 => 4),
+ array(0 => 74, 1 => 2), array(0 => 74, 1 => 2), array(0 => 91, 1 => 2),
+ array(0 => 91, 1 => 0), array(0 => 92, 1 => 2), array(0 => 92, 1 => 2),
+ array(0 => 92, 1 => 4), array(0 => 92, 1 => 2), array(0 => 92, 1 => 2),
+ array(0 => 92, 1 => 4), array(0 => 92, 1 => 3), array(0 => 92, 1 => 5),
+ array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3),
+ array(0 => 92, 1 => 3), array(0 => 92, 1 => 3), array(0 => 92, 1 => 3),
+ array(0 => 92, 1 => 2), array(0 => 79, 1 => 1), array(0 => 79, 1 => 1),
+ array(0 => 79, 1 => 2), array(0 => 93, 1 => 1), array(0 => 93, 1 => 1),
+ array(0 => 93, 1 => 3), array(0 => 90, 1 => 2), array(0 => 94, 1 => 1),
+ array(0 => 94, 1 => 2), array(0 => 95, 1 => 3), array(0 => 95, 1 => 3),
+ array(0 => 95, 1 => 5), array(0 => 95, 1 => 6), array(0 => 95, 1 => 2),
+ array(0 => 87, 1 => 4), array(0 => 96, 1 => 4), array(0 => 96, 1 => 4),
+ array(0 => 97, 1 => 3), array(0 => 97, 1 => 1), array(0 => 97, 1 => 0),
+ array(0 => 75, 1 => 3), array(0 => 75, 1 => 2), array(0 => 98, 1 => 3),
+ array(0 => 98, 1 => 2), array(0 => 80, 1 => 2), array(0 => 80, 1 => 0),
+ array(0 => 99, 1 => 2), array(0 => 99, 1 => 2), array(0 => 89, 1 => 1),
+ array(0 => 89, 1 => 2), array(0 => 89, 1 => 1), array(0 => 89, 1 => 2),
+ array(0 => 89, 1 => 3), array(0 => 84, 1 => 1), array(0 => 84, 1 => 1),
+ array(0 => 85, 1 => 1), array(0 => 83, 1 => 3), array(0 => 100, 1 => 1),
+ array(0 => 100, 1 => 3), array(0 => 100, 1 => 0), array(0 => 101, 1 => 3),
+ array(0 => 101, 1 => 3), array(0 => 101, 1 => 1), array(0 => 88, 1 => 2),
+ array(0 => 88, 1 => 3), array(0 => 102, 1 => 2), array(0 => 102, 1 => 1),
+ array(0 => 103, 1 => 3), array(0 => 103, 1 => 3), array(0 => 103, 1 => 1),
+ array(0 => 103, 1 => 3), array(0 => 103, 1 => 3), array(0 => 103, 1 => 1),
+ array(0 => 103, 1 => 1),);
- public static $yyReduceMap = array(
- 0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 17 => 9, 18 => 9, 43 => 9, 66 => 9,
- 67 => 9, 75 => 9, 76 => 9, 80 => 9, 90 => 9, 95 => 9, 96 => 9, 101 => 9, 103 => 9, 104 => 9, 108 => 9, 110 => 9,
- 115 => 9, 176 => 9, 181 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14, 74 => 14, 15 => 15,
- 91 => 15, 93 => 15, 94 => 15, 122 => 15, 19 => 19, 20 => 20, 21 => 21, 23 => 21, 25 => 21, 22 => 22, 24 => 22,
- 26 => 22, 27 => 27, 28 => 27, 29 => 29, 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36,
- 37 => 37, 38 => 38, 40 => 38, 39 => 39, 41 => 41, 42 => 42, 44 => 44, 45 => 45, 46 => 46, 47 => 47, 49 => 47,
- 48 => 48, 50 => 48, 51 => 51, 52 => 52, 53 => 53, 54 => 54, 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59,
- 60 => 60, 69 => 60, 157 => 60, 161 => 60, 165 => 60, 166 => 60, 61 => 61, 158 => 61, 164 => 61, 62 => 62,
- 63 => 63, 64 => 63, 65 => 65, 142 => 65, 68 => 68, 70 => 70, 71 => 71, 72 => 71, 73 => 73, 77 => 77, 78 => 78,
- 79 => 78, 81 => 81, 107 => 81, 82 => 82, 83 => 83, 84 => 84, 85 => 85, 86 => 86, 87 => 86, 88 => 88, 89 => 89,
- 92 => 92, 97 => 97, 98 => 98, 99 => 99, 100 => 100, 102 => 102, 105 => 105, 106 => 106, 109 => 109, 111 => 111,
- 112 => 112, 113 => 113, 114 => 114, 116 => 116, 117 => 117, 118 => 118, 119 => 119, 120 => 120, 121 => 121,
- 123 => 123, 178 => 123, 124 => 124, 125 => 125, 126 => 126, 127 => 127, 128 => 128, 129 => 129, 137 => 129,
- 130 => 130, 131 => 131, 132 => 132, 133 => 132, 135 => 132, 136 => 132, 134 => 134, 138 => 138, 139 => 139,
- 140 => 140, 182 => 140, 141 => 141, 143 => 143, 144 => 144, 145 => 145, 146 => 146, 147 => 147, 148 => 148,
- 149 => 149, 150 => 150, 151 => 151, 152 => 152, 153 => 153, 154 => 154, 155 => 155, 156 => 156, 159 => 159,
- 160 => 160, 162 => 162, 163 => 163, 167 => 167, 168 => 168, 169 => 169, 170 => 170, 171 => 171, 172 => 172,
- 173 => 173, 174 => 174, 175 => 175, 177 => 177, 179 => 179, 180 => 180, 183 => 183, 184 => 184, 185 => 185,
- 186 => 186, 187 => 186, 189 => 186, 188 => 188, 190 => 190, 191 => 191, 192 => 192,
- );
+ public static $yyReduceMap = array(0 => 0, 1 => 1, 2 => 2, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 17 => 9,
+ 18 => 9, 43 => 9, 66 => 9, 67 => 9, 75 => 9, 76 => 9, 80 => 9, 90 => 9, 95 => 9,
+ 96 => 9, 101 => 9, 103 => 9, 104 => 9, 108 => 9, 110 => 9, 115 => 9, 176 => 9,
+ 181 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 16 => 13, 14 => 14, 74 => 14,
+ 15 => 15, 91 => 15, 93 => 15, 94 => 15, 122 => 15, 19 => 19, 20 => 20, 21 => 21,
+ 23 => 21, 25 => 21, 22 => 22, 24 => 22, 26 => 22, 27 => 27, 28 => 27, 29 => 29,
+ 30 => 30, 31 => 31, 32 => 32, 33 => 33, 34 => 34, 35 => 35, 36 => 36, 37 => 37,
+ 38 => 38, 40 => 38, 39 => 39, 41 => 41, 42 => 42, 44 => 44, 45 => 45, 46 => 46,
+ 47 => 47, 49 => 47, 48 => 48, 50 => 48, 51 => 51, 52 => 52, 53 => 53, 54 => 54,
+ 55 => 55, 56 => 56, 57 => 57, 58 => 58, 59 => 59, 60 => 60, 69 => 60, 157 => 60,
+ 161 => 60, 165 => 60, 166 => 60, 61 => 61, 158 => 61, 164 => 61, 62 => 62,
+ 63 => 63, 64 => 63, 65 => 65, 142 => 65, 68 => 68, 70 => 70, 71 => 71, 72 => 71,
+ 73 => 73, 77 => 77, 78 => 78, 79 => 78, 81 => 81, 107 => 81, 82 => 82, 83 => 83,
+ 84 => 84, 85 => 85, 86 => 86, 87 => 86, 88 => 88, 89 => 89, 92 => 92, 97 => 97,
+ 98 => 98, 99 => 99, 100 => 100, 102 => 102, 105 => 105, 106 => 106, 109 => 109,
+ 111 => 111, 112 => 112, 113 => 113, 114 => 114, 116 => 116, 117 => 117,
+ 118 => 118, 119 => 119, 120 => 120, 121 => 121, 123 => 123, 178 => 123,
+ 124 => 124, 125 => 125, 126 => 126, 127 => 127, 128 => 128, 129 => 129,
+ 137 => 129, 130 => 130, 131 => 131, 132 => 132, 133 => 132, 135 => 132,
+ 136 => 132, 134 => 134, 138 => 138, 139 => 139, 140 => 140, 182 => 140,
+ 141 => 141, 143 => 143, 144 => 144, 145 => 145, 146 => 146, 147 => 147,
+ 148 => 148, 149 => 149, 150 => 150, 151 => 151, 152 => 152, 153 => 153,
+ 154 => 154, 155 => 155, 156 => 156, 159 => 159, 160 => 160, 162 => 162,
+ 163 => 163, 167 => 167, 168 => 168, 169 => 169, 170 => 170, 171 => 171,
+ 172 => 172, 173 => 173, 174 => 174, 175 => 175, 177 => 177, 179 => 179,
+ 180 => 180, 183 => 183, 184 => 184, 185 => 185, 186 => 186, 187 => 186,
+ 189 => 186, 188 => 188, 190 => 190, 191 => 191, 192 => 192,);
#line 218 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r0()
@@ -1233,17 +1426,17 @@ class Smarty_Internal_Templateparser
#line 228 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r1()
{
- if ($this->yystack[$this->yyidx + 0]->minor != null) {
- $this->current_buffer->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor);
+ if ($this->yystack[ $this->yyidx + 0 ]->minor != null) {
+ $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
}
#line 235 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r2()
{
- if ($this->yystack[$this->yyidx + 0]->minor != null) {
+ if ($this->yystack[ $this->yyidx + 0 ]->minor != null) {
// because of possible code injection
- $this->current_buffer->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->current_buffer->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
}
@@ -1251,7 +1444,7 @@ class Smarty_Internal_Templateparser
function yy_r4()
{
if ($this->compiler->has_code) {
- $this->_retvalue = $this->mergePrefixCode($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->mergePrefixCode($this->yystack[ $this->yyidx + 0 ]->minor);
} else {
$this->_retvalue = null;
}
@@ -1262,15 +1455,15 @@ class Smarty_Internal_Templateparser
#line 260 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r5()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Text($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 264 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r6()
{
- $code = $this->compiler->compileTag('private_php', array(
- array('code' => $this->yystack[$this->yyidx + 0]->minor), array('type' => $this->lex->phpType),
- ), array());
+ $code = $this->compiler->compileTag('private_php',
+ array(array('code' => $this->yystack[ $this->yyidx + 0 ]->minor),
+ array('type' => $this->lex->phpType),), array());
if ($this->compiler->has_code && !empty($code)) {
$tmp = '';
foreach ($this->compiler->prefix_code as $code) {
@@ -1289,27 +1482,29 @@ class Smarty_Internal_Templateparser
{
$this->compiler->tag_nocache = true;
$save = $this->template->compiled->has_nocache_code;
- $this->_retvalue =
- new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode("<?php echo '{$this->yystack[$this->yyidx + 0]->minor}';?>\n", $this->compiler, true));
+ $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this,
+ $this->compiler->processNocacheCode("<?php echo '{$this->yystack[$this->yyidx + 0]->minor}';?>\n",
+ $this->compiler,
+ true));
$this->template->compiled->has_nocache_code = $save;
}
#line 282 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r8()
{
- $this->_retvalue = $this->compiler->processText($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->compiler->processText($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 286 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r9()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 290 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r10()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 295 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -1333,81 +1528,97 @@ class Smarty_Internal_Templateparser
#line 308 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r14()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
}
#line 312 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r15()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 328 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r19()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
}
#line 334 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r20()
{
$var =
- trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), ' $');
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
+ ' $');
if (preg_match('/^(.*)(\s+nocache)$/', $var, $match)) {
- $this->_retvalue =
- $this->compiler->compileTag('private_print_expression', array('nocache'), array('value' => $this->compiler->compileVariable('\'' . $match[1] . '\'')));
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression', array('nocache'),
+ array('value' => $this->compiler->compileVariable('\'' .
+ $match[ 1 ] .
+ '\'')));
} else {
- $this->_retvalue =
- $this->compiler->compileTag('private_print_expression', array(), array('value' => $this->compiler->compileVariable('\'' . $var . '\'')));
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(),
+ array('value' => $this->compiler->compileVariable('\'' .
+ $var .
+ '\'')));
}
}
#line 344 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r21()
{
- $this->_retvalue =
- $this->compiler->compileTag('private_print_expression', array(), array('value' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(),
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor));
}
#line 348 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r22()
{
$this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, array('value' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor));
}
#line 371 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r27()
{
- $this->_retvalue = $this->compiler->compileTag('assign', array(
- array('value' => $this->yystack[$this->yyidx + 0]->minor),
- array('var' => '\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\''),
- ));
+ $this->_retvalue = $this->compiler->compileTag('assign', array(array('value' => $this->yystack[ $this->yyidx +
+ 0 ]->minor),
+ array('var' => '\'' .
+ substr($this->yystack[ $this->yyidx +
+ - 2 ]->minor,
+ 1) . '\''),));
}
#line 379 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r29()
{
- $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(
- array('value' => $this->yystack[$this->yyidx + - 1]->minor),
- array('var' => '\'' . substr($this->yystack[$this->yyidx + - 3]->minor, 1) . '\''),
- ), $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag('assign',
+ array_merge(array(array('value' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),
+ array('var' => '\'' .
+ substr($this->yystack[ $this->yyidx +
+ - 3 ]->minor,
+ 1) . '\''),),
+ $this->yystack[ $this->yyidx + 0 ]->minor));
}
#line 383 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r30()
{
- $this->_retvalue = $this->compiler->compileTag('assign', array_merge(array(
- array('value' => $this->yystack[$this->yyidx + - 1]->minor),
- array('var' => $this->yystack[$this->yyidx + - 3]->minor['var']),
- ), $this->yystack[$this->yyidx + 0]->minor), array('smarty_internal_index' => $this->yystack[$this->yyidx + - 3]->minor['smarty_internal_index']));
+ $this->_retvalue = $this->compiler->compileTag('assign',
+ array_merge(array(array('value' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),
+ array('var' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor[ 'var' ]),),
+ $this->yystack[ $this->yyidx + 0 ]->minor),
+ array('smarty_internal_index' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor[ 'smarty_internal_index' ]));
}
#line 388 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r31()
{
$tag =
- trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length));
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length));
if ($tag == 'strip') {
$this->strip = true;
$this->_retvalue = null;;
@@ -1420,7 +1631,7 @@ class Smarty_Internal_Templateparser
$this->compiler->compileTag('private_print_expression', array(), array('value' => $tag));
} else {
if (preg_match('/^(.*)(\s+nocache)$/', $tag, $match)) {
- $this->_retvalue = $this->compiler->compileTag($match[1], array("'nocache'"));
+ $this->_retvalue = $this->compiler->compileTag($match[ 1 ], array("'nocache'"));
} else {
$this->_retvalue = $this->compiler->compileTag($tag, array());
}
@@ -1431,179 +1642,207 @@ class Smarty_Internal_Templateparser
#line 410 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r32()
{
- if (defined($this->yystack[$this->yyidx + - 1]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + - 1 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + - 1]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 1 ]->minor, $this->compiler);
}
$this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, array('value' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor));
} else {
- $this->_retvalue =
- $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor);
}
}
#line 420 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r33()
{
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
- $this->_retvalue =
- $this->compiler->compileTag('private_print_expression', array(), array('value' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression', array(),
+ array('value' => $this->yystack[ $this->yyidx + 0 ]->minor));
} else {
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor, array());
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor, array());
}
}
#line 433 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r34()
{
- if (defined($this->yystack[$this->yyidx + - 2]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + - 2 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + - 2]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + - 2 ]->minor, $this->compiler);
}
$this->_retvalue =
- $this->compiler->compileTag('private_print_expression', $this->yystack[$this->yyidx + 0]->minor, array(
- 'value' => $this->yystack[$this->yyidx + - 2]->minor,
- 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor,
- ));
+ $this->compiler->compileTag('private_print_expression', $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('value' => $this->yystack[ $this->yyidx + - 2 ]->minor,
+ 'modifierlist' => $this->yystack[ $this->yyidx + - 1 ]->minor,));
} else {
- $this->_retvalue =
- '<?php ob_start();?>' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor, $this->yystack[$this->yyidx + 0]->minor) . '<?php echo ';
- $this->_retvalue .= $this->compiler->compileTag('private_modifier', array(), array(
- 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()',
- )) . ';?>';
+ $this->_retvalue = '<?php ob_start();?>' .
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor) . '<?php echo ';
+ $this->_retvalue .= $this->compiler->compileTag('private_modifier', array(),
+ array('modifierlist' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor,
+ 'value' => 'ob_get_clean()',)) . ';?>';
}
}
#line 446 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r35()
{
- $this->_retvalue =
- $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor, $this->yystack[$this->yyidx + 0]->minor, array('object_method' => $this->yystack[$this->yyidx + - 1]->minor));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('object_method' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor));
}
#line 451 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r36()
{
- $this->_retvalue =
- '<?php ob_start();?>' . $this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor, $this->yystack[$this->yyidx + 0]->minor, array('object_method' => $this->yystack[$this->yyidx + - 2]->minor)) . '<?php echo ';
- $this->_retvalue .= $this->compiler->compileTag('private_modifier', array(), array(
- 'modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value' => 'ob_get_clean()',
- )) . ';?>';
+ $this->_retvalue = '<?php ob_start();?>' .
+ $this->compiler->compileTag($this->yystack[ $this->yyidx + - 4 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('object_method' => $this->yystack[ $this->yyidx +
+ - 2 ]->minor)) .
+ '<?php echo ';
+ $this->_retvalue .= $this->compiler->compileTag('private_modifier', array(),
+ array('modifierlist' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor,
+ 'value' => 'ob_get_clean()',)) . ';?>';
}
#line 457 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r37()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length));
- $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' :
- $tag, array(), array('if condition' => $this->yystack[$this->yyidx + 0]->minor));
+ $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length));
+ $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(),
+ array('if condition' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
#line 462 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r38()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor, $this->lex->ldel_length));
- $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' :
- $tag, $this->yystack[$this->yyidx + 0]->minor, array('if condition' => $this->yystack[$this->yyidx + - 1]->minor));
+ $tag = trim(substr($this->yystack[ $this->yyidx + - 2 ]->minor, $this->lex->ldel_length));
+ $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag,
+ $this->yystack[ $this->yyidx + 0 ]->minor,
+ array('if condition' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor));
}
#line 467 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r39()
{
- $tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor, $this->lex->ldel_length));
- $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' :
- $tag, array(), array('if condition' => $this->yystack[$this->yyidx + 0]->minor));
+ $tag = trim(substr($this->yystack[ $this->yyidx + - 1 ]->minor, $this->lex->ldel_length));
+ $this->_retvalue = $this->compiler->compileTag(($tag == 'else if') ? 'elseif' : $tag, array(),
+ array('if condition' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
#line 478 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r41()
{
- $this->_retvalue =
- $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(
- array('start' => $this->yystack[$this->yyidx + - 6]->minor),
- array('ifexp' => $this->yystack[$this->yyidx + - 4]->minor),
- array('var' => $this->yystack[$this->yyidx + - 2]->minor),
- array('step' => $this->yystack[$this->yyidx + - 1]->minor),
- )), 1);
+ $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('start' => $this->yystack[ $this->yyidx +
+ - 6 ]->minor),
+ array('ifexp' => $this->yystack[ $this->yyidx +
+ - 4 ]->minor),
+ array('var' => $this->yystack[ $this->yyidx +
+ - 2 ]->minor),
+ array('step' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),)),
+ 1);
}
#line 482 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r42()
{
- $this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '=' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 490 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r44()
{
- $this->_retvalue =
- $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(
- array('start' => $this->yystack[$this->yyidx + - 3]->minor),
- array('to' => $this->yystack[$this->yyidx + - 1]->minor),
- )), 0);
+ $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('start' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor),
+ array('to' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),)),
+ 0);
}
#line 494 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r45()
{
- $this->_retvalue =
- $this->compiler->compileTag('for', array_merge($this->yystack[$this->yyidx + 0]->minor, array(
- array('start' => $this->yystack[$this->yyidx + - 5]->minor),
- array('to' => $this->yystack[$this->yyidx + - 3]->minor),
- array('step' => $this->yystack[$this->yyidx + - 1]->minor),
- )), 0);
+ $this->_retvalue = $this->compiler->compileTag('for', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('start' => $this->yystack[ $this->yyidx +
+ - 5 ]->minor),
+ array('to' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor),
+ array('step' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),)),
+ 0);
}
#line 499 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r46()
{
- $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->compiler->compileTag('foreach', $this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 504 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r47()
{
- $this->_retvalue =
- $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor, array(
- array('from' => $this->yystack[$this->yyidx + - 3]->minor),
- array('item' => $this->yystack[$this->yyidx + - 1]->minor),
- )));
+ $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('from' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor),
+ array('item' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),)));
}
#line 508 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r48()
{
- $this->_retvalue =
- $this->compiler->compileTag('foreach', array_merge($this->yystack[$this->yyidx + 0]->minor, array(
- array('from' => $this->yystack[$this->yyidx + - 5]->minor),
- array('item' => $this->yystack[$this->yyidx + - 1]->minor),
- array('key' => $this->yystack[$this->yyidx + - 3]->minor),
- )));
+ $this->_retvalue = $this->compiler->compileTag('foreach', array_merge($this->yystack[ $this->yyidx + 0 ]->minor,
+ array(array('from' => $this->yystack[ $this->yyidx +
+ - 5 ]->minor),
+ array('item' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor),
+ array('key' => $this->yystack[ $this->yyidx +
+ - 3 ]->minor),)));
}
#line 521 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r51()
{
- $this->_retvalue =
- $this->compiler->compileTag('setfilter', array(), array('modifier_list' => array(array_merge(array($this->yystack[$this->yyidx + - 1]->minor), $this->yystack[$this->yyidx + 0]->minor))));
+ $this->_retvalue = $this->compiler->compileTag('setfilter', array(),
+ array('modifier_list' => array(array_merge(array($this->yystack[ $this->yyidx +
+ - 1 ]->minor),
+ $this->yystack[ $this->yyidx +
+ 0 ]->minor))));
}
#line 525 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r52()
{
- $this->_retvalue =
- $this->compiler->compileTag('setfilter', array(), array('modifier_list' => array_merge(array(array_merge(array($this->yystack[$this->yyidx + - 2]->minor), $this->yystack[$this->yyidx + - 1]->minor)), $this->yystack[$this->yyidx + 0]->minor)));
+ $this->_retvalue = $this->compiler->compileTag('setfilter', array(),
+ array('modifier_list' => array_merge(array(array_merge(array($this->yystack[ $this->yyidx +
+ - 2 ]->minor),
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor)),
+ $this->yystack[ $this->yyidx +
+ 0 ]->minor)));
}
#line 530 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r53()
{
- $j = strrpos($this->yystack[$this->yyidx + 0]->minor, '.');
- if ($this->yystack[$this->yyidx + 0]->minor[$j + 1] == 'c') {
+ $j = strrpos($this->yystack[ $this->yyidx + 0 ]->minor, '.');
+ if ($this->yystack[ $this->yyidx + 0 ]->minor[ $j + 1 ] == 'c') {
// {$smarty.block.child}
$this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler);
} else {
@@ -1616,7 +1855,8 @@ class Smarty_Internal_Templateparser
function yy_r54()
{
$tag =
- trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), ' /');
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
+ ' /');
if ($tag == 'strip') {
$this->strip = false;
$this->_retvalue = null;
@@ -1628,44 +1868,46 @@ class Smarty_Internal_Templateparser
#line 552 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r55()
{
- $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor . 'close', array());
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + 0 ]->minor . 'close', array());
}
#line 556 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r56()
{
- $this->_retvalue =
- $this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor . 'close', array(), array('modifier_list' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 1 ]->minor . 'close', array(),
+ array('modifier_list' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
#line 561 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r57()
{
- $this->_retvalue =
- $this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor . 'close', array(), array('object_method' => $this->yystack[$this->yyidx + 0]->minor));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(),
+ array('object_method' => $this->yystack[ $this->yyidx +
+ 0 ]->minor));
}
#line 565 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r58()
{
- $this->_retvalue =
- $this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor . 'close', array(), array(
- 'object_method' => $this->yystack[$this->yyidx + - 1]->minor,
- 'modifier_list' => $this->yystack[$this->yyidx + 0]->minor,
- ));
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 3 ]->minor . 'close', array(),
+ array('object_method' => $this->yystack[ $this->yyidx +
+ - 1 ]->minor,
+ 'modifier_list' => $this->yystack[ $this->yyidx +
+ 0 ]->minor,));
}
#line 573 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r59()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
- $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
+ $this->_retvalue[] = $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 579 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r60()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 584 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -1677,15 +1919,16 @@ class Smarty_Internal_Templateparser
#line 589 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r62()
{
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor);
+ array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
} else {
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 2]->minor => '\'' . $this->yystack[$this->yyidx + 0]->minor . '\'');
+ array($this->yystack[ $this->yyidx + - 2 ]->minor => '\'' . $this->yystack[ $this->yyidx + 0 ]->minor .
+ '\'');
}
}
@@ -1693,179 +1936,197 @@ class Smarty_Internal_Templateparser
function yy_r63()
{
$this->_retvalue =
- array(trim($this->yystack[$this->yyidx + - 1]->minor, " =\n\r\t") => $this->yystack[$this->yyidx + 0]->minor);
+ array(trim($this->yystack[ $this->yyidx + - 1 ]->minor, " =\n\r\t") => $this->yystack[ $this->yyidx +
+ 0 ]->minor);
}
#line 608 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r65()
{
- $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\'';
+ $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
}
#line 620 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r68()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor => $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue =
+ array($this->yystack[ $this->yyidx + - 2 ]->minor => $this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 633 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r70()
{
- $this->yystack[$this->yyidx + - 2]->minor[] = $this->yystack[$this->yyidx + 0]->minor;
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor;
+ $this->yystack[ $this->yyidx + - 2 ]->minor[] = $this->yystack[ $this->yyidx + 0 ]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor;
}
#line 638 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r71()
{
- $this->_retvalue = array(
- 'var' => '\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\'',
- 'value' => $this->yystack[$this->yyidx + 0]->minor,
- );
+ $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '\'',
+ 'value' => $this->yystack[ $this->yyidx + 0 ]->minor,);
}
#line 645 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r73()
{
- $this->_retvalue = array(
- 'var' => $this->yystack[$this->yyidx + - 2]->minor, 'value' => $this->yystack[$this->yyidx + 0]->minor,
- );
+ $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 2 ]->minor,
+ 'value' => $this->yystack[ $this->yyidx + 0 ]->minor,);
}
#line 669 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r77()
{
$this->_retvalue =
- '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '://' . $this->yystack[$this->yyidx + 0]->minor . '\')';
+ '$_smarty_tpl->getStreamVariable(\'' . substr($this->yystack[ $this->yyidx + - 2 ]->minor, 1) . '://' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . '\')';
}
#line 674 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r78()
{
$this->_retvalue =
- $this->yystack[$this->yyidx + - 2]->minor . trim($this->yystack[$this->yyidx + - 1]->minor) . $this->yystack[$this->yyidx + 0]->minor;
+ $this->yystack[ $this->yyidx + - 2 ]->minor . trim($this->yystack[ $this->yyidx + - 1 ]->minor) .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 688 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r81()
{
- $this->_retvalue = $this->compiler->compileTag('private_modifier', array(), array(
- 'value' => $this->yystack[$this->yyidx + - 1]->minor,
- 'modifierlist' => $this->yystack[$this->yyidx + 0]->minor,
- ));
+ $this->_retvalue = $this->compiler->compileTag('private_modifier', array(),
+ array('value' => $this->yystack[ $this->yyidx + - 1 ]->minor,
+ 'modifierlist' => $this->yystack[ $this->yyidx +
+ 0 ]->minor,));
}
#line 694 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r82()
{
- $this->_retvalue = (isset($this->yystack[$this->yyidx + - 1]->minor['pre']) ?
- $this->yystack[$this->yyidx + - 1]->minor['pre'] :
- '') . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor['op'] . $this->yystack[$this->yyidx + 0]->minor . (isset($this->yystack[$this->yyidx + - 1]->minor['pre']) ?
- ')' : '');
+ $this->_retvalue = (isset($this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ]) ?
+ $this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ] : '') .
+ $this->yystack[ $this->yyidx + - 2 ]->minor .
+ $this->yystack[ $this->yyidx + - 1 ]->minor[ 'op' ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor .
+ (isset($this->yystack[ $this->yyidx + - 1 ]->minor[ 'pre' ]) ? ')' : '');
}
#line 697 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r83()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + 0 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor . ')';
}
#line 701 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r84()
{
- $this->_retvalue =
- 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . ')';
}
#line 705 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r85()
{
- $this->_retvalue =
- 'in_array(' . $this->yystack[$this->yyidx + - 2]->minor . ',(array)' . $this->yystack[$this->yyidx + 0]->minor . ')';
+ $this->_retvalue = 'in_array(' . $this->yystack[ $this->yyidx + - 2 ]->minor . ',(array)' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . ')';
}
#line 709 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r86()
{
- $this->_retvalue =
- $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + - 1 ]->minor .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 721 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r88()
{
- $this->_retvalue =
- $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 2]->minor, 1) . '\'') . ' : ' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->compiler->compileVariable('\'' .
+ substr($this->yystack[ $this->yyidx +
+ - 2 ]->minor,
+ 1) .
+ '\'') .
+ ' : ' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 725 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r89()
{
$this->_retvalue =
- $this->yystack[$this->yyidx + - 5]->minor . ' ? ' . $this->yystack[$this->yyidx + - 2]->minor . ' : ' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->yystack[ $this->yyidx + - 5 ]->minor . ' ? ' . $this->yystack[ $this->yyidx + - 2 ]->minor . ' : ' .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 740 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r92()
{
- $this->_retvalue = '!' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '!' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 761 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r97()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 2 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 765 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r98()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.';
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . '.';
}
#line 769 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r99()
{
- $this->_retvalue = '.' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 774 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r100()
{
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
} else {
- $this->_retvalue = '\'' . $this->yystack[$this->yyidx + 0]->minor . '\'';
+ $this->_retvalue = '\'' . $this->yystack[ $this->yyidx + 0 ]->minor . '\'';
}
}
#line 791 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r102()
{
- $this->_retvalue = "(" . $this->yystack[$this->yyidx + - 1]->minor . ")";
+ $this->_retvalue = "(" . $this->yystack[ $this->yyidx + - 1 ]->minor . ")";
}
#line 806 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r105()
{
$prefixVar = $this->compiler->getNewPrefixVariable();
- if ($this->yystack[$this->yyidx + - 2]->minor['var'] == '\'smarty\'') {
- $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index']) . ';?>');
+ if ($this->yystack[ $this->yyidx + - 2 ]->minor[ 'var' ] == '\'smarty\'') {
+ $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' .
+ $this->compiler->compileTag('private_special_variable', array(),
+ $this->yystack[ $this->yyidx +
+ - 2 ]->minor[ 'smarty_internal_index' ]) .
+ ';?>');
} else {
- $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 2]->minor['var']) . $this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index'] . ';?>');
+ $this->compiler->appendPrefixCode("<?php $prefixVar" . ' = ' .
+ $this->compiler->compileVariable($this->yystack[ $this->yyidx +
+ - 2 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + - 2 ]->minor[ 'smarty_internal_index' ] .
+ ';?>');
}
- $this->_retvalue =
- $prefixVar . '::' . $this->yystack[$this->yyidx + 0]->minor[0] . $this->yystack[$this->yyidx + 0]->minor[1];
+ $this->_retvalue = $prefixVar . '::' . $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
}
#line 817 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r106()
{
$prefixVar = $this->compiler->getNewPrefixVariable();
- $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[$this->yyidx + 0]->minor);
+ $tmp = $this->compiler->appendCode('<?php ob_start();?>', $this->yystack[ $this->yyidx + 0 ]->minor);
$this->compiler->appendPrefixCode($this->compiler->appendCode($tmp, "<?php $prefixVar" . '=ob_get_clean();?>'));
$this->_retvalue = $prefixVar;
}
@@ -1873,101 +2134,105 @@ class Smarty_Internal_Templateparser
#line 834 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r109()
{
- if (!in_array(strtolower($this->yystack[$this->yyidx + - 2]->minor), array(
- 'self', 'parent',
- )) && (!$this->security || $this->security->isTrustedStaticClassAccess($this->yystack[$this->yyidx + - 2]->minor, $this->yystack[$this->yyidx + 0]->minor, $this->compiler))
+ if (!in_array(strtolower($this->yystack[ $this->yyidx + - 2 ]->minor), array('self', 'parent',)) &&
+ (!$this->security ||
+ $this->security->isTrustedStaticClassAccess($this->yystack[ $this->yyidx + - 2 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler))
) {
- if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor])) {
+ if (isset($this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ])) {
$this->_retvalue =
- $this->smarty->registered_classes[$this->yystack[$this->yyidx + - 2]->minor] . '::' . $this->yystack[$this->yyidx + 0]->minor[0] . $this->yystack[$this->yyidx + 0]->minor[1];
+ $this->smarty->registered_classes[ $this->yystack[ $this->yyidx + - 2 ]->minor ] . '::' .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] . $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
} else {
- $this->_retvalue =
- $this->yystack[$this->yyidx + - 2]->minor . '::' . $this->yystack[$this->yyidx + 0]->minor[0] . $this->yystack[$this->yyidx + 0]->minor[1];
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 2 ]->minor . '::' .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 0 ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 1 ];
}
} else {
- $this->compiler->trigger_template_error("static class '" . $this->yystack[$this->yyidx + - 2]->minor . "' is undefined or not allowed by security setting");
+ $this->compiler->trigger_template_error("static class '" . $this->yystack[ $this->yyidx + - 2 ]->minor .
+ "' is undefined or not allowed by security setting");
}
}
#line 853 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r111()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 864 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r112()
{
$this->_retvalue =
- $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'');
+ $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'');
}
#line 867 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r113()
{
- if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') {
- $smarty_var =
- $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);
+ if ($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ] == '\'smarty\'') {
+ $smarty_var = $this->compiler->compileTag('private_special_variable', array(),
+ $this->yystack[ $this->yyidx +
+ 0 ]->minor[ 'smarty_internal_index' ]);
$this->_retvalue = $smarty_var;
} else {
// used for array reset,next,prev,end,current
- $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var'];
- $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
- $this->_retvalue =
- $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) . $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ $this->last_variable = $this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ];
+ $this->last_index = $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
+ $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + 0 ]->minor[ 'smarty_internal_index' ];
}
}
#line 880 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r114()
{
- $this->_retvalue =
- '$_smarty_tpl->tpl_vars[' . $this->yystack[$this->yyidx + - 2]->minor . ']->' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '$_smarty_tpl->tpl_vars[' . $this->yystack[ $this->yyidx + - 2 ]->minor . ']->' .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 890 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r116()
{
$this->_retvalue =
- $this->compiler->compileConfigVariable("'" . $this->yystack[$this->yyidx + - 1]->minor . "'");
+ $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 1 ]->minor . "'");
}
#line 894 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r117()
{
- $this->_retvalue =
- '(is_array($tmp = ' . $this->compiler->compileConfigVariable("'" . $this->yystack[$this->yyidx + - 2]->minor . "'") . ') ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' :null)';
+ $this->_retvalue = '(is_array($tmp = ' .
+ $this->compiler->compileConfigVariable("'" . $this->yystack[ $this->yyidx + - 2 ]->minor .
+ "'") . ') ? $tmp' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . ' :null)';
}
#line 898 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r118()
{
- $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + - 1]->minor);
+ $this->_retvalue = $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 1 ]->minor);
}
#line 902 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r119()
{
$this->_retvalue =
- '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[$this->yyidx + - 2]->minor) . ') ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' : null)';
+ '(is_array($tmp = ' . $this->compiler->compileConfigVariable($this->yystack[ $this->yyidx + - 2 ]->minor) .
+ ') ? $tmp' . $this->yystack[ $this->yyidx + 0 ]->minor . ' : null)';
}
#line 906 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r120()
{
- $this->_retvalue = array(
- 'var' => '\'' . substr($this->yystack[$this->yyidx + - 1]->minor, 1) . '\'',
- 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor,
- );
+ $this->_retvalue = array('var' => '\'' . substr($this->yystack[ $this->yyidx + - 1 ]->minor, 1) . '\'',
+ 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor,);
}
#line 909 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r121()
{
- $this->_retvalue = array(
- 'var' => $this->yystack[$this->yyidx + - 1]->minor,
- 'smarty_internal_index' => $this->yystack[$this->yyidx + 0]->minor,
- );
+ $this->_retvalue = array('var' => $this->yystack[ $this->yyidx + - 1 ]->minor,
+ 'smarty_internal_index' => $this->yystack[ $this->yyidx + 0 ]->minor,);
}
#line 922 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -1980,72 +2245,82 @@ class Smarty_Internal_Templateparser
function yy_r124()
{
$this->_retvalue =
- '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'') . ']';
+ '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'') .
+ ']';
}
#line 931 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r125()
{
- $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + 0]->minor) . ']';
+ $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + 0 ]->minor) . ']';
}
#line 935 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r126()
{
- $this->_retvalue =
- '[' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 2]->minor) . '->' . $this->yystack[$this->yyidx + 0]->minor . ']';
+ $this->_retvalue = '[' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 2 ]->minor) . '->' .
+ $this->yystack[ $this->yyidx + 0 ]->minor . ']';
}
#line 939 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r127()
{
- if (defined($this->yystack[$this->yyidx + 0]->minor)) {
+ if (defined($this->yystack[ $this->yyidx + 0 ]->minor)) {
if ($this->security) {
- $this->security->isTrustedConstant($this->yystack[$this->yyidx + 0]->minor, $this->compiler);
+ $this->security->isTrustedConstant($this->yystack[ $this->yyidx + 0 ]->minor, $this->compiler);
}
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + 0]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']';
} else {
- $this->_retvalue = "['" . $this->yystack[$this->yyidx + 0]->minor . "']";
+ $this->_retvalue = "['" . $this->yystack[ $this->yyidx + 0 ]->minor . "']";
}
}
#line 950 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r128()
{
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + 0]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + 0 ]->minor . ']';
}
#line 955 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r129()
{
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']';
}
#line 960 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r130()
{
- $this->_retvalue =
- '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + - 1]->minor . '\'][\'index\']') . ']';
+ $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' .
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor .
+ '\'][\'index\']') .
+ ']';
}
#line 964 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r131()
{
- $this->_retvalue =
- '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + - 3]->minor . '\'][\'' . $this->yystack[$this->yyidx + - 1]->minor . '\']') . ']';
+ $this->_retvalue = '[' . $this->compiler->compileTag('private_special_variable', array(), '[\'section\'][\'' .
+ $this->yystack[ $this->yyidx +
+ - 3 ]->minor .
+ '\'][\'' .
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor .
+ '\']') . ']';
}
#line 967 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r132()
{
- $this->_retvalue = '[' . $this->yystack[$this->yyidx + - 1]->minor . ']';
+ $this->_retvalue = '[' . $this->yystack[ $this->yyidx + - 1 ]->minor . ']';
}
#line 973 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r134()
{
- $this->_retvalue =
- '[' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 1]->minor, 1) . '\'') . ']';;
+ $this->_retvalue = '[' . $this->compiler->compileVariable('\'' .
+ substr($this->yystack[ $this->yyidx + - 1 ]->minor,
+ 1) . '\'') . ']';;
}
#line 989 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -2057,7 +2332,7 @@ class Smarty_Internal_Templateparser
#line 999 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r139()
{
- $this->_retvalue = '\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\'';
+ $this->_retvalue = '\'' . substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) . '\'';
}
#line 1003 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -2069,54 +2344,60 @@ class Smarty_Internal_Templateparser
#line 1008 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r141()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 1 ]->minor . '.' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1016 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r143()
{
$var =
- trim(substr($this->yystack[$this->yyidx + 0]->minor, $this->lex->ldel_length, - $this->lex->rdel_length), ' $');
+ trim(substr($this->yystack[ $this->yyidx + 0 ]->minor, $this->lex->ldel_length, - $this->lex->rdel_length),
+ ' $');
$this->_retvalue = $this->compiler->compileVariable('\'' . $var . '\'');
}
#line 1022 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r144()
{
- $this->_retvalue = '(' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue = '(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')';
}
#line 1029 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r145()
{
- if ($this->yystack[$this->yyidx + - 1]->minor['var'] == '\'smarty\'') {
- $this->_retvalue =
- $this->compiler->compileTag('private_special_variable', array(), $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index']) . $this->yystack[$this->yyidx + 0]->minor;
+ if ($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ] == '\'smarty\'') {
+ $this->_retvalue = $this->compiler->compileTag('private_special_variable', array(),
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor[ 'smarty_internal_index' ]) .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
} else {
- $this->_retvalue =
- $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) . $this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor[ 'var' ]) .
+ $this->yystack[ $this->yyidx + - 1 ]->minor[ 'smarty_internal_index' ] .
+ $this->yystack[ $this->yyidx + 0 ]->minor;
}
}
#line 1038 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r146()
{
- $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1043 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r147()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1048 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r148()
{
- if ($this->security && substr($this->yystack[$this->yyidx + - 1]->minor, 0, 1) == '_') {
+ if ($this->security && substr($this->yystack[ $this->yyidx + - 1 ]->minor, 0, 1) == '_') {
$this->compiler->trigger_template_error(self::Err1);
}
- $this->_retvalue = '->' . $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ '->' . $this->yystack[ $this->yyidx + - 1 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1055 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -2125,8 +2406,8 @@ class Smarty_Internal_Templateparser
if ($this->security) {
$this->compiler->trigger_template_error(self::Err2);
}
- $this->_retvalue =
- '->{' . $this->compiler->compileVariable($this->yystack[$this->yyidx + - 1]->minor) . $this->yystack[$this->yyidx + 0]->minor . '}';
+ $this->_retvalue = '->{' . $this->compiler->compileVariable($this->yystack[ $this->yyidx + - 1 ]->minor) .
+ $this->yystack[ $this->yyidx + 0 ]->minor . '}';
}
#line 1062 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -2136,7 +2417,7 @@ class Smarty_Internal_Templateparser
$this->compiler->trigger_template_error(self::Err2);
}
$this->_retvalue =
- '->{' . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}';
+ '->{' . $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor . '}';
}
#line 1069 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -2145,51 +2426,63 @@ class Smarty_Internal_Templateparser
if ($this->security) {
$this->compiler->trigger_template_error(self::Err2);
}
- $this->_retvalue =
- '->{\'' . $this->yystack[$this->yyidx + - 4]->minor . '\'.' . $this->yystack[$this->yyidx + - 2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}';
+ $this->_retvalue = '->{\'' . $this->yystack[ $this->yyidx + - 4 ]->minor . '\'.' .
+ $this->yystack[ $this->yyidx + - 2 ]->minor . $this->yystack[ $this->yyidx + 0 ]->minor .
+ '}';
}
#line 1077 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r152()
{
- $this->_retvalue = '->' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = '->' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1085 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r153()
{
- if (!$this->security || $this->security->isTrustedPhpFunction($this->yystack[$this->yyidx + - 3]->minor, $this->compiler)) {
- if (strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + - 3]->minor, 'array') === 0 || is_callable($this->yystack[$this->yyidx + - 3]->minor)) {
- $func_name = strtolower($this->yystack[$this->yyidx + - 3]->minor);
+ if (!$this->security ||
+ $this->security->isTrustedPhpFunction($this->yystack[ $this->yyidx + - 3 ]->minor, $this->compiler)
+ ) {
+ if (strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'isset') === 0 ||
+ strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'empty') === 0 ||
+ strcasecmp($this->yystack[ $this->yyidx + - 3 ]->minor, 'array') === 0 ||
+ is_callable($this->yystack[ $this->yyidx + - 3 ]->minor)
+ ) {
+ $func_name = strtolower($this->yystack[ $this->yyidx + - 3 ]->minor);
if ($func_name == 'isset') {
- if (count($this->yystack[$this->yyidx + - 1]->minor) == 0) {
+ if (count($this->yystack[ $this->yyidx + - 1 ]->minor) == 0) {
$this->compiler->trigger_template_error('Illegal number of paramer in "isset()"');
}
- $par = implode(',', $this->yystack[$this->yyidx + - 1]->minor);
- if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable', strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0) {
+ $par = implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor);
+ if (strncasecmp($par, '$_smarty_tpl->smarty->ext->_config->_getConfigVariable',
+ strlen('$_smarty_tpl->smarty->ext->_config->_getConfigVariable')) === 0
+ ) {
$prefixVar = $this->compiler->getNewPrefixVariable();
- $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . str_replace(')', ', false)', $par) . ';?>');
+ $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' .
+ str_replace(')', ', false)', $par) . ';?>');
$isset_par = $prefixVar;
} else {
$isset_par = str_replace("')->value", "',null,true,false)->value", $par);
}
- $this->_retvalue = $this->yystack[$this->yyidx + - 3]->minor . "(" . $isset_par . ")";
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" . $isset_par . ")";
} elseif (in_array($func_name, array('empty', 'reset', 'current', 'end', 'prev', 'next'))) {
- if (count($this->yystack[$this->yyidx + - 1]->minor) != 1) {
+ if (count($this->yystack[ $this->yyidx + - 1 ]->minor) != 1) {
$this->compiler->trigger_template_error('Illegal number of paramer in "empty()"');
}
if ($func_name == 'empty') {
- $this->_retvalue =
- $func_name . '(' . str_replace("')->value", "',null,true,false)->value", $this->yystack[$this->yyidx + - 1]->minor[0]) . ')';
+ $this->_retvalue = $func_name . '(' . str_replace("')->value", "',null,true,false)->value",
+ $this->yystack[ $this->yyidx +
+ - 1 ]->minor[ 0 ]) . ')';
} else {
- $this->_retvalue = $func_name . '(' . $this->yystack[$this->yyidx + - 1]->minor[0] . ')';
+ $this->_retvalue = $func_name . '(' . $this->yystack[ $this->yyidx + - 1 ]->minor[ 0 ] . ')';
}
} else {
- $this->_retvalue =
- $this->yystack[$this->yyidx + - 3]->minor . "(" . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")";
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" .
+ implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")";
}
} else {
- $this->compiler->trigger_template_error("unknown function \"" . $this->yystack[$this->yyidx + - 3]->minor . "\"");
+ $this->compiler->trigger_template_error("unknown function \"" .
+ $this->yystack[ $this->yyidx + - 3 ]->minor . "\"");
}
}
}
@@ -2197,11 +2490,11 @@ class Smarty_Internal_Templateparser
#line 1124 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r154()
{
- if ($this->security && substr($this->yystack[$this->yyidx + - 3]->minor, 0, 1) == '_') {
+ if ($this->security && substr($this->yystack[ $this->yyidx + - 3 ]->minor, 0, 1) == '_') {
$this->compiler->trigger_template_error(self::Err1);
}
- $this->_retvalue =
- $this->yystack[$this->yyidx + - 3]->minor . "(" . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ")";
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 3 ]->minor . "(" .
+ implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ")";
}
#line 1131 "../smarty/lexer/smarty_internal_templateparser.y"
@@ -2211,189 +2504,198 @@ class Smarty_Internal_Templateparser
$this->compiler->trigger_template_error(self::Err2);
}
$prefixVar = $this->compiler->getNewPrefixVariable();
- $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . $this->compiler->compileVariable('\'' . substr($this->yystack[$this->yyidx + - 3]->minor, 1) . '\'') . ';?>');
- $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[$this->yyidx + - 1]->minor) . ')';
+ $this->compiler->appendPrefixCode("<?php $prefixVar" . '=' . $this->compiler->compileVariable('\'' .
+ substr($this->yystack[ $this->yyidx +
+ - 3 ]->minor,
+ 1) .
+ '\'') . ';?>');
+ $this->_retvalue = $prefixVar . '(' . implode(',', $this->yystack[ $this->yyidx + - 1 ]->minor) . ')';
}
#line 1142 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r156()
{
$this->_retvalue =
- array_merge($this->yystack[$this->yyidx + - 2]->minor, array($this->yystack[$this->yyidx + 0]->minor));
+ array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor));
}
#line 1159 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r159()
{
- $this->_retvalue =
- array_merge($this->yystack[$this->yyidx + - 2]->minor, array(array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor)));
+ $this->_retvalue = array_merge($this->yystack[ $this->yyidx + - 2 ]->minor,
+ array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor,
+ $this->yystack[ $this->yyidx + 0 ]->minor)));
}
#line 1163 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r160()
{
$this->_retvalue =
- array(array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor));
+ array(array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor));
}
#line 1171 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r162()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 1179 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r163()
{
$this->_retvalue =
- array_merge($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ array_merge($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 1198 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r167()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '', 'method');
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '', 'method');
}
#line 1203 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r168()
{
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'method');
+ array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'method');
}
#line 1208 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r169()
{
- $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor, '');
+ $this->_retvalue = array($this->yystack[ $this->yyidx + 0 ]->minor, '');
}
#line 1213 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r170()
{
$this->_retvalue =
- array($this->yystack[$this->yyidx + - 1]->minor, $this->yystack[$this->yyidx + 0]->minor, 'property');
+ array($this->yystack[ $this->yyidx + - 1 ]->minor, $this->yystack[ $this->yyidx + 0 ]->minor, 'property');
}
#line 1218 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r171()
{
- $this->_retvalue = array(
- $this->yystack[$this->yyidx + - 2]->minor,
- $this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx + 0]->minor, 'property',
- );
+ $this->_retvalue = array($this->yystack[ $this->yyidx + - 2 ]->minor,
+ $this->yystack[ $this->yyidx + - 1 ]->minor .
+ $this->yystack[ $this->yyidx + 0 ]->minor, 'property',);
}
#line 1224 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r172()
{
- $this->_retvalue['op'] = ' ' . trim($this->yystack[$this->yyidx + 0]->minor) . ' ';
+ $this->_retvalue[ 'op' ] = ' ' . trim($this->yystack[ $this->yyidx + 0 ]->minor) . ' ';
}
#line 1228 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r173()
{
- static $lops = array(
- 'eq' => array('op' => ' == ', 'pre' => null), 'ne' => array('op' => ' != ', 'pre' => null),
- 'neq' => array('op' => ' != ', 'pre' => null), 'gt' => array('op' => ' > ', 'pre' => null),
- 'ge' => array('op' => ' >= ', 'pre' => null), 'gte' => array('op' => ' >= ', 'pre' => null),
- 'lt' => array('op' => ' < ', 'pre' => null), 'le' => array('op' => ' <= ', 'pre' => null),
- 'lte' => array('op' => ' <= ', 'pre' => null), 'mod' => array('op' => ' % ', 'pre' => null),
- 'and' => array('op' => ' && ', 'pre' => null), 'or' => array('op' => ' || ', 'pre' => null),
- 'xor' => array('op' => ' xor ', 'pre' => null), 'isdivby' => array('op' => ' % ', 'pre' => '!('),
- 'isnotdivby' => array('op' => ' % ', 'pre' => '('), 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '),
- 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
- 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
- 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),
- );
- $op = strtolower(preg_replace('/\s*/', '', $this->yystack[$this->yyidx + 0]->minor));
- $this->_retvalue = $lops[$op];
+ static $lops = array('eq' => array('op' => ' == ', 'pre' => null), 'ne' => array('op' => ' != ', 'pre' => null),
+ 'neq' => array('op' => ' != ', 'pre' => null), 'gt' => array('op' => ' > ', 'pre' => null),
+ 'ge' => array('op' => ' >= ', 'pre' => null),
+ 'gte' => array('op' => ' >= ', 'pre' => null), 'lt' => array('op' => ' < ', 'pre' => null),
+ 'le' => array('op' => ' <= ', 'pre' => null),
+ 'lte' => array('op' => ' <= ', 'pre' => null),
+ 'mod' => array('op' => ' % ', 'pre' => null),
+ 'and' => array('op' => ' && ', 'pre' => null),
+ 'or' => array('op' => ' || ', 'pre' => null),
+ 'xor' => array('op' => ' xor ', 'pre' => null),
+ 'isdivby' => array('op' => ' % ', 'pre' => '!('),
+ 'isnotdivby' => array('op' => ' % ', 'pre' => '('),
+ 'isevenby' => array('op' => ' / ', 'pre' => '!(1 & '),
+ 'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
+ 'isoddby' => array('op' => ' / ', 'pre' => '(1 & '),
+ 'isnotoddby' => array('op' => ' / ', 'pre' => '!(1 & '),);
+ $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
+ $this->_retvalue = $lops[ $op ];
}
#line 1254 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r174()
{
- static $scond = array(
- 'iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',
- );
- $op = strtolower(str_replace(' ', '', $this->yystack[$this->yyidx + 0]->minor));
- $this->_retvalue = $scond[$op];
+ static $scond =
+ array('iseven' => '!(1 & ', 'isnoteven' => '(1 & ', 'isodd' => '(1 & ', 'isnotodd' => '!(1 & ',);
+ $op = strtolower(str_replace(' ', '', $this->yystack[ $this->yyidx + 0 ]->minor));
+ $this->_retvalue = $scond[ $op ];
}
#line 1268 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r175()
{
- $this->_retvalue = 'array(' . $this->yystack[$this->yyidx + - 1]->minor . ')';
+ $this->_retvalue = 'array(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')';
}
#line 1276 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r177()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 2 ]->minor . ',' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1284 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r179()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor . '=>' . $this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue =
+ $this->yystack[ $this->yyidx + - 2 ]->minor . '=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1288 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r180()
{
$this->_retvalue =
- '\'' . $this->yystack[$this->yyidx + - 2]->minor . '\'=>' . $this->yystack[$this->yyidx + 0]->minor;
+ '\'' . $this->yystack[ $this->yyidx + - 2 ]->minor . '\'=>' . $this->yystack[ $this->yyidx + 0 ]->minor;
}
#line 1304 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r183()
{
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor->to_smarty_php($this);
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor->to_smarty_php($this);
}
#line 1309 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r184()
{
- $this->yystack[$this->yyidx + - 1]->minor->append_subtree($this, $this->yystack[$this->yyidx + 0]->minor);
- $this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
+ $this->yystack[ $this->yyidx + - 1 ]->minor->append_subtree($this, $this->yystack[ $this->yyidx + 0 ]->minor);
+ $this->_retvalue = $this->yystack[ $this->yyidx + - 1 ]->minor;
}
#line 1314 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r185()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Dq($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 1318 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r186()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[$this->yyidx + - 1]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)' . $this->yystack[ $this->yyidx + - 1 ]->minor);
}
#line 1326 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r188()
{
- $this->_retvalue =
- new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '\']->value');
+ $this->_retvalue = new Smarty_Internal_ParseTree_Code('(string)$_smarty_tpl->tpl_vars[\'' .
+ substr($this->yystack[ $this->yyidx + 0 ]->minor, 1) .
+ '\']->value');
}
#line 1334 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r190()
{
$this->_retvalue =
- new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[$this->yyidx + - 1]->minor . ')');
+ new Smarty_Internal_ParseTree_Code('(string)(' . $this->yystack[ $this->yyidx + - 1 ]->minor . ')');
}
#line 1338 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r191()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_Tag($this, $this->yystack[ $this->yyidx + 0 ]->minor);
}
#line 1342 "../smarty/lexer/smarty_internal_templateparser.y"
function yy_r192()
{
- $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = new Smarty_Internal_ParseTree_DqContent($this->yystack[ $this->yyidx + 0 ]->minor);
}
private $_retvalue;
@@ -2401,24 +2703,25 @@ class Smarty_Internal_Templateparser
public function yy_reduce($yyruleno)
{
if ($this->yyTraceFILE && $yyruleno >= 0 && $yyruleno < count(self::$yyRuleName)) {
- fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno, self::$yyRuleName[$yyruleno]);
+ fprintf($this->yyTraceFILE, "%sReduce (%d) [%s].\n", $this->yyTracePrompt, $yyruleno,
+ self::$yyRuleName[ $yyruleno ]);
}
$this->_retvalue = $yy_lefthand_side = null;
- if (isset(self::$yyReduceMap[$yyruleno])) {
+ if (isset(self::$yyReduceMap[ $yyruleno ])) {
// call the action
$this->_retvalue = null;
- $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $this->{'yy_r' . self::$yyReduceMap[ $yyruleno ]}();
$yy_lefthand_side = $this->_retvalue;
}
- $yygoto = self::$yyRuleInfo[$yyruleno][0];
- $yysize = self::$yyRuleInfo[$yyruleno][1];
+ $yygoto = self::$yyRuleInfo[ $yyruleno ][ 0 ];
+ $yysize = self::$yyRuleInfo[ $yyruleno ][ 1 ];
$this->yyidx -= $yysize;
for ($i = $yysize; $i; $i --) {
// pop all of the right-hand side parameters
array_pop($this->yystack);
}
- $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
+ $yyact = $this->yy_find_reduce_action($this->yystack[ $this->yyidx ]->stateno, $yygoto);
if ($yyact < self::YYNSTATE) {
if (!$this->yyTraceFILE && $yysize) {
$this->yyidx ++;
@@ -2426,7 +2729,7 @@ class Smarty_Internal_Templateparser
$x->stateno = $yyact;
$x->major = $yygoto;
$x->minor = $yy_lefthand_side;
- $this->yystack[$this->yyidx] = $x;
+ $this->yystack[ $this->yyidx ] = $x;
} else {
$this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
}
@@ -2485,7 +2788,7 @@ class Smarty_Internal_Templateparser
$yyendofinput = ($yymajor == 0);
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[$yymajor]);
+ fprintf($this->yyTraceFILE, "%sInput %s\n", $this->yyTracePrompt, $this->yyTokenName[ $yymajor ]);
}
do {
@@ -2512,16 +2815,17 @@ class Smarty_Internal_Templateparser
if ($this->yyerrcnt < 0) {
$this->yy_syntax_error($yymajor, $yytokenvalue);
}
- $yymx = $this->yystack[$this->yyidx]->major;
+ $yymx = $this->yystack[ $this->yyidx ]->major;
if ($yymx == self::YYERRORSYMBOL || $yyerrorhit) {
if ($this->yyTraceFILE) {
- fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt, $this->yyTokenName[$yymajor]);
+ fprintf($this->yyTraceFILE, "%sDiscard input token %s\n", $this->yyTracePrompt,
+ $this->yyTokenName[ $yymajor ]);
}
$this->yy_destructor($yymajor, $yytokenvalue);
$yymajor = self::YYNOCODE;
} else {
- while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL && ($yyact =
- $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) {
+ while ($this->yyidx >= 0 && $yymx != self::YYERRORSYMBOL &&
+ ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE) {
$this->yy_pop_parser_stack();
}
if ($this->yyidx < 0 || $yymajor == 0) {
diff --git a/libs/sysplugins/smarty_internal_testinstall.php b/libs/sysplugins/smarty_internal_testinstall.php
index e91f2338..9d34728f 100644
--- a/libs/sysplugins/smarty_internal_testinstall.php
+++ b/libs/sysplugins/smarty_internal_testinstall.php
@@ -359,149 +359,140 @@ class Smarty_Internal_TestInstall
// test if sysplugins are available
$source = SMARTY_SYSPLUGINS_DIR;
if (is_dir($source)) {
- $expectedSysplugins = array('smartycompilerexception.php' => true,
- 'smartyexception.php' => true,
- 'smarty_cacheresource.php' => true,
- 'smarty_cacheresource_custom.php' => true,
- 'smarty_cacheresource_keyvaluestore.php' => true,
- 'smarty_data.php' => true,
- 'smarty_internal_block.php' => true,
- 'smarty_internal_cacheresource_file.php' => true,
- 'smarty_internal_compilebase.php' => true,
- 'smarty_internal_compile_append.php' => true,
- 'smarty_internal_compile_assign.php' => true,
- 'smarty_internal_compile_block.php' => true,
- 'smarty_internal_compile_break.php' => true,
- 'smarty_internal_compile_call.php' => true,
- 'smarty_internal_compile_capture.php' => true,
- 'smarty_internal_compile_config_load.php' => true,
- 'smarty_internal_compile_continue.php' => true,
- 'smarty_internal_compile_debug.php' => true,
- 'smarty_internal_compile_eval.php' => true,
- 'smarty_internal_compile_extends.php' => true,
- 'smarty_internal_compile_for.php' => true,
- 'smarty_internal_compile_foreach.php' => true,
- 'smarty_internal_compile_function.php' => true,
- 'smarty_internal_compile_if.php' => true,
- 'smarty_internal_compile_include.php' => true,
- 'smarty_internal_compile_include_php.php' => true,
- 'smarty_internal_compile_insert.php' => true,
- 'smarty_internal_compile_ldelim.php' => true,
- 'smarty_internal_compile_nocache.php' => true,
- 'smarty_internal_compile_private_block_plugin.php' => true,
- 'smarty_internal_compile_private_foreachsection.php' => true,
- 'smarty_internal_compile_private_function_plugin.php' => true,
- 'smarty_internal_compile_private_modifier.php' => true,
+ $expectedSysplugins = array('smartycompilerexception.php' => true, 'smartyexception.php' => true,
+ 'smarty_cacheresource.php' => true, 'smarty_cacheresource_custom.php' => true,
+ 'smarty_cacheresource_keyvaluestore.php' => true, 'smarty_data.php' => true,
+ 'smarty_internal_block.php' => true,
+ 'smarty_internal_cacheresource_file.php' => true,
+ 'smarty_internal_compilebase.php' => true,
+ 'smarty_internal_compile_append.php' => true,
+ 'smarty_internal_compile_assign.php' => true,
+ 'smarty_internal_compile_block.php' => true,
+ 'smarty_internal_compile_break.php' => true,
+ 'smarty_internal_compile_call.php' => true,
+ 'smarty_internal_compile_capture.php' => true,
+ 'smarty_internal_compile_config_load.php' => true,
+ 'smarty_internal_compile_continue.php' => true,
+ 'smarty_internal_compile_debug.php' => true,
+ 'smarty_internal_compile_eval.php' => true,
+ 'smarty_internal_compile_extends.php' => true,
+ 'smarty_internal_compile_for.php' => true,
+ 'smarty_internal_compile_foreach.php' => true,
+ 'smarty_internal_compile_function.php' => true,
+ 'smarty_internal_compile_if.php' => true,
+ 'smarty_internal_compile_include.php' => true,
+ 'smarty_internal_compile_include_php.php' => true,
+ 'smarty_internal_compile_insert.php' => true,
+ 'smarty_internal_compile_ldelim.php' => true,
+ 'smarty_internal_compile_nocache.php' => true,
+ 'smarty_internal_compile_private_block_plugin.php' => true,
+ 'smarty_internal_compile_private_foreachsection.php' => true,
+ 'smarty_internal_compile_private_function_plugin.php' => true,
+ 'smarty_internal_compile_private_modifier.php' => true,
'smarty_internal_compile_private_object_block_function.php' => true,
- 'smarty_internal_compile_private_object_function.php' => true,
- 'smarty_internal_compile_private_php.php' => true,
- 'smarty_internal_compile_private_print_expression.php' => true,
- 'smarty_internal_compile_private_registered_block.php' => true,
- 'smarty_internal_compile_private_registered_function.php' => true,
- 'smarty_internal_compile_private_special_variable.php' => true,
- 'smarty_internal_compile_rdelim.php' => true,
- 'smarty_internal_compile_section.php' => true,
- 'smarty_internal_compile_setfilter.php' => true,
- 'smarty_internal_compile_shared_inheritance.php' => true,
- 'smarty_internal_compile_while.php' => true,
- 'smarty_internal_configfilelexer.php' => true,
- 'smarty_internal_configfileparser.php' => true,
- 'smarty_internal_config_file_compiler.php' => true,
- 'smarty_internal_data.php' => true,
- 'smarty_internal_debug.php' => true,
- 'smarty_internal_extension_clear.php' => true,
- 'smarty_internal_extension_handler.php' => true,
- 'smarty_internal_method_addautoloadfilters.php' => true,
- 'smarty_internal_method_adddefaultmodifiers.php' => true,
- 'smarty_internal_method_append.php' => true,
- 'smarty_internal_method_appendbyref.php' => true,
- 'smarty_internal_method_assignbyref.php' => true,
- 'smarty_internal_method_assignglobal.php' => true,
- 'smarty_internal_method_clearallassign.php' => true,
- 'smarty_internal_method_clearallcache.php' => true,
- 'smarty_internal_method_clearassign.php' => true,
- 'smarty_internal_method_clearcache.php' => true,
- 'smarty_internal_method_clearcompiledtemplate.php' => true,
- 'smarty_internal_method_clearconfig.php' => true,
- 'smarty_internal_method_compileallconfig.php' => true,
- 'smarty_internal_method_compilealltemplates.php' => true,
- 'smarty_internal_method_configload.php' => true,
- 'smarty_internal_method_createdata.php' => true,
- 'smarty_internal_method_getautoloadfilters.php' => true,
- 'smarty_internal_method_getconfigvars.php' => true,
- 'smarty_internal_method_getdebugtemplate.php' => true,
- 'smarty_internal_method_getdefaultmodifiers.php' => true,
- 'smarty_internal_method_getglobal.php' => true,
- 'smarty_internal_method_getregisteredobject.php' => true,
- 'smarty_internal_method_getstreamvariable.php' => true,
- 'smarty_internal_method_gettags.php' => true,
- 'smarty_internal_method_gettemplatevars.php' => true,
- 'smarty_internal_method_loadfilter.php' => true,
- 'smarty_internal_method_loadplugin.php' => true,
- 'smarty_internal_method_mustcompile.php' => true,
- 'smarty_internal_method_registercacheresource.php' => true,
- 'smarty_internal_method_registerclass.php' => true,
- 'smarty_internal_method_registerdefaultconfighandler.php' => true,
- 'smarty_internal_method_registerdefaultpluginhandler.php' => true,
+ 'smarty_internal_compile_private_object_function.php' => true,
+ 'smarty_internal_compile_private_php.php' => true,
+ 'smarty_internal_compile_private_print_expression.php' => true,
+ 'smarty_internal_compile_private_registered_block.php' => true,
+ 'smarty_internal_compile_private_registered_function.php' => true,
+ 'smarty_internal_compile_private_special_variable.php' => true,
+ 'smarty_internal_compile_rdelim.php' => true,
+ 'smarty_internal_compile_section.php' => true,
+ 'smarty_internal_compile_setfilter.php' => true,
+ 'smarty_internal_compile_shared_inheritance.php' => true,
+ 'smarty_internal_compile_while.php' => true,
+ 'smarty_internal_configfilelexer.php' => true,
+ 'smarty_internal_configfileparser.php' => true,
+ 'smarty_internal_config_file_compiler.php' => true,
+ 'smarty_internal_data.php' => true, 'smarty_internal_debug.php' => true,
+ 'smarty_internal_extension_clear.php' => true,
+ 'smarty_internal_extension_handler.php' => true,
+ 'smarty_internal_method_addautoloadfilters.php' => true,
+ 'smarty_internal_method_adddefaultmodifiers.php' => true,
+ 'smarty_internal_method_append.php' => true,
+ 'smarty_internal_method_appendbyref.php' => true,
+ 'smarty_internal_method_assignbyref.php' => true,
+ 'smarty_internal_method_assignglobal.php' => true,
+ 'smarty_internal_method_clearallassign.php' => true,
+ 'smarty_internal_method_clearallcache.php' => true,
+ 'smarty_internal_method_clearassign.php' => true,
+ 'smarty_internal_method_clearcache.php' => true,
+ 'smarty_internal_method_clearcompiledtemplate.php' => true,
+ 'smarty_internal_method_clearconfig.php' => true,
+ 'smarty_internal_method_compileallconfig.php' => true,
+ 'smarty_internal_method_compilealltemplates.php' => true,
+ 'smarty_internal_method_configload.php' => true,
+ 'smarty_internal_method_createdata.php' => true,
+ 'smarty_internal_method_getautoloadfilters.php' => true,
+ 'smarty_internal_method_getconfigvars.php' => true,
+ 'smarty_internal_method_getdebugtemplate.php' => true,
+ 'smarty_internal_method_getdefaultmodifiers.php' => true,
+ 'smarty_internal_method_getglobal.php' => true,
+ 'smarty_internal_method_getregisteredobject.php' => true,
+ 'smarty_internal_method_getstreamvariable.php' => true,
+ 'smarty_internal_method_gettags.php' => true,
+ 'smarty_internal_method_gettemplatevars.php' => true,
+ 'smarty_internal_method_loadfilter.php' => true,
+ 'smarty_internal_method_loadplugin.php' => true,
+ 'smarty_internal_method_mustcompile.php' => true,
+ 'smarty_internal_method_registercacheresource.php' => true,
+ 'smarty_internal_method_registerclass.php' => true,
+ 'smarty_internal_method_registerdefaultconfighandler.php' => true,
+ 'smarty_internal_method_registerdefaultpluginhandler.php' => true,
'smarty_internal_method_registerdefaulttemplatehandler.php' => true,
- 'smarty_internal_method_registerfilter.php' => true,
- 'smarty_internal_method_registerobject.php' => true,
- 'smarty_internal_method_registerplugin.php' => true,
- 'smarty_internal_method_registerresource.php' => true,
- 'smarty_internal_method_setautoloadfilters.php' => true,
- 'smarty_internal_method_setdebugtemplate.php' => true,
- 'smarty_internal_method_setdefaultmodifiers.php' => true,
- 'smarty_internal_method_unloadfilter.php' => true,
- 'smarty_internal_method_unregistercacheresource.php' => true,
- 'smarty_internal_method_unregisterfilter.php' => true,
- 'smarty_internal_method_unregisterobject.php' => true,
- 'smarty_internal_method_unregisterplugin.php' => true,
- 'smarty_internal_method_unregisterresource.php' => true,
- 'smarty_internal_nocache_insert.php' => true,
- 'smarty_internal_parsetree.php' => true,
- 'smarty_internal_parsetree_code.php' => true,
- 'smarty_internal_parsetree_dq.php' => true,
- 'smarty_internal_parsetree_dqcontent.php' => true,
- 'smarty_internal_parsetree_tag.php' => true,
- 'smarty_internal_parsetree_template.php' => true,
- 'smarty_internal_parsetree_text.php' => true,
- 'smarty_internal_resource_eval.php' => true,
- 'smarty_internal_resource_extends.php' => true,
- 'smarty_internal_resource_file.php' => true,
- 'smarty_internal_resource_php.php' => true,
- 'smarty_internal_resource_registered.php' => true,
- 'smarty_internal_resource_stream.php' => true,
- 'smarty_internal_resource_string.php' => true,
- 'smarty_internal_runtime_cachemodify.php' => true,
- 'smarty_internal_runtime_codeframe.php' => true,
- 'smarty_internal_runtime_filterhandler.php' => true,
- 'smarty_internal_runtime_foreach.php' => true,
- 'smarty_internal_runtime_getincludepath.php' => true,
- 'smarty_internal_runtime_inheritance.php' => true,
- 'smarty_internal_runtime_tplfunction.php' => true,
- 'smarty_internal_runtime_updatecache.php' => true,
- 'smarty_internal_runtime_updatescope.php' => true,
- 'smarty_internal_runtime_writefile.php' => true,
- 'smarty_internal_smartytemplatecompiler.php' => true,
- 'smarty_internal_template.php' => true,
- 'smarty_internal_templatebase.php' => true,
- 'smarty_internal_templatecompilerbase.php' => true,
- 'smarty_internal_templatelexer.php' => true,
- 'smarty_internal_templateparser.php' => true,
- 'smarty_internal_testinstall.php' => true,
- 'smarty_internal_undefined.php' => true,
- 'smarty_resource.php' => true,
- 'smarty_resource_custom.php' => true,
- 'smarty_resource_recompiled.php' => true,
- 'smarty_resource_uncompiled.php' => true,
- 'smarty_security.php' => true,
- 'smarty_template_cached.php' => true,
- 'smarty_template_compiled.php' => true,
- 'smarty_template_config.php' => true,
- 'smarty_template_resource_base.php' => true,
- 'smarty_template_source.php' => true,
- 'smarty_undefined_variable.php' => true,
- 'smarty_variable.php' => true,);
+ 'smarty_internal_method_registerfilter.php' => true,
+ 'smarty_internal_method_registerobject.php' => true,
+ 'smarty_internal_method_registerplugin.php' => true,
+ 'smarty_internal_method_registerresource.php' => true,
+ 'smarty_internal_method_setautoloadfilters.php' => true,
+ 'smarty_internal_method_setdebugtemplate.php' => true,
+ 'smarty_internal_method_setdefaultmodifiers.php' => true,
+ 'smarty_internal_method_unloadfilter.php' => true,
+ 'smarty_internal_method_unregistercacheresource.php' => true,
+ 'smarty_internal_method_unregisterfilter.php' => true,
+ 'smarty_internal_method_unregisterobject.php' => true,
+ 'smarty_internal_method_unregisterplugin.php' => true,
+ 'smarty_internal_method_unregisterresource.php' => true,
+ 'smarty_internal_nocache_insert.php' => true,
+ 'smarty_internal_parsetree.php' => true,
+ 'smarty_internal_parsetree_code.php' => true,
+ 'smarty_internal_parsetree_dq.php' => true,
+ 'smarty_internal_parsetree_dqcontent.php' => true,
+ 'smarty_internal_parsetree_tag.php' => true,
+ 'smarty_internal_parsetree_template.php' => true,
+ 'smarty_internal_parsetree_text.php' => true,
+ 'smarty_internal_resource_eval.php' => true,
+ 'smarty_internal_resource_extends.php' => true,
+ 'smarty_internal_resource_file.php' => true,
+ 'smarty_internal_resource_php.php' => true,
+ 'smarty_internal_resource_registered.php' => true,
+ 'smarty_internal_resource_stream.php' => true,
+ 'smarty_internal_resource_string.php' => true,
+ 'smarty_internal_runtime_cachemodify.php' => true,
+ 'smarty_internal_runtime_codeframe.php' => true,
+ 'smarty_internal_runtime_filterhandler.php' => true,
+ 'smarty_internal_runtime_foreach.php' => true,
+ 'smarty_internal_runtime_getincludepath.php' => true,
+ 'smarty_internal_runtime_inheritance.php' => true,
+ 'smarty_internal_runtime_tplfunction.php' => true,
+ 'smarty_internal_runtime_updatecache.php' => true,
+ 'smarty_internal_runtime_updatescope.php' => true,
+ 'smarty_internal_runtime_writefile.php' => true,
+ 'smarty_internal_smartytemplatecompiler.php' => true,
+ 'smarty_internal_template.php' => true,
+ 'smarty_internal_templatebase.php' => true,
+ 'smarty_internal_templatecompilerbase.php' => true,
+ 'smarty_internal_templatelexer.php' => true,
+ 'smarty_internal_templateparser.php' => true,
+ 'smarty_internal_testinstall.php' => true,
+ 'smarty_internal_undefined.php' => true, 'smarty_resource.php' => true,
+ 'smarty_resource_custom.php' => true, 'smarty_resource_recompiled.php' => true,
+ 'smarty_resource_uncompiled.php' => true, 'smarty_security.php' => true,
+ 'smarty_template_cached.php' => true, 'smarty_template_compiled.php' => true,
+ 'smarty_template_config.php' => true,
+ 'smarty_template_resource_base.php' => true,
+ 'smarty_template_source.php' => true, 'smarty_undefined_variable.php' => true,
+ 'smarty_variable.php' => true,);
$iterator = new DirectoryIterator($source);
foreach ($iterator as $file) {
if (!$file->isDot()) {
@@ -539,30 +530,28 @@ class Smarty_Internal_TestInstall
$source = SMARTY_PLUGINS_DIR;
if (is_dir($source)) {
$expectedPlugins =
- array('block.textformat.php' => true, 'function.counter.php' => true,
- 'function.cycle.php' => true, 'function.fetch.php' => true,
- 'function.html_checkboxes.php' => true, 'function.html_image.php' => true,
- 'function.html_options.php' => true, 'function.html_radios.php' => true,
- 'function.html_select_date.php' => true, 'function.html_select_time.php' => true,
- 'function.html_table.php' => true, 'function.mailto.php' => true,
- 'function.math.php' => true, 'modifier.capitalize.php' => true,
- 'modifier.date_format.php' => true, 'modifier.debug_print_var.php' => true,
- 'modifier.escape.php' => true, 'modifier.regex_replace.php' => true,
- 'modifier.replace.php' => true, 'modifier.spacify.php' => true,
- 'modifier.truncate.php' => true, 'modifiercompiler.cat.php' => true,
- 'modifiercompiler.count_characters.php' => true, 'modifiercompiler.count_paragraphs.php' => true,
- 'modifiercompiler.count_sentences.php' => true, 'modifiercompiler.count_words.php' => true,
- 'modifiercompiler.default.php' => true, 'modifiercompiler.escape.php' => true,
- 'modifiercompiler.from_charset.php' => true, 'modifiercompiler.indent.php' => true,
- 'modifiercompiler.lower.php' => true, 'modifiercompiler.noprint.php' => true,
- 'modifiercompiler.string_format.php' => true, 'modifiercompiler.strip.php' => true,
- 'modifiercompiler.strip_tags.php' => true, 'modifiercompiler.to_charset.php' => true,
- 'modifiercompiler.unescape.php' => true, 'modifiercompiler.upper.php' => true,
- 'modifiercompiler.wordwrap.php' => true, 'outputfilter.trimwhitespace.php' => true,
- 'shared.escape_special_chars.php' => true, 'shared.literal_compiler_param.php' => true,
- 'shared.make_timestamp.php' => true, 'shared.mb_str_replace.php' => true,
- 'shared.mb_unicode.php' => true, 'shared.mb_wordwrap.php' => true,
- 'variablefilter.htmlspecialchars.php' => true,);
+ array('block.textformat.php' => true, 'function.counter.php' => true, 'function.cycle.php' => true,
+ 'function.fetch.php' => true, 'function.html_checkboxes.php' => true,
+ 'function.html_image.php' => true, 'function.html_options.php' => true,
+ 'function.html_radios.php' => true, 'function.html_select_date.php' => true,
+ 'function.html_select_time.php' => true, 'function.html_table.php' => true,
+ 'function.mailto.php' => true, 'function.math.php' => true, 'modifier.capitalize.php' => true,
+ 'modifier.date_format.php' => true, 'modifier.debug_print_var.php' => true,
+ 'modifier.escape.php' => true, 'modifier.regex_replace.php' => true,
+ 'modifier.replace.php' => true, 'modifier.spacify.php' => true, 'modifier.truncate.php' => true,
+ 'modifiercompiler.cat.php' => true, 'modifiercompiler.count_characters.php' => true,
+ 'modifiercompiler.count_paragraphs.php' => true, 'modifiercompiler.count_sentences.php' => true,
+ 'modifiercompiler.count_words.php' => true, 'modifiercompiler.default.php' => true,
+ 'modifiercompiler.escape.php' => true, 'modifiercompiler.from_charset.php' => true,
+ 'modifiercompiler.indent.php' => true, 'modifiercompiler.lower.php' => true,
+ 'modifiercompiler.noprint.php' => true, 'modifiercompiler.string_format.php' => true,
+ 'modifiercompiler.strip.php' => true, 'modifiercompiler.strip_tags.php' => true,
+ 'modifiercompiler.to_charset.php' => true, 'modifiercompiler.unescape.php' => true,
+ 'modifiercompiler.upper.php' => true, 'modifiercompiler.wordwrap.php' => true,
+ 'outputfilter.trimwhitespace.php' => true, 'shared.escape_special_chars.php' => true,
+ 'shared.literal_compiler_param.php' => true, 'shared.make_timestamp.php' => true,
+ 'shared.mb_str_replace.php' => true, 'shared.mb_unicode.php' => true,
+ 'shared.mb_wordwrap.php' => true, 'variablefilter.htmlspecialchars.php' => true,);
$iterator = new DirectoryIterator($source);
foreach ($iterator as $file) {
if (!$file->isDot()) {
diff --git a/libs/sysplugins/smarty_internal_undefined.php b/libs/sysplugins/smarty_internal_undefined.php
index 2a216c63..23563e05 100644
--- a/libs/sysplugins/smarty_internal_undefined.php
+++ b/libs/sysplugins/smarty_internal_undefined.php
@@ -17,9 +17,9 @@ class Smarty_Internal_Undefined
* - Decode saved properties from compiled template and cache files
* - Check if compiled or cache file is valid
*
- * @param \Smarty_Internal_Template $tpl
- * @param array $properties special template properties
- * @param bool $cache flag if called from cache file
+ * @param \Smarty_Internal_Template $tpl
+ * @param array $properties special template properties
+ * @param bool $cache flag if called from cache file
*
* @return bool flag if compiled or cache file is valid
*/
@@ -44,6 +44,6 @@ class Smarty_Internal_Undefined
*/
public function __call($name, $args)
{
- throw new SmartyException(get_class($args[0]) . "->{$name}() undefined method");
+ throw new SmartyException(get_class($args[ 0 ]) . "->{$name}() undefined method");
}
} \ No newline at end of file
diff --git a/libs/sysplugins/smarty_resource.php b/libs/sysplugins/smarty_resource.php
index 93d9fa7a..2d0cd0b2 100644
--- a/libs/sysplugins/smarty_resource.php
+++ b/libs/sysplugins/smarty_resource.php
@@ -35,12 +35,12 @@ abstract class Smarty_Resource
*
* @var array
*/
- public static $sysplugins = array('file' => 'smarty_internal_resource_file.php',
- 'string' => 'smarty_internal_resource_string.php',
+ public static $sysplugins = array('file' => 'smarty_internal_resource_file.php',
+ 'string' => 'smarty_internal_resource_string.php',
'extends' => 'smarty_internal_resource_extends.php',
- 'stream' => 'smarty_internal_resource_stream.php',
- 'eval' => 'smarty_internal_resource_eval.php',
- 'php' => 'smarty_internal_resource_php.php');
+ 'stream' => 'smarty_internal_resource_stream.php',
+ 'eval' => 'smarty_internal_resource_eval.php',
+ 'php' => 'smarty_internal_resource_php.php');
/**
* Flag if resource does implement populateCompiledFilepath() method
@@ -146,28 +146,28 @@ abstract class Smarty_Resource
public static function load(Smarty $smarty, $type)
{
// try smarty's cache
- if (isset($smarty->_cache['resource_handlers'][$type])) {
- return $smarty->_cache['resource_handlers'][$type];
+ if (isset($smarty->_cache[ 'resource_handlers' ][ $type ])) {
+ return $smarty->_cache[ 'resource_handlers' ][ $type ];
}
// try registered resource
- if (isset($smarty->registered_resources[$type])) {
- return $smarty->_cache['resource_handlers'][$type] =
- $smarty->registered_resources[$type] instanceof Smarty_Resource ? $smarty->registered_resources[$type] :
- new Smarty_Internal_Resource_Registered();
+ if (isset($smarty->registered_resources[ $type ])) {
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] =
+ $smarty->registered_resources[ $type ] instanceof Smarty_Resource ?
+ $smarty->registered_resources[ $type ] : new Smarty_Internal_Resource_Registered();
}
// try sysplugins dir
- if (isset(self::$sysplugins[$type])) {
+ if (isset(self::$sysplugins[ $type ])) {
$_resource_class = 'Smarty_Internal_Resource_' . ucfirst($type);
- return $smarty->_cache['resource_handlers'][$type] = new $_resource_class();
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] = new $_resource_class();
}
// try plugins dir
$_resource_class = 'Smarty_Resource_' . ucfirst($type);
if ($smarty->loadPlugin($_resource_class)) {
if (class_exists($_resource_class, false)) {
- return $smarty->_cache['resource_handlers'][$type] = new $_resource_class();
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] = new $_resource_class();
} else {
$smarty->registerResource($type,
array("smarty_resource_{$type}_source", "smarty_resource_{$type}_timestamp",
@@ -184,7 +184,7 @@ abstract class Smarty_Resource
if (is_object($smarty->security_policy)) {
$smarty->security_policy->isTrustedStream($type);
}
- return $smarty->_cache['resource_handlers'][$type] = new Smarty_Internal_Resource_Stream();
+ return $smarty->_cache[ 'resource_handlers' ][ $type ] = new Smarty_Internal_Resource_Stream();
}
// TODO: try default_(template|config)_handler
@@ -205,8 +205,8 @@ abstract class Smarty_Resource
public static function parseResourceName($resource_name, $default_resource)
{
if (preg_match('/^([A-Za-z0-9_\-]{2,})[:]/', $resource_name, $match)) {
- $type = $match[1];
- $name = substr($resource_name, strlen($match[0]));
+ $type = $match[ 1 ];
+ $name = substr($resource_name, strlen($match[ 0 ]));
} else {
// no resource given, use default
// or single character before the colon is not a resource type, but part of the filepath
@@ -231,7 +231,7 @@ abstract class Smarty_Resource
// TODO: optimize for Smarty's internal resource types
$resource = Smarty_Resource::load($smarty, $type);
// go relative to a given template?
- $_file_is_dotted = $name[0] == '.' && ($name[1] == '.' || $name[1] == '/');
+ $_file_is_dotted = $name[ 0 ] == '.' && ($name[ 1 ] == '.' || $name[ 1 ] == '/');
if ($obj->_objType == 2 && $_file_is_dotted &&
($obj->source->type == 'file' || $obj->parent->source->type == 'extends')
) {
@@ -246,7 +246,8 @@ abstract class Smarty_Resource
*
* @return bool
*/
- public function checkTimestamps() {
+ public function checkTimestamps()
+ {
return true;
}
diff --git a/libs/sysplugins/smarty_security.php b/libs/sysplugins/smarty_security.php
index 9d48bcb2..c51df4a1 100644
--- a/libs/sysplugins/smarty_security.php
+++ b/libs/sysplugins/smarty_security.php
@@ -316,25 +316,25 @@ class Smarty_Security
*/
public function isTrustedStaticClassAccess($class_name, $params, $compiler)
{
- if (!isset($params[2])) {
+ if (!isset($params[ 2 ])) {
// fall back
return $this->isTrustedStaticClass($class_name, $compiler);
}
- if ($params[2] == 'method') {
+ if ($params[ 2 ] == 'method') {
$allowed = $this->trusted_static_methods;
- $name = substr($params[0], 0, strpos($params[0], '('));
+ $name = substr($params[ 0 ], 0, strpos($params[ 0 ], '('));
} else {
$allowed = $this->trusted_static_properties;
// strip '$'
- $name = substr($params[0], 1);
+ $name = substr($params[ 0 ], 1);
}
if (isset($allowed)) {
if (empty($allowed)) {
// fall back
return $this->isTrustedStaticClass($class_name, $compiler);
}
- if (isset($allowed[$class_name]) &&
- (empty($allowed[$class_name]) || in_array($name, $allowed[$class_name]))
+ if (isset($allowed[ $class_name ]) &&
+ (empty($allowed[ $class_name ]) || in_array($name, $allowed[ $class_name ]))
) {
return true;
}
@@ -377,11 +377,11 @@ class Smarty_Security
public function isTrustedTag($tag_name, $compiler)
{
// check for internal always required tags
- if (in_array($tag_name, array('assign', 'call', 'private_filter', 'private_block_plugin',
- 'private_function_plugin', 'private_object_block_function',
- 'private_object_function', 'private_registered_function',
- 'private_registered_block', 'private_special_variable',
- 'private_print_expression', 'private_modifier'))) {
+ if (in_array($tag_name,
+ array('assign', 'call', 'private_filter', 'private_block_plugin', 'private_function_plugin',
+ 'private_object_block_function', 'private_object_function', 'private_registered_function',
+ 'private_registered_block', 'private_special_variable', 'private_print_expression',
+ 'private_modifier'))) {
return true;
}
// check security settings
@@ -414,7 +414,8 @@ class Smarty_Security
if (!in_array($var_name, $this->disabled_special_smarty_vars)) {
return true;
} else {
- $compiler->trigger_template_error("special variable '\$smarty.{$var_name}' not allowed by security setting", null, true);
+ $compiler->trigger_template_error("special variable '\$smarty.{$var_name}' not allowed by security setting",
+ null, true);
}
return false; // should not, but who knows what happens to the compiler in the future?
@@ -440,14 +441,16 @@ class Smarty_Security
if (empty($this->disabled_modifiers) || !in_array($modifier_name, $this->disabled_modifiers)) {
return true;
} else {
- $compiler->trigger_template_error("modifier '{$modifier_name}' disabled by security setting", null, true);
+ $compiler->trigger_template_error("modifier '{$modifier_name}' disabled by security setting", null,
+ true);
}
} elseif (in_array($modifier_name, $this->allowed_modifiers) &&
- !in_array($modifier_name, $this->disabled_modifiers)
+ !in_array($modifier_name, $this->disabled_modifiers)
) {
return true;
} else {
- $compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting", null, true);
+ $compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting", null,
+ true);
}
return false; // should not, but who knows what happens to the compiler in the future?
@@ -510,55 +513,55 @@ class Smarty_Security
{
if ($this->_include_path_status !== $this->smarty->use_include_path) {
foreach ($this->_include_dir as $directory) {
- unset($this->_resource_dir[$directory]);
+ unset($this->_resource_dir[ $directory ]);
}
if ($this->smarty->use_include_path) {
$this->_include_dir = array();
$_dirs = $this->smarty->ext->_getIncludePath->getIncludePathDirs($this->smarty);
foreach ($_dirs as $directory) {
$this->_include_dir[] = $directory;
- $this->_resource_dir[$directory] = true;
+ $this->_resource_dir[ $directory ] = true;
}
}
$this->_include_path_status = $this->smarty->use_include_path;
}
if ($isConfig !== true &&
- (!isset($this->smarty->_cache['template_dir_new']) || $this->smarty->_cache['template_dir_new'])
+ (!isset($this->smarty->_cache[ 'template_dir_new' ]) || $this->smarty->_cache[ 'template_dir_new' ])
) {
$_dir = $this->smarty->getTemplateDir();
if ($this->_template_dir !== $_dir) {
foreach ($this->_template_dir as $directory) {
- unset($this->_resource_dir[$directory]);
+ unset($this->_resource_dir[ $directory ]);
}
foreach ($_dir as $directory) {
- $this->_resource_dir[$directory] = true;
+ $this->_resource_dir[ $directory ] = true;
}
$this->_template_dir = $_dir;
}
- $this->smarty->_cache['template_dir_new'] = false;
+ $this->smarty->_cache[ 'template_dir_new' ] = false;
}
if ($isConfig !== false &&
- (!isset($this->smarty->_cache['config_dir_new']) || $this->smarty->_cache['config_dir_new'])
+ (!isset($this->smarty->_cache[ 'config_dir_new' ]) || $this->smarty->_cache[ 'config_dir_new' ])
) {
$_dir = $this->smarty->getConfigDir();
if ($this->_config_dir !== $_dir) {
foreach ($this->_config_dir as $directory) {
- unset($this->_resource_dir[$directory]);
+ unset($this->_resource_dir[ $directory ]);
}
foreach ($_dir as $directory) {
- $this->_resource_dir[$directory] = true;
+ $this->_resource_dir[ $directory ] = true;
}
$this->_config_dir = $_dir;
}
- $this->smarty->_cache['config_dir_new'] = false;
+ $this->smarty->_cache[ 'config_dir_new' ] = false;
}
if ($this->_secure_dir !== (array) $this->secure_dir) {
foreach ($this->_secure_dir as $directory) {
- unset($this->_resource_dir[$directory]);
+ unset($this->_resource_dir[ $directory ]);
}
foreach ((array) $this->secure_dir as $directory) {
$directory = $this->smarty->_realpath($directory . DS, true);
- $this->_resource_dir[$directory] = true;
+ $this->_resource_dir[ $directory ] = true;
}
$this->_secure_dir = (array) $this->secure_dir;
}
@@ -581,8 +584,8 @@ class Smarty_Security
public function isTrustedUri($uri)
{
$_uri = parse_url($uri);
- if (!empty($_uri['scheme']) && !empty($_uri['host'])) {
- $_uri = $_uri['scheme'] . '://' . $_uri['host'];
+ if (!empty($_uri[ 'scheme' ]) && !empty($_uri[ 'host' ])) {
+ $_uri = $_uri[ 'scheme' ] . '://' . $_uri[ 'host' ];
foreach ($this->trusted_uri as $pattern) {
if (preg_match($pattern, $_uri)) {
return true;
@@ -614,11 +617,12 @@ class Smarty_Security
$this->_trusted_dir = $this->trusted_dir;
foreach ((array) $this->trusted_dir as $directory) {
$directory = $this->smarty->_realpath($directory . DS, true);
- $this->_php_resource_dir[$directory] = true;
+ $this->_php_resource_dir[ $directory ] = true;
}
}
- $this->_php_resource_dir = $this->_checkDir($this->smarty->_realpath($filepath, true), $this->_php_resource_dir);
+ $this->_php_resource_dir =
+ $this->_checkDir($this->smarty->_realpath($filepath, true), $this->_php_resource_dir);
return true;
}
@@ -663,9 +667,9 @@ class Smarty_Security
$_directory = array();
while (true) {
// remember the directory to add it to _resource_dir in case we're successful
- $_directory[$directory] = true;
+ $_directory[ $directory ] = true;
// test if the directory is trusted
- if (isset($dirs[$directory])) {
+ if (isset($dirs[ $directory ])) {
// merge sub directories of current $directory into _resource_dir to speed up subsequent lookup
$dirs = array_merge($dirs, $_directory);
diff --git a/libs/sysplugins/smarty_template_cached.php b/libs/sysplugins/smarty_template_cached.php
index cecf4298..4ac8d85b 100644
--- a/libs/sysplugins/smarty_template_cached.php
+++ b/libs/sysplugins/smarty_template_cached.php
@@ -99,7 +99,7 @@ class Smarty_Template_Cached extends Smarty_Template_Resource_Base
$_template->cached->handler->populate($_template->cached, $_template);
// caching enabled ?
if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT ||
- $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || $_template->source->handler->recompiled
+ $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || $_template->source->handler->recompiled
) {
$_template->cached->valid = false;
}
diff --git a/libs/sysplugins/smarty_template_compiled.php b/libs/sysplugins/smarty_template_compiled.php
index 9a5801e0..28ba1203 100644
--- a/libs/sysplugins/smarty_template_compiled.php
+++ b/libs/sysplugins/smarty_template_compiled.php
@@ -47,8 +47,8 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
$_compile_id = isset($_template->compile_id) ? preg_replace('![^\w]+!', '_', $_template->compile_id) : null;
if ($_template->source->isConfig) {
$_flag = '_' .
- ((int) $_template->smarty->config_read_hidden + (int) $_template->smarty->config_booleanize * 2 +
- (int) $_template->smarty->config_overwrite * 4);
+ ((int) $_template->smarty->config_read_hidden + (int) $_template->smarty->config_booleanize * 2 +
+ (int) $_template->smarty->config_overwrite * 4);
} else {
$_flag =
'_' . ((int) $_template->smarty->merge_compiled_includes + (int) $_template->smarty->escape_html * 2);
@@ -57,7 +57,7 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
// if use_sub_dirs, break file into directories
if ($_template->smarty->use_sub_dirs) {
$_filepath = substr($_filepath, 0, 2) . DS . substr($_filepath, 2, 2) . DS . substr($_filepath, 4, 2) . DS .
- $_filepath;
+ $_filepath;
}
$_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
if (isset($_compile_id)) {
@@ -99,7 +99,8 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
$_smarty_tpl = $_template;
if ($_template->source->handler->recompiled || !$_template->compiled->exists ||
$_template->smarty->force_compile || ($_template->smarty->compile_check &&
- $_template->source->getTimeStamp() > $_template->compiled->getTimeStamp())
+ $_template->source->getTimeStamp() >
+ $_template->compiled->getTimeStamp())
) {
$this->compileTemplateSource($_template);
$compileCheck = $_template->smarty->compile_check;
@@ -180,7 +181,7 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base
}
$this->getRenderedTemplateCode($_template);
if ($_template->caching && $this->has_nocache_code) {
- $_template->cached->hashes[$this->nocache_hash] = true;
+ $_template->cached->hashes[ $this->nocache_hash ] = true;
}
if (isset($_template->parent) && $_template->parent->_objType == 2 && !empty($_template->tpl_function)) {
$_template->parent->tpl_function = array_merge($_template->parent->tpl_function, $_template->tpl_function);
diff --git a/libs/sysplugins/smarty_template_config.php b/libs/sysplugins/smarty_template_config.php
index 22d45981..a74efb21 100644
--- a/libs/sysplugins/smarty_template_config.php
+++ b/libs/sysplugins/smarty_template_config.php
@@ -72,7 +72,8 @@ class Smarty_Template_Config extends Smarty_Template_Source
* @return Smarty_Template_Config Source Object
* @throws SmartyException
*/
- public static function load(Smarty_Internal_Template $_template = null, Smarty $smarty = null, $template_resource = null)
+ public static function load(Smarty_Internal_Template $_template = null, Smarty $smarty = null,
+ $template_resource = null)
{
static $_incompatible_resources = array('extends' => true, 'php' => true);
$template_resource = $_template->template_resource;
@@ -80,9 +81,10 @@ class Smarty_Template_Config extends Smarty_Template_Source
throw new SmartyException('Missing config name');
}
// parse resource_name, load resource handler
- list($name, $type) = Smarty_Resource::parseResourceName($template_resource, $_template->smarty->default_config_type);
+ list($name, $type) =
+ Smarty_Resource::parseResourceName($template_resource, $_template->smarty->default_config_type);
// make sure configs are not loaded via anything smarty can't handle
- if (isset($_incompatible_resources[$type])) {
+ if (isset($_incompatible_resources[ $type ])) {
throw new SmartyException ("Unable to use resource '{$type}' for config");
}
$resource = Smarty_Resource::load($_template->smarty, $type);
diff --git a/libs/sysplugins/smarty_template_resource_base.php b/libs/sysplugins/smarty_template_resource_base.php
index 11313038..e871763e 100644
--- a/libs/sysplugins/smarty_template_resource_base.php
+++ b/libs/sysplugins/smarty_template_resource_base.php
@@ -116,13 +116,13 @@ abstract class Smarty_Template_Resource_Base
//
// render compiled or saved template code
//
- if (!isset($_template->_cache['capture_stack'])) {
- $_template->_cache['capture_stack'] = array();
+ if (!isset($_template->_cache[ 'capture_stack' ])) {
+ $_template->_cache[ 'capture_stack' ] = array();
}
- $_saved_capture_level = count($_template->_cache['capture_stack']);
+ $_saved_capture_level = count($_template->_cache[ 'capture_stack' ]);
$unifunc($_template);
// any unclosed {capture} tags ?
- if ($_saved_capture_level != count($_template->_cache['capture_stack'])) {
+ if ($_saved_capture_level != count($_template->_cache[ 'capture_stack' ])) {
$_template->capture_error();
}
if (isset($_template->smarty->security_policy)) {
@@ -134,7 +134,7 @@ abstract class Smarty_Template_Resource_Base
while (ob_get_level() > $level) {
ob_end_clean();
}
- if (isset($_template->smarty->security_policy)) {
+ if (isset($_template->smarty->security_policy)) {
$_template->smarty->security_policy->exitTemplate();
}
throw $e;
diff --git a/libs/sysplugins/smarty_template_source.php b/libs/sysplugins/smarty_template_source.php
index b5b50c37..2cc8fff2 100644
--- a/libs/sysplugins/smarty_template_source.php
+++ b/libs/sysplugins/smarty_template_source.php
@@ -144,8 +144,8 @@ class Smarty_Template_Source
}
// parse resource_name, load resource handler, identify unique resource name
if (preg_match('/^([A-Za-z0-9_\-]{2,})[:]([\s\S]*)$/', $template_resource, $match)) {
- $type = $match[1];
- $name = $match[2];
+ $type = $match[ 1 ];
+ $name = $match[ 2 ];
} else {
// no resource given, use default
// or single character before the colon is not a resource type, but part of the filepath
@@ -153,9 +153,9 @@ class Smarty_Template_Source
$name = $template_resource;
}
- $handler = isset($smarty->_cache['resource_handlers'][$type]) ?
- $smarty->_cache['resource_handlers'][$type] :
- Smarty_Resource::load($smarty, $type);
+ $handler =
+ isset($smarty->_cache[ 'resource_handlers' ][ $type ]) ? $smarty->_cache[ 'resource_handlers' ][ $type ] :
+ Smarty_Resource::load($smarty, $type);
// create new source object
$source = new Smarty_Template_Source($handler, $smarty, $template_resource, $type, $name);
$handler->populate($source, $_template);
diff --git a/libs/sysplugins/smarty_variable.php b/libs/sysplugins/smarty_variable.php
index a6504b18..0b17bc7c 100644
--- a/libs/sysplugins/smarty_variable.php
+++ b/libs/sysplugins/smarty_variable.php
@@ -15,6 +15,7 @@ class Smarty_Variable
* @var mixed
*/
public $value = null;
+
/**
* if true any output of this variable will be not cached
*
diff --git a/libs/sysplugins/smartycompilerexception.php b/libs/sysplugins/smartycompilerexception.php
index 4d5d7787..763bab15 100644
--- a/libs/sysplugins/smartycompilerexception.php
+++ b/libs/sysplugins/smartycompilerexception.php
@@ -18,18 +18,21 @@ class SmartyCompilerException extends SmartyException
* @type int|null
*/
public $line = null;
+
/**
* The template source snippet relating to the error
*
* @type string|null
*/
public $source = null;
+
/**
* The raw text of the error message
*
* @type string|null
*/
public $desc = null;
+
/**
* The resource identifier or template name
*
diff --git a/libs/sysplugins/smartyexception.php b/libs/sysplugins/smartyexception.php
index 3da16c27..431d8f8e 100644
--- a/libs/sysplugins/smartyexception.php
+++ b/libs/sysplugins/smartyexception.php
@@ -1,4 +1,5 @@
<?php
+
/**
* Smarty exception class
*