From 83fac0ba8c6a17cc86be68d8b857ebef03cabbbf Mon Sep 17 00:00:00 2001
From: "Committo,Ergo:sum" <esj@rezo.net>
Date: Fri, 30 Nov 2007 09:56:31 +0000
Subject: [PATCH] =?UTF-8?q?Traduction=20de=20date=20incompl=C3=A8te=20en?=
 =?UTF-8?q?=20PG=20(mais=20PCRE=20est=20bizarre:=20la=20Regexp=20pr=C3=A9c?=
 =?UTF-8?q?=C3=A9dente=20aurait=20d=C3=BB=20marcher).?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/req/pg.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ecrire/req/pg.php b/ecrire/req/pg.php
index dee9b702eb..b59c0d91f9 100644
--- a/ecrire/req/pg.php
+++ b/ecrire/req/pg.php
@@ -382,15 +382,16 @@ function spip_pg_frommysql($arg)
 	$res = preg_replace('/UNIX_TIMESTAMP\s*[(]([^)]*)[)]/',
 			    ' EXTRACT(epoch FROM \1)', $res);
 
-	$res = preg_replace('/\bDAYOFMONTH\s*[(]([^()]*([(][^)]*[)][()]*)*[^)]*)[)]/',
+
+	$res = preg_replace('/\bDAYOFMONTH\s*[(]([^()]*([(][^()]*[)][^()]*)*[^)]*)[)]/',
 			    ' EXTRACT(day FROM \1)',
 			    $res);
 
-	$res = preg_replace('/\bMONTH\s*[(]([^()]*([(][^)]*[)][()]*)*[^)]*)[)]/',
+	$res = preg_replace('/\bMONTH\s*[(]([^()]*([(][^)]*[)][^()]*)*[^)]*)[)]/',
 			    ' EXTRACT(month FROM \1)',
 			    $res);
 
-	$res = preg_replace('/\bYEAR\s*[(]([^()]*([(][^)]*[)][()]*)*[^)]*)[)]/',
+	$res = preg_replace('/\bYEAR\s*[(]([^()]*([(][^)]*[)][^()]*)*[^)]*)[)]/',
 			    ' EXTRACT(year FROM \1)',
 			    $res);
 
@@ -439,7 +440,7 @@ function spip_pg_fromfield($arg)
 function calculer_pg_where($v)
 {
 	if (!is_array($v))
-	  return spip_pg_frommysql($v);
+		return spip_pg_frommysql($v);
 
 	$op = str_replace('REGEXP', '~', array_shift($v));
 	if (!($n=count($v)))
-- 
GitLab