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) { if ($confirm) {
echo $obj -> _cli_show($raw_values); $obj -> _cli_show($raw_values);
// Sure ? // Sure ?
echo "\nAre you sure you want to delete this object ? Type 'yes' to continue: "; if (!LScli :: confirm("\nAre you sure you want to delete this object?"));
$handle = fopen ("php://stdin","r"); return True;
$line = fgets($handle);
if(trim($line) != 'yes'){
echo "User cancel\n";
return True;
}
echo "\n";
} }
if ($obj -> remove()) { if ($obj -> remove()) {