Fix: exit code when upgrade is ran from command line
This commit is contained in:
parent
17c45208d3
commit
be4960cfbb
@ -351,10 +351,14 @@ if (empty($actiondone))
|
|||||||
print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
|
print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ret=0;
|
||||||
|
if (! $ok && isset($argv[1])) $ret=1;
|
||||||
|
dol_syslog("Exit ".$ret);
|
||||||
|
|
||||||
pFooter(! $ok && empty($_GET["ignoreerrors"]),$setuplang);
|
pFooter(! $ok && empty($_GET["ignoreerrors"]),$setuplang);
|
||||||
|
|
||||||
if ($db->connected) $db->close();
|
if ($db->connected) $db->close();
|
||||||
|
|
||||||
// Return code if ran from command line
|
// Return code if ran from command line
|
||||||
if (! $ok && isset($argv[1])) exit(1);
|
if ($ret) exit($ret);
|
||||||
?>
|
?>
|
||||||
@ -341,13 +341,16 @@ else
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ret=0;
|
||||||
|
if ($error && isset($argv[1])) $ret=1;
|
||||||
|
dol_syslog("Exit ".$ret);
|
||||||
|
|
||||||
pFooter($error,$setuplang);
|
pFooter($error,$setuplang);
|
||||||
|
|
||||||
if ($db->connected) $db->close();
|
if ($db->connected) $db->close();
|
||||||
|
|
||||||
// Return code if ran from command line
|
// Return code if ran from command line
|
||||||
if ($error && isset($argv[1])) exit(1);
|
if ($ret) exit($ret);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user