Include supermaintainers in getMaintainersForAppIdVersionId()

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-03-10 03:35:06 +00:00
committed by WineHQ
parent 71cba5e7c3
commit f12a5ded10
2 changed files with 6 additions and 7 deletions

View File

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

View File

@@ -758,13 +758,10 @@ class Version {
echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><b>Maintainers of this version:</b>\n"; echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><b>Maintainers of this version:</b>\n";
echo "<table width=\"250\" border=\"0\">"; echo "<table width=\"250\" border=\"0\">";
$aMaintainers = $this->getMaintainersUserIds(); $aMaintainers = $this->getMaintainersUserIds();
$aSupermaintainers = Maintainer::getSuperMaintainersUserIdsFromAppId($this->iAppId); if(sizeof($aMaintainers)>0)
$aAllMaintainers = array_merge($aMaintainers,$aSupermaintainers);
$aAllMaintainers = array_unique($aAllMaintainers);
if(sizeof($aAllMaintainers)>0)
{ {
echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><ul>"; echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><ul>";
while(list($index, $userIdValue) = each($aAllMaintainers)) while(list($index, $userIdValue) = each($aMaintainers))
{ {
$oUser = new User($userIdValue); $oUser = new User($userIdValue);
echo "<li>$oUser->sRealname (<a href=\"".BASE."contact.php?". echo "<li>$oUser->sRealname (<a href=\"".BASE."contact.php?".