FIX: hook added on fileupload.class.php to enable modules to override upload options
This commit is contained in:
parent
9d50c67208
commit
cf458c77dc
@ -45,6 +45,8 @@ class FileUpload
|
|||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
global $object;
|
global $object;
|
||||||
|
global $hookmanager;
|
||||||
|
$hookmanager->initHooks(array('fileupload'));
|
||||||
|
|
||||||
$this->fk_element=$fk_element;
|
$this->fk_element=$fk_element;
|
||||||
$this->element=$element;
|
$this->element=$element;
|
||||||
@ -183,6 +185,18 @@ class FileUpload
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$hookmanager->executeHooks(
|
||||||
|
'overrideUploadOptions',
|
||||||
|
array(
|
||||||
|
'options' => &$options,
|
||||||
|
'element' => $element
|
||||||
|
),
|
||||||
|
$object,
|
||||||
|
$action,
|
||||||
|
$hookmanager
|
||||||
|
);
|
||||||
|
|
||||||
if ($options) {
|
if ($options) {
|
||||||
$this->options = array_replace_recursive($this->options, $options);
|
$this->options = array_replace_recursive($this->options, $options);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user