From d9bcb577d70b7bedcaa6dc50d6711f1219634c5a Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Thu, 7 Nov 2024 12:05:23 +0900 Subject: [PATCH] some minor test page code fixes --- phpstan.neon | 2 +- www/admin/class_test.php | 38 ++++++++++++++++++-------------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/phpstan.neon b/phpstan.neon index a10a656b..a84ae62c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,7 +10,7 @@ parameters: # lineAfter: 3 level: 8 # max is now 9 # strictRules: - # allRules: true + # allRules: false checkMissingCallableSignature: true treatPhpDocTypesAsCertain: false paths: diff --git a/www/admin/class_test.php b/www/admin/class_test.php index 6c173f18..a5032e9a 100644 --- a/www/admin/class_test.php +++ b/www/admin/class_test.php @@ -134,7 +134,7 @@ print "
READ _ENV ARRAY:
"; print Support::dumpVar(array_map('htmlentities', $_ENV)); // set + check edit access id $edit_access_id = 3; -if (is_object($login) && isset($login->loginGetAcl()['unit'])) { +if (isset($login->loginGetAcl()['unit'])) { print "ACL UNIT: " . print_r(array_keys($login->loginGetAcl()['unit']), true) . "
"; print "ACCESS CHECK: " . (string)$login->loginCheckEditAccess($edit_access_id) . "
"; if ($login->loginCheckEditAccess($edit_access_id)) { @@ -177,25 +177,23 @@ $log->debug('SOME MARK', 'Some error output'); // INTERNAL SET print "EDIT ACCESS ID: " . $backend->edit_access_id . "
"; -if (is_object($login)) { - // print "ACL:
".$backend->print_ar($login->loginGetAcl())."
"; - // $log->debug('ACL', "ACL: " . \CoreLibs\Debug\Support::dumpVar($login->loginGetAcl())); - // print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
"; - // print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
"; - // $result = array_flip( - // array_filter( - // array_flip($login->default_acl_list), - // function ($key) { - // if (is_numeric($key)) { - // return $key; - // } - // } - // ) - // ); - // print "DEFAULT ACL:
".$backend->print_ar($result)."
"; - // DEPRICATED CALL - // $backend->adbSetACL($login->loginGetAcl()); -} +// print "ACL:
".$backend->print_ar($login->loginGetAcl())."
"; +// $log->debug('ACL', "ACL: " . \CoreLibs\Debug\Support::dumpVar($login->loginGetAcl())); +// print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
"; +// print "DEFAULT ACL:
".$backend->print_ar($login->default_acl_list)."
"; +// $result = array_flip( +// array_filter( +// array_flip($login->default_acl_list), +// function ($key) { +// if (is_numeric($key)) { +// return $key; +// } +// } +// ) +// ); +// print "DEFAULT ACL:
".$backend->print_ar($result)."
"; +// DEPRICATED CALL +// $backend->adbSetACL($login->loginGetAcl()); print "THIS HOST: " . HOST_NAME . ", with PROTOCOL: " . HOST_PROTOCOL . " is running SSL: " . HOST_SSL . "
"; print "DIR: " . DIR . "
";