mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
fix $check_only parameter and a little nicer cli formatting
This commit is contained in:
parent
37a9711b19
commit
00bf97eaeb
@ -24,15 +24,13 @@ $GLOBALS['egw_info'] = [
|
|||||||
];
|
];
|
||||||
require(dirname(__DIR__).'/header.inc.php');
|
require(dirname(__DIR__).'/header.inc.php');
|
||||||
|
|
||||||
$msgs = Sqlfs\Utils::fsck([
|
$msgs = Sqlfs\Utils::fsck($check_only = ($_SERVER['argv'][1] ?? '') !== '--yes');
|
||||||
'check_only' => $check_only = ($_SERVER['argv'][1] ?? '') !== '--yes',
|
|
||||||
]);
|
|
||||||
echo implode("\n", $msgs)."\n";
|
echo implode("\n", $msgs)."\n";
|
||||||
if (!$msgs)
|
if (!$msgs)
|
||||||
{
|
{
|
||||||
error_log("fsck found NO problems :)");
|
echo "fsck found NO problems :)\n";
|
||||||
}
|
}
|
||||||
elseif ($check_only)
|
elseif ($check_only)
|
||||||
{
|
{
|
||||||
error_log('Use --yes to fix problems found');
|
echo "\nUse --yes to fix problems found\n";
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user