Przeglądaj źródła

- Bug ! Incorrectly appending a parameter ?version= to linked scripts already containing a parameter in their URL !
- changed the parameter name to itopversion to avoid collisions

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1701 a333f486-631f-4898-b8df-5754b55c2be0

dflaven 13 lat temu
rodzic
commit
2811c2dc56

+ 3 - 3
application/itopwebpage.class.inc.php

@@ -593,13 +593,13 @@ EOF
         {
          	// Make sure that the URL to the script contains the application's version number
         	// so that the new script do NOT get reloaded from the cache when the application is upgraded
-        	if (strpos('?', $s_script) === false)
+        	if (strpos($s_script, '?') === false)
         	{
-        		$s_script .= "?version=".ITOP_VERSION;
+        		$s_script .= "?itopversion=".ITOP_VERSION;
         	}
         	else
         	{
-        		$s_script .= "&version=".ITOP_VERSION;
+        		$s_script .= "&itopversion=".ITOP_VERSION;
         	}
             echo "<script type=\"text/javascript\" src=\"$s_script\"></script>\n";
         }

+ 3 - 3
application/webpage.class.inc.php

@@ -372,13 +372,13 @@ class WebPage
         {
         	// Make sure that the URL to the script contains the application's version number
         	// so that the new script do NOT get reloaded from the cache when the application is upgraded
-        	if (strpos('?', $s_script) === false)
+        	if (strpos($s_script, '?') === false)
         	{
-        		$s_script .= "?version=".ITOP_VERSION;
+        		$s_script .= "?itopversion=".ITOP_VERSION;
         	}
         	else
         	{
-        		$s_script .= "&version=".ITOP_VERSION;
+        		$s_script .= "&itopversion=".ITOP_VERSION;
         	}
             echo "<script type=\"text/javascript\" src=\"$s_script\"></script>\n";
         }