From cbd4c0e92d8cb2be73f023cabb6a13e2bba5d2be Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 15 Jun 2005 13:04:35 +0000 Subject: [PATCH] fix search in holiday management, thanks to johann.heymes -AT- cyber-networks.fr --- calendar/inc/class.soholiday.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.soholiday.inc.php b/calendar/inc/class.soholiday.inc.php index 3f3c3a8079..d575a7fcbf 100755 --- a/calendar/inc/class.soholiday.inc.php +++ b/calendar/inc/class.soholiday.inc.php @@ -162,10 +162,10 @@ $querymethod = ''; if($query) { - $querymethod .= " WHERE hol_locale LIKE ".$this->db->quote('%'.$query.'%'); + $querymethod = 'hol_locale LIKE '.$this->db->quote('%'.$query.'%'); } - if(preg_match('/[a-zA-Z0-9_,]+/',$order)) + if(preg_match('/^[a-zA-Z0-9_,]+$/',$order)) { $querymethod .= ' ORDER BY '.$order; }