Add url::display and replace old link display code.

This commit is contained in:
Alexander Nicolaysen Sørnes
2007-01-18 02:28:21 +00:00
committed by WineHQ
parent 1f0b58fa25
commit dde9a6a19b
2 changed files with 30 additions and 14 deletions

View File

@@ -234,6 +234,30 @@ class Url {
$sEmail = User::get_notify_email_address_list(null, $this->iVersionId);
if($sEmail)
mail_appdb($sEmail, $sSubject ,$sMsg);
}
}
/* Display links for a given version/application */
function display($iVersionId, $iAppId = NULL)
{
if($iVersionId)
{
if(!($hResult = appData::getData($iVersionId, "url")))
return FALSE;
} else
{
if(!($hResult = appData::getData($iAppId, "url", FALSE)))
return FALSE;
}
for($i = 0; $oRow = mysql_fetch_object($hResult); $i++)
{
$sReturn .= html_tr(array(
"<b>Link</b>",
"<a href=\"$oRow->url\">$oRow->description</a>"),
"color1");
}
return $sReturn;
}
}
?>