Add support for application wide maintainers, super maintainers, that are

maintainers for all versions of a particular application.
This commit is contained in:
Chris Morgan
2004-12-10 00:18:01 +00:00
committed by WineHQ
parent 06a0ea4812
commit 3fa8a3bd7a
10 changed files with 393 additions and 148 deletions

View File

@@ -5,7 +5,7 @@
*/
function getAppsFromUserId($userId)
{
$result = mysql_query("SELECT appId, versionId FROM ".
$result = mysql_query("SELECT appId, versionId, superMaintainer FROM ".
"appMaintainers WHERE userId = '$userId'");
if(mysql_num_rows($result) == 0)
return;
@@ -14,7 +14,7 @@ function getAppsFromUserId($userId)
$c = 0;
while($row = mysql_fetch_object($result))
{
$retval[$c] = array($row->appId, $row->versionId);
$retval[$c] = array($row->appId, $row->versionId, $row->superMaintainer);
$c++;
}
@@ -44,4 +44,27 @@ function getMaintainersUserIdsFromAppIdVersionId($appId, $versionId)
return $retval;
}
/*
* get the userIds of super maintainers for this appId
*/
function getSuperMaintainersUserIdsFromAppId($appId)
{
$query = "SELECT userId FROM ".
"appMaintainers WHERE appId = '$appId' " .
"AND superMaintainer = '1';";
$result = mysql_query($query);
if(mysql_num_rows($result) == 0)
return; // no sub categories
$retval = array();
$c = 0;
while($row = mysql_fetch_object($result))
{
$retval[$c] = array($row->userId);
$c++;
}
return $retval;
}
?>