/** * Ignore a file element that has an associated hidden element, * since this means that the user did not change the uploaded file. * * @param Zend_Form_Element_File $element */ private function _configFileElement(Zend_Form_Element_File $element) { $elementName = $element->getName(); // If file input's related hidden input has a non-empty value, // then the user has NOT changed the file, so do NOT upload the file. if ($hiddenElement = $this->_form->getElement(Omeka_Form_ThemeConfiguration::THEME_FILE_HIDDEN_FIELD_NAME_PREFIX . $elementName)) { $hiddenName = $hiddenElement->getName(); if (!empty($_POST[$hiddenName])) { // Ignore the file input element $element->setIgnore(true); } } }