Add support for application wide maintainers, super maintainers, that are
maintainers for all versions of a particular application.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user