Changeset 7655 for trunk/workflow/inc/smarty/plugins
- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- Location:
- trunk/workflow/inc/smarty/plugins
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workflow/inc/smarty/plugins/block.textformat.php
r795 r7655 76 76 $_output = ''; 77 77 78 for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {78 for($_x = 0, $_y = count($_paragraphs); $_x < $_y; ++$_x) { 79 79 if ($_paragraphs[$_x] == '') { 80 80 continue; -
trunk/workflow/inc/smarty/plugins/function.config_load.php
r795 r7655 121 121 $smarty->_config[1]['files'][$_file] = true; 122 122 } else if ($_scope == 'global') { 123 for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; $i++) {123 for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; ++$i) { 124 124 $smarty->_config[$i]['vars'] = @array_merge($smarty->_config[$i]['vars'], $_config_vars); 125 125 $smarty->_config[$i]['files'][$_file] = true; -
trunk/workflow/inc/smarty/plugins/function.html_select_date.php
r795 r7655 181 181 $field_separator_count = -1; 182 182 if ($display_months) { 183 $field_separator_count++;183 ++$field_separator_count; 184 184 $month_names = array(); 185 185 $month_values = array(); … … 188 188 $month_values[''] = ''; 189 189 } 190 for ($i = 1; $i <= 12; $i++) {190 for ($i = 1; $i <= 12; ++$i) { 191 191 $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000)); 192 192 $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000)); … … 225 225 $day_values[''] = ''; 226 226 } 227 for ($i = 1; $i <= 31; $i++) {227 for ($i = 1; $i <= 31; ++$i) { 228 228 $days[] = sprintf($day_format, $i); 229 229 $day_values[] = sprintf($day_value_format, $i); … … 255 255 256 256 if ($display_years) { 257 $field_separator_count++;257 ++$field_separator_count; 258 258 if (null !== $field_array){ 259 259 $year_name = $field_array . '[' . $prefix . 'Year]'; … … 303 303 304 304 // Loop thru the field_order field 305 for ($i = 0; $i <= 2; $i++){305 for ($i = 0; $i <= 2; ++$i){ 306 306 $c = substr($field_order, $i, 1); 307 307 switch ($c){ -
trunk/workflow/inc/smarty/plugins/function.html_select_time.php
r795 r7655 85 85 $hours = $use_24_hours ? range(0, 23) : range(1, 12); 86 86 $hour_fmt = $use_24_hours ? '%H' : '%I'; 87 for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)87 for ($i = 0, $for_max = count($hours); $i < $for_max; ++$i) 88 88 $hours[$i] = sprintf('%02d', $hours[$i]); 89 89 $html_result .= '<select name='; -
trunk/workflow/inc/smarty/plugins/function.html_table.php
r795 r7655 128 128 $output .= "<thead><tr>\n"; 129 129 130 for ($r=0; $r<$cols_count; $r++) {130 for ($r=0; $r<$cols_count; ++$r) { 131 131 $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>'; 132 132 $output .= $cols[$r]; … … 137 137 138 138 $output .= "<tbody>\n"; 139 for ($r=0; $r<$rows; $r++) {139 for ($r=0; $r<$rows; ++$r) { 140 140 $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n"; 141 141 $rx = ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count; 142 142 143 for ($c=0; $c<$cols_count; $c++) {143 for ($c=0; $c<$cols_count; ++$c) { 144 144 $x = ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c; 145 145 if ($inner!='cols') { -
trunk/workflow/inc/smarty/plugins/function.mailto.php
r795 r7655 89 89 90 90 $mail_parm_vals = ''; 91 for ($i=0; $i<count($mail_parms); $i++) { 91 $mail_parms_count = count($mail_parms); 92 for ($i=0; $i<$mail_parms_count; ++$i) { 92 93 $mail_parm_vals .= (0==$i) ? '?' : '&'; 93 94 $mail_parm_vals .= $mail_parms[$i]; … … 105 106 106 107 $js_encode = ''; 107 for ($x=0; $x < strlen($string); $x++) {108 for ($x=0; $x < strlen($string); ++$x) { 108 109 $js_encode .= '%' . bin2hex($string[$x]); 109 110 } … … 114 115 $string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>'; 115 116 116 for($x = 0, $y = strlen($string); $x < $y; $x++) {117 for($x = 0, $y = strlen($string); $x < $y; ++$x ) { 117 118 $ord[] = ord($string[$x]); 118 119 } … … 138 139 } 139 140 $address_encode = ''; 140 for ($x=0; $x < strlen($address); $x++) {141 for ($x=0; $x < strlen($address); ++$x) { 141 142 if(preg_match('!\w!',$address[$x])) { 142 143 $address_encode .= '%' . bin2hex($address[$x]); … … 146 147 } 147 148 $text_encode = ''; 148 for ($x=0; $x < strlen($text); $x++) {149 for ($x=0; $x < strlen($text); ++$x) { 149 150 $text_encode .= '&#x' . bin2hex($text[$x]).';'; 150 151 } -
trunk/workflow/inc/smarty/plugins/modifier.escape.php
r795 r7655 42 42 // escape every character into hex 43 43 $return = ''; 44 for ($x=0; $x < strlen($string); $x++) {44 for ($x=0; $x < strlen($string); ++$x) { 45 45 $return .= '%' . bin2hex($string[$x]); 46 46 } … … 49 49 case 'hexentity': 50 50 $return = ''; 51 for ($x=0; $x < strlen($string); $x++) {51 for ($x=0; $x < strlen($string); ++$x) { 52 52 $return .= '&#x' . bin2hex($string[$x]) . ';'; 53 53 } … … 56 56 case 'decentity': 57 57 $return = ''; 58 for ($x=0; $x < strlen($string); $x++) {58 for ($x=0; $x < strlen($string); ++$x) { 59 59 $return .= '&#' . ord($string[$x]) . ';'; 60 60 } … … 72 72 // escape non-standard chars, such as ms document quotes 73 73 $_res = ''; 74 for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {74 for($_i = 0, $_len = strlen($string); $_i < $_len; ++$_i) { 75 75 $_ord = ord(substr($string, $_i, 1)); 76 76 // non-standard char, escape it -
trunk/workflow/inc/smarty/plugins/outputfilter.trimwhitespace.php
r795 r7655 65 65 $_len = strlen($search_str); 66 66 $_pos = 0; 67 for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)67 for ($_i=0, $_count=count($replace); $_i<$_count; ++$_i) 68 68 if (($_pos=strpos($subject, $search_str, $_pos))!==false) 69 69 $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
Note: See TracChangeset
for help on using the changeset viewer.