[Rt-commit] rt branch, 4.2/webhomepath-with-webpath, created. rt-4.1.6-312-g80725e7
Alex Vandiver
alexmv at bestpractical.com
Wed Mar 6 21:00:23 EST 2013
The branch, 4.2/webhomepath-with-webpath has been created
at 80725e7abae76f9762c58b8c70b70abc4b4edd48 (commit)
- Log -----------------------------------------------------------------
commit 80725e7abae76f9762c58b8c70b70abc4b4edd48
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Mar 6 20:56:05 2013 -0500
WebHomePath was always "/SelfService" when WebPath was defined
Concatenation is higher precedence than the ternary operator, leading
the WebHomePath to effectively be:
(WebPath . !Privileged) ? "/SelfService" : ""
...which was a correct formulation as long as WebPath was empty, but
which forced WebHomePath to "/SelfService" whenever WebPath was set,
breaking autocompletion.
Add parentheses to fix the precedence.
diff --git a/share/html/Elements/JavascriptConfig b/share/html/Elements/JavascriptConfig
index b428478..e7bbcde 100644
--- a/share/html/Elements/JavascriptConfig
+++ b/share/html/Elements/JavascriptConfig
@@ -59,7 +59,7 @@ if ($session{CurrentUser} and $session{CurrentUser}->id) {
? JSON::true : JSON::false;
$Config->{WebHomePath} = RT->Config->Get("WebPath")
- . !$session{CurrentUser}->Privileged ? "/SelfService" : "";
+ . (!$session{CurrentUser}->Privileged ? "/SelfService" : "");
}
$m->callback(
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list