Test Failed
Pull Request — master (#592)
by Lucio
10:17
created
htdocs/class/smarty/plugins/function.cycle.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
     $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;
52 52
             
53 53
     if (!in_array('values', array_keys($params))) {
54
-        if(!isset($cycle_vars[$name]['values'])) {
54
+        if (!isset($cycle_vars[$name]['values'])) {
55 55
             $smarty->trigger_error("cycle: missing 'values' parameter");
56 56
             return;
57 57
         }
58 58
     } else {
59
-        if(isset($cycle_vars[$name]['values'])
60
-            && $cycle_vars[$name]['values'] != $params['values'] ) {
59
+        if (isset($cycle_vars[$name]['values'])
60
+            && $cycle_vars[$name]['values'] != $params['values']) {
61 61
             $cycle_vars[$name]['index'] = 0;
62 62
         }
63 63
         $cycle_vars[$name]['values'] = $params['values'];
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
         $cycle_vars[$name]['delimiter'] = ',';       
70 70
     }
71 71
     
72
-    if(is_array($cycle_vars[$name]['values'])) {
72
+    if (is_array($cycle_vars[$name]['values'])) {
73 73
         $cycle_array = $cycle_vars[$name]['values'];
74 74
     } else {
75
-        $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']);
75
+        $cycle_array = explode($cycle_vars[$name]['delimiter'], $cycle_vars[$name]['values']);
76 76
     }
77 77
     
78
-    if(!isset($cycle_vars[$name]['index']) || $reset ) {
78
+    if (!isset($cycle_vars[$name]['index']) || $reset) {
79 79
         $cycle_vars[$name]['index'] = 0;
80 80
     }
81 81
     
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
         $smarty->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
85 85
     }
86 86
         
87
-    if($print) {
87
+    if ($print) {
88 88
         $retval = $cycle_array[$cycle_vars[$name]['index']];
89 89
     } else {
90 90
         $retval = null;
91 91
     }
92 92
 
93
-    if($advance) {
94
-        if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) {
93
+    if ($advance) {
94
+        if ($cycle_vars[$name]['index'] >= count($cycle_array) - 1) {
95 95
             $cycle_vars[$name]['index'] = 0;
96 96
         } else {
97 97
             $cycle_vars[$name]['index']++;
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/function.popup_init.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     
30 30
     if (!empty($params['src'])) {
31 31
         return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
32
-         . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
32
+            . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
33 33
     } else {
34 34
         $smarty->trigger_error("popup_init: missing src parameter");
35 35
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
     }
29 29
     
30 30
     if (!empty($params['src'])) {
31
-        return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
32
-         . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
31
+        return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>'."\n"
32
+         . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>'."\n";
33 33
     } else {
34 34
         $smarty->trigger_error("popup_init: missing src parameter");
35 35
     }
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/outputfilter.trimwhitespace.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
     preg_match_all("!<script[^>]*?>.*?</script>!is", $source, $match);
32 32
     $_script_blocks = $match[0];
33 33
     $source = preg_replace("!<script[^>]*?>.*?</script>!is",
34
-                           '@@@SMARTY:TRIM:SCRIPT@@@', $source);
34
+                            '@@@SMARTY:TRIM:SCRIPT@@@', $source);
35 35
 
36 36
     // Pull out the pre blocks
37 37
     preg_match_all("!<pre[^>]*?>.*?</pre>!is", $source, $match);
38 38
     $_pre_blocks = $match[0];
39 39
     $source = preg_replace("!<pre[^>]*?>.*?</pre>!is",
40
-                           '@@@SMARTY:TRIM:PRE@@@', $source);
40
+                            '@@@SMARTY:TRIM:PRE@@@', $source);
41 41
     
42 42
     // Pull out the textarea blocks
43 43
     preg_match_all("!<textarea[^>]*?>.*?</textarea>!is", $source, $match);
44 44
     $_textarea_blocks = $match[0];
45 45
     $source = preg_replace("!<textarea[^>]*?>.*?</textarea>!is",
46
-                           '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
46
+                            '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
47 47
 
48 48
     // remove all leading spaces, tabs and carriage returns NOT
49 49
     // preceeded by a php close tag.
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
     $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source));
51 51
 
52 52
     // replace textarea blocks
53
-    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source);
53
+    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@", $_textarea_blocks, $source);
54 54
 
55 55
     // replace pre blocks
56
-    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source);
56
+    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@", $_pre_blocks, $source);
57 57
 
58 58
     // replace script blocks
59
-    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source);
59
+    smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@", $_script_blocks, $source);
60 60
 
61 61
     return $source;
62 62
 }
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) {
65 65
     $_len = strlen($search_str);
66 66
     $_pos = 0;
67
-    for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
68
-        if (($_pos=strpos($subject, $search_str, $_pos))!==false)
67
+    for ($_i = 0, $_count = count($replace); $_i < $_count; $_i++)
68
+        if (($_pos = strpos($subject, $search_str, $_pos)) !== false)
69 69
             $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
70 70
         else
71 71
             break;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,11 +64,13 @@
 block discarded – undo
64 64
 function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) {
65 65
     $_len = strlen($search_str);
66 66
     $_pos = 0;
67
-    for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
68
-        if (($_pos=strpos($subject, $search_str, $_pos))!==false)
67
+    for ($_i=0, $_count=count($replace); $_i<$_count; $_i++) {
68
+            if (($_pos=strpos($subject, $search_str, $_pos))!==false)
69 69
             $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
70
-        else
71
-            break;
70
+    }
71
+        else {
72
+                    break;
73
+        }
72 74
 
73 75
 }
