mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Minor improvements (#1658)
* Minor improvements * Update install.php * Update install.php * Update .gitignore * Update admin_cron.php * Update Upload.php * Update CHANGELOG.md
This commit is contained in:
parent
0587f7a035
commit
055a6e53ca
5 changed files with 25 additions and 22 deletions
|
@ -188,7 +188,8 @@ switch ($mode) {
|
|||
}
|
||||
|
||||
if ($submit) {
|
||||
if ($_POST['mode'] == 'list') {
|
||||
$mode2 = $_POST['mode'] ?? '';
|
||||
if ($mode2 == 'list') {
|
||||
if ($cron_action == 'run' && $jobs) {
|
||||
\TorrentPier\Legacy\Admin\Cron::run_jobs($jobs);
|
||||
} elseif ($cron_action == 'delete' && $jobs) {
|
||||
|
@ -198,12 +199,12 @@ if ($submit) {
|
|||
}
|
||||
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
||||
} elseif (\TorrentPier\Legacy\Admin\Cron::validate_cron_post($_POST) == 1) {
|
||||
if ($_POST['mode'] == 'edit') {
|
||||
if ($mode2 == 'edit') {
|
||||
\TorrentPier\Legacy\Admin\Cron::update_cron_job($_POST);
|
||||
} elseif ($_POST['mode'] == 'add') {
|
||||
} elseif ($mode2 == 'add') {
|
||||
\TorrentPier\Legacy\Admin\Cron::insert_cron_job($_POST);
|
||||
} else {
|
||||
bb_die('Mode error');
|
||||
bb_die("Invalid mode: $mode2");
|
||||
}
|
||||
|
||||
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue