Issue 164: External file name prompt required
This commit is contained in:
parent
84547905d6
commit
827c537f61
@ -146,11 +146,13 @@ class IDF_Form_Upload extends Pluf_Form
|
|||||||
throw new Pluf_Form_Invalid(__("Must upload a file or specify an external file"));
|
throw new Pluf_Form_Invalid(__("Must upload a file or specify an external file"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->cleaned_data["ext_file_name"] != "") {
|
||||||
foreach(explode(".", $this->cleaned_data["ext_file_name"]) as $section) {
|
foreach(explode(".", $this->cleaned_data["ext_file_name"]) as $section) {
|
||||||
if (!ctype_alnum(($section))) {
|
if (!ctype_alnum(($section))) {
|
||||||
throw new Pluf_Form_Invalid(__("External file name must not contain characters other than a-zA-Z and ."));
|
throw new Pluf_Form_Invalid(__("External file name must not contain characters other than a-zA-Z and ."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $this->cleaned_data;
|
return $this->cleaned_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user