X-Git-Url: http://git.cyclocoop.org/?p=ptitvelo%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Freq%2Fsqlite_fonctions.php;h=5afe5814776ee8cf1bcf512c3d4188fca2c021ea;hp=cb15072bda1877feb40805e3ce7049116ae31046;hb=e847eea4a82a7396dd0abf860f9b30d654f38629;hpb=d686c3e22e97dd46ef42bcd0f138c65083f8f232 diff --git a/www/ecrire/req/sqlite_fonctions.php b/www/ecrire/req/sqlite_fonctions.php index cb15072..5afe581 100644 --- a/www/ecrire/req/sqlite_fonctions.php +++ b/www/ecrire/req/sqlite_fonctions.php @@ -244,7 +244,10 @@ function _sqlite_func_right ($s, $length) { // http://doc.spip.org/@_sqlite_func_regexp_match function _sqlite_func_regexp_match($cherche, $quoi) { - $return = preg_match('%'.$cherche.'%', $quoi); + // optimiser un cas tres courant avec les requetes en base + if (!$quoi AND !strlen($quoi)) return false; + $u = $GLOBALS['meta']['pcre_u']; + $return = preg_match('%'.$cherche.'%imsS'.$u, $quoi); #spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); return $return; }