fixed validator which allowed to post a blank filename for static pages

This commit is contained in:
real_nowhereman 2008-02-29 16:52:38 +00:00
parent 7414932235
commit d704c79ce9

View File

@ -36,9 +36,10 @@
*/
function smarty_validate_criteria_isValidEntryId($value, $empty, &$params, &$formvars) {
$fname = $params['field'];
if (!$value)
return false;
return @utils_validateinput($fname);
return !preg_match('/[^a-z0-9\-_]/i',$value);
}
?>