wip
This commit is contained in:
1 parent
31f86944bd
commit
d2733e16bc
1 file changed
+16
-2
@@ -252,8 +252,10 @@ trait GrappingSofascore
|
||||
$this->restart = 1;
|
||||
break;
|
||||
case 'clear':
|
||||
$this->restart = 1;
|
||||
$this->clear_folder($folder, 'all');
|
||||
if ($this->confirm_delete() == 'Yes') {
|
||||
$this->restart = 1;
|
||||
$this->clear_folder($folder, 'all');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -432,4 +434,16 @@ trait GrappingSofascore
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
protected function confirm_delete(): string
|
||||
{
|
||||
return select(
|
||||
label: 'Confirm delete!',
|
||||
default: 'no',
|
||||
options: [
|
||||
'no' => 'No',
|
||||
'yes' => 'Yes',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user