dépôts
/
ptitvelo
/
web
/
www.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SPIP] ~maj v3.0.14-->v3.0.17
[ptitvelo/web/www.git]
/
www
/
ecrire
/
req
/
sqlite_fonctions.php
diff --git
a/www/ecrire/req/sqlite_fonctions.php
b/www/ecrire/req/sqlite_fonctions.php
index
cb15072
..
5afe581
100644
(file)
--- 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) {
// 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;
}
#spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG);
return $return;
}