Move getAppsFromUserId() to user::getAppsMaintained(). Also implement a unit test for

user::getAppsMaintained()
This commit is contained in:
Chris Morgan
2006-07-06 22:08:37 +00:00
committed by WineHQ
parent 3096e63828
commit ea02b57c25
6 changed files with 109 additions and 25 deletions

View File

@@ -3,29 +3,6 @@
/* functions for maintainers */
/*****************************/
/**
* get the applications and versions that this userId maintains
*/
function getAppsFromUserId($userId)
{
/* retrieve the list of application and order them by application name */
$hResult = query_parameters("SELECT appMaintainers.appId, versionId, superMaintainer, appName FROM ".
"appFamily, appMaintainers WHERE appFamily.appId = appMaintainers.appId ".
"AND userId = '?' ORDER BY appName", $userId);
if(!$hResult || mysql_num_rows($hResult) == 0)
return;
$retval = array();
$c = 0;
while($oRow = mysql_fetch_object($hResult))
{
$retval[$c] = array($oRow->appId, $oRow->versionId, $oRow->superMaintainer);
$c++;
}
return $retval;
}
/*
* get the userIds of maintainers for a versionId
*/