Changeset 7655 for trunk/workflow/inc/report/xajax/xajaxCompress.php
- Timestamp:
- 12/14/12 14:30:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workflow/inc/report/xajax/xajaxCompress.php
r5307 r7655 58 58 $escaped = false; 59 59 $quoteChar = ""; 60 61 for($i=0;$i<count($lines);$i++) 60 $lines_count = count($lines); 61 62 for($i=0;$i<$lines_count;++$i) 62 63 { 63 64 $line = $lines[$i]; … … 65 66 66 67 //loop through line's characters and take out any literal strings, replace them with ___i___ where i is the index of this string 67 for($j=0;$j<strlen($line); $j++)68 for($j=0;$j<strlen($line);++$j) 68 69 { 69 70 $c = substr($line,$j,1); … … 89 90 $quoteChar = $d; 90 91 $literal = $d; 91 $j++;92 ++$j; 92 93 } 93 94 else if($d=="//") //ignore string markers that are found inside comments … … 126 127 array_push($literal_strings,$literal); 127 128 128 $j++;129 ++$j; 129 130 } 130 131 else if($c == "\\" && !$escaped) … … 143 144 144 145 //now process each line at a time 145 for($i=0;$i<count($lines);$i++) 146 $lines_count = count($lines); 147 for($i=0;$i<$lines_count;++$i) 146 148 { 147 149 $line = $lines[$i]; … … 175 177 176 178 //finally loop through and replace all the literal strings: 177 for($i=0;$i<count($literal_strings);$i++) 179 $literal_strings_count = count($literal_strings); 180 for($i=0;$i<$literal_strings_count;++$i) 178 181 $sJS = str_replace("___".$i."___",$literal_strings[$i],$sJS); 179 182
Note: See TracChangeset
for help on using the changeset viewer.