LSldapObject :: _cli_remove : use LScli :: confirm

This commit is contained in:
Benjamin Renard 2020-05-08 20:38:02 +02:00
parent 1de6d1d25e
commit 3d9c11e12f

View file

@ -2041,16 +2041,10 @@ class LSldapObject extends LSlog_staticLoggerClass {
}
if ($confirm) {
echo $obj -> _cli_show($raw_values);
$obj -> _cli_show($raw_values);
// Sure ?
echo "\nAre you sure you want to delete this object ? Type 'yes' to continue: ";
$handle = fopen ("php://stdin","r");
$line = fgets($handle);
if(trim($line) != 'yes'){
echo "User cancel\n";
return True;
}
echo "\n";
if (!LScli :: confirm("\nAre you sure you want to delete this object?"));
return True;
}
if ($obj -> remove()) {