From 169d7ca493214b68515d618804dce992f56da807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Nicolaysen=20S=C3=B8rnes?= Date: Sun, 8 Apr 2007 23:04:31 +0000 Subject: [PATCH] Use objectMakeUrl()/Link() in more places --- admin/editAppFamily.php | 5 +++-- admin/editAppNote.php | 5 +++-- admin/editAppVersion.php | 5 +++-- admin/moveAppVersion.php | 14 +++++++----- include/maintainer.php | 17 +++++++++----- include/monitor.php | 48 ++++++++++++++++++---------------------- include/note.php | 14 +++++++----- include/screenshot.php | 25 ++++++++++++--------- include/testData.php | 23 ++++++++++++------- include/url.php | 34 +++++++++++++++++++--------- include/util.php | 8 +++---- include/version.php | 14 +++++++----- include/vote.php | 10 ++++----- testResults.php | 5 ++--- viewScreenshots.php | 10 +++------ viewbugs.php | 6 +++-- 16 files changed, 138 insertions(+), 105 deletions(-) diff --git a/admin/editAppFamily.php b/admin/editAppFamily.php index b8f1ce6..1908692 100644 --- a/admin/editAppFamily.php +++ b/admin/editAppFamily.php @@ -19,7 +19,8 @@ if(!empty($aClean['sSubmit'])) { process_app_version_changes(false); url::processForm($aClean); - util_redirect_and_exit(apidb_fullurl("appview.php?iAppId={$aClean['iAppId']}")); + $oApp = new application($aClean['iAppId']); + util_redirect_and_exit($oApp->objectMakeUrl()); } else // Show the form for editing the Application Family @@ -52,7 +53,7 @@ else // URL editor echo url::outputEditor("editAppFamily.php", NULL, $oApp); - echo html_back_link(1,BASE."appview.php?iAppId=$oApp->iAppId"); + echo html_back_link(1,$oApp->objectMakeUrl()); } apidb_footer(); diff --git a/admin/editAppNote.php b/admin/editAppNote.php index 21cbd62..ad54222 100644 --- a/admin/editAppNote.php +++ b/admin/editAppNote.php @@ -12,6 +12,7 @@ if(!is_numeric($aClean['iNoteId'])) /* Get note data */ $oNote = new Note($aClean['iNoteId']); +$oVersion = new version($oNote->iVersionId); /* Check for privs */ if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($oNote->iVersionId) && !$_SESSION['current']->isSuperMaintainer($oNote->iAppId)) @@ -29,7 +30,7 @@ if(!empty($aClean['sSub'])) { $oNote->update(); } - util_redirect_and_exit(apidb_fullurl("appview.php?iVersionId={$oNote->iVersionId}")); + util_redirect_and_exit($oVersion->objectMakeUrl()); } else /* display note */ { // show form @@ -53,7 +54,7 @@ if(!empty($aClean['sSub'])) echo '',"\n"; echo ''; - echo html_back_link(1,BASE."appview.php?iVersionId=".$oNote->iVersionId); + echo html_back_link(1,$oVersion->objectMakeUrl()); } apidb_footer(); diff --git a/admin/editAppVersion.php b/admin/editAppVersion.php index b33605e..92c9685 100644 --- a/admin/editAppVersion.php +++ b/admin/editAppVersion.php @@ -18,7 +18,8 @@ if(!empty($aClean['sSubmit'])) process_app_version_changes(true); downloadurl::processForm($aClean); url::processForm($aClean); - util_redirect_and_exit(apidb_fullurl("appview.php?iVersionId=".$aClean['iVersionId'])); + $oVersion = new version($aClean['iVersionId']); + util_redirect_and_exit($oVersion->objectMakeUrl()); } else /* or display the webform for making changes */ { @@ -59,7 +60,7 @@ if(!empty($aClean['sSubmit'])) echo html_frame_end(); } - echo html_back_link(1,BASE."appview.php?iVersionId=".$oVersion->iVersionId); + echo html_back_link(1,$oVersion->objectMakeUrl()); apidb_footer(); } ?> diff --git a/admin/moveAppVersion.php b/admin/moveAppVersion.php index 78dece5..daa69c6 100644 --- a/admin/moveAppVersion.php +++ b/admin/moveAppVersion.php @@ -18,9 +18,10 @@ if(!empty($aClean['sAction'])) $oVersion = new Version($aClean['iVersionId']); $oVersion->iAppId = $aClean['iAppId']; $oVersion->update(); + $oApp = new application($aClean['iAppId']); /* redirect to the application we just moved this version to */ - util_redirect_and_exit(apidb_fullurl("appview.php?iAppId=".$aClean['iAppId'])); + util_redirect_and_exit($oApp->objectMakeUrl()); } else /* or display the webform for making changes */ { ?> @@ -50,12 +51,13 @@ if(!empty($aClean['sAction'])) { /* if the version ids differ then we should start a row with a new application */ /* and the version that matches with it */ - if($currentAppId != $oRow->appId) + if($iCurrentAppId != $oRow->appId) { - $currentAppId = $oRow->appId; + $oApp = new application($oRow->appId); + $iCurrentAppId = $oRow->appId; echo ''; - $url = BASE."appview.php?iAppId=".$oRow->appId; - echo ''.substr($oRow->appName, 0, 30).' - '.$oRow->appId.''; + $sUrl = $oApp->objectMakeUrl(); + echo ''.substr($oRow->appName, 0, 30).' - '.$oRow->appId.''; echo "Move here"; echo ''.$oRow->versionName.''; } else /* just add another version */ @@ -68,7 +70,7 @@ if(!empty($aClean['sAction'])) echo html_table_end(); echo html_frame_end(); echo ""; - echo html_back_link(1, BASE."appview.php?iVersionId=".$oVersion->iVersionId); + echo html_back_link(1, $oVersion->objectMakeUrl()); apidb_footer(); } ?> diff --git a/include/maintainer.php b/include/maintainer.php index 4e51407..7eb96cf 100644 --- a/include/maintainer.php +++ b/include/maintainer.php @@ -83,19 +83,24 @@ class maintainer { $sStatusMessage = "

