mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Null coalescing operator can be used
Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
parent
4667c92f60
commit
f0d6d30def
27 changed files with 60 additions and 61 deletions
|
@ -14,11 +14,11 @@ if (!empty($setmodules)) {
|
|||
return;
|
||||
}
|
||||
|
||||
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
||||
$mode = $_GET['mode'] ?? '';
|
||||
$job_id = isset($_GET['id']) ? (int)$_GET['id'] : '';
|
||||
$submit = isset($_POST['submit']);
|
||||
$jobs = isset($_POST['select']) ? implode(',', $_POST['select']) : '';
|
||||
$cron_action = isset($_POST['cron_action']) ? $_POST['cron_action'] : '';
|
||||
$cron_action = $_POST['cron_action'] ?? '';
|
||||
|
||||
if ($mode == 'run' && !$job_id) {
|
||||
define('BB_ROOT', './../');
|
||||
|
@ -40,7 +40,7 @@ foreach ($sql as $row) {
|
|||
$config_value = $row['config_value'];
|
||||
$default_config[$config_name] = $config_value;
|
||||
|
||||
$new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
|
||||
$new[$config_name] = $_POST[$config_name] ?? $default_config[$config_name];
|
||||
|
||||
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
|
||||
bb_update_config(array($config_name => $new[$config_name]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue