This repository has been archived on 2025-05-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
qemudb/include/maintainer.php
2006-07-06 22:08:37 +00:00

51 lines
1.1 KiB
PHP

<?php
/*****************************/
/* functions for maintainers */
/*****************************/
/*
* get the userIds of maintainers for a versionId
*/
function getMaintainersUserIdsFromAppIdVersionId($versionId)
{
$retval = array();
/* early out if the versionId isn't valid */
if($versionId == 0)
return $retval;
$sQuery = "SELECT userId FROM ".
"appMaintainers WHERE versionId = '?';";
$hResult = query_parameters($sQuery, $versionId);
$c = 0;
while($oRow = mysql_fetch_object($hResult))
{
$retval[$c] = $oRow->userId;
$c++;
}
return $retval;
}
/*
* get the userIds of super maintainers for this appId
*/
function getSuperMaintainersUserIdsFromAppId($appId)
{
$sQuery = "SELECT userId FROM ".
"appMaintainers WHERE appId = '?' " .
"AND superMaintainer = '1';";
$hResult = query_parameters($sQuery, $appId);
$retval = array();
$c = 0;
while($oRow = mysql_fetch_object($hResult))
{
$retval[$c] = $oRow->userId;
$c++;
}
return $retval;
}
?>