diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index bb6a8de30d4..83227b00e51 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -355,7 +355,7 @@ if ($useajax || $action == 'delete') $section_id = $section; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - $useglobalvars = 1; + $form = new Form($db); $formquestion['urlfile'] = array('type'=>'hidden', 'value'=>$urlfile, 'name'=>'urlfile'); // We must always put field, even if empty because it is filled by javascript later $formquestion['section'] = array('type'=>'hidden', 'value'=>$section, 'name'=>'section'); // We must always put field, even if empty because it is filled by javascript later diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f2b11938ca2..30519077c9e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4207,7 +4207,6 @@ class Form public function formconfirm($page, $title, $question, $action, $formquestion = '', $selectedchoice = '', $useajax = 0, $height = 0, $width = 500, $disableformtag = 0) { global $langs, $conf; - global $useglobalvars; $more = ''; $formconfirm = ''; @@ -4355,7 +4354,7 @@ class Form if (isset($input['inputko']) && $input['inputko'] == 1) array_push($inputko, $input['name']); } } - // Show JQuery confirm box. Note that global var $useglobalvars is used inside this template + // Show JQuery confirm box. $formconfirm .= '