appdb/include version.php
WineHQ
wineowner at wine.codeweavers.com
Wed Apr 4 21:29:23 CDT 2007
ChangeSet ID: 31032
CVSROOT: /opt/cvs-commit
Module name: appdb
Changes by: wineowner at winehq.org 2007/04/04 21:29:22
Modified files:
include : version.php
Log message:
Alexander Nicolaysen Sørnes <alex at thehandofagony.com>
make version::objectGetEntriesCount() more consistent for rejected versions by not allowing
maintainers to see rejected versions for applications they maintain
Patch: http://cvs.winehq.org/patch.py?id=31032
Old revision New revision Changes Path
1.111 1.112 +34 -30 appdb/include/version.php
Index: appdb/include/version.php
diff -u -p appdb/include/version.php:1.111 appdb/include/version.php:1.112
--- appdb/include/version.php:1.111 5 Apr 2007 2:29:22 -0000
+++ appdb/include/version.php 5 Apr 2007 2:29:22 -0000
@@ -1159,41 +1159,45 @@ class Version {
if($bQueued && !version::canEdit())
{
- /* Users should see their own rejected entries */
+ /* Users should see their own rejected entries, but maintainers should
+ not be able to see rejected entries for versions they maintain */
if($bRejected)
- $sIncludeUserSubmissions = "OR appVersion.submitterId = '".
- $_SESSION['current']->iUserId."'";
-
- $sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
- appVersion, appMaintainers, appFamily WHERE
- appFamily.appId = appVersion.appId
- AND
- appFamily.queued = 'false'
- AND
- (
+ $sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
+ appVersion, appFamily WHERE
+ appFamily.appId = appVersion.appId
+ AND
+ appFamily.queued = 'false'
+ AND
+ appVersion.submitterId = '?'
+ AND
+ appVersion.queued = '?'";
+ else
+ $sQuery = "SELECT COUNT(DISTINCT appVersion.versionId) as count FROM
+ appVersion, appMaintainers, appFamily WHERE
+ appFamily.appId = appVersion.appId
+ AND
+ appFamily.queued = 'false'
+ AND
(
(
- (
- appMaintainers.appId = appVersion.appId
- AND
- superMaintainer = '1'
- )
- OR
- (
- appMaintainers.versionId = appVersion.versionId
- AND
- superMaintainer = '0'
- )
+ appMaintainers.appId = appVersion.appId
+ AND
+ superMaintainer = '1'
+ )
+ OR
+ (
+ appMaintainers.versionId = appVersion.versionId
+ AND
+ superMaintainer = '0'
)
- AND
- appMaintainers.userId = '?'
- AND
- appMaintainers.queued = 'false'
)
- $sIncludeUserSubmissions
- )
- AND
- appVersion.queued = '?'";
+ AND
+ appMaintainers.userId = '?'
+ AND
+ appMaintainers.queued = 'false'
+ AND
+ appVersion.queued = '?'";
+
$hResult = query_parameters($sQuery, $_SESSION['current']->iUserId, $sQueued);
} else
{
More information about the wine-cvs
mailing list