The maintainer was successfully added into the database

\n"; - $oApp = new Application($this->iAppId); - $oVersion = new Version($this->iVersionId); //Send Status Email $sEmail = $oUser->sEmail; if ($sEmail) { if($this->iVersionId) - $sURL = APPDB_ROOT."appview.php?iVersionId=$this->iVersionId"; - else - $sURL = APPDB_ROOT."appview.php?iAppId=$this->iAppId"; + { + $oVersion = new Version($this->iVersionId); + $sURL = $oVersion->objectMakeUrl(); + $sName = version::fullName($this->iVersionId); + } else + { + $oApp = new Application($this->iAppId); + $sURL = $oApp->objectMakeUrl(); + $sName = $oApp->sName; + } $sSubject = "Application Maintainer Request Report"; - $sMsg = "Your application to be the maintainer of ".$oApp->sName." ".$oVersion->sName." has been accepted.\n"; + $sMsg = "Your application to be the maintainer of $sName has been accepted.\n"; $sMsg .= "$sURL\n"; $sMsg .= "$this->sReplyText\n"; $sMsg .= "We appreciate your help in making the Application Database better for all users.\n\n"; diff --git a/include/monitor.php b/include/monitor.php index f7bdec3..a9ecac6 100644 --- a/include/monitor.php +++ b/include/monitor.php @@ -98,41 +98,35 @@ class Monitor { function SendNotificationMail($sAction="add",$sMsg=null) { - /* set $aAppName appropriately */ + /* Set variables depending on whether it is an application or version monitor */ if(isset($this->iVersionId)) - $sAppName = Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId); - else + { + $oVersion = new version($this->iVersionId); + $sAppName = version::fullName($this->iVersionId); + $sUrl = $oVersion->objectMakeUrl(); + $sVersion = " version"; + } else + { + $oApp = new application($this->iAppId); $sAppName = Application::lookup_name($this->iAppId); + $sUrl = $oApp->objectMakeUrl(); + } switch($sAction) { case "add": - if (isset($this->iVersionId)) - { - $sSubject = "Monitor for ".$sAppName; - $sSubject .= " added: ".$_SESSION['current']->sRealname; - $sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; - addmsg("You will now receive an email whenever changes are made to this Application version.", "green"); - } else - { - $sSubject = "Monitor for ".$sAppName." added: ".$_SESSION['current']->sRealname; - $sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppid."\n"; - addmsg("You will now receive an email whenever changes are made to this Application.", "green"); - } + $sSubject = "Monitor for ".$sAppName; + $sSubject .= " added: ".$_SESSION['current']->sRealname; + $sMsg .= "$sUrl\n"; + addmsg("You will now receive an email whenever changes are made ". + "to this application$sVersion.", "green"); break; case "delete": - if (isset($this->iVersionId)) - { - $sSubject = "Monitor for ".$sAppName; - $sSubject .= " removed: ".$_SESSION['current']->sRealname; - $sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; - addmsg("You will no longer receive an email whenever changes are made to this Application version.", "green"); - } else - { - $sSubject = "Monitor for ".$sAppName." removed: ".$_SESSION['current']->sRealname; - $sMsg .= APPDB_ROOT."appview.php?iAppId=".$this->iAppid."\n"; - addmsg("You will no longer receive an email whenever changes are made to this Application.", "green"); - } + $sSubject = "Monitor for ".$sAppName; + $sSubject .= " removed: ".$_SESSION['current']->sRealname; + $sMsg .= "$sUrl\n"; + addmsg("You will no longer receive an email whenever changes ". + "are made to this application$sVersion.", "green"); break; } $sEmail = User::get_notify_email_address_list(null, $this->iVersionId); diff --git a/include/note.php b/include/note.php index d44cb00..18408b0 100644 --- a/include/note.php +++ b/include/note.php @@ -137,21 +137,25 @@ class Note { function SendNotificationMail($sAction="add",$sMsg=null) { - $sAppName = Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId); + $oVersion = new version($this->iVersionId); + $sAppName = version::fullName($this->iVersionId); + $sMsg = $oVersion->objectMakeUrl()."\n"; switch($sAction) { case "add": - $sSubject = "Note ".$this->sTitle." for ".$sAppName." added by ".$_SESSION['current']->sRealname; - $sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sSubject = "Note $this->sTitle for $sAppName added by ". + $_SESSION['current']->sRealname; addmsg("The note was successfully added into the database.", "green"); break; case "edit": - $sSubject = "Note ".$this->sTitle." for ".$sAppName." has been modified by ".$_SESSION['current']->sRealname; + $sSubject = "Note $this->sTitle for $sAppName has been modified by ". + $_SESSION['current']->sRealname; addmsg("Note modified.", "green"); break; case "delete": $oSubmitter = new User($this->iSubmitterId); - $sSubject = "Note ".$this->sTitle." for ".$sAppName." has been deleted by ".$_SESSION['current']->sRealname; + $sSubject = "Note $this->sTitle for $sAppName has been deleted by ". + $_SESSION['current']->sRealname; $sMsg .= "This note was made on ".print_date(mysqltimestamp_to_unixtimestamp($this->sSubmitTime))." by ".$oSubmitter->sRealname."\n"; $sMsg .= "\n"; $sMsg .= "Subject: ".$this->sTitle."\n"; diff --git a/include/screenshot.php b/include/screenshot.php index 7b8ad5b..67be68a 100644 --- a/include/screenshot.php +++ b/include/screenshot.php @@ -331,32 +331,37 @@ class Screenshot { function mailMaintainers($bDeleted=false) { - $sAppName = Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId); + $oVersion = new version($this->iVersionId); + $sAppName = version::fullName($this->iVersionId); + $sMsg = $oVersion->objectMakeUrl()."\n"; if(!$bDeleted) { if(!$this->bQueued) { - $sSubject = "Screenshot for ".$sAppName." added by ".$_SESSION['current']->sRealname; - $sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sSubject = "Screenshot for $sAppName added by ". + $_SESSION['current']->sRealname; if($this->iSubmitterId) { $oSubmitter = new User($this->iSubmitterId); - $sMsg .= "This screenshot has been submitted by ".$oSubmitter->sRealname."."; + $sMsg .= "This screenshot has been submitted by ". + $oSubmitter->sRealname."."; $sMsg .= "\n"; } - addmsg("The screenshot was successfully added into the database.", "green"); + addmsg("The screenshot was successfully added into the database.", + "green"); } else // Screenshot queued. { - $sSubject = "Screenshot for ".$sAppName." submitted by ".$_SESSION['current']->sRealname; - $sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sSubject = "Screenshot for $sAppName submitted by ". + $_SESSION['current']->sRealname; $sMsg .= "This screenshot has been queued."; $sMsg .= "\n"; - addmsg("The screenshot you submitted will be added to the database database after being reviewed.", "green"); + addmsg("The screenshot you submitted will be added to the ". + "database after being reviewed.", "green"); } } else // Screenshot deleted. { - $sSubject = "Screenshot for ".$sAppName." deleted by ".$_SESSION['current']->sRealname; - $sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sSubject = "Screenshot for $sAppName deleted by ". + $_SESSION['current']->sRealname; addmsg("Screenshot deleted.", "green"); } diff --git a/include/testData.php b/include/testData.php index 18b037a..e257578 100644 --- a/include/testData.php +++ b/include/testData.php @@ -255,28 +255,35 @@ class testData{ /* Get the full app/version name to display */ $sName = version::fullName($this->iVersionId); + $oVersion = new version($this->iVersionId); + switch($sAction) { case "add": $sSubject = "Submitted testing data accepted"; - $sMsg = "The testing data you submitted for '$sName' has been accepted by ".$_SESSION['current']->sRealname."."; - $sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n"; + $sMsg = "The testing data you submitted for '$sName' has been ". + "accepted by ".$_SESSION['current']->sRealname."."; + $sMsg .= $oVersion->objectMakeUrl()."&iTestingId=".$this->iTestingId."\n"; $sMsg .= "Administrators Responce:\n"; break; case "reject": $sSubject = "Submitted testing data rejected"; - $sMsg = "The testing data you submitted for '$sName' has been rejected by ".$_SESSION['current']->sRealname."."; - $sMsg .= APPDB_ROOT."testResults.php?sSub=view&iTestingId=".$this->iTestingId."\n"; + $sMsg = "The testing data you submitted for '$sName' has ". + "been rejected by ".$_SESSION['current']->sRealname."."; + $sMsg .= APPDB_ROOT."testResults.php?sSub=view&iTestingId=". + $this->iTestingId."\n"; $sMsg .= "Reason given:\n"; break; case "delete": $sSubject = "Submitted testing data deleted"; - $sMsg = "The testing data you submitted for '$sName' has been deleted by ".$_SESSION['current']->sRealname."."; + $sMsg = "The testing data you submitted for '$sName' has ". + "been deleted by ".$_SESSION['current']->sRealname."."; $sMsg .= "Reason given:\n"; break; } $sMsg .= $aClean['sReplyText']."\n"; - $sMsg .= "We appreciate your help in making the Application Database better for all users."; + $sMsg .= "We appreciate your help in making the Application ". + "Database better for all users."; mail_appdb($oSubmitter->sEmail, $sSubject ,$sMsg); } @@ -289,7 +296,7 @@ class testData{ $oVersion = new Version($this->iVersionId); $oApp = new Application($oVersion->iAppId); - $sBacklink = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n"; + $sBacklink = $oVersion->objectMakeUrl()."&iTestingId=".$this->iTestingId."\n"; switch($sAction) { @@ -666,7 +673,7 @@ class testData{ for($i = 1; $oRow = mysql_fetch_object($hResult); $i++) $sReturn .= html_tr(array( - "versionId\">$oRow->appName: $oRow->versionName", + version::fullNameLink($oRow->versionId), $oRow->testedRating, $oRow->testedRelease, print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))), diff --git a/include/url.php b/include/url.php index b66342e..7f87ea2 100644 --- a/include/url.php +++ b/include/url.php @@ -213,13 +213,25 @@ class Url { function SendNotificationMail($bDeleted=false) { - $sAppName = Application::lookup_name($this->iAppId)." ".Version::lookup_name($this->iVersionId); + /* Set variables depending on whether the url is for an app or version */ + if($this->iVersionId) + { + $oVersion = new version($this->iVersionId); + $sAppName = version::fullName($this->iVersionId); + $sUrl = $oVersion->objectMakeUrl(); + } else + { + $oApp = new application($this->iAppId); + $sAppName = $oApp->sName; + $sUrl = $oApp->objectMakeUrl(); + } + if(!$bDeleted) { if(!$this->bQueued) { - $sSubject = "Url for ".$sAppName." added by ".$_SESSION['current']->sRealname; - $sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sSubject = "Url for $sAppName added by ".$_SESSION['current']->sRealname; + $sMsg = "$sUrl\n"; if($this->iSubmitterId) { $oSubmitter = new User($this->iSubmitterId); @@ -229,16 +241,18 @@ class Url { addmsg("The url was successfully added into the database.", "green"); } else // Url queued. { - $sSubject = "Url for ".$sAppName." submitted by ".$_SESSION['current']->sRealname; - $sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sSubject = "Url for $sAppName submitted by ". + $_SESSION['current']->sRealname; + $sMsg = "$sUrl\n"; $sMsg .= "This url has been queued."; $sMsg .= "\n"; - addmsg("The url you submitted will be added to the database database after being reviewed.", "green"); + addmsg("The url you submitted will be added to the database ". + "database after being reviewed.", "green"); } } else // Url deleted. { - $sSubject = "Url for ".$sAppName." deleted by ".$_SESSION['current']->sRealname; - $sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sSubject = "Url for $sAppName deleted by ".$_SESSION['current']->sRealname; + $sMsg = "$sUrl\n"; addmsg("Url deleted.", "green"); } @@ -425,8 +439,8 @@ class Url { $_SESSION['current']->sRealname; $sMsg = $aValues["iVersionId"] ? - APPDB_ROOT."appview.php?iVersionId=".$aValues['iVersionId'] : - APPDB_ROOT."appview.php?iAppId=".$avalues["iAppid"]; + $oVersion->objectMakeUrl() : + $oApp->objectMakeUrl(); $sMsg .= "\n\n"; $sMsg .= "The following changed were made\n\n"; $sMsg .= "$sWhatChanged\n\n"; diff --git a/include/util.php b/include/util.php index 2a99101..fe3465d 100644 --- a/include/util.php +++ b/include/util.php @@ -243,10 +243,9 @@ function outputTopXRow($oRow) $oVersion = new Version($oRow->versionId); $oApp = new Application($oVersion->iAppId); $img = Screenshot::get_random_screenshot_img(null, $oRow->versionId, false); // image, disable extra formatting - html_tr_highlight_clickable('appview.php?iVersionId='.$oRow->versionId, "white", "#f0f6ff", "white"); + html_tr_highlight_clickable($oVersion->objectMakeUrl(), "white", "#f0f6ff", "white"); echo ' - - '.$oApp->sName.' '.$oVersion->sName.' + '.version::fullNameLink($oVersion->iVersionId).' '.util_trim_description($oApp->sDescription).'
'.$img.'
'; @@ -506,6 +505,7 @@ function outputSearchTableForhResult($search_words, $hResult) $c = 0; while($oRow = mysql_fetch_object($hResult)) { + $oApp = new application($oRow->appId); //skip if a NONAME if ($oRow->appName == "NONAME") { continue; } @@ -519,7 +519,7 @@ function outputSearchTableForhResult($search_words, $hResult) //display row echo "\n"; - echo " ".html_ahref($oRow->appName,BASE."appview.php?iAppId=$oRow->appId")."\n"; + echo " ".html_ahref($oRow->appName,$oApp->objectMakeUrl())."\n"; echo " ".util_trim_description($oRow->description)."\n"; echo " $y->versions  \n"; echo "\n\n"; diff --git a/include/version.php b/include/version.php index 67d7a48..a933621 100644 --- a/include/version.php +++ b/include/version.php @@ -500,7 +500,7 @@ class Version { if($this->sQueued == "false") { $sSubject = "Version ".$this->sName." of ".$oApp->sName." added by ".$_SESSION['current']->sRealname; - $sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sMsg = $this->objectMakeUrl()."\n"; if($this->iSubmitterId) { $oSubmitter = new User($this->iSubmitterId); @@ -524,7 +524,7 @@ class Version { break; case "edit": $sSubject = "'".$oApp->sName." ".$this->sName."' has been modified by ".$_SESSION['current']->sRealname; - $sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n"; + $sMsg .= $this->objectMakeUrl()."\n"; addmsg("Version modified.", "green"); break; case "delete": @@ -812,7 +812,8 @@ class Version { $oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId); if(!$oMonitor->iMonitorId) { - echo '
iVersionId.'&iAppId='.$oApp->iAppId.'>'; + echo ''; echo ''; echo ''; echo "
"; @@ -862,7 +863,8 @@ class Version { { echo ''; echo ''; - echo '
iVersionId.'>'; + echo ''; echo ''; echo ''; echo '
'; @@ -1091,7 +1093,7 @@ class Version { for($i = 1; $oRow = mysql_fetch_object($hResult); $i++) $sResult .= html_tr(array( - "versionId\">$oRow->appName: $oRow->versionName", + version::fullNameLink($oRow->versionId), $oRow->description, print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))), ($i % 2) ? "color0" : "color1"); @@ -1145,7 +1147,7 @@ class Version { function objectMakeUrl() { - return BASE."appview.php?iVersionId=$this->iVersionId"; + return APPDB_ROOT."appview.php?iVersionId=$this->iVersionId"; } function objectMakeLink() diff --git a/include/vote.php b/include/vote.php index c07b510..7d6d2c7 100644 --- a/include/vote.php +++ b/include/vote.php @@ -148,17 +148,18 @@ function vote_update($vars) if(!$_SESSION['current']->isLoggedIn()) util_show_error_page_and_exit("You must be logged in to vote"); + $oVersion = new version($vars['iVersionId']); + if( !is_numeric($vars['iVersionId']) OR !is_numeric($vars['iSlot'])) { if(is_numeric($vars['iVersionId'])) - util_redirect_and_exit(apidb_fullurl( - "appview.php?iVersionId=".$vars['iVersionId'])); + util_redirect_and_exit($oVersion->objectMakeUrl()); else util_redirect_and_exit(apidb_fullurl("index.php")); return; } - + if($vars["sVote"]) { addmsg("Registered vote for App #".$vars['iVersionId'], "green"); @@ -174,8 +175,7 @@ function vote_update($vars) } } - util_redirect_and_exit(apidb_fullurl( - "appview.php?iVersionId=".$vars['iVersionId'])); + util_redirect_and_exit($oVersion->objectMakeUrl()); } // tell us if there is a vote in a given slot so we don't diff --git a/testResults.php b/testResults.php index 89c2f37..5d5b768 100644 --- a/testResults.php +++ b/testResults.php @@ -88,8 +88,7 @@ if ($aClean['sSub']) } if ($aClean['sSub'] == 'view') { - $oApp = new Application($oVersion->iAppId); - $sVersionInfo = $oApp->sName." ".$oVersion->sName; + $sVersionInfo = version::fullName($oVersion->iVersionId); switch($oTest->sQueued) { @@ -127,7 +126,7 @@ if ($aClean['sSub']) // View Test Details $oTest->outputEditor($aClean['sDistribution'],true); - echo 'Back to Version'; + echo 'Back to Version'; echo '',"\n"; diff --git a/viewScreenshots.php b/viewScreenshots.php index 4a445c8..e53ff87 100644 --- a/viewScreenshots.php +++ b/viewScreenshots.php @@ -72,14 +72,10 @@ while ($oRow = mysql_fetch_object($Ids)) echo $img; echo "
". substr($oRow->description,0,20). "\n"; - echo "
["; - echo $oApp->sName."]"; + echo "
[".$oApp->objectMakeLink()."]"; + + echo "
[".$oVersion->objectMakeLink()."]"; - echo "
["; - echo "Version: ".$oVersion->sName."]"; - echo "
\n"; // end row if counter of 3 if ($c % 3 == 0) echo "\n"; diff --git a/viewbugs.php b/viewbugs.php index 71f2701..9b1dcfc 100644 --- a/viewbugs.php +++ b/viewbugs.php @@ -44,6 +44,8 @@ if(!is_numeric($aClean['iBugId'])) { while($oRow = mysql_fetch_object($hResult)) { + $oApp = new application($oRow->appId); + $oVersion = new version($oRow->versionId); $sDownloadUrls = ""; if($hDownloadUrls = appData::getData($oRow->versionId, "downloadurl")) { @@ -56,11 +58,11 @@ if(!is_numeric($aClean['iBugId'])) $bgcolor = ($c % 2 == 0) ? "color0" : "color1"; echo '',"\n"; echo ' ',"\n"; - echo ' '.$oRow->appName.'',"\n"; + echo " ".$oApp->objectMakeLink()."\n"; echo ' ',"\n"; echo ' '.$oRow->appDescription.'',"\n"; echo ' ',"\n"; - echo ' '.$oRow->versionName.'',"\n"; + echo " ".$oVersion->objectMakeLink()."\n"; echo ' ',"\n"; echo " $sDownloadUrls\n"; echo '',"\n";