From 2aa99a4e80dccfee2c9ea2b7544e0d9141928f91 Mon Sep 17 00:00:00 2001 From: Alix Date: Thu, 18 May 2023 22:42:25 +0330 Subject: [PATCH] Update system_check.php --- stuff/admin/system_check.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/stuff/admin/system_check.php b/stuff/admin/system_check.php index 4aa4e340..39dca7fa 100644 --- a/stuff/admin/system_check.php +++ b/stuff/admin/system_check.php @@ -65,14 +65,14 @@ foreach ($modules as $module) { } $functions = array('fopen'); +$systemCheckOk = array(); +$systemCheckError = array(); foreach ($functions as $function) { if (function_exists($function)) { - $okField = "system_ok_$function"; - $systemCheckOk[$function] = $function->$okField; + $systemCheckOk[$function] = true; } else { - $errorField = "error_system_$function"; - $systemCheckError[$function] = $sprache->$errorField; + $systemCheckError[$function] = "The function $function does not exist."; } } @@ -106,19 +106,19 @@ $folderArray = array( ); foreach ($folderArray as $folder) { - if (is_dir(EASYWIDIR . "/${folder}")) { - $handle = @fopen(EASYWIDIR . "/${folder}test.txt", "w+"); + if (is_dir(EASYWIDIR . "/{$folder}")) { + $handle = @fopen(EASYWIDIR . "/{$folder}test.txt", "w+"); if ($handle) { fclose($handle); - unlink(EASYWIDIR . "/${folder}test.txt"); - $systemCheckOk['folders'][] = "Folder exists and can write to: ${folder}"; + unlink(EASYWIDIR . "/{$folder}test.txt"); + $systemCheckOk['folders'][] = "Folder exists and can write to: {$folder}"; } else { - $systemCheckError['folders'][] = "Folder exists but cannot edit files: ${folder}"; + $systemCheckError['folders'][] = "Folder exists but cannot edit files: {$folder}"; } } else { - $systemCheckError['folders'][] = "Folder does not exist or cannot access: ${folder}"; + $systemCheckError['folders'][] = "Folder does not exist or cannot access: {$folder}"; } }