74 76
 
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/function.math.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
 {
27 27
     static $_allowed_funcs =
28 28
         array('int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,
29
-              'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true, 'rand' => true,
30
-              'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true, 'tan' => true);
29
+                'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true, 'rand' => true,
30
+                'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true, 'tan' => true);
31 31
     // be sure equation parameter is present
32 32
     if (empty($params[ 'equation' ])) {
33 33
         trigger_error("math: missing equation parameter", E_USER_WARNING);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
               'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true, 'rand' => true,
30 30
               'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true, 'tan' => true);
31 31
     // be sure equation parameter is present
32
-    if (empty($params[ 'equation' ])) {
32
+    if (empty($params['equation'])) {
33 33
         trigger_error("math: missing equation parameter", E_USER_WARNING);
34 34
 
35 35
         return;
36 36
     }
37 37
 
38
-    $equation = $params[ 'equation' ];
38
+    $equation = $params['equation'];
39 39
 
40 40
     // make sure parenthesis are balanced
41 41
     if (substr_count($equation, "(") != substr_count($equation, ")")) {
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
     // match all vars in equation, make sure all are passed
78 78
     preg_match_all('!(?:0x[a-fA-F0-9]+)|([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)!', $equation, $match);
79 79
 
80
-    foreach ($match[ 1 ] as $curr_var) {
81
-        if ($curr_var && !isset($params[ $curr_var ]) && !isset($_allowed_funcs[ $curr_var ])) {
80
+    foreach ($match[1] as $curr_var) {
81
+        if ($curr_var && !isset($params[$curr_var]) && !isset($_allowed_funcs[$curr_var])) {
82 82
             trigger_error("math: function call '{$curr_var}' not allowed, or missing parameter '{$curr_var}'", E_USER_WARNING);
83 83
 
84 84
             return;
@@ -91,19 +91,19 @@  discard block
 block discarded – undo
91 91
         }
92 92
     }
93 93
     $smarty_math_result = null;
94
-    eval("\$smarty_math_result = " . $equation . ";");
94
+    eval("\$smarty_math_result = ".$equation.";");
95 95
 
96
-    if (empty($params[ 'format' ])) {
97
-        if (empty($params[ 'assign' ])) {
96
+    if (empty($params['format'])) {
97
+        if (empty($params['assign'])) {
98 98
             return $smarty_math_result;
99 99
         } else {
100
-            $smarty->assign($params[ 'assign' ], $smarty_math_result);
100
+            $smarty->assign($params['assign'], $smarty_math_result);
101 101
         }
102 102
     } else {
103
-        if (empty($params[ 'assign' ])) {
104
-            printf($params[ 'format' ], $smarty_math_result);
103
+        if (empty($params['assign'])) {
104
+            printf($params['format'], $smarty_math_result);
105 105
         } else {
106
-            $smarty->assign($params[ 'assign' ], sprintf($params[ 'format' ], $smarty_math_result));
106
+            $smarty->assign($params['assign'], sprintf($params['format'], $smarty_math_result));
107 107
         }
108 108
     }
109 109
 }
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/function.config_load.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         $_params = array('resource_name' => $_file,
59
-                         'resource_base_path' => $smarty->config_dir,
60
-                         'get_source' => false);
59
+                            'resource_base_path' => $smarty->config_dir,
60
+                            'get_source' => false);
61 61
         $smarty->_parse_resource_name($_params);
62 62
         $_file_path = $_params['resource_type'] . ':' . $_params['resource_name'];
63 63
         if (isset($_section))
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
             $_compile = true;
70 70
         } elseif ($smarty->compile_check) {
71 71
             $_params = array('resource_name' => $_file,
72
-                             'resource_base_path' => $smarty->config_dir,
73
-                             'get_source' => false);
72
+                                'resource_base_path' => $smarty->config_dir,
73
+                                'get_source' => false);
74 74
             $_compile = $smarty->_fetch_resource_info($_params) &&
75 75
                 $_params['resource_timestamp'] > filemtime($_compile_file);
76 76
         } else {
@@ -89,8 +89,8 @@  discard block
 block discarded – undo
89 89
             }
90 90
 
91 91
             $_params = array('resource_name' => $_file,
92
-                             'resource_base_path' => $smarty->config_dir,
93
-                             $_params['get_source'] = true);
92
+                                'resource_base_path' => $smarty->config_dir,
93
+                                $_params['get_source'] = true);
94 94
             if (!$smarty->_fetch_resource_info($_params)) {
95 95
                 return;
96 96
             }
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 {
29 29
         if ($smarty->debugging) {
30 30
             $_params = array();
31
-            require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
31
+            require_once(SMARTY_CORE_DIR.'core.get_microtime.php');
32 32
             $_debug_start_time = smarty_core_get_microtime($_params, $smarty);
33 33
         }
34 34
 
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
                          'resource_base_path' => $smarty->config_dir,
60 60
                          'get_source' => false);
61 61
         $smarty->_parse_resource_name($_params);
62
-        $_file_path = $_params['resource_type'] . ':' . $_params['resource_name'];
62
+        $_file_path = $_params['resource_type'].':'.$_params['resource_name'];
63 63
         if (isset($_section))
64 64
             $_compile_file = $smarty->_get_compile_path($_file_path.'|'.$_section);
65 65
         else
66 66
             $_compile_file = $smarty->_get_compile_path($_file_path);
67 67
 
68
-        if($smarty->force_compile || !file_exists($_compile_file)) {
68
+        if ($smarty->force_compile || !file_exists($_compile_file)) {
69 69
             $_compile = true;
70 70
         } elseif ($smarty->compile_check) {
71 71
             $_params = array('resource_name' => $_file,
@@ -77,10 +77,10 @@  discard block
 block discarded – undo
77 77
             $_compile = false;
78 78
         }
79 79
 
80
-        if($_compile) {
80
+        if ($_compile) {
81 81
             // compile config file
82
-            if(!is_object($smarty->_conf_obj)) {
83
-                require_once SMARTY_DIR . $smarty->config_class . '.class.php';
82
+            if (!is_object($smarty->_conf_obj)) {
83
+                require_once SMARTY_DIR.$smarty->config_class.'.class.php';
84 84
                 $smarty->_conf_obj = new $smarty->config_class();
85 85
                 $smarty->_conf_obj->overwrite = $smarty->config_overwrite;
86 86
                 $smarty->_conf_obj->booleanize = $smarty->config_booleanize;
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
             $smarty->_conf_obj->set_file_contents($_file, $_params['source_content']);
98 98
             $_config_vars = array_merge($smarty->_conf_obj->get($_file),
99 99
                     $smarty->_conf_obj->get($_file, $_section));
100
-            if(function_exists('var_export')) {
101
-                $_output = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; ?>';
100
+            if (function_exists('var_export')) {
101
+                $_output = '<?php $_config_vars = '.var_export($_config_vars, true).'; ?>';
102 102
             } else {
103
-                $_output = '<?php $_config_vars = unserialize(\'' . strtr(serialize($_config_vars),array('\''=>'\\\'', '\\'=>'\\\\')) . '\'); ?>';
103
+                $_output = '<?php $_config_vars = unserialize(\''.strtr(serialize($_config_vars), array('\''=>'\\\'', '\\'=>'\\\\')).'\'); ?>';
104 104
             }
105 105
             $_params = (array('compile_path' => $_compile_file, 'compiled_content' => $_output, 'resource_timestamp' => $_params['resource_timestamp']));
106
-            require_once(SMARTY_CORE_DIR . 'core.write_compiled_resource.php');
106
+            require_once(SMARTY_CORE_DIR.'core.write_compiled_resource.php');
107 107
             smarty_core_write_compiled_resource($_params, $smarty);
108 108
         } else {
109 109
             include($_compile_file);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
         if ($smarty->debugging) {
130 130
             $_params = array();
131
-            require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
131
+            require_once(SMARTY_CORE_DIR.'core.get_microtime.php');
132 132
             $smarty->_smarty_debug_info[] = array('type'      => 'config',
133 133
                                                 'filename'  => $_file.' ['.$_section.'] '.$_scope,
134 134
                                                 'depth'     => $smarty->_inclusion_depth,
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,10 +60,11 @@
 block discarded – undo
60 60
                          'get_source' => false);
61 61
         $smarty->_parse_resource_name($_params);
62 62
         $_file_path = $_params['resource_type'] . ':' . $_params['resource_name'];
63
-        if (isset($_section))
64
-            $_compile_file = $smarty->_get_compile_path($_file_path.'|'.$_section);
65
-        else
66
-            $_compile_file = $smarty->_get_compile_path($_file_path);
63
+        if (isset($_section)) {
64
+                    $_compile_file = $smarty->_get_compile_path($_file_path.'|'.$_section);
65
+        } else {
66
+                    $_compile_file = $smarty->_get_compile_path($_file_path);
67
+        }
67 68
 
68 69
         if($smarty->force_compile || !file_exists($_compile_file)) {
69 70
             $_compile = true;
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/function.mailto.php 2 patches
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     // netscape and mozilla do not decode %40 (@) in BCC field (bug?)
64 64
     // so, don't encode it.
65 65
     $search = array('%40', '%2C');
66
-    $replace  = array('@', ',');
66
+    $replace = array('@', ',');
67 67
     $mail_parms = array();
68 68
     foreach ($params as $var=>$value) {
69 69
         switch ($var) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             case 'bcc':
72 72
             case 'followupto':
73 73
                 if (!empty($value))
74
-                    $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
74
+                    $mail_parms[] = $var.'='.str_replace($search, $replace, rawurlencode($value));
75 75
                 break;
76 76
                 
77 77
             case 'subject':
@@ -88,39 +88,39 @@  discard block
 block discarded – undo
88 88
     }
89 89
 
90 90
     $mail_parm_vals = '';
91
-    for ($i=0; $i<count($mail_parms); $i++) {
92
-        $mail_parm_vals .= (0==$i) ? '?' : '&';
91
+    for ($i = 0; $i < count($mail_parms); $i++) {
92
+        $mail_parm_vals .= (0 == $i) ? '?' : '&';
93 93
         $mail_parm_vals .= $mail_parms[$i];
94 94
     }
95 95
     $address .= $mail_parm_vals;
96 96
 
97 97
     $encode = (empty($params['encode'])) ? 'none' : $params['encode'];
98
-    if (!in_array($encode,array('javascript','javascript_charcode','hex','none')) ) {
98
+    if (!in_array($encode, array('javascript', 'javascript_charcode', 'hex', 'none'))) {
99 99
         $smarty->trigger_error("mailto: 'encode' parameter must be none, javascript or hex");
100 100
         return;
101 101
     }
102 102
 
103
-    if ($encode == 'javascript' ) {
103
+    if ($encode == 'javascript') {
104 104
         $string = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');';
105 105
 
106 106
         $js_encode = '';
107
-        for ($x=0; $x < strlen($string); $x++) {
108
-            $js_encode .= '%' . bin2hex($string[$x]);
107
+        for ($x = 0; $x < strlen($string); $x++) {
108
+            $js_encode .= '%'.bin2hex($string[$x]);
109 109
         }
110 110
 
111 111
         return '<script type="text/javascript">eval(unescape(\''.$js_encode.'\'))</script>';
112 112
 
113
-    } elseif ($encode == 'javascript_charcode' ) {
113
+    } elseif ($encode == 'javascript_charcode') {
114 114
         $string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
115 115
 
116
-        for($x = 0, $y = strlen($string); $x < $y; $x++ ) {
116
+        for ($x = 0, $y = strlen($string); $x < $y; $x++) {
117 117
             $ord[] = ord($string[$x]);   
118 118
         }
119 119
 
120 120
         $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n";
121 121
         $_ret .= "<!--\n";
122 122
         $_ret .= "{document.write(String.fromCharCode(";
123
-        $_ret .= implode(',',$ord);
123
+        $_ret .= implode(',', $ord);
124 124
         $_ret .= "))";
125 125
         $_ret .= "}\n";
126 126
         $_ret .= "//-->\n";
@@ -131,22 +131,22 @@  discard block
 block discarded – undo
131 131
         
132 132
     } elseif ($encode == 'hex') {
133 133
 
134
-        preg_match('!^(.*)(\?.*)$!',$address,$match);
135
-        if(!empty($match[2])) {
134
+        preg_match('!^(.*)(\?.*)$!', $address, $match);
135
+        if (!empty($match[2])) {
136 136
             $smarty->trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.");
137 137
             return;
138 138
         }
139 139
         $address_encode = '';
140
-        for ($x=0; $x < strlen($address); $x++) {
141
-            if(preg_match('!\w!',$address[$x])) {
142
-                $address_encode .= '%' . bin2hex($address[$x]);
140
+        for ($x = 0; $x < strlen($address); $x++) {
141
+            if (preg_match('!\w!', $address[$x])) {
142
+                $address_encode .= '%'.bin2hex($address[$x]);
143 143
             } else {
144 144
                 $address_encode .= $address[$x];
145 145
             }
146 146
         }
147 147
         $text_encode = '';
148
-        for ($x=0; $x < strlen($text); $x++) {
149
-            $text_encode .= '&#x' . bin2hex($text[$x]).';';
148
+        for ($x = 0; $x < strlen($text); $x++) {
149
+            $text_encode .= '&#x'.bin2hex($text[$x]).';';
150 150
         }
151 151
 
152 152
         $mailto = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;";
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,9 @@
 block discarded – undo
70 70
             case 'cc':
71 71
             case 'bcc':
72 72
             case 'followupto':
73
-                if (!empty($value))
74
-                    $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
73
+                if (!empty($value)) {
74
+                                    $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
75
+                }
75 76
                 break;
76 77
                 
77 78
             case 'subject':
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/modifier.capitalize.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,12 +28,12 @@
 block discarded – undo
28 28
 {
29 29
     static $_uc_digits = false;
30 30
     
31
-    if(isset($uc_digits)) {
31
+    if (isset($uc_digits)) {
32 32
         $_uc_digits = $uc_digits;
33 33
         return;
34 34
     }
35 35
     
36
-    if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits)
36
+    if (substr($string[0], 0, 1) != "'" && !preg_match("!\d!", $string[0]) || $_uc_digits)
37 37
         return ucfirst($string[0]);
38 38
     else
39 39
         return $string[0];
Please login to merge, or discard this patch.
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,11 +33,12 @@
 block discarded – undo
33 33
         return;
34 34
     }
35 35
     
36
-    if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits)
37
-        return ucfirst($string[0]);
38
-    else
39
-        return $string[0];
40
-}
36
+    if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits) {
37
+            return ucfirst($string[0]);
38
+    } else {
39
+            return $string[0];
40
+    }
41
+    }
41 42
 
42 43
 
43 44
 ?>
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/modifier.indent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
  * @param string
21 21
  * @return string
22 22
  */
23
-function smarty_modifier_indent($string,$chars=4,$char=" ")
23
+function smarty_modifier_indent($string, $chars = 4, $char = " ")
24 24
 {
25
-    return preg_replace('!^!m',str_repeat($char,$chars),$string);
25
+    return preg_replace('!^!m', str_repeat($char, $chars), $string);
26 26
 }
27 27
 
28 28
 ?>
Please login to merge, or discard this patch.
htdocs/class/smarty/plugins/modifier.default.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,11 +21,12 @@
 block discarded – undo
21 21
  */
22 22
 function smarty_modifier_default($string, $default = '')
23 23
 {
24
-    if (!isset($string) || $string === '')
25
-        return $default;
26
-    else
27
-        return $string;
28
-}
24
+    if (!isset($string) || $string === '') {
25
+            return $default;
26
+    } else {
27
+            return $string;
28
+    }
29
+    }
29 30
 
30 31
 /* vim: set expandtab: */
31 32
 
Please login to merge, or discard this patch.