Pārlūkot izejas kodu

Fix: broken context usage when no context (neither org nor menu) at all

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1381 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 gadi atpakaļ
vecāks
revīzija
acb01895ef

+ 2 - 1
application/itopwebpage.class.inc.php

@@ -398,8 +398,9 @@ EOF
 				{
 					return sURL+'?'+sContext;
 				}				
+				return sURL+'&'+sContext;
 			}
-			return sURL+'&'+sContext;
+			return sURL;
 		}
 		
 		var oUserPreferences = $sUserPrefs;

+ 5 - 5
application/portalwebpage.class.inc.php

@@ -158,8 +158,7 @@ EOF
 	{
 		return '$sAbsURLAppRoot';
 	}
-		
-		
+	
 	function AddAppContext(sURL)
 	{
 		var sContext = '$sAppContext';
@@ -168,11 +167,12 @@ EOF
 			if (sURL.indexOf('?') == -1)
 			{
 				return sURL+'?'+sContext;
-			}
+			}				
+			return sURL+'&'+sContext;
 		}
-		return sURL+'&'+sContext;
+		return sURL;
 	}
-
+	
 	function GoBack(sFormId)
 	{
 		var form = $('#'+sFormId);