Web: use master_url instead of URL_BASE in example

The URL_BASE in project.inc may not be the same as the <master_url> in config.xml so the example would be wrong if those differ.
This commit is contained in:
Christian Beer 2015-12-02 13:56:57 +01:00
parent 9a4a26e898
commit f8a1762ea2
1 changed files with 6 additions and 4 deletions

View File

@ -19,7 +19,7 @@
require_once("../inc/util.inc"); require_once("../inc/util.inc");
require_once("../inc/user.inc"); require_once("../inc/user.inc");
$url = parse_config(get_config(), "<master_url>"); $master_url = parse_config(get_config(), "<master_url>");
$user = get_logged_in_user(); $user = get_logged_in_user();
page_head(tra("Account keys")); page_head(tra("Account keys"));
@ -30,9 +30,11 @@ $weak_auth = weak_auth($user);
// strip http:// // strip http://
// //
$idx = strpos($url, '://'); $idx = strpos($master_url, '://');
if ($idx) { if ($idx) {
$url = substr($url, $idx+strlen('://')); $url = substr($master_url, $idx+strlen('://'));
} else {
$url = $master_url;
} }
// convert invalid characters into underscores // convert invalid characters into underscores
@ -65,7 +67,7 @@ echo "<table><tr><td>",
<pre>", <pre>",
htmlspecialchars( htmlspecialchars(
"<account> "<account>
<master_url>".URL_BASE."</master_url> <master_url>".$master_url."</master_url>
<authenticator>".$weak_auth."</authenticator> <authenticator>".$weak_auth."</authenticator>
</account>"), </account>"),
"</pre> "</pre>