Home » Projects » Mambo CMS » SVN » Browse repository
Diff of /mambo/branches/4.6/includes/database.php
Parent Directory
|
Revision Log
|
Patch
| 114 |
function replacePrefix ($sql, $prefix='#__') { |
function replacePrefix ($sql, $prefix='#__') { |
| 115 |
$done = ''; |
$done = ''; |
| 116 |
while (strlen($sql)) { |
while (strlen($sql)) { |
| 117 |
if ($double = preg_match('/\"([^\\\"]|\\.)*"/', $sql,$matches_double,PREG_OFFSET_CAPTURE) OR |
$single = preg_match("/\'([^\\\']|\\.)*'/", $sql,$matches_single,PREG_OFFSET_CAPTURE); |
| 118 |
$single = preg_match("/\'([^\\\']|\\.)*'/", $sql,$matches_single,PREG_OFFSET_CAPTURE)) { |
if ($double = preg_match('/\"([^\\\"]|\\.)*"/', $sql,$matches_double,PREG_OFFSET_CAPTURE) OR $single) { |
| 119 |
if ($single == 0 OR ($double AND $matches_double[0][1] < $matches_single[0][1])) { |
if ($single == 0 OR ($double AND $matches_double[0][1] < $matches_single[0][1])) { |
| 120 |
$done .= str_replace($prefix, $this->_table_prefix, substr($sql,0,$matches_double[0][1])).$matches_double[0][0]; |
$done .= str_replace($prefix, $this->_table_prefix, substr($sql,0,$matches_double[0][1])).$matches_double[0][0]; |
| 121 |
$sql = substr($sql,$matches_double[0][1]+strlen($matches_double[0][0])); |
$sql = substr($sql,$matches_double[0][1]+strlen($matches_double[0][0])); |
|
|
Legend:
| Removed from v.238 |
|
| changed lines |
| |
Added in v.281 |
|
|

Web Hosting provided by Network
Redux.