[ros-diffs] [cfinck] 443: Hey Arch, why do we have a table with all correct version numbers and then try to determine the version number from the sort key? This solution is not very elegant, but should serve us well till Danny's CompatDB rewrite is done ; -) Thanks to Javier for reporting this bug on the mailing list (http://www.reactos.org/archives/public/ros-dev/2009-July/011751.html)

cfinck at svn.reactos.org cfinck at svn.reactos.org
Tue Jul 7 21:11:41 CEST 2009


Author: cfinck
Date: Tue Jul  7 23:11:40 2009
New Revision: 443

URL: http://svn.reactos.org/svn/reactos?rev=443&view=rev
Log:
Hey Arch, why do we have a table with all correct version numbers and then try to determine the version number from the sort key?
This solution is not very elegant, but should serve us well till Danny's CompatDB rewrite is done ;-)

Thanks to Javier for reporting this bug on the mailing list (http://www.reactos.org/archives/public/ros-dev/2009-July/011751.html)

Modified:
    trunk/web/reactos.org/htdocs/support/inc/tools/osversion.php

Modified: trunk/web/reactos.org/htdocs/support/inc/tools/osversion.php
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/support/inc/tools/osversion.php?rev=443&r1=442&r2=443&view=diff
==============================================================================
--- trunk/web/reactos.org/htdocs/support/inc/tools/osversion.php [iso-8859-1] (original)
+++ trunk/web/reactos.org/htdocs/support/inc/tools/osversion.php [iso-8859-1] Tue Jul  7 23:11:40 2009
@@ -36,34 +36,12 @@
 
 	
 	function show_osversion($osvernumber) { // intern function, don't call this function directly
-		$tempabc = array();
-		$tempd="";
+		$result = mysql_query("SELECT ver_name FROM rsdb_object_osversions WHERE ver_value = '$osvernumber' LIMIT 1");
 		
-		$tempabc = str_split($osvernumber, 1);
+		if(!$result)
+			return "";
 		
-		if ($tempabc[0] != 0) {
-			$tempd .= $tempabc[0];
-		}
-		if ($tempabc[1] != 0) {
-			$tempd .= $tempabc[1];
-		}
-		//if ($tempabc[2] != 0) {
-			$tempd .= $tempabc[2];
-		//}
-		//if ($tempabc[3] != 0) {
-			$tempd .= ".".$tempabc[3];
-		//}
-		//if ($tempabc[4] != 0) {
-			$tempd .= ".".$tempabc[4];
-		//}
-		if ($tempabc[5] != 0) {
-			$tempd .= $tempabc[5];
-		}
-		/*else {
-			$tempd = "unkown";
-		}*/
-		
-		return $tempd;
+		return mysql_result($result, 0);
 	}
 	
 ?>



More information about the Ros-diffs mailing list