Order appData entries by the application name, otherwise the order is based on when the

application was added to the database and this grouping doesn't work well for screenshots.
This commit is contained in:
Chris Morgan
2007-08-08 00:55:27 +00:00
committed by WineHQ
parent 242849cc04
commit 218beb0f83

View File

@@ -366,7 +366,8 @@ class appData
AND AND
appData.queued = '?' appData.queued = '?'
AND AND
appData.type = '?'"; appData.type = '?'
ORDER BY appFamily.appName";
if(!$iRows && !$iStart) if(!$iRows && !$iStart)
{ {
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $hResult = query_parameters($sQuery, $_SESSION['current']->iUserId,
@@ -386,37 +387,42 @@ class appData
if($iStart || $iRows) if($iStart || $iRows)
$sLimit = " LIMIT ?,?"; $sLimit = " LIMIT ?,?";
$sQuery = "(SELECT DISTINCT appData.* FROM appData, $sQuery =
appFamily, appVersion WHERE "(
appFamily.appId = appVersion.appId SELECT DISTINCT appData.* FROM appData,
AND appFamily, appVersion WHERE
( appFamily.appId = appVersion.appId
AND
(
appData.appId = appFamily.appId appData.appId = appFamily.appId
)
AND
appVersion.queued = 'false'
AND
appFamily.queued = 'false'
AND
appData.queued = '?'
AND
appData.type = '?' ORDER BY appFamily.appName $sLimit
) )
AND UNION
appVersion.queued = 'false'
AND
appFamily.queued = 'false'
AND
appData.queued = '?'
AND
appData.type = '?'$sLimit) UNION
( (
SELECT DISTINCT appData.* FROM appData, SELECT DISTINCT appData.* FROM appData,
appFamily, appVersion WHERE appFamily, appVersion WHERE
appFamily.appId = appVersion.appId appFamily.appId = appVersion.appId
AND AND
( (
appData.versionId = appVersion.versionId appData.versionId = appVersion.versionId
) )
AND AND
appVersion.queued = 'false' appVersion.queued = 'false'
AND AND
appFamily.queued = 'false' appFamily.queued = 'false'
AND AND
appData.queued = '?' appData.queued = '?'
AND AND
appData.type = '?'$sLimit)"; appData.type = '?' ORDER BY appFamily.appName $sLimit
)";
if(!$iRows && !$iStart) if(!$iRows && !$iStart)
{ {
$hResult = query_parameters($sQuery, $bQueued ? "true" : "false", $sType, $hResult = query_parameters($sQuery, $bQueued ? "true" : "false", $sType,