function _document_is_uploaded in Document 7
Same name and namespace in other branches
- 6 document.module \_document_is_uploaded()
- 8.x document.module \_document_is_uploaded()
1 call to _document_is_uploaded()
- document_validate in ./
document.module - Implementation of hook_validate().
File
- ./
document.module, line 662
Code
function _document_is_uploaded() {
$hasDoc = TRUE;
if (array_key_exists('document_filepath', $_FILES)) {
if ($_FILES['document_filepath']['error'] != UPLOAD_ERR_OK) {
$hasDoc = FALSE;
}
}
else {
if (array_key_exists('error', $_FILES)) {
if ($_FILES['error']['document_filepath'] != UPLOAD_ERR_OK) {
$hasDoc = FALSE;
}
}
else {
if (array_key_exists('files', $_FILES)) {
if ($_FILES['files']['error']['document_filepath'] != UPLOAD_ERR_OK) {
$hasDoc = FALSE;
}
}
else {
$hasDoc = FALSE;
}
}
}
return $hasDoc;
}