| @@ 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; |
|
| @@ 1529-1532 (lines=4) @@ | ||
| 1526 | $texte = str_replace("\r\n", "\r", $texte); |
|
| 1527 | $texte = str_replace("\r", "\n", $texte); |
|
| 1528 | ||
| 1529 | if (preg_match(",\n+$,", $texte, $fin)) { |
|
| 1530 | $texte = substr($texte, 0, -strlen($fin = $fin[0])); |
|
| 1531 | } else { |
|
| 1532 | $fin = ''; |
|
| 1533 | } |
|
| 1534 | ||
| 1535 | $texte = echappe_html($texte, '', true); |
|
| @@ 1560-1563 (lines=4) @@ | ||
| 1557 | } else { |
|
| 1558 | $debut .= "\n"; |
|
| 1559 | } |
|
| 1560 | if (preg_match(",^\n+,", $suite, $regs)) { |
|
| 1561 | $debut .= $regs[0]; |
|
| 1562 | $suite = substr($suite, strlen($regs[0])); |
|
| 1563 | } |
|
| 1564 | } |
|
| 1565 | $texte = $debut . $suite; |
|
| 1566 | ||