Completed
Push — master ( d54fc1...89cac1 )
by cam
01:11
created
ecrire/req/sqlite_fonctions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
 // https://code.spip.net/@_sqlite_func_preg_replace
252 252
 function _sqlite_func_preg_replace($quoi, $cherche, $remplace) {
253
-	$return = preg_replace('%' . $cherche . '%', $remplace, $quoi);
253
+	$return = preg_replace('%'.$cherche.'%', $remplace, $quoi);
254 254
 
255 255
 	#spip_log("preg_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG);
256 256
 	return $return;
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 	// il faut enlever un niveau d'echappement pour être homogène à mysql
309 309
 	$cherche = str_replace('\\\\', '\\', $cherche);
310 310
 	$u = isset($GLOBALS['meta']['pcre_u']) ? $GLOBALS['meta']['pcre_u'] : 'u';
311
-	$return = preg_match('%' . $cherche . '%imsS' . $u, $quoi);
311
+	$return = preg_match('%'.$cherche.'%imsS'.$u, $quoi);
312 312
 
313 313
 	#spip_log("regexp_replace : $quoi, $cherche, $remplace, $return",'sqlite.'._LOG_DEBUG);
314 314
 	return $return;
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 		$count = 0;
358 358
 		str_replace($mysql_to_strftime_not_ok, '', $conv, $count);
359 359
 		if ($count > 0) {
360
-			spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.' . _LOG_ERREUR);
360
+			spip_log("DATE_FORMAT : At least one parameter can't be parsed by strftime with format '$conv'", 'sqlite.'._LOG_ERREUR);
361 361
 		}
362 362
 		$to_strftime[$conv] = str_replace(array_keys($mysql_to_strftime), $mysql_to_strftime, $conv);
363 363
 	}
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
  */
375 375
 function _sqlite_func_to_days($d) {
376 376
 	static $offset = 719528; // nb de jour entre 0000-00-00 et timestamp 0=1970-01-01
377
-	$result = $offset + (int)ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600));
377
+	$result = $offset + (int) ceil(_sqlite_func_unix_timestamp($d) / (24 * 3600));
378 378
 
379 379
 	#spip_log("Passage avec TO_DAYS : $d, $result",'sqlite.'._LOG_DEBUG);
380 380
 	return $result;
Please login to merge, or discard this patch.