From 8c728ac63824f4f388d1447de7437d2c4e3252f4 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <ldestailleur@teclib.com>
Date: Thu, 7 Aug 2014 12:47:14 +0200
Subject: [PATCH] Fix: bad regex syntax

---
 htdocs/main.inc.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index ba12febd3d4..4457e627976 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -446,9 +446,9 @@ if (! defined('NOLOGIN'))
                 $dol_authmode=$conf->authmode;	// This properties is defined only when logged, to say what mode was successfully used
                 $dol_tz=$_POST["tz"];
                 $dol_tz_string=$_POST["tz_string"];
-                $dol_tz_string=preg_replace('\s*\(.+\)$','',$dol_tz_string);
-                $dol_tz_string=preg_replace(',','/',$dol_tz_string);
-                $dol_tz_string=preg_replace('\s','_',$dol_tz_string);
+                $dol_tz_string=preg_replace('/\s*\(.+\)/$','',$dol_tz_string);
+                $dol_tz_string=preg_replace('/,/','/',$dol_tz_string);
+                $dol_tz_string=preg_replace('/\s/','_',$dol_tz_string);
                 $dol_dst=0;
                 if (isset($_POST["dst_first"]) && isset($_POST["dst_second"]))
                 {
-- 
GitLab