appData: Some cleanup in SQL code

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-12-02 19:38:17 +01:00
committed by Chris Morgan
parent 31750b9de0
commit 6d9aa68e0e

View File

@@ -214,7 +214,6 @@ class appData
$sQueued = "false";
$sSelectType = "";
$sLimit = "";
if(($sQueued == "true" || $sQueued == "all") &&
!$_SESSION['current']->hasPriv("admin"))
@@ -280,17 +279,13 @@ class appData
$sSelectType = " AND type = '?'";
$sQuery = "(SELECT COUNT(DISTINCT appData.id) as count FROM appData,
appFamily, appVersion WHERE
appFamily.appId = appVersion.appId
AND
appFamily WHERE
(
appData.appId = appFamily.appId
AND
appData.versionId = '0'
)
AND
appVersion.queued = 'false'
AND
appFamily.queued = 'false'$sAppDataQueued$sSelectType) UNION
(
SELECT COUNT(DISTINCT appData.id) as count FROM appData,
@@ -407,17 +402,13 @@ class appData
$sQuery =
"(
SELECT DISTINCT appData.* FROM appData,
appFamily, appVersion WHERE
appFamily.appId = appVersion.appId
AND
appFamily WHERE
(
appData.appId = appFamily.appId
AND
appData.versionId = '0'
)
AND
appVersion.queued = 'false'
AND
appFamily.queued = 'false'
AND
appData.queued = '?'