Fix maintainer listing for versions. getMaintainersForAppIdVersionId() did not check that

additional entries had a superMaintainer = 1 so a maintainer of one version would be listed
as the maintainer for all versions of the application. Correct that issue and update the
unit test.
This commit is contained in:
Alexander Nicolaysen Sørnes
2007-04-16 23:19:44 +00:00
committed by WineHQ
parent 46df59f063
commit b584fe1df7
2 changed files with 28 additions and 5 deletions

View File

@@ -396,9 +396,19 @@ class maintainer
if($iVersionId)
{
$hResult = query_parameters("SELECT userId from appMaintainers, appVersion
WHERE appMaintainers.queued = 'false' AND appVersion.versionId = '?'
AND ((appMaintainers.versionId = appVersion.versionId) OR
(appMaintainers.appId = appVersion.appId))", $iVersionId);
WHERE
appMaintainers.queued = 'false'
AND
appVersion.versionId = '?'
AND
(
appMaintainers.versionId = appVersion.versionId
OR
(
appMaintainers.appId = appVersion.appId
AND superMaintainer = '1'
)
)", $iVersionId);
}
/*
* If versionId was not supplied we fetch supermaintainers of application and maintainer of all versions.