Ticket #9602: rewrite.php.patch
File rewrite.php.patch, 431 bytes (added by , 16 years ago) |
---|
Line | |
---|---|
1 | 299,313c299 |
2 | < |
3 | < preg_match_all('/\$(.*?)\[(.*?)\]/',$query,$subs); |
4 | < $find=array(); |
5 | < $replace=array(); |
6 | < |
7 | < foreach($subs[0] as $key=>$value) |
8 | < { |
9 | < $tmp=$subs[1][$key]; |
10 | < $tmp=$$tmp; |
11 | < $tmp=$tmp[$subs[2][$key]]; |
12 | < $find[]=$subs[0][$key]; |
13 | < $replace[]=$tmp; |
14 | < } |
15 | < |
16 | < $query=str_replace($find,$replace,$query); |
17 | --- |
18 | > eval("\$query = \"" . addslashes($query) . "\";"); |