Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/class/smarty/xoops_plugins/function.xoMemberInfo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@
 block discarded – undo
61 61
             $member_info = array();
62 62
         }
63 63
         foreach ($infos as $info) {
64
-            if (!array_key_exists($info, $member_info) && @$_SESSION['xoops_member_info'][$info . '_expire'] < $time) {
64
+            if (!array_key_exists($info, $member_info) && @$_SESSION['xoops_member_info'][$info.'_expire'] < $time) {
65 65
                 $member_info[$info]                               = $xoopsUser->getVar($info, 'E');
66 66
                 $_SESSION['xoops_member_info'][$info]             = $member_info[$info];
67
-                $_SESSION['xoops_member_info'][$info . '_expire'] = $time + 60;
67
+                $_SESSION['xoops_member_info'][$info.'_expire'] = $time + 60;
68 68
             }
69 69
         }
70 70
     }
Please login to merge, or discard this patch.
htdocs/class/smarty/xoops_plugins/modifier.truncate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
         $string = preg_replace('/\s+?(\S+)?$/u', '', mb_substr($string, 0, $length + 1, $charset));
42 42
     }
43 43
     if (!$middle) {
44
-        return mb_substr($string, 0, $length, $charset) . $etc;
44
+        return mb_substr($string, 0, $length, $charset).$etc;
45 45
     }
46
-    return mb_substr($string, 0, $length / 2, $charset) . $etc
46
+    return mb_substr($string, 0, $length / 2, $charset).$etc
47 47
         . mb_substr($string, -$length / 2, (mb_strlen($string) - $length / 2), $charset);
48 48
 }
Please login to merge, or discard this patch.
htdocs/class/smarty/Smarty.class.php 3 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -229,16 +229,16 @@  discard block
 block discarded – undo
229 229
     var $security_settings  = array(
230 230
                                     'PHP_HANDLING'    => false,
231 231
                                     'IF_FUNCS'        => array('array', 'list',
232
-                                                               'isset', 'empty',
233
-                                                               'count', 'sizeof',
234
-                                                               'in_array', 'is_array',
235
-                                                               'true', 'false', 'null'),
232
+                                                                'isset', 'empty',
233
+                                                                'count', 'sizeof',
234
+                                                                'in_array', 'is_array',
235
+                                                                'true', 'false', 'null'),
236 236
                                     'INCLUDE_ANY'     => false,
237 237
                                     'PHP_TAGS'        => false,
238 238
                                     'MODIFIER_FUNCS'  => array('count'),
239 239
                                     'ALLOW_CONSTANTS'  => false,
240 240
                                     'ALLOW_SUPER_GLOBALS' => true
241
-                                   );
241
+                                    );
242 242
 
243 243
     /**
244 244
      * This is an array of directories where trusted php scripts reside.
@@ -529,15 +529,15 @@  discard block
 block discarded – undo
529 529
      * @var array
530 530
      */
531 531
     var $_plugins              = array(
532
-                                       'modifier'      => array(),
533
-                                       'function'      => array(),
534
-                                       'block'         => array(),
535
-                                       'compiler'      => array(),
536
-                                       'prefilter'     => array(),
537
-                                       'postfilter'    => array(),
538
-                                       'outputfilter'  => array(),
539
-                                       'resource'      => array(),
540
-                                       'insert'        => array());
532
+                                        'modifier'      => array(),
533
+                                        'function'      => array(),
534
+                                        'block'         => array(),
535
+                                        'compiler'      => array(),
536
+                                        'prefilter'     => array(),
537
+                                        'postfilter'    => array(),
538
+                                        'outputfilter'  => array(),
539
+                                        'resource'      => array(),
540
+                                        'insert'        => array());
541 541
 
542 542
 
543 543
     /**
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
      */
575 575
     public function __construct()
576 576
     {
577
-      $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
577
+        $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
578 578
                     : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
579 579
     }
580 580
 
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
     {
661 661
         if ($tpl_var != '' && isset($value)) {
662 662
             if(!@is_array($this->_tpl_vars[$tpl_var])) {
663
-             settype($this->_tpl_vars[$tpl_var],'array');
663
+                settype($this->_tpl_vars[$tpl_var],'array');
664 664
             }
665 665
             if ($merge && is_array($value)) {
666 666
                 foreach($value as $_key => $_val) {
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
                             ,array(&$functions[0], $functions[2])
824 824
                             ,array(&$functions[0], $functions[3])
825 825
                             ,array(&$functions[0], $functions[4]))
826
-                      ,false);
826
+                        ,false);
827 827
 
828 828
         } else {
829 829
             $this->trigger_error("malformed function-list for '$type' in register_resource");
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 
953 953
         if (!empty($this->cache_handler_func)) {
954 954
             return call_user_func_array($this->cache_handler_func,
955
-                                  array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time));
955
+                                    array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time));
956 956
         } else {
957 957
             $_params = array('auto_base' => $this->cache_dir,
958 958
                             'auto_source' => $tpl_file,
@@ -1355,7 +1355,7 @@  discard block
 block discarded – undo
1355 1355
         if(!isset($var)) {
1356 1356
             // clear all values
1357 1357
             $this->_config = array(array('vars'  => array(),
1358
-                                         'files' => array()));
1358
+                                            'files' => array()));
1359 1359
         } else {
1360 1360
             unset($this->_config[0]['vars'][$var]);
1361 1361
         }
@@ -1375,7 +1375,7 @@  discard block
 block discarded – undo
1375 1375
         return smarty_core_assemble_plugin_filepath($_params, $this);
1376 1376
     }
1377 1377
 
1378
-   /**
1378
+    /**
1379 1379
      * test if resource needs compiling
1380 1380
      *
1381 1381
      * @param string $resource_name
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
         }
1409 1409
     }
1410 1410
 
1411
-   /**
1411
+    /**
1412 1412
      * compile the template
1413 1413
      *
1414 1414
      * @param string $resource_name
@@ -1444,7 +1444,7 @@  discard block
 block discarded – undo
1444 1444
 
1445 1445
     }
1446 1446
 
1447
-   /**
1447
+    /**
1448 1448
      * compile the given source
1449 1449
      *
1450 1450
      * @param string $resource_name
@@ -1518,7 +1518,7 @@  discard block
 block discarded – undo
1518 1518
     function _get_compile_path($resource_name)
1519 1519
     {
1520 1520
         return $this->_get_auto_filename($this->compile_dir, $resource_name,
1521
-                                         $this->_compile_id) . '.php';
1521
+                                            $this->_compile_id) . '.php';
1522 1522
     }
1523 1523
 
1524 1524
     /**
@@ -1564,14 +1564,14 @@  discard block
 block discarded – undo
1564 1564
                     if ($params['get_source']) {
1565 1565
                         $_source_return = isset($this->_plugins['resource'][$_resource_type]) &&
1566 1566
                             call_user_func_array($this->_plugins['resource'][$_resource_type][0][0],
1567
-                                                 array($_resource_name, &$params['source_content'], &$this));
1567
+                                                    array($_resource_name, &$params['source_content'], &$this));
1568 1568
                     } else {
1569 1569
                         $_source_return = true;
1570 1570
                     }
1571 1571
 
1572 1572
                     $_timestamp_return = isset($this->_plugins['resource'][$_resource_type]) &&
1573 1573
                         call_user_func_array($this->_plugins['resource'][$_resource_type][0][1],
1574
-                                             array($_resource_name, &$params['resource_timestamp'], &$this));
1574
+                                                array($_resource_name, &$params['resource_timestamp'], &$this));
1575 1575
 
1576 1576
                     $_return = $_source_return && $_timestamp_return;
1577 1577
                     break;
@@ -1760,7 +1760,7 @@  discard block
 block discarded – undo
1760 1760
             // prepend %% to avoid name conflicts with
1761 1761
             // with $params['auto_id'] names
1762 1762
             $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .
1763
-                      substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
1763
+                        substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
1764 1764
             $_return .= '%%' . $_crc32 . '%%' . $_filename;
1765 1765
         }
1766 1766
 
@@ -1856,8 +1856,8 @@  discard block
 block discarded – undo
1856 1856
             require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
1857 1857
             $debug_start_time = smarty_core_get_microtime($_params, $this);
1858 1858
             $this->_smarty_debug_info[] = array('type'      => 'template',
1859
-                                                  'filename'  => $params['smarty_include_tpl_file'],
1860
-                                                  'depth'     => ++$this->_inclusion_depth);
1859
+                                                    'filename'  => $params['smarty_include_tpl_file'],
1860
+                                                    'depth'     => ++$this->_inclusion_depth);
1861 1861
             $included_tpls_idx = count($this->_smarty_debug_info) - 1;
1862 1862
         }
1863 1863
 
@@ -1947,17 +1947,17 @@  discard block
 block discarded – undo
1947 1947
      * @param callback $function
1948 1948
      * @return string
1949 1949
      */
