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