| @@ 38-41 (lines=4) @@ | ||
| 35 | } |
|
| 36 | ||
| 37 | $rtl = false; |
|
| 38 | if (preg_match(',[-_]rtl$,i', $type, $match)) { |
|
| 39 | $rtl = true; |
|
| 40 | $type = substr($type, 0, -strlen($match[0])); |
|
| 41 | } |
|
| 42 | ||
| 43 | // objet_type garde invariant tout ce qui ne commence par par id_, spip_ |
|
| 44 | // et ne finit pas par un s, sauf si c'est une exception declaree |
|
| @@ 169-172 (lines=4) @@ | ||
| 166 | $link = $connexion['link']; |
|
| 167 | $db = $connexion['db']; |
|
| 168 | ||
| 169 | if (preg_match('/\s(SET|VALUES|WHERE|DATABASE)\s/i', $query, $regs)) { |
|
| 170 | $suite = strstr($query, $regs[0]); |
|
| 171 | $query = substr($query, 0, -strlen($suite)); |
|
| 172 | } else { |
|
| 173 | $suite = ''; |
|
| 174 | } |
|
| 175 | $query = preg_replace('/([,\s])spip_/', '\1' . $prefixe . '_', $query) . $suite; |
|
| @@ 462-465 (lines=4) @@ | ||
| 459 | $connexion = &$GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
|
| 460 | $prefixe = $connexion['prefixe']; |
|
| 461 | $link = $connexion['link']; |
|
| 462 | if (preg_match('/\s(SET|VALUES|WHERE)\s/i', $query, $regs)) { |
|
| 463 | $suite = strstr($query, $regs[0]); |
|
| 464 | $query = substr($query, 0, -strlen($suite)); |
|
| 465 | } else { |
|
| 466 | $suite = ''; |
|
| 467 | } |
|
| 468 | $query = 'EXPLAIN ' . preg_replace('/([,\s])spip_/', '\1' . $prefixe . '_', $query) . $suite; |
|
| @@ 1500-1503 (lines=4) @@ | ||
| 1497 | $texte = str_replace("\r\n", "\r", $texte); |
|
| 1498 | $texte = str_replace("\r", "\n", $texte); |
|
| 1499 | ||
| 1500 | if (preg_match(",\n+$,", $texte, $fin)) { |
|
| 1501 | $texte = substr($texte, 0, -strlen($fin = $fin[0])); |
|
| 1502 | } else { |
|
| 1503 | $fin = ''; |
|
| 1504 | } |
|
| 1505 | ||
| 1506 | $texte = echappe_html($texte, '', true); |
|
| @@ 1531-1534 (lines=4) @@ | ||
| 1528 | } else { |
|
| 1529 | $debut .= "\n"; |
|
| 1530 | } |
|
| 1531 | if (preg_match(",^\n+,", $suite, $regs)) { |
|
| 1532 | $debut .= $regs[0]; |
|
| 1533 | $suite = substr($suite, strlen($regs[0])); |
|
| 1534 | } |
|
| 1535 | } |
|
| 1536 | $texte = $debut . $suite; |
|
| 1537 | ||