Skip to content

Commit da8519b

Browse files
committed
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) svn path=/trunk/; revision=443
1 parent b256d64 commit da8519b

File tree

1 file changed

+4
-26
lines changed

1 file changed

+4
-26
lines changed

web/reactos.org/htdocs/support/inc/tools/osversion.php

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,12 @@
3636

3737

3838
function show_osversion($osvernumber) { // intern function, don't call this function directly
39-
$tempabc = array();
40-
$tempd="";
39+
$result = mysql_query("SELECT ver_name FROM rsdb_object_osversions WHERE ver_value = '$osvernumber' LIMIT 1");
4140

42-
$tempabc = str_split($osvernumber, 1);
41+
if(!$result)
42+
return "";
4343

44-
if ($tempabc[0] != 0) {
45-
$tempd .= $tempabc[0];
46-
}
47-
if ($tempabc[1] != 0) {
48-
$tempd .= $tempabc[1];
49-
}
50-
//if ($tempabc[2] != 0) {
51-
$tempd .= $tempabc[2];
52-
//}
53-
//if ($tempabc[3] != 0) {
54-
$tempd .= ".".$tempabc[3];
55-
//}
56-
//if ($tempabc[4] != 0) {
57-
$tempd .= ".".$tempabc[4];
58-
//}
59-
if ($tempabc[5] != 0) {
60-
$tempd .= $tempabc[5];
61-
}
62-
/*else {
63-
$tempd = "unkown";
64-
}*/
65-
66-
return $tempd;
44+
return mysql_result($result, 0);
6745
}
6846

6947
?>

0 commit comments

Comments
 (0)