Use constants instead of string literals

* Replaced '../triggers/cron_running' with CRON_RUNNING
* Replaced '../triggers/cron_allowed' with CRON_ALLOWED
This commit is contained in:
Roman Kelesidis 2023-03-05 23:09:33 +07:00
commit d3114093f7

View file

@ -79,7 +79,7 @@ switch ($mode) {
));
//detect cron status
if (file_exists('../triggers/cron_running')) {
if (file_exists(CRON_RUNNING)) {
$template->assign_vars(array(
'CRON_RUNNING' => true,
));
@ -87,8 +87,8 @@ switch ($mode) {
break;
case 'repair':
if (file_exists('../triggers/cron_running')) {
rename('../triggers/cron_running', '../triggers/cron_allowed');
if (file_exists(CRON_RUNNING)) {
rename(CRON_RUNNING, CRON_ALLOWED);
}
redirect('admin/' . basename(__FILE__) . '?mode=list');
break;