mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Fix #2136 add button to reset the cleanup exception list
This commit is contained in:
parent
e98ba87f8e
commit
d285a90e88
6 changed files with 32 additions and 1 deletions
|
|
@ -22,6 +22,14 @@ class Cleanup extends Base
|
|||
$cleanup_list = $this->checkFiles();
|
||||
Context::set('cleanup_list', $cleanup_list);
|
||||
|
||||
// Get current configuration.
|
||||
$config = ModuleModel::getModuleConfig('admin') ?: new \stdClass;
|
||||
if (!isset($config->cleanup_exceptions))
|
||||
{
|
||||
$config->cleanup_exceptions = [];
|
||||
}
|
||||
Context::set('exceptions', $config->cleanup_exceptions);
|
||||
|
||||
// Check previous errors.
|
||||
Context::set('cleanup_errors', $_SESSION['admin_cleanup_errors'] ?? []);
|
||||
unset($_SESSION['admin_cleanup_errors']);
|
||||
|
|
@ -54,6 +62,16 @@ class Cleanup extends Base
|
|||
ModuleController::getInstance()->insertModuleConfig('admin', $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the exception list.
|
||||
*/
|
||||
public function procAdminResetCleanupException()
|
||||
{
|
||||
$config = ModuleModel::getModuleConfig('admin') ?: new \stdClass;
|
||||
$config->cleanup_exceptions = [];
|
||||
ModuleController::getInstance()->insertModuleConfig('admin', $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup action.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue