diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php index bd36dba199b..ee090fed65d 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); } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 090bfd3bcd4..458e6649d8a 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1720,7 +1720,7 @@ function top_menu_user(User $user, Translate $langs) $userImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'photouserphoto userphoto', 'small', 0, 1); $userDropDownImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'dropdown-user-image', 'small', 0, 1); } - else{ + else { $nophoto='/public/theme/common/user_anonymous.png'; if ($user->gender == 'man') $nophoto='/public/theme/common/user_man.png'; if ($user->gender == 'woman') $nophoto='/public/theme/common/user_woman.png'; @@ -1734,7 +1734,7 @@ function top_menu_user(User $user, Translate $langs) $dropdownBody.= '