Fix: uniformize code and remove htmlentities (bad character with utf8

files)
This commit is contained in:
Regis Houssin 2012-03-03 18:41:06 +01:00
parent 80b75fa67d
commit 2de1ff11e2

View File

@ -64,15 +64,15 @@ $entitytolang=array( // Translation code
'other'=>'Other' 'other'=>'Other'
); );
$datatoimport=isset($_GET["datatoimport"])? $_GET["datatoimport"] : (isset($_POST["datatoimport"])?$_POST["datatoimport"]:''); $datatoimport = GETPOST('datatoimport');
$format=isset($_GET["format"])? $_GET["format"] : (isset($_POST["format"])?$_POST["format"]:''); $format = GETPOST('format');
$filetoimport=isset($_GET["filetoimport"])? $_GET["filetoimport"] : (isset($_POST["filetoimport"])?$_POST["filetoimport"]:''); $filetoimport = GETPOST('filetoimport');
$action=isset($_GET["action"]) ? $_GET["action"] : (isset($_POST["action"])?$_POST["action"]:''); $action = GETPOST('action');
$step=isset($_GET["step"])? $_GET["step"] : (isset($_POST["step"])?$_POST["step"]:1); $step = (GETPOST('step') ? GETPOST('step') : 1);
$import_name=isset($_POST["import_name"])? $_POST["import_name"] : ''; $import_name = GETPOST('import_name');
$hexa=isset($_POST["hexa"])? $_POST["hexa"] : ''; $hexa = GETPOST('hexa');
$importmodelid=isset($_POST["importmodelid"])? $_POST["importmodelid"] : ''; $importmodelid = GETPOST('importmodelid');
$excludefirstline=isset($_GET["excludefirstline"])? $_GET["excludefirstline"] : (isset($_POST["excludefirstline"])?$_POST["excludefirstline"]:0); $excludefirstline = (GETPOST('excludefirstline') ? GETPOST('excludefirstline') : 0);
$objimport=new Import($db); $objimport=new Import($db);
$objimport->load_arrays($user,($step==1?'':$datatoimport)); $objimport->load_arrays($user,($step==1?'':$datatoimport));
@ -1638,7 +1638,7 @@ function show_elem($fieldssource,$pos,$key,$var,$nostyle='')
print '</td>'; print '</td>';
print '<td style="font-weight: normal">'; print '<td style="font-weight: normal">';
print $langs->trans("Field").' '.$pos; print $langs->trans("Field").' '.$pos;
if (! empty($fieldssource[$pos]['example1'])) print ' (<i>'.htmlentities($fieldssource[$pos]['example1']).'</i>)'; if (! empty($fieldssource[$pos]['example1'])) print ' (<i>'.$fieldssource[$pos]['example1'].'</i>)';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
} }