From: Pierre Habouzit (MadCoder Date: Thu, 9 Dec 2004 18:57:12 +0000 (+0000) Subject: fix advanced search X-Git-Tag: xorg/old~685 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3910d679a811913df717cf0985896fbce262bbf9;p=platal.git fix advanced search git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-63 --- diff --git a/include/search.classes.inc.php b/include/search.classes.inc.php index 2208eed..d996d27 100644 --- a/include/search.classes.inc.php +++ b/include/search.classes.inc.php @@ -578,6 +578,9 @@ class PromoSField extends SField function get_request() { parent::get_request(); + if (preg_match('/^[0-9]{2}$/', $this->value)){ + $this->value = intval($this->value) + 1900; + } if (!(empty($this->value) or preg_match('/^[0-9]{4}$/', $this->value))) { new ThrowError('La promotion est une année à quatre chiffres.'); }