Add url::display and replace old link display code.
This commit is contained in:
committed by
WineHQ
parent
1f0b58fa25
commit
dde9a6a19b
@@ -234,6 +234,30 @@ class Url {
|
|||||||
$sEmail = User::get_notify_email_address_list(null, $this->iVersionId);
|
$sEmail = User::get_notify_email_address_list(null, $this->iVersionId);
|
||||||
if($sEmail)
|
if($sEmail)
|
||||||
mail_appdb($sEmail, $sSubject ,$sMsg);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -646,28 +646,20 @@ class Version {
|
|||||||
// main URL
|
// main URL
|
||||||
echo " <tr class=\"color1\"><td><b>URL</b></td><td>".$appLinkURL."</td></tr>\n";
|
echo " <tr class=\"color1\"><td><b>URL</b></td><td>".$appLinkURL."</td></tr>\n";
|
||||||
|
|
||||||
// links
|
|
||||||
$result = query_parameters("SELECT * FROM appData WHERE versionID = '?' AND type = 'url'",
|
|
||||||
$this->iVersionId);
|
|
||||||
if($result && mysql_num_rows($result) > 0)
|
|
||||||
{
|
|
||||||
echo " <tr class=\"color1\"><td><b>Links</b></td><td>\n";
|
|
||||||
while($oRow = mysql_fetch_object($result))
|
|
||||||
{
|
|
||||||
echo " <a href=\"$oRow->url\">".substr(stripslashes($oRow->description),0,30)."</a> <br />\n";
|
|
||||||
}
|
|
||||||
echo " </td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if($this->sTestedRating != "/" && $this->sTestedRating)
|
if($this->sTestedRating != "/" && $this->sTestedRating)
|
||||||
$sMaintainerColor = $this->sTestedRating;
|
$sMaintainerColor = $this->sTestedRating;
|
||||||
else
|
else
|
||||||
$sMaintainerColor = "color0";
|
$sMaintainerColor = "color0";
|
||||||
|
|
||||||
|
// URLs
|
||||||
|
if($sUrls = url::display($this->iVersionId))
|
||||||
|
echo $sUrls;
|
||||||
|
|
||||||
// rating Area
|
// rating Area
|
||||||
echo "<tr class=\"$sMaintainerColor\" valign=\"top\"><td><b>Maintainer’s Rating</b></td><td>".$this->sTestedRating."</td></tr>\n";
|
echo "<tr class=\"$sMaintainerColor\" valign=\"top\"><td><b>Maintainer’s Rating</b></td><td>".$this->sTestedRating."</td></tr>\n";
|
||||||
echo "<tr class=\"$sMaintainerColor\" valign=\"top\"><td><b>Maintainer’s Version</b></td><td>".$this->sTestedRelease."</td></tr>\n";
|
echo "<tr class=\"$sMaintainerColor\" valign=\"top\"><td><b>Maintainer’s Version</b></td><td>".$this->sTestedRelease."</td></tr>\n";
|
||||||
|
|
||||||
|
// Download URLs
|
||||||
if($sDownloadurls = downloadurl::display($this->iVersionId))
|
if($sDownloadurls = downloadurl::display($this->iVersionId))
|
||||||
echo $sDownloadurls;
|
echo $sDownloadurls;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user