Fix: avoid warning php strict mode

This commit is contained in:
Regis Houssin
2012-07-10 11:45:38 +02:00
parent 41789458c5
commit 41144643eb
6 changed files with 139 additions and 124 deletions

View File

@@ -30,10 +30,16 @@ $langs->load("admin");
if (! $user->admin) accessforbidden();
$action = GETPOST('action');
$debug = GETPOST('debug');
$rowid=GETPOST('rowid','int');
$entity=GETPOST('entity','int');
$action=GETPOST('action');
$update=GETPOST('update');
$delete=GETPOST('delete');
$debug=GETPOST('debug');
$consts=GETPOST('const');
$typeconst=array('yesno','texte','chaine');
$mesg='';
/*
@@ -64,9 +70,9 @@ if ($action == 'add')
}
}
if (($_POST["const"] && isset($_POST["update"]) && $_POST["update"] == $langs->trans("Modify")))
if (! empty($consts) && $update == $langs->trans("Modify"))
{
foreach($_POST["const"] as $const)
foreach($consts as $const)
{
if ($const["check"])
{
@@ -79,9 +85,9 @@ if (($_POST["const"] && isset($_POST["update"]) && $_POST["update"] == $langs->t
}
// Delete several lines at once
if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("Delete"))
if (! empty($consts) && $delete == $langs->trans("Delete"))
{
foreach($_POST["const"] as $const)
foreach($consts as $const)
{
if ($const["check"]) // Is checkbox checked
{
@@ -96,7 +102,7 @@ if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("De
// Delete line from delete picto
if ($action == 'delete')
{
if (dolibarr_del_const($db, $_GET["rowid"], $_GET["entity"]) < 0)
if (dolibarr_del_const($db, $rowid, $entity) < 0)
{
dol_print_error($db);
}
@@ -136,7 +142,7 @@ print_fiche_titre($langs->trans("OtherSetup"),'','setup');
print $langs->trans("ConstDesc")."<br>\n";
print "<br>\n";
if ($mesg) print $mesg;
dol_htmloutput_mesg($mesg);
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';