[Smarttemplate-cvscommit] smarttemplate class.smarttemplateparser.php, 1.17, 1.18
Brought to you by:
codeworxtech
|
From: EndelWar <end...@us...> - 2007-01-01 18:23:45
|
Update of /cvsroot/smarttemplate/smarttemplate In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv5771 Modified Files: class.smarttemplateparser.php Log Message: Fixed spacing match in all regex Index: class.smarttemplateparser.php =================================================================== RCS file: /cvsroot/smarttemplate/smarttemplate/class.smarttemplateparser.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** class.smarttemplateparser.php 1 Jan 2007 01:46:24 -0000 1.17 --- class.smarttemplateparser.php 1 Jan 2007 18:23:42 -0000 1.18 *************** *** 97,101 **** } //match 'ELSE' and the last sub expression ! if (preg_match_all('/<!-- (ELSE)?IF [ ]*(\(*).*[|&]{2}[ ]*\(*[ ]*([a-zA-Z0-9_.]+)[ ]*([!=<>]+)[ ]*(["]?[^"]*?["]?)[ ]*(\)*)[ ]* -->/', $src_page, $var)) { foreach ($var[3] as $cnt => $tag) --- 97,101 ---- } //match 'ELSE' and the last sub expression ! if (preg_match_all('/<!-- (ELSE)?IF \s*(\(*).*[|&]{2}\s*\(*\s*([a-zA-Z0-9_.]+)\s*([!=<>]+)\s*(["]?[^"]*?["]?)\s*(\)*)\s* -->/', $src_page, $var)) { foreach ($var[3] as $cnt => $tag) *************** *** 120,124 **** //match other sub expressions ! if (preg_match_all('/([a-zA-Z0-9_.]+)[ ]*([!=<>]+)[ ]*(["]?[^"]*?["]?)[ ]*(\)*[ ]*[|&]{2}[ ]*\(*)[ ]*/', $var[0][$cnt], $sub_var)) { $code_mid = ''; --- 120,124 ---- //match other sub expressions ! if (preg_match_all('/([a-zA-Z0-9_.]+)\s*([!=<>]+)\s*(["]?[^"]*?["]?)\s*(\)*\s*[|&]{2}\s*\(*)\s*/', $var[0][$cnt], $sub_var)) { $code_mid = ''; *************** *** 236,240 **** // 'IF nnn=mmm' Blocks ! if (preg_match_all('/<!-- (ELSE)?IF ([a-zA-Z0-9_.]+)[ ]*([!=<>]+)[ ]*(["]?[^"]*["]?) -->/', $page, $var)) { foreach ($var[2] as $cnt => $tag) --- 236,240 ---- // 'IF nnn=mmm' Blocks ! if (preg_match_all('/<!-- (ELSE)?IF ([a-zA-Z0-9_.]+)\s*([!=<>]+)\s*(["]?[^"]*["]?) -->/', $page, $var)) { foreach ($var[2] as $cnt => $tag) *************** *** 283,289 **** // <!-- ENDIF --> // thanks to Khary Sharpe (ksharpe [at] kharysharpe [dot] com) for the initial code ! if (preg_match_all('/<!-- (ELSE)?IF {([a-zA-Z0-9_]+):([^}]*)}[\s]*([!=<>]+)[\s]*(["]?[^"]*["]?) -->/', $page, $var)) { - foreach ($var[2] as $cnt => $tag) { --- 283,288 ---- // <!-- ENDIF --> // thanks to Khary Sharpe (ksharpe [at] kharysharpe [dot] com) for the initial code ! if (preg_match_all('/<!-- (ELSE)?IF {([a-zA-Z0-9_]+):([^}]*)}\s*([!=<>]+)\s*(["]?[^"]*["]?) -->/', $page, $var)) { foreach ($var[2] as $cnt => $tag) { |