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

@@ -25,8 +25,8 @@ if ($aClean['sSub'])
{
if($aClean['sSub'] == 'delete')
{
$sQuery = "DELETE FROM appMaintainers WHERE maintainerId = '?'";
$hResult = query_parameters($sQuery, $aClean['iMaintainerId']);
$oMaintainer = new maintainer($aClean['iMaintainerId']);
$oMaintainer->delete();
echo html_frame_start("Delete maintainer: ".$aClean['iMaintainerId'],400,"",0);
if($hResult)
{
@@ -84,7 +84,7 @@ if ($aClean['sSub'])
else
echo " <td style=\"$style\"><a href=\"mailto:".$oUser->sEmail."\">".$oUser->sRealname."</a></td>\n";
$count = $oUser->getMaintainerCount(true);
$count = Maintainer::getMaintainerCountForUser($oUser, true);
if($count == 0)
echo " <td style=\"$style\">&nbsp</td>\n";
else if($count <= 1)
@@ -93,7 +93,7 @@ if ($aClean['sSub'])
echo " <td style=\"$style\">".$count." apps</td>\n";
$count = $oUser->getMaintainerCount(false);
$count = Maintainer::getMaintainerCountForUser($oUser, false);
if($count == 0)
echo " <td style=\"$style\">&nbsp</td>\n";
else if($count <= 1)