1950
-	function _get_filter_name($function)
1951
-	{
1952
-		if (is_array($function)) {
1953
-			$_class_name = (is_object($function[0]) ?
1954
-				get_class($function[0]) : $function[0]);
1955
-			return $_class_name . '_' . $function[1];
1956
-		}
1957
-		else {
1958
-			return $function;
1959
-		}
1960
-	}
1950
+    function _get_filter_name($function)
1951
+    {
1952
+        if (is_array($function)) {
1953
+            $_class_name = (is_object($function[0]) ?
1954
+                get_class($function[0]) : $function[0]);
1955
+            return $_class_name . '_' . $function[1];
1956
+        }
1957
+        else {
1958
+            return $function;
1959
+        }
1960
+    }
1961 1961
 
1962 1962
     /**#@-*/
1963 1963
 
Please login to merge, or discard this patch.
Spacing   +149 added lines, -149 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 /**
36 36
  * DIR_SEP isn't used anymore, but third party apps might
37 37
  */
38
-if(!defined('DIR_SEP')) {
38
+if (!defined('DIR_SEP')) {
39 39
     define('DIR_SEP', DIRECTORY_SEPARATOR);
40 40
 }
41 41
 
@@ -46,17 +46,17 @@  discard block
 block discarded – undo
46 46
  */
47 47
 
48 48
 if (!defined('SMARTY_DIR')) {
49
-    define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
49
+    define('SMARTY_DIR', dirname(__FILE__).DIRECTORY_SEPARATOR);
50 50
 }
51 51
 
52 52
 if (!defined('SMARTY_CORE_DIR')) {
53
-    define('SMARTY_CORE_DIR', SMARTY_DIR . 'internals' . DIRECTORY_SEPARATOR);
53
+    define('SMARTY_CORE_DIR', SMARTY_DIR.'internals'.DIRECTORY_SEPARATOR);
54 54
 }
55 55
 
56
-define('SMARTY_PHP_PASSTHRU',   0);
57
-define('SMARTY_PHP_QUOTE',      1);
58
-define('SMARTY_PHP_REMOVE',     2);
59
-define('SMARTY_PHP_ALLOW',      3);
56
+define('SMARTY_PHP_PASSTHRU', 0);
57
+define('SMARTY_PHP_QUOTE', 1);
58
+define('SMARTY_PHP_REMOVE', 2);
59
+define('SMARTY_PHP_ALLOW', 3);
60 60
 
61 61
 /**
62 62
  * @package Smarty
@@ -72,28 +72,28 @@  discard block
 block discarded – undo
72 72
      *
73 73
      * @var string
74 74
      */
75
-    var $template_dir    =  'templates';
75
+    var $template_dir = 'templates';
76 76
 
77 77
     /**
78 78
      * The directory where compiled templates are located.
79 79
      *
80 80
      * @var string
81 81
      */
82
-    var $compile_dir     =  'templates_c';
82
+    var $compile_dir = 'templates_c';
83 83
 
84 84
     /**
85 85
      * The directory where config files are located.
86 86
      *
87 87
      * @var string
88 88
      */
89
-    var $config_dir      =  'configs';
89
+    var $config_dir = 'configs';
90 90
 
91 91
     /**
92 92
      * An array of directories searched for plugins.
93 93
      *
94 94
      * @var array
95 95
      */
96
-    var $plugins_dir     =  array('plugins');
96
+    var $plugins_dir = array('plugins');
97 97
 
98 98
     /**
99 99
      * If debugging is enabled, a debug console window will display
@@ -102,14 +102,14 @@  discard block
 block discarded – undo
102 102
      *
103 103
      * @var boolean
104 104
      */
105
-    var $debugging       =  false;
105
+    var $debugging = false;
106 106
 
107 107
     /**
108 108
      * When set, smarty does uses this value as error_reporting-level.
109 109
      *
110 110
      * @var integer
111 111
      */
112
-    var $error_reporting  =  null;
112
+    var $error_reporting = null;
113 113
 
114 114
     /**
115 115
      * This is the path to the debug console template. If not set,
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      *
118 118
      * @var string
119 119
      */
120
-    var $debug_tpl       =  '';
120
+    var $debug_tpl = '';
121 121
 
122 122
     /**
123 123
      * This determines if debugging is enable-able from the browser.
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      * @link http://www.foo.dom/index.php?SMARTY_DEBUG
129 129
      * @var string
130 130
      */
131
-    var $debugging_ctrl  =  'NONE';
131
+    var $debugging_ctrl = 'NONE';
132 132
 
133 133
     /**
134 134
      * This tells Smarty whether to check for recompiling or not. Recompiling
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      *
139 139
      * @var boolean
140 140
      */
141
-    var $compile_check   =  true;
141
+    var $compile_check = true;
142 142
 
143 143
     /**
144 144
      * This forces templates to compile every time. Useful for development
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      *
147 147
      * @var boolean
148 148
      */
149
-    var $force_compile   =  false;
149
+    var $force_compile = false;
150 150
 
151 151
     /**
152 152
      * This enables template caching.
@@ -157,14 +157,14 @@  discard block
 block discarded – undo
157 157
      * </ul>
158 158
      * @var integer
159 159
      */
160
-    var $caching         =  0;
160
+    var $caching = 0;
161 161
 
162 162
     /**
163 163
      * The name of the directory for cache files.
164 164
      *
165 165
      * @var string
166 166
      */
167
-    var $cache_dir       =  'cache';
167
+    var $cache_dir = 'cache';
168 168
 
169 169
     /**
170 170
      * This is the number of seconds cached content will persist.
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      *
176 176
      * @var integer
177 177
      */
178
-    var $cache_lifetime  =  3600;
178
+    var $cache_lifetime = 3600;
179 179
 
180 180
     /**
181 181
      * Only used when $caching is enabled. If true, then If-Modified-Since headers
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      *
200 200
      * @var integer
201 201
      */
202
-    var $php_handling    =  SMARTY_PHP_PASSTHRU;
202
+    var $php_handling = SMARTY_PHP_PASSTHRU;
203 203
 
204 204
     /**
205 205
      * This enables template security. When enabled, many things are restricted
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      *
210 210
      * @var boolean
211 211
      */
212
-    var $security       =   false;
212
+    var $security = false;
213 213
 
214 214
     /**
215 215
      * This is the list of template directories that are considered secure. This
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      *
219 219
      * @var array
220 220
      */
221
-    var $secure_dir     =   array();
221
+    var $secure_dir = array();
222 222
 
223 223
     /**
224 224
      * These are the security settings for Smarty. They are used only when
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      *
227 227
      * @var array
228 228
      */
229
-    var $security_settings  = array(
229
+    var $security_settings = array(
230 230
                                     'PHP_HANDLING'    => false,
231 231
                                     'IF_FUNCS'        => array('array', 'list',
232 232
                                                                'isset', 'empty',
@@ -246,21 +246,21 @@  discard block
 block discarded – undo
246 246
      *
247 247
      * @var array
248 248
      */
249
-    var $trusted_dir        = array();
249
+    var $trusted_dir = array();
250 250
 
251 251
     /**
252 252
      * The left delimiter used for the template tags.
253 253
      *
254 254
      * @var string
255 255
      */
256
-    var $left_delimiter  =  '{';
256
+    var $left_delimiter = '{';
257 257
 
258 258
     /**
259 259
      * The right delimiter used for the template tags.
260 260
      *
261 261
      * @var string
262 262
      */
263
-    var $right_delimiter =  '}';
263
+    var $right_delimiter = '}';
264 264
 
265 265
     /**
266 266
      * The order in which request variables are registered, similar to
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      *
270 270
      * @var string
271 271
      */
272
-    var $request_vars_order    = 'EGPCS';
272
+    var $request_vars_order = 'EGPCS';
273 273
 
274 274
     /**
275 275
      * Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      *
280 280
      * @var boolean
281 281
      */
282
-    var $request_use_auto_globals      = true;
282
+    var $request_use_auto_globals = true;
283 283
 
284 284
     /**
285 285
      * Set this if you want different sets of compiled files for the same
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
      *
290 290
      * @var string
291 291
      */
292
-    var $compile_id            = null;
292
+    var $compile_id = null;
293 293
 
294 294
     /**
295 295
      * This tells Smarty whether or not to use sub dirs in the cache/ and
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      * @var boolean
300 300
      *
301 301
      */
302
-    var $use_sub_dirs          = false;
302
+    var $use_sub_dirs = false;
303 303
 
304 304
     /**
305 305
      * This is a list of the modifiers to apply to all template variables.
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      *
309 309
      * @var array
310 310
      */
311
-    var $default_modifiers        = array();
311
+    var $default_modifiers = array();
312 312
 
313 313
     /**
314 314
      * This is the resource type to be used when not specified
@@ -322,14 +322,14 @@  discard block
 block discarded – undo
322 322
      *
323 323
      * @var array
324 324
      */
325
-    var $default_resource_type    = 'file';
325
+    var $default_resource_type = 'file';
326 326
 
327 327
     /**
328 328
      * The function used for cache file handling. If not set, built-in caching is used.
329 329
      *
330 330
      * @var null|string function name
331 331
      */
332
-    var $cache_handler_func   = null;
332
+    var $cache_handler_func = null;
333 333
 
334 334
     /**
335 335
      * This indicates which filters are automatically loaded into Smarty.
@@ -383,21 +383,21 @@  discard block
 block discarded – undo
383 383
      *
384 384
      * @var string
385 385
      */
386
-    var $compiler_file        =    'Smarty_Compiler.class.php';
386
+    var $compiler_file = 'Smarty_Compiler.class.php';
387 387
 
388 388
     /**
389 389
      * The class used for compiling templates.
390 390
      *
391 391
      * @var string
392 392
      */
393
-    var $compiler_class        =   'Smarty_Compiler';
393
+    var $compiler_class = 'Smarty_Compiler';
394 394
 
395 395
     /**
396 396
      * The class used to load config vars.
397 397
      *
398 398
      * @var string
399 399
      */
400
-    var $config_class          =   'Config_File';
400
+    var $config_class = 'Config_File';
401 401
 
402 402
 /**#@+
403 403
  * END Smarty Configuration Section
@@ -409,126 +409,126 @@  discard block
 block discarded – undo
409 409
      *
410 410
      * @var array
411 411
      */
412
-    var $_tpl_vars             = array();
412
+    var $_tpl_vars = array();
413 413
 
414 414
     /**
415 415
      * stores run-time $smarty.* vars
416 416
      *
417 417
      * @var null|array
418 418
      */
419
-    var $_smarty_vars          = null;
419
+    var $_smarty_vars = null;
420 420
 
421 421
     /**
422 422
      * keeps track of sections
423 423
      *
424 424
      * @var array
425 425
      */
426
-    var $_sections             = array();
426
+    var $_sections = array();
427 427
 
428 428
     /**
429 429
      * keeps track of foreach blocks
430 430
      *
431 431
      * @var array
432 432
      */
433
-    var $_foreach              = array();
433
+    var $_foreach = array();
434 434
 
435 435
     /**
436 436
      * keeps track of tag hierarchy
437 437
      *
438 438
      * @var array
439 439
      */
440
-    var $_tag_stack            = array();
440
+    var $_tag_stack = array();
441 441
 
442 442
     /**
443 443
      * configuration object
444 444
      *
445 445
      * @var Config_file
446 446
      */
447
-    var $_conf_obj             = null;
447
+    var $_conf_obj = null;
448 448
 
449 449
     /**
450 450
      * loaded configuration settings
451 451
      *
452 452
      * @var array
453 453
      */
454
-    var $_config               = array(array('vars'  => array(), 'files' => array()));
454
+    var $_config = array(array('vars'  => array(), 'files' => array()));
455 455
 
456 456
     /**
457 457
      * md5 checksum of the string 'Smarty'
458 458
      *
459 459
      * @var string
460 460
      */
461
-    var $_smarty_md5           = 'f8d698aea36fcbead2b9d5359ffca76f';
461
+    var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f';
462 462
 
463 463
     /**
464 464
      * Smarty version number
465 465
      *
466 466
      * @var string
467 467
      */
468
-    var $_version              = '2.6.31';
468
+    var $_version = '2.6.31';
469 469
 
470 470
     /**
471 471
      * current template inclusion depth
472 472
      *
473 473
      * @var integer
474 474
      */
475
-    var $_inclusion_depth      = 0;
475
+    var $_inclusion_depth = 0;
476 476
 
477 477
     /**
478 478
      * for different compiled templates
479 479
      *
480 480
      * @var string
481 481
      */
482
-    var $_compile_id           = null;
482
+    var $_compile_id = null;
483 483
 
484 484
     /**
485 485
      * text in URL to enable debug mode
486 486
      *
487 487
      * @var string
488 488
      */
489
-    var $_smarty_debug_id      = 'SMARTY_DEBUG';
489
+    var $_smarty_debug_id = 'SMARTY_DEBUG';
490 490
 
491 491
     /**
492 492
      * debugging information for debug console
493 493
      *
494 494
      * @var array
495 495
      */
496
-    var $_smarty_debug_info    = array();
496
+    var $_smarty_debug_info = array();
497 497
 
498 498
     /**
499 499
      * info that makes up a cache file
500 500
      *
501 501
      * @var array
502 502
      */
503
-    var $_cache_info           = array();
503
+    var $_cache_info = array();
504 504
 
505 505
     /**
506 506
      * default file permissions
507 507
      *
508 508
      * @var integer
509 509
      */
510
-    var $_file_perms           = 0644;
510
+    var $_file_perms = 0644;
511 511
 
512 512
     /**
513 513
      * default dir permissions
514 514
      *
515 515
      * @var integer
516 516
      */
517
-    var $_dir_perms               = 0771;
517
+    var $_dir_perms = 0771;
518 518
 
519 519
     /**
520 520
      * registered objects
521 521
      *
522 522
      * @var array
523 523
      */
524
-    var $_reg_objects           = array();
524
+    var $_reg_objects = array();
525 525
 
526 526
     /**
527 527
      * table keeping track of plugins
528 528
      *
529 529
      * @var array
530 530
      */
531
-    var $_plugins              = array(
531
+    var $_plugins = array(
532 532
                                        'modifier'      => array(),
533 533
                                        'function'      => array(),
534 534
                                        'block'         => array(),
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
      */
587 587
     function assign($tpl_var, $value = null)
588 588
     {
589
-        if (is_array($tpl_var)){
589
+        if (is_array($tpl_var)) {
590 590
             foreach ($tpl_var as $key => $val) {
591 591
                 if ($key != '') {
592 592
                     $this->_tpl_vars[$key] = $val;
@@ -616,17 +616,17 @@  discard block
 block discarded – undo
616 616
      * @param array|string $tpl_var the template variable name(s)
617 617
      * @param mixed $value the value to append
618 618
      */
619
-    function append($tpl_var, $value=null, $merge=false)
619
+    function append($tpl_var, $value = null, $merge = false)
620 620
     {
621 621
         if (is_array($tpl_var)) {
622 622
             // $tpl_var is an array, ignore $value
623 623
             foreach ($tpl_var as $_key => $_val) {
624 624
                 if ($_key != '') {
625
-                    if(!@is_array($this->_tpl_vars[$_key])) {
626
-                        settype($this->_tpl_vars[$_key],'array');
625
+                    if (!@is_array($this->_tpl_vars[$_key])) {
626
+                        settype($this->_tpl_vars[$_key], 'array');
627 627
                     }
628
-                    if($merge && is_array($_val)) {
629
-                        foreach($_val as $_mkey => $_mval) {
628
+                    if ($merge && is_array($_val)) {
629
+                        foreach ($_val as $_mkey => $_mval) {
630 630
                             $this->_tpl_vars[$_key][$_mkey] = $_mval;
631 631
                         }
632 632
                     } else {
@@ -636,11 +636,11 @@  discard block
 block discarded – undo
636 636
             }
637 637
         } else {
638 638
             if ($tpl_var != '' && isset($value)) {
639
-                if(!@is_array($this->_tpl_vars[$tpl_var])) {
640
-                    settype($this->_tpl_vars[$tpl_var],'array');
639
+                if (!@is_array($this->_tpl_vars[$tpl_var])) {
640
+                    settype($this->_tpl_vars[$tpl_var], 'array');
641 641
                 }
642
-                if($merge && is_array($value)) {
643
-                    foreach($value as $_mkey => $_mval) {
642
+                if ($merge && is_array($value)) {
643
+                    foreach ($value as $_mkey => $_mval) {
644 644
                         $this->_tpl_vars[$tpl_var][$_mkey] = $_mval;
645 645
                     }
646 646
                 } else {
@@ -656,14 +656,14 @@  discard block
 block discarded – undo
656 656
      * @param string $tpl_var the template variable name
657 657
      * @param mixed $value the referenced value to append
658 658
      */
659
-    function append_by_ref($tpl_var, &$value, $merge=false)
659
+    function append_by_ref($tpl_var, &$value, $merge = false)
660 660
     {
661 661
         if ($tpl_var != '' && isset($value)) {
662
-            if(!@is_array($this->_tpl_vars[$tpl_var])) {
663
-             settype($this->_tpl_vars[$tpl_var],'array');
662
+            if (!@is_array($this->_tpl_vars[$tpl_var])) {
663
+             settype($this->_tpl_vars[$tpl_var], 'array');
664 664
             }
665 665
             if ($merge && is_array($value)) {
666
-                foreach($value as $_key => $_val) {
666
+                foreach ($value as $_key => $_val) {
667 667
                     $this->_tpl_vars[$tpl_var][$_key] = &$value[$_key];
668 668
                 }
669 669
             } else {
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
      * @param string $function the name of the template function
695 695
      * @param string $function_impl the name of the PHP function to register
696 696
      */
697
-    function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null)
697
+    function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null)
698 698
     {
699 699
         $this->_plugins['function'][$function] =
700 700
             array($function_impl, null, null, false, $cacheable, $cache_attrs);
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
      * @param string $block name of template block
746 746
      * @param string $block_impl PHP function to register
747 747
      */
748
-    function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null)
748
+    function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null)
749 749
     {
750 750
         $this->_plugins['block'][$block] =
751 751
             array($block_impl, null, null, false, $cacheable, $cache_attrs);
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
      * @param string $function name of template function
768 768
      * @param string $function_impl name of PHP function to register
769 769
      */
770
-    function register_compiler_function($function, $function_impl, $cacheable=true)
770
+    function register_compiler_function($function, $function_impl, $cacheable = true)
771 771
     {
772 772
         $this->_plugins['compiler'][$function] =
773 773
             array($function_impl, null, null, false, $cacheable);
@@ -813,11 +813,11 @@  discard block
 block discarded – undo
813 813
      */
814 814
     function register_resource($type, $functions)
815 815
     {
816
-        if (count($functions)==4) {
816
+        if (count($functions) == 4) {
817 817
             $this->_plugins['resource'][$type] =
818 818
                 array($functions, false);
819 819
 
820
-        } elseif (count($functions)==5) {
820
+        } elseif (count($functions) == 5) {
821 821
             $this->_plugins['resource'][$type] =
822 822
                 array(array(array(&$functions[0], $functions[1])
823 823
                             ,array(&$functions[0], $functions[2])
@@ -917,15 +917,15 @@  discard block
 block discarded – undo
917 917
     {
918 918
         switch ($type) {
919 919
             case 'output':
920
-                $_params = array('plugins' => array(array($type . 'filter', $name, null, null, false)));
921
-                require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
920
+                $_params = array('plugins' => array(array($type.'filter', $name, null, null, false)));
921
+                require_once(SMARTY_CORE_DIR.'core.load_plugins.php');
922 922
                 smarty_core_load_plugins($_params, $this);
923 923
                 break;
924 924
 
925 925
             case 'pre':
926 926
             case 'post':
927
-                if (!isset($this->_plugins[$type . 'filter'][$name]))
928
-                    $this->_plugins[$type . 'filter'][$name] = false;
927
+                if (!isset($this->_plugins[$type.'filter'][$name]))
928
+                    $this->_plugins[$type.'filter'][$name] = false;
929 929
                 break;
930 930
         }
931 931
     }
@@ -958,7 +958,7 @@  discard block
 block discarded – undo
958 958
                             'auto_source' => $tpl_file,
959 959
                             'auto_id' => $_auto_id,
960 960
                             'exp_time' => $exp_time);
961
-            require_once(SMARTY_CORE_DIR . 'core.rm_auto.php');
961
+            require_once(SMARTY_CORE_DIR.'core.rm_auto.php');
962 962
             return smarty_core_rm_auto($_params, $this);
963 963
         }
964 964
 
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
             'cache_id' => $cache_id,
999 999
             'compile_id' => $compile_id
1000 1000
         );
1001
-        require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php');
1001
+        require_once(SMARTY_CORE_DIR.'core.read_cache_file.php');
1002 1002
         return smarty_core_read_cache_file($_params, $this);
1003 1003
     }
1004 1004
 
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
                         'auto_id' => $compile_id,
1033 1033
                         'exp_time' => $exp_time,
1034 1034
                         'extensions' => array('.inc', '.php'));
1035
-        require_once(SMARTY_CORE_DIR . 'core.rm_auto.php');
1035
+        require_once(SMARTY_CORE_DIR.'core.rm_auto.php');
1036 1036
         return smarty_core_rm_auto($_params, $this);
1037 1037
     }
1038 1038
 
@@ -1055,11 +1055,11 @@  discard block
 block discarded – undo
1055 1055
      * @param string $type
1056 1056
      * @return array
1057 1057
      */
1058
-    function &get_template_vars($name=null)
1058
+    function &get_template_vars($name = null)
1059 1059
     {
1060
-        if(!isset($name)) {
1060
+        if (!isset($name)) {
1061 1061
             return $this->_tpl_vars;
1062
-        } elseif(isset($this->_tpl_vars[$name])) {
1062
+        } elseif (isset($this->_tpl_vars[$name])) {
1063 1063
             return $this->_tpl_vars[$name];
1064 1064
         } else {
1065 1065
             // var non-existant, return valid reference
@@ -1075,11 +1075,11 @@  discard block
 block discarded – undo
1075 1075
      * @param string $type
1076 1076
      * @return array
1077 1077
      */
1078
-    function &get_config_vars($name=null)
1078
+    function &get_config_vars($name = null)
1079 1079
     {
1080
-        if(!isset($name) && is_array($this->_config[0])) {
1080
+        if (!isset($name) && is_array($this->_config[0])) {
1081 1081
             return $this->_config[0]['vars'];
1082
-        } else if(isset($this->_config[0]['vars'][$name])) {
1082
+        } else if (isset($this->_config[0]['vars'][$name])) {
1083 1083
             return $this->_config[0]['vars'][$name];
1084 1084
         } else {
1085 1085
             // var non-existant, return valid reference
@@ -1131,11 +1131,11 @@  discard block
 block discarded – undo
1131 1131
         if (!$this->debugging && $this->debugging_ctrl == 'URL') {
1132 1132
             $_query_string = $this->request_use_auto_globals ? $_SERVER['QUERY_STRING'] : $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'];
1133 1133
             if (@strstr($_query_string, $this->_smarty_debug_id)) {
1134
-                if (@strstr($_query_string, $this->_smarty_debug_id . '=on')) {
1134
+                if (@strstr($_query_string, $this->_smarty_debug_id.'=on')) {
1135 1135
                     // enable debugging for this browser session
1136 1136
                     @setcookie('SMARTY_DEBUG', true);
1137 1137
                     $this->debugging = true;
1138
-                } elseif (@strstr($_query_string, $this->_smarty_debug_id . '=off')) {
1138
+                } elseif (@strstr($_query_string, $this->_smarty_debug_id.'=off')) {
1139 1139
                     // disable debugging for this browser session
1140 1140
                     @setcookie('SMARTY_DEBUG', false);
1141 1141
                     $this->debugging = false;
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
         if ($this->debugging) {
1152 1152
             // capture time for debugging info
1153 1153
             $_params = array();
1154
-            require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
1154
+            require_once(SMARTY_CORE_DIR.'core.get_microtime.php');
1155 1155
             $_debug_start_time = smarty_core_get_microtime($_params, $this);
1156 1156
             $this->_smarty_debug_info[] = array('type'      => 'template',
1157 1157
                                                 'filename'  => $resource_name,
@@ -1176,20 +1176,20 @@  discard block
 block discarded – undo
1176 1176
                 'compile_id' => $compile_id,
1177 1177
                 'results' => null
1178 1178
             );
1179
-            require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php');
1179
+            require_once(SMARTY_CORE_DIR.'core.read_cache_file.php');
1180 1180
             if (smarty_core_read_cache_file($_params, $this)) {
1181 1181
                 $_smarty_results = $_params['results'];
1182 1182
                 if (!empty($this->_cache_info['insert_tags'])) {
1183 1183
                     $_params = array('plugins' => $this->_cache_info['insert_tags']);
1184
-                    require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
1184
+                    require_once(SMARTY_CORE_DIR.'core.load_plugins.php');
1185 1185
                     smarty_core_load_plugins($_params, $this);
1186 1186
                     $_params = array('results' => $_smarty_results);
1187
-                    require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php');
1187
+                    require_once(SMARTY_CORE_DIR.'core.process_cached_inserts.php');
1188 1188
                     $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
1189 1189
                 }
1190 1190
                 if (!empty($this->_cache_info['cache_serials'])) {
1191 1191
                     $_params = array('results' => $_smarty_results);
1192
-                    require_once(SMARTY_CORE_DIR . 'core.process_compiled_include.php');
1192
+                    require_once(SMARTY_CORE_DIR.'core.process_compiled_include.php');
1193 1193
                     $_smarty_results = smarty_core_process_compiled_include($_params, $this);
1194 1194
                 }
1195 1195
 
@@ -1199,9 +1199,9 @@  discard block
 block discarded – undo
1199 1199
                     {
1200 1200
                         // capture time for debugging info
1201 1201
                         $_params = array();
1202
-                        require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
1202
+                        require_once(SMARTY_CORE_DIR.'core.get_microtime.php');
1203 1203
                         $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $_debug_start_time;
1204
-                        require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
1204
+                        require_once(SMARTY_CORE_DIR.'core.display_debug_console.php');
1205 1205
                         $_smarty_results .= smarty_core_display_debug_console($_params, $this);
1206 1206
                     }
1207 1207
                     if ($this->cache_modified_check) {
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
                         if (@count($this->_cache_info['insert_tags']) == 0
1212 1212
                             && !$this->_cache_serials
1213 1213
                             && $_gmt_mtime == $_last_modified_date) {
1214
-                            if (php_sapi_name()=='cgi')
1214
+                            if (php_sapi_name() == 'cgi')
1215 1215
                                 header('Status: 304 Not Modified');
1216 1216
                             else
1217 1217
                                 header('HTTP/1.1 304 Not Modified');
@@ -1282,9 +1282,9 @@  discard block
 block discarded – undo
1282 1282
                         'cache_id' => $cache_id,
1283 1283
                         'compile_id' => $compile_id,
1284 1284
                         'results' => $_smarty_results);
1285
-            require_once(SMARTY_CORE_DIR . 'core.write_cache_file.php');
1285
+            require_once(SMARTY_CORE_DIR.'core.write_cache_file.php');
1286 1286
             smarty_core_write_cache_file($_params, $this);
1287
-            require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php');
1287
+            require_once(SMARTY_CORE_DIR.'core.process_cached_inserts.php');
1288 1288
             $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
1289 1289
 
1290 1290
             if ($this->_cache_serials) {
@@ -1303,9 +1303,9 @@  discard block
 block discarded – undo
1303 1303
             if ($this->debugging) {
1304 1304
                 // capture time for debugging info
1305 1305
                 $_params = array();
1306
-                require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
1306
+                require_once(SMARTY_CORE_DIR.'core.get_microtime.php');
1307 1307
                 $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);
1308
-                require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
1308
+                require_once(SMARTY_CORE_DIR.'core.display_debug_console.php');
1309 1309
                 echo smarty_core_display_debug_console($_params, $this);
1310 1310
             }
1311 1311
             error_reporting($_smarty_old_error_level);
@@ -1352,7 +1352,7 @@  discard block
 block discarded – undo
1352 1352
      */
1353 1353
     function clear_config($var = null)
1354 1354
     {
1355
-        if(!isset($var)) {
1355
+        if (!isset($var)) {
1356 1356
             // clear all values
1357 1357
             $this->_config = array(array('vars'  => array(),
1358 1358
                                          'files' => array()));
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
     function _get_plugin_filepath($type, $name)
1372 1372
     {
1373 1373
         $_params = array('type' => $type, 'name' => $name);
1374
-        require_once(SMARTY_CORE_DIR . 'core.assemble_plugin_filepath.php');
1374
+        require_once(SMARTY_CORE_DIR.'core.assemble_plugin_filepath.php');
1375 1375
         return smarty_core_assemble_plugin_filepath($_params, $this);
1376 1376
     }
1377 1377
 
@@ -1424,17 +1424,17 @@  discard block
 block discarded – undo
1424 1424
         }
1425 1425
 
1426 1426
         $_source_content = $_params['source_content'];
1427
-        $_cache_include    = substr($compile_path, 0, -4).'.inc';
1427
+        $_cache_include = substr($compile_path, 0, -4).'.inc';
1428 1428
 
1429 1429
         if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
1430 1430
             // if a _cache_serial was set, we also have to write an include-file:
1431 1431
             if ($this->_cache_include_info) {
1432
-                require_once(SMARTY_CORE_DIR . 'core.write_compiled_include.php');
1433
-                smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content'=>$_compiled_content, 'resource_name'=>$resource_name)),  $this);
1432
+                require_once(SMARTY_CORE_DIR.'core.write_compiled_include.php');
1433
+                smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content'=>$_compiled_content, 'resource_name'=>$resource_name)), $this);
1434 1434
             }
1435 1435
 
1436 1436
             $_params = array('compile_path'=>$compile_path, 'compiled_content' => $_compiled_content);
1437
-            require_once(SMARTY_CORE_DIR . 'core.write_compiled_resource.php');
1437
+            require_once(SMARTY_CORE_DIR.'core.write_compiled_resource.php');
1438 1438
             smarty_core_write_compiled_resource($_params, $this);
1439 1439
 
1440 1440
             return true;
@@ -1452,10 +1452,10 @@  discard block
 block discarded – undo
1452 1452
      * @param string $compiled_content
1453 1453
      * @return boolean
1454 1454
      */
1455
-    function _compile_source($resource_name, &$source_content, &$compiled_content, $cache_include_path=null)
1455
+    function _compile_source($resource_name, &$source_content, &$compiled_content, $cache_include_path = null)
1456 1456
     {
1457
-        if (file_exists(SMARTY_DIR . $this->compiler_file)) {
1458
-            require_once(SMARTY_DIR . $this->compiler_file);
1457
+        if (file_exists(SMARTY_DIR.$this->compiler_file)) {
1458
+            require_once(SMARTY_DIR.$this->compiler_file);
1459 1459
         } else {
1460 1460
             // use include_path
1461 1461
             require_once($this->compiler_file);
@@ -1484,8 +1484,8 @@  discard block
 block discarded – undo
1484 1484
         $smarty_compiler->_tpl_vars         = &$this->_tpl_vars;
1485 1485
         $smarty_compiler->default_modifiers = $this->default_modifiers;
1486 1486
         $smarty_compiler->compile_id        = $this->_compile_id;
1487
-        $smarty_compiler->_config            = $this->_config;
1488
-        $smarty_compiler->request_use_auto_globals  = $this->request_use_auto_globals;
1487
+        $smarty_compiler->_config = $this->_config;
1488
+        $smarty_compiler->request_use_auto_globals = $this->request_use_auto_globals;
1489 1489
 
1490 1490
         if (isset($cache_include_path) && isset($this->_cache_serials[$cache_include_path])) {
1491 1491
             $smarty_compiler->_cache_serial = $this->_cache_serials[$cache_include_path];
@@ -1518,7 +1518,7 @@  discard block
 block discarded – undo
1518 1518
     function _get_compile_path($resource_name)
1519 1519
     {
1520 1520
         return $this->_get_auto_filename($this->compile_dir, $resource_name,
1521
-                                         $this->_compile_id) . '.php';
1521
+                                         $this->_compile_id).'.php';
1522 1522
     }
1523 1523
 
1524 1524
     /**
@@ -1537,11 +1537,11 @@  discard block
 block discarded – undo
1537 1537
 
1538 1538
     function _fetch_resource_info(&$params)
1539 1539
     {
1540
-        if(!isset($params['get_source'])) { $params['get_source'] = true; }
1541
-        if(!isset($params['quiet'])) { $params['quiet'] = false; }
1540
+        if (!isset($params['get_source'])) { $params['get_source'] = true; }
1541
+        if (!isset($params['quiet'])) { $params['quiet'] = false; }
1542 1542
 
1543 1543
         $_return = false;
1544
-        $_params = array('resource_name' => $params['resource_name']) ;
1544
+        $_params = array('resource_name' => $params['resource_name']);
1545 1545
         if (isset($params['resource_base_path']))
1546 1546
             $_params['resource_base_path'] = $params['resource_base_path'];
1547 1547
         else
@@ -1593,13 +1593,13 @@  discard block
 block discarded – undo
1593 1593
 
1594 1594
         if (!$_return) {
1595 1595
             if (!$params['quiet']) {
1596
-                $this->trigger_error('unable to read resource: "' . $params['resource_name'] . '"');
1596
+                $this->trigger_error('unable to read resource: "'.$params['resource_name'].'"');
1597 1597
             }
1598 1598
         } else if ($_return && $this->security) {
1599
-            require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
1599
+            require_once(SMARTY_CORE_DIR.'core.is_secure.php');
1600 1600
             if (!smarty_core_is_secure($_params, $this)) {
1601 1601
                 if (!$params['quiet'])
1602
-                    $this->trigger_error('(secure mode) accessing "' . $params['resource_name'] . '" is not allowed');
1602
+                    $this->trigger_error('(secure mode) accessing "'.$params['resource_name'].'" is not allowed');
1603 1603
                 $params['source_content'] = null;
1604 1604
                 $params['resource_timestamp'] = null;
1605 1605
                 return false;
@@ -1630,7 +1630,7 @@  discard block
 block discarded – undo
1630 1630
             $params['resource_type'] = $this->default_resource_type;
1631 1631
             $params['resource_name'] = $_resource_name_parts[0];
1632 1632
         } else {
1633
-            if(strlen($_resource_name_parts[0]) == 1) {
1633
+            if (strlen($_resource_name_parts[0]) == 1) {
1634 1634
                 // 1 char is not resource type, but part of filepath
1635 1635
                 $params['resource_type'] = $this->default_resource_type;
1636 1636
                 $params['resource_name'] = $params['resource_name'];
@@ -1645,15 +1645,15 @@  discard block
 block discarded – undo
1645 1645
                 // relative pathname to $params['resource_base_path']
1646 1646
                 // use the first directory where the file is found
1647 1647
                 foreach ((array)$params['resource_base_path'] as $_curr_path) {
1648
-                    $_fullpath = $_curr_path . DIRECTORY_SEPARATOR . $params['resource_name'];
1648
+                    $_fullpath = $_curr_path.DIRECTORY_SEPARATOR.$params['resource_name'];
1649 1649
                     if (file_exists($_fullpath) && is_file($_fullpath)) {
1650 1650
                         $params['resource_name'] = $_fullpath;
1651 1651
                         return true;
1652 1652
                     }
1653 1653
                     // didn't find the file, try include_path
1654 1654
                     $_params = array('file_path' => $_fullpath);
1655
-                    require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
1656
-                    if(smarty_core_get_include_path($_params, $this)) {
1655
+                    require_once(SMARTY_CORE_DIR.'core.get_include_path.php');
1656
+                    if (smarty_core_get_include_path($_params, $this)) {
1657 1657
                         $params['resource_name'] = $_params['new_file_path'];
1658 1658
                         return true;
1659 1659
                     }
@@ -1665,7 +1665,7 @@  discard block
 block discarded – undo
1665 1665
             }
1666 1666
         } elseif (empty($this->_plugins['resource'][$params['resource_type']])) {
1667 1667
             $_params = array('type' => $params['resource_type']);
1668
-            require_once(SMARTY_CORE_DIR . 'core.load_resource_plugin.php');
1668
+            require_once(SMARTY_CORE_DIR.'core.load_resource_plugin.php');
1669 1669
             smarty_core_load_resource_plugin($_params, $this);
1670 1670
         }
1671 1671
 
@@ -1719,7 +1719,7 @@  discard block
 block discarded – undo
1719 1719
      */
1720 1720
     function _read_file($filename)
1721 1721
     {
1722
-        if ( file_exists($filename) && is_readable($filename) && ($fd = @fopen($filename, 'rb')) ) {
1722
+        if (file_exists($filename) && is_readable($filename) && ($fd = @fopen($filename, 'rb'))) {
1723 1723
             $contents = '';
1724 1724
             while (!feof($fd)) {
1725 1725
                 $contents .= fread($fd, 8192);
@@ -1743,25 +1743,25 @@  discard block
 block discarded – undo
1743 1743
      */
1744 1744
     function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
1745 1745
     {
1746
-        $_compile_dir_sep =  $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
1747
-        $_return = $auto_base . DIRECTORY_SEPARATOR;
1746
+        $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
1747
+        $_return = $auto_base.DIRECTORY_SEPARATOR;
1748 1748
 
1749
-        if(isset($auto_id)) {
1749
+        if (isset($auto_id)) {
1750 1750
             // make auto_id safe for directory names
1751
-            $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id)));
1751
+            $auto_id = str_replace('%7C', $_compile_dir_sep, (urlencode($auto_id)));
1752 1752
             // split into separate directories
1753
-            $_return .= $auto_id . $_compile_dir_sep;
1753
+            $_return .= $auto_id.$_compile_dir_sep;
1754 1754
         }
1755 1755
 
1756
-        if(isset($auto_source)) {
1756
+        if (isset($auto_source)) {
1757 1757
             // make source name safe for filename
1758 1758
             $_filename = urlencode(basename($auto_source));
1759 1759
             $_crc32 = sprintf('%08X', crc32($auto_source));
1760 1760
             // prepend %% to avoid name conflicts with
1761 1761
             // with $params['auto_id'] names
1762
-            $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .
1763
-                      substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
1764
-            $_return .= '%%' . $_crc32 . '%%' . $_filename;
1762
+            $_crc32 = substr($_crc32, 0, 2).$_compile_dir_sep.
1763
+                      substr($_crc32, 0, 3).$_compile_dir_sep.$_crc32;
1764
+            $_return .= '%%'.$_crc32.'%%'.$_filename;
1765 1765
         }
1766 1766
 
1767 1767
         return $_return;
@@ -1775,8 +1775,8 @@  discard block
 block discarded – undo
1775 1775
      */
1776 1776
     function _unlink($resource, $exp_time = null)
1777 1777
     {
1778
-        if(isset($exp_time)) {
1779
-            if(time() - @filemtime($resource) >= $exp_time) {
1778
+        if (isset($exp_time)) {
1779
+            if (time() - @filemtime($resource) >= $exp_time) {
1780 1780
                 return @unlink($resource);
1781 1781
             }
1782 1782
         } else {
@@ -1791,10 +1791,10 @@  discard block
 block discarded – undo
1791 1791
      * @param string $compile_id
1792 1792
      * @return string|null
1793 1793
      */
1794
-    function _get_auto_id($cache_id=null, $compile_id=null) {
1794
+    function _get_auto_id($cache_id = null, $compile_id = null) {
1795 1795
     if (isset($cache_id))
1796
-        return (isset($compile_id)) ? $cache_id . '|' . $compile_id  : $cache_id;
1797
-    elseif(isset($compile_id))
1796
+        return (isset($compile_id)) ? $cache_id.'|'.$compile_id : $cache_id;
1797
+    elseif (isset($compile_id))
1798 1798
         return $compile_id;
1799 1799
     else
1800 1800
         return null;
@@ -1813,15 +1813,15 @@  discard block
 block discarded – undo
1813 1813
     function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null,
1814 1814
             $file = null, $line = null, $error_type = E_USER_ERROR)
1815 1815
     {
1816
-        if(isset($file) && isset($line)) {
1816
+        if (isset($file) && isset($line)) {
1817 1817
             $info = ' ('.basename($file).", line $line)";
1818 1818
         } else {
1819 1819
             $info = '';
1820 1820
         }
1821 1821
         if (isset($tpl_line) && isset($tpl_file)) {
1822
-            $this->trigger_error('[in ' . $tpl_file . ' line ' . $tpl_line . "]: $error_msg$info", $error_type);
1822
+            $this->trigger_error('[in '.$tpl_file.' line '.$tpl_line."]: $error_msg$info", $error_type);
1823 1823
         } else {
1824
-            $this->trigger_error($error_msg . $info, $error_type);
1824
+            $this->trigger_error($error_msg.$info, $error_type);
1825 1825
         }
1826 1826
     }
1827 1827
 
@@ -1853,7 +1853,7 @@  discard block
 block discarded – undo
1853 1853
     {
1854 1854
         if ($this->debugging) {
1855 1855
             $_params = array();
1856
-            require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
1856
+            require_once(SMARTY_CORE_DIR.'core.get_microtime.php');
1857 1857
             $debug_start_time = smarty_core_get_microtime($_params, $this);
1858 1858
             $this->_smarty_debug_info[] = array('type'      => 'template',
1859 1859
                                                   'filename'  => $params['smarty_include_tpl_file'],
@@ -1884,7 +1884,7 @@  discard block
 block discarded – undo
1884 1884
         if ($this->debugging) {
1885 1885
             // capture time for debugging info
1886 1886
             $_params = array();
1887
-            require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
1887
+            require_once(SMARTY_CORE_DIR.'core.get_microtime.php');
1888 1888
             $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $debug_start_time;
1889 1889
         }
1890 1890
 
@@ -1900,7 +1900,7 @@  discard block
 block discarded – undo
1900 1900
      * @return array
1901 1901
      */
1902 1902
     function &_smarty_cache_attrs($cache_serial, $count) {
1903
-        $_cache_attrs =& $this->_cache_info['cache_attrs'][$cache_serial][$count];
1903
+        $_cache_attrs = & $this->_cache_info['cache_attrs'][$cache_serial][$count];
1904 1904
 
1905 1905
         if ($this->_cache_including) {
1906 1906
             /* return next set of cache_attrs */
@@ -1911,7 +1911,7 @@  discard block
 block discarded – undo
1911 1911
         } else {
1912 1912
             /* add a reference to a new set of cache_attrs */
1913 1913
             $_cache_attrs[] = array();
1914
-            return $_cache_attrs[count($_cache_attrs)-1];
1914
+            return $_cache_attrs[count($_cache_attrs) - 1];
1915 1915
 
1916 1916
         }
1917 1917
 
@@ -1922,7 +1922,7 @@  discard block
 block discarded – undo
1922 1922
      * wrapper for include() retaining $this
1923 1923
      * @return mixed
1924 1924
      */
1925
-    function _include($filename, $once=false, $params=null)
1925
+    function _include($filename, $once = false, $params = null)
1926 1926
     {
1927 1927
         if ($once) {
1928 1928
             return include_once($filename);
@@ -1936,7 +1936,7 @@  discard block
 block discarded – undo
1936 1936
      * wrapper for eval() retaining $this
1937 1937
      * @return mixed
1938 1938
      */
1939
-    function _eval($code, $params=null)
1939
+    function _eval($code, $params = null)
1940 1940
     {
1941 1941
         return eval($code);
1942 1942
     }
@@ -1952,7 +1952,7 @@  discard block
 block discarded – undo
1952 1952
 		if (is_array($function)) {
1953 1953
 			$_class_name = (is_object($function[0]) ?
1954 1954
 				get_class($function[0]) : $function[0]);
1955
-			return $_class_name . '_' . $function[1];
1955
+			return $_class_name.'_'.$function[1];
1956 1956
 		}
1957 1957
 		else {
1958 1958
 			return $function;
Please login to merge, or discard this patch.
Braces   +58 added lines, -44 removed lines patch added patch discarded remove patch
@@ -593,8 +593,9 @@  discard block
 block discarded – undo
593 593
                 }
594 594
             }
595 595
         } else {
596
-            if ($tpl_var != '')
597
-                $this->_tpl_vars[$tpl_var] = $value;
596
+            if ($tpl_var != '') {
597
+                            $this->_tpl_vars[$tpl_var] = $value;
598
+            }
598 599
         }
599 600
     }
600 601
 
@@ -606,8 +607,9 @@  discard block
 block discarded – undo
606 607
      */
607 608
     function assign_by_ref($tpl_var, &$value)
608 609
     {
609
-        if ($tpl_var != '')
610
-            $this->_tpl_vars[$tpl_var] = &$value;
610
+        if ($tpl_var != '') {
611
+                    $this->_tpl_vars[$tpl_var] = &$value;
612
+        }
611 613
     }
612 614
 
613 615
     /**
@@ -680,11 +682,12 @@  discard block
 block discarded – undo
680 682
      */
681 683
     function clear_assign($tpl_var)
682 684
     {
683
-        if (is_array($tpl_var))
684
-            foreach ($tpl_var as $curr_var)
685
+        if (is_array($tpl_var)) {
686
+                    foreach ($tpl_var as $curr_var)
685 687
                 unset($this->_tpl_vars[$curr_var]);
686
-        else
687
-            unset($this->_tpl_vars[$tpl_var]);
688
+        } else {
689
+                    unset($this->_tpl_vars[$tpl_var]);
690
+        }
688 691
     }
689 692
 
690 693
 
@@ -924,8 +927,9 @@  discard block
 block discarded – undo
924 927
 
925 928
             case 'pre':
926 929
             case 'post':
927
-                if (!isset($this->_plugins[$type . 'filter'][$name]))
928
-                    $this->_plugins[$type . 'filter'][$name] = false;
930
+                if (!isset($this->_plugins[$type . 'filter'][$name])) {
931
+                                    $this->_plugins[$type . 'filter'][$name] = false;
932
+                }
929 933
                 break;
930 934
         }
931 935
     }
@@ -942,11 +946,13 @@  discard block
 block discarded – undo
942 946
     function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
943 947
     {
944 948
 
945
-        if (!isset($compile_id))
946
-            $compile_id = $this->compile_id;
949
+        if (!isset($compile_id)) {
950
+                    $compile_id = $this->compile_id;
951
+        }
947 952
 
948
-        if (!isset($tpl_file))
949
-            $compile_id = null;
953
+        if (!isset($tpl_file)) {
954
+                    $compile_id = null;
955
+        }
950 956
 
951 957
         $_auto_id = $this->_get_auto_id($cache_id, $compile_id);
952 958
 
@@ -987,11 +993,13 @@  discard block
 block discarded – undo
987 993
      */
988 994
     function is_cached($tpl_file, $cache_id = null, $compile_id = null)
989 995
     {
990
-        if (!$this->caching)
991
-            return false;
996
+        if (!$this->caching) {
997
+                    return false;
998
+        }
992 999
 
993
-        if (!isset($compile_id))
994
-            $compile_id = $this->compile_id;
1000
+        if (!isset($compile_id)) {
1001
+                    $compile_id = $this->compile_id;
1002
+        }
995 1003
 
996 1004
         $_params = array(
997 1005
             'tpl_file' => $tpl_file,
@@ -1211,10 +1219,11 @@  discard block
 block discarded – undo
1211 1219
                         if (@count($this->_cache_info['insert_tags']) == 0
1212 1220
                             && !$this->_cache_serials
1213 1221
                             && $_gmt_mtime == $_last_modified_date) {
1214
-                            if (php_sapi_name()=='cgi')
1215
-                                header('Status: 304 Not Modified');
1216
-                            else
1217
-                                header('HTTP/1.1 304 Not Modified');
1222
+                            if (php_sapi_name()=='cgi') {
1223
+                                                            header('Status: 304 Not Modified');
1224
+                            } else {
1225
+                                                            header('HTTP/1.1 304 Not Modified');
1226
+                            }
1218 1227
 
1219 1228
                         } else {
1220 1229
                             header('Last-Modified: '.$_gmt_mtime);
@@ -1336,11 +1345,13 @@  discard block
 block discarded – undo
1336 1345
      * @return object
1337 1346
      */
1338 1347
     function &get_registered_object($name) {
1339
-        if (!isset($this->_reg_objects[$name]))
1340
-        $this->_trigger_fatal_error("'$name' is not a registered object");
1348
+        if (!isset($this->_reg_objects[$name])) {
1349
+                $this->_trigger_fatal_error("'$name' is not a registered object");
1350
+        }
1341 1351
 
1342
-        if (!is_object($this->_reg_objects[$name][0]))
1343
-        $this->_trigger_fatal_error("registered '$name' is not an object");
1352
+        if (!is_object($this->_reg_objects[$name][0])) {
1353
+                $this->_trigger_fatal_error("registered '$name' is not an object");
1354
+        }
1344 1355
 
1345 1356
         return $this->_reg_objects[$name][0];
1346 1357
     }
@@ -1542,10 +1553,11 @@  discard block
 block discarded – undo
1542 1553
 
1543 1554
         $_return = false;
1544 1555
         $_params = array('resource_name' => $params['resource_name']) ;
1545
-        if (isset($params['resource_base_path']))
1546
-            $_params['resource_base_path'] = $params['resource_base_path'];
1547
-        else
1548
-            $_params['resource_base_path'] = $this->template_dir;
1556
+        if (isset($params['resource_base_path'])) {
1557
+                    $_params['resource_base_path'] = $params['resource_base_path'];
1558
+        } else {
1559
+                    $_params['resource_base_path'] = $this->template_dir;
1560
+        }
1549 1561
 
1550 1562
         if ($this->_parse_resource_name($_params)) {
1551 1563
             $_resource_type = $_params['resource_type'];
@@ -1598,8 +1610,9 @@  discard block
 block discarded – undo
1598 1610
         } else if ($_return && $this->security) {
1599 1611
             require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
1600 1612
             if (!smarty_core_is_secure($_params, $this)) {
1601
-                if (!$params['quiet'])
1602
-                    $this->trigger_error('(secure mode) accessing "' . $params['resource_name'] . '" is not allowed');
1613
+                if (!$params['quiet']) {
1614
+                                    $this->trigger_error('(secure mode) accessing "' . $params['resource_name'] . '" is not allowed');
1615
+                }
1603 1616
                 $params['source_content'] = null;
1604 1617
                 $params['resource_timestamp'] = null;
1605 1618
                 return false;
@@ -1704,10 +1717,11 @@  discard block
 block discarded – undo
1704 1717
     function _dequote($string)
1705 1718
     {
1706 1719
         if ((substr($string, 0, 1) == "'" || substr($string, 0, 1) == '"') &&
1707
-            substr($string, -1) == substr($string, 0, 1))
1708
-            return substr($string, 1, -1);
1709
-        else
1710
-            return $string;
1720
+            substr($string, -1) == substr($string, 0, 1)) {
1721
+                    return substr($string, 1, -1);
1722
+        } else {
1723
+                    return $string;
1724
+        }
1711 1725
     }
1712 1726
 
1713 1727
 
@@ -1792,12 +1806,13 @@  discard block
 block discarded – undo
1792 1806
      * @return string|null
1793 1807
      */
1794 1808
     function _get_auto_id($cache_id=null, $compile_id=null) {
1795
-    if (isset($cache_id))
1796
-        return (isset($compile_id)) ? $cache_id . '|' . $compile_id  : $cache_id;
1797
-    elseif(isset($compile_id))
1798
-        return $compile_id;
1799
-    else
1800
-        return null;
1809
+    if (isset($cache_id)) {
1810
+            return (isset($compile_id)) ? $cache_id . '|' . $compile_id  : $cache_id;
1811
+    } elseif(isset($compile_id)) {
1812
+            return $compile_id;
1813
+    } else {
1814
+            return null;
1815
+    }
1801 1816
     }
1802 1817
 
1803 1818
     /**
@@ -1953,8 +1968,7 @@  discard block
 block discarded – undo
1953 1968
 			$_class_name = (is_object($function[0]) ?
1954 1969
 				get_class($function[0]) : $function[0]);
1955 1970
 			return $_class_name . '_' . $function[1];
1956
-		}
1957
-		else {
1971
+		} else {
1958 1972
 			return $function;
1959 1973
 		}
1960 1974
 	}
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/function.eval.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@
 block discarded – undo
25 25
         return;
26 26
     }
27 27
 
28
-    if($params['var'] == '') {
28
+    if ($params['var'] == '') {
29 29
         return;
30 30
     }
31 31
 
32 32
     $smarty->_compile_source('evaluated template', $params['var'], $_var_compiled);
33 33
 
34 34
     ob_start();
35
-    $smarty->_eval('?>' . $_var_compiled);
35
+    $smarty->_eval('?>'.$_var_compiled);
36 36
     $_contents = ob_get_contents();
37 37
     ob_end_clean();
38 38
 
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/modifier.count_words.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 function smarty_modifier_count_words($string)
22 22
 {
23 23
     // split text by ' ',\r,\n,\f,\t
24
-    $split_array = preg_split('/\s+/',$string);
24
+    $split_array = preg_split('/\s+/', $string);
25 25
     // count matches that contain alphanumerics
26 26
     $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array);
27 27
 
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/modifier.regex_replace.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 function smarty_modifier_regex_replace($string, $search, $replace)
24 24
 {
25 25
     if(is_array($search)) {
26
-      foreach($search as $idx => $s)
26
+        foreach($search as $idx => $s)
27 27
         $search[$idx] = _smarty_regex_replace_check($s);
28 28
     } else {
29
-      $search = _smarty_regex_replace_check($search);
29
+        $search = _smarty_regex_replace_check($search);
30 30
     }       
31 31
 
32 32
     return preg_replace($search, $replace, $string);
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 function _smarty_regex_replace_check($search)
36 36
 {
37 37
     if (($pos = strpos($search,"\0")) !== false)
38
-      $search = substr($search,0,$pos);
38
+        $search = substr($search,0,$pos);
39 39
     if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
40 40
         /* remove eval-modifier from $search */
41 41
         $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
  */
23 23
 function smarty_modifier_regex_replace($string, $search, $replace)
24 24
 {
25
-    if(is_array($search)) {
26
-      foreach($search as $idx => $s)
25
+    if (is_array($search)) {
26
+      foreach ($search as $idx => $s)
27 27
         $search[$idx] = _smarty_regex_replace_check($s);
28 28
     } else {
29 29
       $search = _smarty_regex_replace_check($search);
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 
35 35
 function _smarty_regex_replace_check($search)
36 36
 {
37
-    if (($pos = strpos($search,"\0")) !== false)
38
-      $search = substr($search,0,$pos);
37
+    if (($pos = strpos($search, "\0")) !== false)
38
+      $search = substr($search, 0, $pos);
39 39
     if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
40 40
         /* remove eval-modifier from $search */
41
-        $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
41
+        $search = substr($search, 0, -strlen($match[1])).preg_replace('![e\s]+!', '', $match[1]);
42 42
     }
43 43
     return $search;
44 44
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,8 +23,9 @@  discard block
 block discarded – undo
23 23
 function smarty_modifier_regex_replace($string, $search, $replace)
24 24
 {
25 25
     if(is_array($search)) {
26
-      foreach($search as $idx => $s)
27
-        $search[$idx] = _smarty_regex_replace_check($s);
26
+      foreach($search as $idx => $s) {
27
+              $search[$idx] = _smarty_regex_replace_check($s);
28
+      }
28 29
     } else {
29 30
       $search = _smarty_regex_replace_check($search);
30 31
     }       
@@ -34,8 +35,9 @@  discard block
 block discarded – undo
34 35
 
35 36
 function _smarty_regex_replace_check($search)
36 37
 {
37
-    if (($pos = strpos($search,"\0")) !== false)
38
-      $search = substr($search,0,$pos);
38
+    if (($pos = strpos($search,"\0")) !== false) {
39
+          $search = substr($search,0,$pos);
40
+    }
39 41
     if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
40 42
         /* remove eval-modifier from $search */
41 43
         $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/function.counter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
             'count'=>1
33 33
             );
34 34
     }
35
-    $counter =& $counters[$name];
35
+    $counter = & $counters[$name];
36 36
 
37 37
     if (isset($params['start'])) {
38 38
         $counter['start'] = $counter['count'] = (int)$params['start'];
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,10 +66,11 @@
 block discarded – undo
66 66
         $counter['direction'] = $params['direction'];
67 67
     }
68 68
 
69
-    if ($counter['direction'] == "down")
70
-        $counter['count'] -= $counter['skip'];
71
-    else
72
-        $counter['count'] += $counter['skip'];
69
+    if ($counter['direction'] == "down") {
70
+            $counter['count'] -= $counter['skip'];
71
+    } else {
72
+            $counter['count'] += $counter['skip'];
73
+    }
73 74
     
74 75
     return $retval;
75 76
     
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/modifier.spacify.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 function smarty_modifier_spacify($string, $spacify_char = ' ')
23 23
 {
24 24
     return implode($spacify_char,
25
-                   preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY));
25
+                    preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY));
26 26
 }
27 27
 
28 28
 /* vim: set expandtab: */
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/shared.escape_special_chars.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,10 +18,10 @@
 block discarded – undo
18 18
  */
19 19
 function smarty_function_escape_special_chars($string)
20 20
 {
21
-    if(!is_array($string)) {
21
+    if (!is_array($string)) {
22 22
         $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
23 23
         $string = htmlspecialchars($string);
24
-        $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string);
24
+        $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
25 25
     }
26 26
     return $string;
27 27
 }
Please login to merge, or discard this patch.