Skip to content

Commit 68947c8

Browse files
committed
put back config setting to be less magic
1 parent 8213daf commit 68947c8

File tree

4 files changed

+5
-1
lines changed

4 files changed

+5
-1
lines changed

defaults/config.ini.default

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ terms_of_service_url = "https://github.com" ; this can be external or a portal p
1515
account_policy_url = "https://github.com" ; this can be external or a portal page created with "content management"
1616
allow_die = true ; internal use only
1717
enable_verbose_error_log = true ; internal use only
18+
enable_redirect_message = true ; internal use only
1819
enable_exception_handler = true ; internal use only
1920
enable_error_handler = true ; internal use only
2021

deployment/overrides/phpunit/config/config.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ custom_user_mappings_dir = "test/custom_user_mappings"
44
[site]
55
allow_die = false
66
enable_verbose_error_log = false
7+
enable_redirect_message = false
78
enable_exception_handler = false
89
enable_error_handler = false
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[site]
2+
enable_redirect_message = false

resources/lib/UnityHTTPD.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function redirect(?string $dest = null): never
4646
$dest = htmlspecialchars($dest);
4747
header("Location: $dest");
4848
http_response_code(302);
49-
if (php_sapi_name() !== "cli") {
49+
if (CONFIG["site"]["enable_redirect_message"]) {
5050
echo "If you're reading this message, then your browser has failed to redirect you " .
5151
"to the proper destination. click <a href='$dest'>here</a> to continue.";
5252
}

0 commit comments

Comments
 (0)