// Merge -> revision 9061

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9069 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-10-05 15:21:55 +00:00
parent 51de6be6cc
commit b4d436ca21
53 changed files with 795 additions and 456 deletions
+12
View File
@@ -408,6 +408,18 @@ class ValidateCore
return preg_match('/^[a-zA-Z_0-9-]+$/', $configName);
}
/**
* Check date formats like http://php.net/manual/en/function.date.php
*
* @param string $date_format date format to check
* @return boolean Validity is ok or not
*/
public static function isPhpDateFormat($date_format)
{
// We can't really check if this is valid or not, because this is a string and you can write whatever you want in it. That's why only < et > are forbidden (HTML)
return preg_match('/^[^<>]+$/', $date_format);
}
/**
* Check for date format
*