From: x2003bruneau Date: Sat, 12 Aug 2006 21:08:38 +0000 (+0000) Subject: Small fixes X-Git-Tag: xorg/0.9.11~107 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=74581a1bbed1b594d22a77c18bcf9f40daac918f;p=platal.git Small fixes git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@808 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/classes/XDB.php b/classes/XDB.php index df77e82..5e07bc2 100644 --- a/classes/XDB.php +++ b/classes/XDB.php @@ -39,16 +39,16 @@ class XDB $query = preg_split("/\n\\s*/", $query); $length = 0; foreach ($query as $line) { - if (preg_match('/^([A-Z]+( (JOIN|BY))?) /', $line, $matches) - && $matches[1] != 'AND' && $matches[2] != 'OR') { + if (preg_match('/^([A-Z]+(?: +(?:JOIN|BY))?) /', $line, $matches) + && $matches[1] != 'AND' && $matches[1] != 'OR') { $length = max($length, strlen($matches[1])); } } $res = ''; foreach ($query as $line) { $local = -2; - if (preg_match('/^([A-Z]+(?: (?:JOIN|BY))?) +(.*)/', $line, $matches) - && $matches[1] != 'AND' && $matches[2] != 'OR') { + if (preg_match('/^([A-Z]+(?: +(?:JOIN|BY))?) +(.*)/', $line, $matches) + && $matches[1] != 'AND' && $matches[1] != 'OR') { $local = strlen($matches[1]); $line = $matches[1] . ' ' . $matches[2]; }