Show supermaintainers names in version's page
This commit is contained in:
13
appview.php
13
appview.php
@@ -239,7 +239,7 @@ if($_REQUEST['appId'])
|
|||||||
if($other_maintainers)
|
if($other_maintainers)
|
||||||
{
|
{
|
||||||
echo " <tr><td align=\"left\"><ul>\n";
|
echo " <tr><td align=\"left\"><ul>\n";
|
||||||
while(list($index, list($userIdValue)) = each($other_maintainers))
|
while(list($index, $userIdValue) = each($other_maintainers))
|
||||||
{
|
{
|
||||||
$oUser = new User($userIdValue);
|
$oUser = new User($userIdValue);
|
||||||
echo " <li>".$oUser->sRealname."</li>\n";
|
echo " <li>".$oUser->sRealname."</li>\n";
|
||||||
@@ -368,13 +368,16 @@ else if($_REQUEST['versionId'])
|
|||||||
echo "<tr><td align=\"center\" colspan=\"2\">$img</td></tr>\n";
|
echo "<tr><td align=\"center\" colspan=\"2\">$img</td></tr>\n";
|
||||||
|
|
||||||
// display all maintainers of this application
|
// display all maintainers of this application
|
||||||
echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><b>Maintainers of this application:</b>\n";
|
echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><b>Maintainers of this version:</b>\n";
|
||||||
echo "<table width=\"250\" border=\"0\">";
|
echo "<table width=\"250\" border=\"0\">";
|
||||||
$other_maintainers = getMaintainersUserIdsFromAppIdVersionId($oApp->iAppId, $oVersion->iVersionId);
|
$aMaintainers = getMaintainersUserIdsFromAppIdVersionId($oVersion->iVersionId);
|
||||||
if($other_maintainers)
|
$aSupermaintainers = getSuperMaintainersUserIdsFromAppId($oVersion->iAppId);
|
||||||
|
$aAllMaintainers = array_merge($aMaintainers,$aSupermaintainers);
|
||||||
|
$aAllMaintainers = array_unique($aAllMaintainers);
|
||||||
|
if(sizeof($aAllMaintainers)>0)
|
||||||
{
|
{
|
||||||
echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><ul>";
|
echo "<tr class=\"color0\"><td align=\"left\" colspan=\"2\"><ul>";
|
||||||
while(list($index, list($userIdValue)) = each($other_maintainers))
|
while(list($index, $userIdValue) = each($aAllMaintainers))
|
||||||
{
|
{
|
||||||
$oUser = new User($userIdValue);
|
$oUser = new User($userIdValue);
|
||||||
echo "<li>".$oUser->sRealname."</li>";
|
echo "<li>".$oUser->sRealname."</li>";
|
||||||
|
|||||||
@@ -27,20 +27,16 @@ function getAppsFromUserId($userId)
|
|||||||
/*
|
/*
|
||||||
* get the userIds of maintainers for this appId and versionId
|
* get the userIds of maintainers for this appId and versionId
|
||||||
*/
|
*/
|
||||||
function getMaintainersUserIdsFromAppIdVersionId($appId, $versionId)
|
function getMaintainersUserIdsFromAppIdVersionId($versionId)
|
||||||
{
|
{
|
||||||
$query = "SELECT userId FROM ".
|
$query = "SELECT userId FROM ".
|
||||||
"appMaintainers WHERE appId = '$appId' " .
|
"appMaintainers WHERE versionId = '$versionId';";
|
||||||
"AND versionId = '$versionId';";
|
|
||||||
$result = query_appdb($query);
|
$result = query_appdb($query);
|
||||||
if(mysql_num_rows($result) == 0)
|
|
||||||
return; // no sub categories
|
|
||||||
|
|
||||||
$retval = array();
|
$retval = array();
|
||||||
$c = 0;
|
$c = 0;
|
||||||
while($row = mysql_fetch_object($result))
|
while($row = mysql_fetch_object($result))
|
||||||
{
|
{
|
||||||
$retval[$c] = array($row->userId);
|
$retval[$c] = $row->userId;
|
||||||
$c++;
|
$c++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,14 +52,11 @@ function getSuperMaintainersUserIdsFromAppId($appId)
|
|||||||
"appMaintainers WHERE appId = '$appId' " .
|
"appMaintainers WHERE appId = '$appId' " .
|
||||||
"AND superMaintainer = '1';";
|
"AND superMaintainer = '1';";
|
||||||
$result = query_appdb($query);
|
$result = query_appdb($query);
|
||||||
if(!$result || mysql_num_rows($result) == 0)
|
|
||||||
return; // no sub categories
|
|
||||||
|
|
||||||
$retval = array();
|
$retval = array();
|
||||||
$c = 0;
|
$c = 0;
|
||||||
while($row = mysql_fetch_object($result))
|
while($row = mysql_fetch_object($result))
|
||||||
{
|
{
|
||||||
$retval[$c] = array($row->userId);
|
$retval[$c] = $row->userId;
|
||||||
$c++;
|
$c++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user