|
@@ -333,7 +333,7 @@ discard block |
|
|
block discarded – undo |
|
333
|
333
|
* @return string |
|
334
|
334
|
*/ |
|
335
|
335
|
function _sqlite_func_preg_replace($quoi, $cherche, $remplace) { |
|
336
|
|
- $return = preg_replace('%' . $cherche . '%', $remplace, $quoi); |
|
|
336
|
+ $return = preg_replace('%'.$cherche.'%', $remplace, $quoi); |
|
337
|
337
|
|
|
338
|
338
|
#spip_log("preg_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
|
339
|
339
|
return $return; |
|
@@ -409,7 +409,7 @@ discard block |
|
|
block discarded – undo |
|
409
|
409
|
// il faut enlever un niveau d'echappement pour être homogène à mysql |
|
410
|
410
|
$cherche = str_replace('\\\\', '\\', $cherche); |
|
411
|
411
|
$u = isset($GLOBALS['meta']['pcre_u']) ? $GLOBALS['meta']['pcre_u'] : 'u'; |
|
412
|
|
- $return = preg_match('%' . $cherche . '%imsS' . $u, $quoi); |
|
|
412
|
+ $return = preg_match('%'.$cherche.'%imsS'.$u, $quoi); |
|
413
|
413
|
|
|
414
|
414
|
#spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG); |
|
415
|
415
|
return $return; |
|
@@ -461,7 +461,7 @@ discard block |
|
|
block discarded – undo |
|
461
|
461
|
$count = 0; |
|
462
|
462
|
str_replace($mysql_to_strftime_not_ok, '', $conv, $count); |
|
463
|
463
|
if ($count > 0) { |
|
464
|
|
- spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.' . _LOG_ERREUR); |
|
|
464
|
+ spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.'._LOG_ERREUR); |
|
465
|
465
|
} |
|
466
|
466
|
$to_strftime[$conv] = str_replace(array_keys($mysql_to_strftime), $mysql_to_strftime, $conv); |
|
467
|
467
|
} |
|
@@ -480,7 +480,7 @@ discard block |
|
|
block discarded – undo |
|
480
|
480
|
*/ |
|
481
|
481
|
function _sqlite_func_to_days($d) { |
|
482
|
482
|
static $offset = 719528; // nb de jour entre 0000-00-00 et timestamp 0=1970-01-01 |
|
483
|
|
- $result = $offset + (int)ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
|
483
|
+ $result = $offset + (int) ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600)); |
|
484
|
484
|
|
|
485
|
485
|
#spip_log("Passage avec TO_DAYS : $d, $result",'sqlite.'._LOG_DEBUG); |
|
486
|
486
|
return $result; |