Merge pull request #10155 from frederic34/patch-2

GETPOSTISSET has only one param
This commit is contained in:
Laurent Destailleur 2018-12-02 17:04:55 +01:00 committed by GitHub
commit 70f29d9d79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
* Copyright (C) 2015 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -995,7 +996,7 @@ function fieldList($fieldlist, $obj='', $tabname='', $context='')
print '<td>';
if (! empty($conf->global->MAIN_MULTILANGS))
{
$selectedlang = GETPOSTISSET('langcode','aZ09')?GETPOST('langcode','aZ09'):$langs->defaultlang;
$selectedlang = GETPOSTISSET('langcode')?GETPOST('langcode', 'aZ09'):$langs->defaultlang;
if ($context == 'edit') $selectedlang = $obj->{$fieldlist[$field]};
print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150');
}