diff --git a/include/maintainer.php b/include/maintainer.php
index 805395f..0dab56c 100644
--- a/include/maintainer.php
+++ b/include/maintainer.php
@@ -479,58 +479,49 @@ class maintainer
*/
echo '
| Other maintainers of this app: | ',"\n";
- $bFoundMaintainers = false;
-
- $bFirstDisplay = true; /* if false we need to fix up table rows appropriately */
-
- /* display maintainers for the version */
+ /* Fetch maintainers and super maintainers */
$oVersion = new Version($this->iVersionId);
- $aOtherUsers = $oVersion->getMaintainersUserIds();
- if($aOtherUsers)
- {
+ $aOtherMaintainers = $oVersion->getMaintainersUserIds();
+ $aOtherSuperMaintainers =
+ Maintainer::getSuperMaintainersUserIdsFromAppId($this->iAppId);
+
+ if($aOtherMaintainers || $aOtherSuperMaintainers)
$bFoundMaintainers = true;
- while(list($index, $iUserId) = each($aOtherUsers))
+ else
+ $bFoundMaintainers = false;
+
+ echo "\n";
+ /* display maintainers for the version */
+ if($aOtherMaintainers)
+ {
+ while(list($index, $iUserId) = each($aOtherMaintainers))
{
$oUser = new User($iUserId);
- if($bFirstDisplay)
- {
- echo " | ".$oUser->sRealname." |
\n";
- $bFirstDisplay = false;
- } else
- {
- echo " | ".$oUser->sRealname." |
\n";
- }
+ echo "$oUser->sRealname
\n";
}
}
/* display super maintainers for the given app */
- $aOtherUsers = Maintainer::getSuperMaintainersUserIdsFromAppId($this->iAppId);
- if($aOtherUsers)
+
+ if($aOtherSuperMaintainers)
{
- $bFoundMaintainers = true;
- while(list($index, $iUserId) = each($aOtherUsers))
+ while(list($index, $iUserId) = each($aOtherSuperMaintainers))
{
$oUser = new User($iUserId);
- if($bFirstDisplay)
- {
- echo "".$oUser->sRealname."* | \n";
- $bFirstDisplay = false;
- } else
- {
- echo " | ".$oUser->sRealname."* |
\n";
- }
+ echo "$oUser->sRealname*
\n";
}
}
if(!$bFoundMaintainers)
{
- echo "No other maintainers | \n";
+ echo "No other maintainers";
}
- // Show which other apps the user maintains
- echo '| This user also maintains these apps: | ',"\n";
+ echo "
\n";
+
+ // Show which other apps the user maintains
+ echo '| This user also maintains these apps: | ',"\n";
- $bFirstDisplay = true;
$oUser = new User($this->iUserId);
$aOtherApps = Maintainer::getAppsMaintained($oUser);
if($aOtherApps)
@@ -538,37 +529,29 @@ class maintainer
while(list($index, list($iAppIdOther, $iVersionIdOther, $bSuperMaintainerOther)) = each($aOtherApps))
{
$oApp = new Application($iAppIdOther);
- $oVersion = new Version($iVersionIdOther);
- if($bFirstDisplay)
- {
- $bFirstDisplay = false;
- if($bSuperMaintainerOther)
- echo " | ".$oApp->sName."* |
\n";
- else
- echo "".$oApp->sName." ".$oVersion->sName." | \n";
- } else
- {
- if($bSuperMaintainerOther)
- echo " | ".$oApp->sName."* | \n";
- else
- echo " | ".$oApp->sName." ".$oVersion->sName." | \n";
- }
+
+ if($bSuperMaintainerOther)
+ echo $oApp->objectMakeLink()."*
\n";
+ else
+ echo $oVersion->fullNameLink($iVersionIdOther)."
\n";
}
} else
{
- echo "User maintains no other applications | \n";
+ echo "User maintains no other applications";
}
+ echo "\n";
+
$oApp = new Application($this->iAppId);
$oVersion = new Version($this->iVersionId);
//app name
echo '| App Name: | ',"\n";
- echo "".$oApp->sName." |
\n";
+ echo "".$oApp->objectMakeLink()." | \n";
//version
echo '| App Version: | ',"\n";
- echo "".$oVersion->sName." |
\n";
+ echo "".$oVersion->objectMakeLink()." | \n";
//maintainReason
echo '| Maintainer request reason: | ',"\n";
diff --git a/include/version.php b/include/version.php
index 11738b9..0f9f5dd 100644
--- a/include/version.php
+++ b/include/version.php
@@ -956,6 +956,15 @@ class Version {
return "$oRow->appName $oRow->versionName";
}
+ /* Creates a link to the version labelled with the full application name */
+ function fullNameLink($iVersionId)
+ {
+ $oVersion = new version($iVersionId);
+ $sLink = "objectMakeUrl()."\">".
+ $oVersion->fullName($iVersionId)."";
+ return $sLink;
+ }
+
function showList($hResult)
{
//show applist