Start to move maintainer related functions into maintainer class and separate maintainer related queries and logic from

display code. Also move maintainer related code from the user class. Fix up unit tests to work with the new maintainer class.
This commit is contained in:
Chris Morgan
2006-07-24 16:20:40 +00:00
committed by WineHQ
parent 25cf0a827f
commit cef2aec209
15 changed files with 758 additions and 629 deletions

View File

@@ -184,24 +184,6 @@ function make_maintainer_rating_list($varname, $cvalue)
echo "</select>\n";
}
/* get the number of queued maintainers */
function getQueuedMaintainerCount()
{
$sQuery = "SELECT count(*) as queued_maintainers FROM appMaintainers where queued='true'";
$hResult = query_parameters($sQuery);
$oRow = mysql_fetch_object($hResult);
return $oRow->queued_maintainers;
}
/* get the total number of maintainers and applications in the appMaintainers table */
function getMaintainerCount()
{
$sQuery = "SELECT count(*) as maintainers FROM appMaintainers where queued='false'";
$hResult = query_parameters($sQuery);
$oRow = mysql_fetch_object($hResult);
return $oRow->maintainers;
}
/* get the total number of vendors from the vendor table */
function getVendorCount()
{
@@ -227,13 +209,6 @@ function getNumberOfVersions()
return $oRow->num_versions;
}
/* Get the number of maintainers in the database */
function getNumberOfMaintainers()
{
$hResult = query_parameters("SELECT DISTINCT userId FROM appMaintainers WHERE queued='false';");
return mysql_num_rows($hResult);
}
/* Get the number of app familes in the database */
function getNumberOfAppFamilies()
{