Преглед на файлове

Safer regexpr for DateTimes (don't let 2012-12-05 1900:00 pass through since it turns into 0000-00-00 00:00:00 in MySQL) but allow to omit the seconds (i.e. 2012-12-05 18:45 will become 2012-12-05 18:45:00 in MySQL)

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@2525 a333f486-631f-4898-b8df-5754b55c2be0
dflaven преди 12 години
родител
ревизия
12f2f642c8
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      core/attributedef.class.inc.php

+ 1 - 1
core/attributedef.class.inc.php

@@ -2458,7 +2458,7 @@ class AttributeDateTime extends AttributeDBField
 
 	public function GetValidationPattern()
 	{
-		return "^([0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30))))( (0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])){0,1}|0000-00-00 00:00:00|0000-00-00$";
+		return "^(([0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30))))( (0[0-9]|1[0-9]|2[0-3]):([0-5][0-9])(:([0-5][0-9])){0,1}){0,1}|0000-00-00 00:00:00|0000-00-00)$";
 	}
 
 	public function GetBasicFilterOperators()