Merge pull request #10672 from frederic34/patch-1
Update html.formfile.class.php
This commit is contained in:
commit
52bcef38fc
@ -67,11 +67,12 @@ class FormFile
|
||||
* @param int $addcancel 1=Add 'Cancel' button
|
||||
* @param int $sectionid If upload must be done inside a particular ECM section (is sectionid defined, sectiondir must not be)
|
||||
* @param int $perm Value of permission to allow upload
|
||||
* @param int $size Length of input file area. Deprecated.
|
||||
* @param int $size Length of input file area. Deprecated.
|
||||
* @param Object $object Object to use (when attachment is done on an element)
|
||||
* @param string $options Add an option column
|
||||
* @param integer $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). @deprecated 2 should never be used and if 1 is used, option should no be enabled.
|
||||
* @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__'
|
||||
* @param integer $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option).
|
||||
* Deprecated 2 should never be used and if 1 is used, option should no be enabled.
|
||||
* @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__'
|
||||
* @param integer $linkfiles 1=Also add form to link files, 0=Do not show form to link files
|
||||
* @param string $htmlname Name and id of HTML form ('formuserfile' by default, 'formuserfileecm' when used to upload a file in ECM)
|
||||
* @param string $accept Specifies the types of files accepted (This is not a security check but an user interface facility. eg '.pdf,image/*' or '.png,.jpg' or 'video/*')
|
||||
@ -84,6 +85,10 @@ class FormFile
|
||||
global $conf,$langs, $hookmanager;
|
||||
$hookmanager->initHooks(array('formfile'));
|
||||
|
||||
// Deprecation warning
|
||||
if ($useajax == 2) {
|
||||
dol_syslog(__METHOD__ . ": using 2 for useajax is deprecated and should be not used", LOG_WARNING);
|
||||
}
|
||||
|
||||
if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') $useajax=0;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user