appdb/include application.php

WineHQ wineowner at wine.codeweavers.com
Sat Jun 9 19:27:54 CDT 2007


ChangeSet ID:	31169
CVSROOT:	/opt/cvs-commit
Module name:	appdb
Changes by:	wineowner at winehq.org	2007/06/09 19:27:54

Modified files:
	include        : application.php 

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

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

Old revision  New revision  Changes     Path
 1.109         1.110         +5 -4       appdb/include/application.php

Index: appdb/include/application.php
diff -u -p appdb/include/application.php:1.109 appdb/include/application.php:1.110
--- appdb/include/application.php:1.109	10 Jun 2007  0:27:54 -0000
+++ appdb/include/application.php	10 Jun 2007  0:27:54 -0000
@@ -808,7 +808,7 @@ class Application {
         return $sLink;
     }
 
-    function objectGetEntries($bQueued, $bRejected)
+    function objectGetEntries($bQueued, $bRejected, $sOrderBy = "appId")
     {
         $sQuery = "SELECT * FROM appFamily WHERE
                      appFamily.queued = '?'";
@@ -821,12 +821,13 @@ class Application {
             if(!$bRejected)
                 return FALSE;
 
-            $sQuery .= " AND appFamily.submitterId = '?'";
+            $sQuery .= " AND appFamily.submitterId = '?' ORDER BY '?'";
             $hResult = query_parameters($sQuery, $sQueued,
-                                        $_SESSION['current']->iUserId);
+                                        $_SESSION['current']->iUserId, $sOrderBy);
         } else
         {
-            $hResult = query_parameters($sQuery, $sQueued);
+            $sQuery .= " ORDER BY '?'";
+            $hResult = query_parameters($sQuery, $sQueued, $sOrderBy);
         }
 
         if(!$hResult)



More information about the wine-cvs mailing list