Use objectMakeLink()/Url() in more places
This commit is contained in:
committed by
WineHQ
parent
eeaf2c3642
commit
89535dbe01
@@ -443,7 +443,7 @@ class Application {
|
||||
if($this->sQueued == 'false') // Has been accepted.
|
||||
{
|
||||
$sSubject = $this->sName." has been added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?iAppId=".$this->iAppId."\n";
|
||||
$sMsg = $this->objectMakeUrl()."\n";
|
||||
if($this->iSubmitterId)
|
||||
{
|
||||
$oSubmitter = new User($this->iSubmitterId);
|
||||
@@ -467,7 +467,7 @@ class Application {
|
||||
break;
|
||||
case "edit":
|
||||
$sSubject = $this->sName." has been modified by ".$_SESSION['current']->sRealname;
|
||||
$sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppId."\n";
|
||||
$sMsg .= $this->objectMakeUrl()."\n";
|
||||
addmsg("Application modified.", "green");
|
||||
break;
|
||||
case "delete":
|
||||
@@ -810,8 +810,9 @@ class Application {
|
||||
for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
|
||||
{
|
||||
$oVendor = new vendor($oRow->vendorId);
|
||||
$oApp = new application($oRow->appId);
|
||||
$sResult .= html_tr(array(
|
||||
"<a href=\"".BASE."appview.php?iAppId=$oRow->appId\">$oRow->appName</a>",
|
||||
$oApp->objectMakeLink(),
|
||||
$oRow->description,
|
||||
$oVendor->objectMakeLink(),
|
||||
print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))),
|
||||
|
||||
@@ -219,13 +219,14 @@ class Bug {
|
||||
|
||||
function SendNotificationMail($bDeleted=false)
|
||||
{
|
||||
$sAppName = Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId);
|
||||
$sAppName = version::fullName($this->iVersionId);
|
||||
$oVersion = new version($this->iVersionId);
|
||||
if(!$bDeleted)
|
||||
{
|
||||
if(!$this->bQueued)
|
||||
{
|
||||
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg = $oVersion->objectMakeUrl()."\n";
|
||||
if($this->iSubmitterId)
|
||||
{
|
||||
$oSubmitter = new User($this->iSubmitterId);
|
||||
@@ -236,7 +237,7 @@ class Bug {
|
||||
} else // Bug Link queued.
|
||||
{
|
||||
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg = $oVersion->objectMakeUrl()."\n";
|
||||
$sMsg .= "This Bug Link has been queued.";
|
||||
$sMsg .= "\n";
|
||||
addmsg("The Bug Link you submitted will be added to the database after being reviewed.", "green");
|
||||
@@ -244,7 +245,7 @@ class Bug {
|
||||
} else // Bug Link deleted.
|
||||
{
|
||||
$sSubject = "Link between Bug ".$this->iBug_id." and ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sMsg = $oVersion->objectMakeUrl()."\n";
|
||||
addmsg("Bug Link deleted.", "green");
|
||||
}
|
||||
|
||||
@@ -277,7 +278,7 @@ class Bug {
|
||||
{
|
||||
$oBug = new Bug($oRow->bug_id);
|
||||
$sReturn .= html_tr(array(
|
||||
"<a href=\"".BASE."appview.php?iVersionId=".$oRow->versionId."\">".$oRow->appName.": ".$oRow->versionName."</a>",
|
||||
version::fullNameUrl($oRow->versionId),
|
||||
"<a href=\"".BUGZILLA_ROOT."show_bug.cgi?id=".$oRow->bug_id."\">".$oRow->bug_id."</a>",
|
||||
$oBug->sBug_status,
|
||||
$oBug->sResolution,
|
||||
@@ -315,7 +316,7 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
|
||||
//start format table
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
echo "<form method=post action='appview.php?iVersionId=".$iVersionId."'>\n";
|
||||
echo "<form method=post action='".$oVersion->objectMakeUrl()."'>\n";
|
||||
}
|
||||
echo html_frame_start("Known bugs","98%",'',0);
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\">\n\n";
|
||||
@@ -352,10 +353,10 @@ function view_version_bugs($iVersionId = null, $aBuglinkIds)
|
||||
|
||||
if($bCanEdit == true)
|
||||
{
|
||||
echo "<td align=center>[<a href='appview.php?sSub=delete&iBuglinkId=".$oBuglink->iLinkId."&iVersionId=".$oBuglink->iVersionId."'>delete</a>]</td>\n";
|
||||
echo "<td align=center>[<a href='".$oVersion->objectMakeUrl()."&sSub=delete&iBuglinkId=".$oBuglink->iLinkId."'>delete</a>]</td>\n";
|
||||
if ($oBuglink->bQueued)
|
||||
{
|
||||
echo "<td align=center>[<a href='appview.php?sSub=unqueue&iBuglinkId=".$oBuglink->iLinkId."&iVersionId=".$oBuglink->iVersionId."'>OK</a>]</td>\n";
|
||||
echo "<td align=center>[<a href='".$oVersion->objectMakeUrl()."&sSub=unqueue&iBuglinkId=".$oBuglink->iLinkId."'>OK</a>]</td>\n";
|
||||
} else
|
||||
{
|
||||
echo "<td align=center>Yes</td>\n";
|
||||
|
||||
@@ -87,7 +87,7 @@ class Comment {
|
||||
$sSubject = "Comment for '".Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId)."' added by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = "To reply to this email please use the link provided below.\n";
|
||||
$sMsg .= "DO NOT reply via your email client as it will not reach the person who wrote the comment\n";
|
||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&mode=nested#Comment-".$this->iCommentId."\n";
|
||||
$sMsg .= $this->objectMakeUrl()."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "Subject: ".$this->sSubject."\r\n";
|
||||
$sMsg .= "\n";
|
||||
@@ -165,8 +165,9 @@ class Comment {
|
||||
$sEmail .= $this->oOwner->sEmail;
|
||||
if($sEmail)
|
||||
{
|
||||
$sSubject = "Comment for '".Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId)."' deleted by ".$_SESSION['current']->sRealname;
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
||||
$sSubject = "Comment for '".version::fullName($this->iVersionId)."' deleted by ".$_SESSION['current']->sRealname;
|
||||
$oVersion = new version($this->iVersionId);
|
||||
$sMsg = $oVersion->objectMakeUrl()."\n";
|
||||
$sMsg .= "\n";
|
||||
$sMsg .= "This comment was made on ".substr($this->sDateCreated,0,10)." by ".$this->oOwner->sRealname."\n";
|
||||
$sMsg .= "\n";
|
||||
@@ -385,8 +386,10 @@ class Comment {
|
||||
if (!empty($aClean['sCmode']))
|
||||
$_SESSION['current']->setPref("comments:mode", $aClean['sCmode']);
|
||||
|
||||
$oVersion = new version($versionId);
|
||||
$sel[$_SESSION['current']->getPref("comments:mode", "threaded")] = 'selected';
|
||||
echo '<td><form method="post" name="sMode" action="appview.php">',"\n";
|
||||
echo '<td><form method="post" name="sMode" action="'.
|
||||
$oVersion->objectMakeUrl().'">',"\n";
|
||||
echo "<b>Application Comments</b> $messageCount total comments ";
|
||||
echo '<b>Mode</b> <select name="sCmode" onchange="document.sMode.submit();">',"\n";
|
||||
echo ' <option value="flat" '.$sel['flat'].'>Flat</option>',"\n";
|
||||
@@ -394,7 +397,7 @@ class Comment {
|
||||
echo ' <option value="nested" '.$sel['nested'].'>Nested</option>',"\n";
|
||||
echo ' <option value="off" '.$sel['off'].'>No Comments</option>',"\n";
|
||||
echo '</select>',"\n";
|
||||
echo '<input type="hidden" name="iVersionId" value="'.$versionId.'"></form></td>',"\n";
|
||||
echo '</form></td>',"\n";
|
||||
}
|
||||
|
||||
// blank space
|
||||
@@ -440,7 +443,14 @@ class Comment {
|
||||
}
|
||||
|
||||
echo '</td></tr></table>',"\n";
|
||||
}
|
||||
}
|
||||
|
||||
function objectMakeUrl()
|
||||
{
|
||||
$oVersion = new version($this->iVersionId);
|
||||
$sUrl = $oVersion->objectMakeUrl()."#Comment-".$this->iCommentId;
|
||||
return $sUrl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -527,8 +527,8 @@ class distribution {
|
||||
continue;
|
||||
|
||||
echo '<tr class='.$bgcolor.'>',"\n";
|
||||
echo '<td><a href="'.BASE.'appview.php?iVersionId='.$oTest->iVersionId.'&iTestingId='.$oTest->iTestingId.'">',"\n";
|
||||
echo $oApp->sName.' '.$oVersion->sName.'</a></td>',"\n";
|
||||
echo '<td><a href="'.$oVersion->objectMakeUrl().'&iTestingId='.$oTest->iTestingId.'">',"\n";
|
||||
echo version::fullName($oVersion->iVersionId).'</a></td>',"\n";
|
||||
echo '<td>',"\n";
|
||||
if($_SESSION['current']->isLoggedIn())
|
||||
{
|
||||
|
||||
@@ -191,13 +191,12 @@ class downloadurl
|
||||
if($sWhatChanged && $sEmail =
|
||||
User::get_notify_email_address_list($aValues['iVersionId']))
|
||||
{
|
||||
$oApp = new Application($aValues["iAppId"]);
|
||||
$oVersion = new Version($aValues["iVersionId"]);
|
||||
|
||||
$sSubject = "Download URLs for $oApp->sName $oVersion->sName".
|
||||
$sSubject = "Download URLs for ".version::fullName($oVersion->iVersionId).
|
||||
" updated by ".$_SESSION['current']->sRealname;
|
||||
|
||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$aValues['iVersionId'];
|
||||
$sMsg = $oVersion->objectMakeUrl();
|
||||
$sMsg .= "\n\n";
|
||||
$sMsg .= "The following changed were made\n\n";
|
||||
$sMsg .= "$sWhatChanged\n\n";
|
||||
|
||||
Reference in New Issue
Block a user