From f8a1762ea2cebca159d8cea2c98d4ef19ccde17a Mon Sep 17 00:00:00 2001 From: Christian Beer Date: Wed, 2 Dec 2015 13:56:57 +0100 Subject: [PATCH] Web: use master_url instead of URL_BASE in example The URL_BASE in project.inc may not be the same as the in config.xml so the example would be wrong if those differ. --- html/user/weak_auth.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/html/user/weak_auth.php b/html/user/weak_auth.php index 5b0ce184fa..f3e31b3744 100644 --- a/html/user/weak_auth.php +++ b/html/user/weak_auth.php @@ -19,7 +19,7 @@ require_once("../inc/util.inc"); require_once("../inc/user.inc"); -$url = parse_config(get_config(), ""); +$master_url = parse_config(get_config(), ""); $user = get_logged_in_user(); page_head(tra("Account keys")); @@ -30,9 +30,11 @@ $weak_auth = weak_auth($user); // strip http:// // -$idx = strpos($url, '://'); +$idx = strpos($master_url, '://'); if ($idx) { - $url = substr($url, $idx+strlen('://')); + $url = substr($master_url, $idx+strlen('://')); +} else { + $url = $master_url; } // convert invalid characters into underscores @@ -65,7 +67,7 @@ echo "
",
",
     htmlspecialchars(
 "
-    ".URL_BASE."
+    ".$master_url."
     ".$weak_auth."
 "),
     "