diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index c3a40599877..17444cb5358 100644 --- a/htdocs/core/class/fileupload.class.php +++ b/htdocs/core/class/fileupload.class.php @@ -45,6 +45,8 @@ class FileUpload { global $db, $conf; global $object; + global $hookmanager; + $hookmanager->initHooks(array('fileupload')); $this->fk_element=$fk_element; $this->element=$element; @@ -183,6 +185,18 @@ class FileUpload ) ) ); + + $hookmanager->executeHooks( + 'overrideUploadOptions', + array( + 'options' => &$options, + 'element' => $element + ), + $object, + $action, + $hookmanager + ); + if ($options) { $this->options = array_replace_recursive($this->options, $options); }