Marius Cramer
2015-04-16 d7fe4dc96dcd2319a56216cdf683d2963f3ef110
- Fixed problem with .* table info (GRANT X ON Y.*)
2 files modified
12 ■■■■■ changed files
interface/lib/classes/db_mysql.inc.php 6 ●●●●● patch | view | raw | blame | history
server/lib/classes/db_mysql.inc.php 6 ●●●●● patch | view | raw | blame | history
interface/lib/classes/db_mysql.inc.php
@@ -128,8 +128,10 @@
                    $sTxt = $this->escape($sValue);
                    
                    $sTxt = str_replace('`', '', $sTxt);
                    if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt);
                    else $sTxt = '`' . $sTxt . '`';
                    if(strpos($sTxt, '.') !== false) {
                        $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt);
                        $sTxt = str_replace('.`*`', '.*', $sTxt);
                    } else $sTxt = '`' . $sTxt . '`';
                    $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2);
                    $iPos2 += strlen($sTxt);
server/lib/classes/db_mysql.inc.php
@@ -132,8 +132,10 @@
                if($iPos2 !== false && ($iPos === false || $iPos2 <= $iPos)) {
                    $sTxt = $this->escape($sValue);
                    if(strpos($sTxt, '.') !== false) $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt);
                    else $sTxt = '`' . $sTxt . '`';
                    if(strpos($sTxt, '.') !== false) {
                        $sTxt = preg_replace('/^(.+)\.(.+)$/', '`$1`.`$2`', $sTxt);
                        $sTxt = str_replace('.`*`', '.*', $sTxt);
                    } else $sTxt = '`' . $sTxt . '`';
                    $sQuery = substr_replace($sQuery, $sTxt, $iPos2, 2);
                    $iPos2 += strlen($sTxt);