appdb/include version.php

WineHQ wineowner at wine.codeweavers.com
Sat Jun 9 19:28:52 CDT 2007


ChangeSet ID:	31170
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/06/09 19:28:52

Modified files:
	include        : version.php 

Log message:
	Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
	Order versions by id

Patch: http://cvs.winehq.org/patch.py?id=31170

Old revision  New revision  Changes     Path
 1.127         1.128         +7 -6       appdb/include/version.php

Index: appdb/include/version.php
diff -u -p appdb/include/version.php:1.127 appdb/include/version.php:1.128
--- appdb/include/version.php:1.127	10 Jun 2007  0:28:52 -0000
+++ appdb/include/version.php	10 Jun 2007  0:28:52 -0000
@@ -1276,7 +1276,7 @@ class Version {
         return $aCells;
     }
 
-    function objectGetEntries($bQueued, $bRejected)
+    function objectGetEntries($bQueued, $bRejected, $sOrderBy = "versionId")
     {
         $sQueued = objectManager::getQueueString($bQueued, $bRejected);
 
@@ -1293,7 +1293,7 @@ class Version {
                         AND
                         appVersion.submitterId = '?'
                         AND
-                        appVersion.queued = '?'";
+                        appVersion.queued = '?' ORDER BY '?'";
             else
                 $sQuery = "SELECT appVersion.* FROM
                         appVersion, appMaintainers, appFamily WHERE
@@ -1319,9 +1319,10 @@ class Version {
                         AND
                         appMaintainers.queued = 'false'
                         AND
-                        appVersion.queued = '?'";
+                        appVersion.queued = '?' ORDER BY '?'";
 
-            $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sQueued);
+            $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sQueued,
+                                       $sOrderBy);
         } else
         {
             $sQuery = "SELECT appVersion.*
@@ -1330,8 +1331,8 @@ class Version {
                     AND
                     appFamily.queued = 'false'
                     AND
-                    appVersion.queued = '?'";
-            $hResult = query_parameters($sQuery, $sQueued);
+                    appVersion.queued = '?' ORDER BY '?'";
+            $hResult = query_parameters($sQuery, $sQueued, $sOrderBy);
         }
 
         if(!$hResult)



More information about the wine-cvs mailing list