Use objectMakeUrl()/Link() in more places
This commit is contained in:
committed by
WineHQ
parent
9de4e9b63b
commit
169d7ca493
@@ -19,7 +19,8 @@ if(!empty($aClean['sSubmit']))
|
|||||||
{
|
{
|
||||||
process_app_version_changes(false);
|
process_app_version_changes(false);
|
||||||
url::processForm($aClean);
|
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
|
else
|
||||||
// Show the form for editing the Application Family
|
// Show the form for editing the Application Family
|
||||||
@@ -52,7 +53,7 @@ else
|
|||||||
// URL editor
|
// URL editor
|
||||||
echo url::outputEditor("editAppFamily.php", NULL, $oApp);
|
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();
|
apidb_footer();
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ if(!is_numeric($aClean['iNoteId']))
|
|||||||
|
|
||||||
/* Get note data */
|
/* Get note data */
|
||||||
$oNote = new Note($aClean['iNoteId']);
|
$oNote = new Note($aClean['iNoteId']);
|
||||||
|
$oVersion = new version($oNote->iVersionId);
|
||||||
|
|
||||||
/* Check for privs */
|
/* Check for privs */
|
||||||
if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->isMaintainer($oNote->iVersionId) && !$_SESSION['current']->isSuperMaintainer($oNote->iAppId))
|
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();
|
$oNote->update();
|
||||||
}
|
}
|
||||||
util_redirect_and_exit(apidb_fullurl("appview.php?iVersionId={$oNote->iVersionId}"));
|
util_redirect_and_exit($oVersion->objectMakeUrl());
|
||||||
} else /* display note */
|
} else /* display note */
|
||||||
{
|
{
|
||||||
// show form
|
// show form
|
||||||
@@ -53,7 +54,7 @@ if(!empty($aClean['sSub']))
|
|||||||
echo '<input type="submit" name=sSub value="Delete"></td></tr>',"\n";
|
echo '<input type="submit" name=sSub value="Delete"></td></tr>',"\n";
|
||||||
echo '</center>';
|
echo '</center>';
|
||||||
|
|
||||||
echo html_back_link(1,BASE."appview.php?iVersionId=".$oNote->iVersionId);
|
echo html_back_link(1,$oVersion->objectMakeUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
apidb_footer();
|
apidb_footer();
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ if(!empty($aClean['sSubmit']))
|
|||||||
process_app_version_changes(true);
|
process_app_version_changes(true);
|
||||||
downloadurl::processForm($aClean);
|
downloadurl::processForm($aClean);
|
||||||
url::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 */
|
} else /* or display the webform for making changes */
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -59,7 +60,7 @@ if(!empty($aClean['sSubmit']))
|
|||||||
echo html_frame_end();
|
echo html_frame_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
echo html_back_link(1,BASE."appview.php?iVersionId=".$oVersion->iVersionId);
|
echo html_back_link(1,$oVersion->objectMakeUrl());
|
||||||
apidb_footer();
|
apidb_footer();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -18,9 +18,10 @@ if(!empty($aClean['sAction']))
|
|||||||
$oVersion = new Version($aClean['iVersionId']);
|
$oVersion = new Version($aClean['iVersionId']);
|
||||||
$oVersion->iAppId = $aClean['iAppId'];
|
$oVersion->iAppId = $aClean['iAppId'];
|
||||||
$oVersion->update();
|
$oVersion->update();
|
||||||
|
$oApp = new application($aClean['iAppId']);
|
||||||
|
|
||||||
/* redirect to the application we just moved this version to */
|
/* 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 */
|
} 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 */
|
/* if the version ids differ then we should start a row with a new application */
|
||||||
/* and the version that matches with it */
|
/* 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 '<tr style="background: #CCDDFF; border: thin solid; font-weight:bold;"><td align="left" style="padding-left:20px;">';
|
echo '<tr style="background: #CCDDFF; border: thin solid; font-weight:bold;"><td align="left" style="padding-left:20px;">';
|
||||||
$url = BASE."appview.php?iAppId=".$oRow->appId;
|
$sUrl = $oApp->objectMakeUrl();
|
||||||
echo '<a href="'.$url.'">'.substr($oRow->appName, 0, 30).'</a></td><td> - '.$oRow->appId.'</td>';
|
echo '<a href="'.$sUrl.'">'.substr($oRow->appName, 0, 30).'</a></td><td> - '.$oRow->appId.'</td>';
|
||||||
echo "<td style='padding-left:20px;'><a href='moveAppVersion.php?sAction=move&iVersionId=$oVersion->iVersionId&iAppId=$oRow->appId'>Move here</a></td></tr>";
|
echo "<td style='padding-left:20px;'><a href='moveAppVersion.php?sAction=move&iVersionId=$oVersion->iVersionId&iAppId=$oRow->appId'>Move here</a></td></tr>";
|
||||||
echo '<tr style="border-left: thin solid; border-right:thin solid; background: #FAFBE2;"><td style="padding-left:40px;" colspan="3" align="left">'.$oRow->versionName.'</td></tr>';
|
echo '<tr style="border-left: thin solid; border-right:thin solid; background: #FAFBE2;"><td style="padding-left:40px;" colspan="3" align="left">'.$oRow->versionName.'</td></tr>';
|
||||||
} else /* just add another version */
|
} else /* just add another version */
|
||||||
@@ -68,7 +70,7 @@ if(!empty($aClean['sAction']))
|
|||||||
echo html_table_end();
|
echo html_table_end();
|
||||||
echo html_frame_end();
|
echo html_frame_end();
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
echo html_back_link(1, BASE."appview.php?iVersionId=".$oVersion->iVersionId);
|
echo html_back_link(1, $oVersion->objectMakeUrl());
|
||||||
apidb_footer();
|
apidb_footer();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -83,19 +83,24 @@ class maintainer
|
|||||||
{
|
{
|
||||||
$sStatusMessage = "<p>The maintainer was successfully added into the database</p>\n";
|
$sStatusMessage = "<p>The maintainer was successfully added into the database</p>\n";
|
||||||
|
|
||||||
$oApp = new Application($this->iAppId);
|
|
||||||
$oVersion = new Version($this->iVersionId);
|
|
||||||
//Send Status Email
|
//Send Status Email
|
||||||
$sEmail = $oUser->sEmail;
|
$sEmail = $oUser->sEmail;
|
||||||
if ($sEmail)
|
if ($sEmail)
|
||||||
{
|
{
|
||||||
if($this->iVersionId)
|
if($this->iVersionId)
|
||||||
$sURL = APPDB_ROOT."appview.php?iVersionId=$this->iVersionId";
|
{
|
||||||
else
|
$oVersion = new Version($this->iVersionId);
|
||||||
$sURL = APPDB_ROOT."appview.php?iAppId=$this->iAppId";
|
$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";
|
$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 .= "$sURL\n";
|
||||||
$sMsg .= "$this->sReplyText\n";
|
$sMsg .= "$this->sReplyText\n";
|
||||||
$sMsg .= "We appreciate your help in making the Application Database better for all users.\n\n";
|
$sMsg .= "We appreciate your help in making the Application Database better for all users.\n\n";
|
||||||
|
|||||||
@@ -98,41 +98,35 @@ class Monitor {
|
|||||||
|
|
||||||
function SendNotificationMail($sAction="add",$sMsg=null)
|
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))
|
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);
|
$sAppName = Application::lookup_name($this->iAppId);
|
||||||
|
$sUrl = $oApp->objectMakeUrl();
|
||||||
|
}
|
||||||
|
|
||||||
switch($sAction)
|
switch($sAction)
|
||||||
{
|
{
|
||||||
case "add":
|
case "add":
|
||||||
if (isset($this->iVersionId))
|
|
||||||
{
|
|
||||||
$sSubject = "Monitor for ".$sAppName;
|
$sSubject = "Monitor for ".$sAppName;
|
||||||
$sSubject .= " added: ".$_SESSION['current']->sRealname;
|
$sSubject .= " added: ".$_SESSION['current']->sRealname;
|
||||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$sMsg .= "$sUrl\n";
|
||||||
addmsg("You will now receive an email whenever changes are made to this Application version.", "green");
|
addmsg("You will now receive an email whenever changes are made ".
|
||||||
} else
|
"to this application$sVersion.", "green");
|
||||||
{
|
|
||||||
$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");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
if (isset($this->iVersionId))
|
|
||||||
{
|
|
||||||
$sSubject = "Monitor for ".$sAppName;
|
$sSubject = "Monitor for ".$sAppName;
|
||||||
$sSubject .= " removed: ".$_SESSION['current']->sRealname;
|
$sSubject .= " removed: ".$_SESSION['current']->sRealname;
|
||||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$sMsg .= "$sUrl\n";
|
||||||
addmsg("You will no longer receive an email whenever changes are made to this Application version.", "green");
|
addmsg("You will no longer receive an email whenever changes ".
|
||||||
} else
|
"are made to this application$sVersion.", "green");
|
||||||
{
|
|
||||||
$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");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sEmail = User::get_notify_email_address_list(null, $this->iVersionId);
|
$sEmail = User::get_notify_email_address_list(null, $this->iVersionId);
|
||||||
|
|||||||
@@ -137,21 +137,25 @@ class Note {
|
|||||||
|
|
||||||
function SendNotificationMail($sAction="add",$sMsg=null)
|
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)
|
switch($sAction)
|
||||||
{
|
{
|
||||||
case "add":
|
case "add":
|
||||||
$sSubject = "Note ".$this->sTitle." for ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
$sSubject = "Note $this->sTitle for $sAppName added by ".
|
||||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$_SESSION['current']->sRealname;
|
||||||
addmsg("The note was successfully added into the database.", "green");
|
addmsg("The note was successfully added into the database.", "green");
|
||||||
break;
|
break;
|
||||||
case "edit":
|
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");
|
addmsg("Note modified.", "green");
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
$oSubmitter = new User($this->iSubmitterId);
|
$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 .= "This note was made on ".print_date(mysqltimestamp_to_unixtimestamp($this->sSubmitTime))." by ".$oSubmitter->sRealname."\n";
|
||||||
$sMsg .= "\n";
|
$sMsg .= "\n";
|
||||||
$sMsg .= "Subject: ".$this->sTitle."\n";
|
$sMsg .= "Subject: ".$this->sTitle."\n";
|
||||||
|
|||||||
@@ -331,32 +331,37 @@ class Screenshot {
|
|||||||
|
|
||||||
function mailMaintainers($bDeleted=false)
|
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(!$bDeleted)
|
||||||
{
|
{
|
||||||
if(!$this->bQueued)
|
if(!$this->bQueued)
|
||||||
{
|
{
|
||||||
$sSubject = "Screenshot for ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
$sSubject = "Screenshot for $sAppName added by ".
|
||||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$_SESSION['current']->sRealname;
|
||||||
if($this->iSubmitterId)
|
if($this->iSubmitterId)
|
||||||
{
|
{
|
||||||
$oSubmitter = new User($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";
|
$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.
|
} else // Screenshot queued.
|
||||||
{
|
{
|
||||||
$sSubject = "Screenshot for ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
|
$sSubject = "Screenshot for $sAppName submitted by ".
|
||||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$_SESSION['current']->sRealname;
|
||||||
$sMsg .= "This screenshot has been queued.";
|
$sMsg .= "This screenshot has been queued.";
|
||||||
$sMsg .= "\n";
|
$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.
|
} else // Screenshot deleted.
|
||||||
{
|
{
|
||||||
$sSubject = "Screenshot for ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
|
$sSubject = "Screenshot for $sAppName deleted by ".
|
||||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$_SESSION['current']->sRealname;
|
||||||
addmsg("Screenshot deleted.", "green");
|
addmsg("Screenshot deleted.", "green");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -255,28 +255,35 @@ class testData{
|
|||||||
/* Get the full app/version name to display */
|
/* Get the full app/version name to display */
|
||||||
$sName = version::fullName($this->iVersionId);
|
$sName = version::fullName($this->iVersionId);
|
||||||
|
|
||||||
|
$oVersion = new version($this->iVersionId);
|
||||||
|
|
||||||
switch($sAction)
|
switch($sAction)
|
||||||
{
|
{
|
||||||
case "add":
|
case "add":
|
||||||
$sSubject = "Submitted testing data accepted";
|
$sSubject = "Submitted testing data accepted";
|
||||||
$sMsg = "The testing data you submitted for '$sName' has been accepted by ".$_SESSION['current']->sRealname.".";
|
$sMsg = "The testing data you submitted for '$sName' has been ".
|
||||||
$sMsg .= APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
|
"accepted by ".$_SESSION['current']->sRealname.".";
|
||||||
|
$sMsg .= $oVersion->objectMakeUrl()."&iTestingId=".$this->iTestingId."\n";
|
||||||
$sMsg .= "Administrators Responce:\n";
|
$sMsg .= "Administrators Responce:\n";
|
||||||
break;
|
break;
|
||||||
case "reject":
|
case "reject":
|
||||||
$sSubject = "Submitted testing data rejected";
|
$sSubject = "Submitted testing data rejected";
|
||||||
$sMsg = "The testing data you submitted for '$sName' has been rejected by ".$_SESSION['current']->sRealname.".";
|
$sMsg = "The testing data you submitted for '$sName' has ".
|
||||||
$sMsg .= APPDB_ROOT."testResults.php?sSub=view&iTestingId=".$this->iTestingId."\n";
|
"been rejected by ".$_SESSION['current']->sRealname.".";
|
||||||
|
$sMsg .= APPDB_ROOT."testResults.php?sSub=view&iTestingId=".
|
||||||
|
$this->iTestingId."\n";
|
||||||
$sMsg .= "Reason given:\n";
|
$sMsg .= "Reason given:\n";
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
$sSubject = "Submitted testing data deleted";
|
$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";
|
$sMsg .= "Reason given:\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sMsg .= $aClean['sReplyText']."\n";
|
$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);
|
mail_appdb($oSubmitter->sEmail, $sSubject ,$sMsg);
|
||||||
}
|
}
|
||||||
@@ -289,7 +296,7 @@ class testData{
|
|||||||
|
|
||||||
$oVersion = new Version($this->iVersionId);
|
$oVersion = new Version($this->iVersionId);
|
||||||
$oApp = new Application($oVersion->iAppId);
|
$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)
|
switch($sAction)
|
||||||
{
|
{
|
||||||
@@ -666,7 +673,7 @@ class testData{
|
|||||||
|
|
||||||
for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
|
for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
|
||||||
$sReturn .= html_tr(array(
|
$sReturn .= html_tr(array(
|
||||||
"<a href=\"".BASE."appview.php?iVersionId=$oRow->versionId\">$oRow->appName: $oRow->versionName</a>",
|
version::fullNameLink($oRow->versionId),
|
||||||
$oRow->testedRating,
|
$oRow->testedRating,
|
||||||
$oRow->testedRelease,
|
$oRow->testedRelease,
|
||||||
print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))),
|
print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))),
|
||||||
|
|||||||
@@ -213,13 +213,25 @@ class Url {
|
|||||||
|
|
||||||
function SendNotificationMail($bDeleted=false)
|
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(!$bDeleted)
|
||||||
{
|
{
|
||||||
if(!$this->bQueued)
|
if(!$this->bQueued)
|
||||||
{
|
{
|
||||||
$sSubject = "Url for ".$sAppName." added by ".$_SESSION['current']->sRealname;
|
$sSubject = "Url for $sAppName added by ".$_SESSION['current']->sRealname;
|
||||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$sMsg = "$sUrl\n";
|
||||||
if($this->iSubmitterId)
|
if($this->iSubmitterId)
|
||||||
{
|
{
|
||||||
$oSubmitter = new User($this->iSubmitterId);
|
$oSubmitter = new User($this->iSubmitterId);
|
||||||
@@ -229,16 +241,18 @@ class Url {
|
|||||||
addmsg("The url was successfully added into the database.", "green");
|
addmsg("The url was successfully added into the database.", "green");
|
||||||
} else // Url queued.
|
} else // Url queued.
|
||||||
{
|
{
|
||||||
$sSubject = "Url for ".$sAppName." submitted by ".$_SESSION['current']->sRealname;
|
$sSubject = "Url for $sAppName submitted by ".
|
||||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$_SESSION['current']->sRealname;
|
||||||
|
$sMsg = "$sUrl\n";
|
||||||
$sMsg .= "This url has been queued.";
|
$sMsg .= "This url has been queued.";
|
||||||
$sMsg .= "\n";
|
$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.
|
} else // Url deleted.
|
||||||
{
|
{
|
||||||
$sSubject = "Url for ".$sAppName." deleted by ".$_SESSION['current']->sRealname;
|
$sSubject = "Url for $sAppName deleted by ".$_SESSION['current']->sRealname;
|
||||||
$sMsg = APPDB_ROOT."appview.php?iVersionId=".$this->iVersionId."\n";
|
$sMsg = "$sUrl\n";
|
||||||
addmsg("Url deleted.", "green");
|
addmsg("Url deleted.", "green");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,8 +439,8 @@ class Url {
|
|||||||
$_SESSION['current']->sRealname;
|
$_SESSION['current']->sRealname;
|
||||||
|
|
||||||
$sMsg = $aValues["iVersionId"] ?
|
$sMsg = $aValues["iVersionId"] ?
|
||||||
APPDB_ROOT."appview.php?iVersionId=".$aValues['iVersionId'] :
|
$oVersion->objectMakeUrl() :
|
||||||
APPDB_ROOT."appview.php?iAppId=".$avalues["iAppid"];
|
$oApp->objectMakeUrl();
|
||||||
$sMsg .= "\n\n";
|
$sMsg .= "\n\n";
|
||||||
$sMsg .= "The following changed were made\n\n";
|
$sMsg .= "The following changed were made\n\n";
|
||||||
$sMsg .= "$sWhatChanged\n\n";
|
$sMsg .= "$sWhatChanged\n\n";
|
||||||
|
|||||||
@@ -243,10 +243,9 @@ function outputTopXRow($oRow)
|
|||||||
$oVersion = new Version($oRow->versionId);
|
$oVersion = new Version($oRow->versionId);
|
||||||
$oApp = new Application($oVersion->iAppId);
|
$oApp = new Application($oVersion->iAppId);
|
||||||
$img = Screenshot::get_random_screenshot_img(null, $oRow->versionId, false); // image, disable extra formatting
|
$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 '
|
echo '
|
||||||
<td class="app_name">
|
<td class="app_name">'.version::fullNameLink($oVersion->iVersionId).'</td>
|
||||||
<a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oApp->sName.' '.$oVersion->sName.'</a></td>
|
|
||||||
<td>'.util_trim_description($oApp->sDescription).'</td>
|
<td>'.util_trim_description($oApp->sDescription).'</td>
|
||||||
<td><center>'.$img.'</center></td>
|
<td><center>'.$img.'</center></td>
|
||||||
</tr>';
|
</tr>';
|
||||||
@@ -506,6 +505,7 @@ function outputSearchTableForhResult($search_words, $hResult)
|
|||||||
$c = 0;
|
$c = 0;
|
||||||
while($oRow = mysql_fetch_object($hResult))
|
while($oRow = mysql_fetch_object($hResult))
|
||||||
{
|
{
|
||||||
|
$oApp = new application($oRow->appId);
|
||||||
//skip if a NONAME
|
//skip if a NONAME
|
||||||
if ($oRow->appName == "NONAME") { continue; }
|
if ($oRow->appName == "NONAME") { continue; }
|
||||||
|
|
||||||
@@ -519,7 +519,7 @@ function outputSearchTableForhResult($search_words, $hResult)
|
|||||||
|
|
||||||
//display row
|
//display row
|
||||||
echo "<tr class=$bgcolor>\n";
|
echo "<tr class=$bgcolor>\n";
|
||||||
echo " <td>".html_ahref($oRow->appName,BASE."appview.php?iAppId=$oRow->appId")."</td>\n";
|
echo " <td>".html_ahref($oRow->appName,$oApp->objectMakeUrl())."</td>\n";
|
||||||
echo " <td>".util_trim_description($oRow->description)."</td>\n";
|
echo " <td>".util_trim_description($oRow->description)."</td>\n";
|
||||||
echo " <td>$y->versions </td>\n";
|
echo " <td>$y->versions </td>\n";
|
||||||
echo "</tr>\n\n";
|
echo "</tr>\n\n";
|
||||||
|
|||||||
@@ -500,7 +500,7 @@ class Version {
|
|||||||
if($this->sQueued == "false")
|
if($this->sQueued == "false")
|
||||||
{
|
{
|
||||||
$sSubject = "Version ".$this->sName." of ".$oApp->sName." added by ".$_SESSION['current']->sRealname;
|
$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)
|
if($this->iSubmitterId)
|
||||||
{
|
{
|
||||||
$oSubmitter = new User($this->iSubmitterId);
|
$oSubmitter = new User($this->iSubmitterId);
|
||||||
@@ -524,7 +524,7 @@ class Version {
|
|||||||
break;
|
break;
|
||||||
case "edit":
|
case "edit":
|
||||||
$sSubject = "'".$oApp->sName." ".$this->sName."' has been modified by ".$_SESSION['current']->sRealname;
|
$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");
|
addmsg("Version modified.", "green");
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
@@ -812,7 +812,8 @@ class Version {
|
|||||||
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
|
$oMonitor->find($_SESSION['current']->iUserId, $this->iVersionId);
|
||||||
if(!$oMonitor->iMonitorId)
|
if(!$oMonitor->iMonitorId)
|
||||||
{
|
{
|
||||||
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'&iAppId='.$oApp->iAppId.'>';
|
echo '<form method="post" name="sMessage" action='.
|
||||||
|
$this->objectMakeUrl().'&iAppId='.$oApp->iAppId.'>';
|
||||||
echo '<input type=hidden name="sSub" value="StartMonitoring" />';
|
echo '<input type=hidden name="sSub" value="StartMonitoring" />';
|
||||||
echo '<input type=submit value="Monitor Changes" class="button" />';
|
echo '<input type=submit value="Monitor Changes" class="button" />';
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
@@ -862,7 +863,8 @@ class Version {
|
|||||||
{
|
{
|
||||||
echo '<tr><td colspan="2" align="center">';
|
echo '<tr><td colspan="2" align="center">';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
echo '<form method=post name=sMessage action=appview.php?iVersionId='.$this->iVersionId.'>';
|
echo '<form method="post" name="sMessage" action='.
|
||||||
|
$this->objectMakeUrl().'>';
|
||||||
echo '<input type=hidden name="sSub" value="StopMonitoring" />';
|
echo '<input type=hidden name="sSub" value="StopMonitoring" />';
|
||||||
echo '<input type=submit value="Stop Monitoring Version" class="button" />';
|
echo '<input type=submit value="Stop Monitoring Version" class="button" />';
|
||||||
echo '</form>';
|
echo '</form>';
|
||||||
@@ -1091,7 +1093,7 @@ class Version {
|
|||||||
|
|
||||||
for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
|
for($i = 1; $oRow = mysql_fetch_object($hResult); $i++)
|
||||||
$sResult .= html_tr(array(
|
$sResult .= html_tr(array(
|
||||||
"<a href=\"".BASE."appview.php?iVersionId=$oRow->versionId\">$oRow->appName: $oRow->versionName</a>",
|
version::fullNameLink($oRow->versionId),
|
||||||
$oRow->description,
|
$oRow->description,
|
||||||
print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))),
|
print_date(mysqltimestamp_to_unixtimestamp($oRow->submitTime))),
|
||||||
($i % 2) ? "color0" : "color1");
|
($i % 2) ? "color0" : "color1");
|
||||||
@@ -1145,7 +1147,7 @@ class Version {
|
|||||||
|
|
||||||
function objectMakeUrl()
|
function objectMakeUrl()
|
||||||
{
|
{
|
||||||
return BASE."appview.php?iVersionId=$this->iVersionId";
|
return APPDB_ROOT."appview.php?iVersionId=$this->iVersionId";
|
||||||
}
|
}
|
||||||
|
|
||||||
function objectMakeLink()
|
function objectMakeLink()
|
||||||
|
|||||||
@@ -148,11 +148,12 @@ function vote_update($vars)
|
|||||||
if(!$_SESSION['current']->isLoggedIn())
|
if(!$_SESSION['current']->isLoggedIn())
|
||||||
util_show_error_page_and_exit("You must be logged in to vote");
|
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']) OR !is_numeric($vars['iSlot']))
|
||||||
{
|
{
|
||||||
if(is_numeric($vars['iVersionId']))
|
if(is_numeric($vars['iVersionId']))
|
||||||
util_redirect_and_exit(apidb_fullurl(
|
util_redirect_and_exit($oVersion->objectMakeUrl());
|
||||||
"appview.php?iVersionId=".$vars['iVersionId']));
|
|
||||||
else
|
else
|
||||||
util_redirect_and_exit(apidb_fullurl("index.php"));
|
util_redirect_and_exit(apidb_fullurl("index.php"));
|
||||||
|
|
||||||
@@ -174,8 +175,7 @@ function vote_update($vars)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
util_redirect_and_exit(apidb_fullurl(
|
util_redirect_and_exit($oVersion->objectMakeUrl());
|
||||||
"appview.php?iVersionId=".$vars['iVersionId']));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// tell us if there is a vote in a given slot so we don't
|
// tell us if there is a vote in a given slot so we don't
|
||||||
|
|||||||
@@ -88,8 +88,7 @@ if ($aClean['sSub'])
|
|||||||
}
|
}
|
||||||
if ($aClean['sSub'] == 'view')
|
if ($aClean['sSub'] == 'view')
|
||||||
{
|
{
|
||||||
$oApp = new Application($oVersion->iAppId);
|
$sVersionInfo = version::fullName($oVersion->iVersionId);
|
||||||
$sVersionInfo = $oApp->sName." ".$oVersion->sName;
|
|
||||||
|
|
||||||
switch($oTest->sQueued)
|
switch($oTest->sQueued)
|
||||||
{
|
{
|
||||||
@@ -127,7 +126,7 @@ if ($aClean['sSub'])
|
|||||||
// View Test Details
|
// View Test Details
|
||||||
$oTest->outputEditor($aClean['sDistribution'],true);
|
$oTest->outputEditor($aClean['sDistribution'],true);
|
||||||
|
|
||||||
echo '<a href="'.BASE."appview.php?iVersionId=".$oTest->iVersionId.'">Back to Version</a>';
|
echo '<a href="'.$oVersion->objectMakeUrl().'">Back to Version</a>';
|
||||||
|
|
||||||
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
|
echo '<tr valign=top><td class=color3 align=center colspan=2>',"\n";
|
||||||
|
|
||||||
|
|||||||
@@ -72,13 +72,9 @@ while ($oRow = mysql_fetch_object($Ids))
|
|||||||
echo $img;
|
echo $img;
|
||||||
echo "<div align=center>". substr($oRow->description,0,20). "\n";
|
echo "<div align=center>". substr($oRow->description,0,20). "\n";
|
||||||
|
|
||||||
echo "<br />[<a href='".apidb_fullurl("appview.php");
|
echo "<br />[".$oApp->objectMakeLink()."]";
|
||||||
echo "?iAppId=".$oApp->iAppId."'>";
|
|
||||||
echo $oApp->sName."</a>]";
|
|
||||||
|
|
||||||
echo "<br />[<a href='".apidb_fullurl("appview.php");
|
echo "<br />[".$oVersion->objectMakeLink()."]";
|
||||||
echo "?iVersionId=".$oVersion->iVersionId."'>";
|
|
||||||
echo "Version: ".$oVersion->sName."</a>]";
|
|
||||||
|
|
||||||
echo "</div></td>\n";
|
echo "</div></td>\n";
|
||||||
// end row if counter of 3
|
// end row if counter of 3
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ if(!is_numeric($aClean['iBugId']))
|
|||||||
{
|
{
|
||||||
while($oRow = mysql_fetch_object($hResult))
|
while($oRow = mysql_fetch_object($hResult))
|
||||||
{
|
{
|
||||||
|
$oApp = new application($oRow->appId);
|
||||||
|
$oVersion = new version($oRow->versionId);
|
||||||
$sDownloadUrls = "";
|
$sDownloadUrls = "";
|
||||||
if($hDownloadUrls = appData::getData($oRow->versionId, "downloadurl"))
|
if($hDownloadUrls = appData::getData($oRow->versionId, "downloadurl"))
|
||||||
{
|
{
|
||||||
@@ -56,11 +58,11 @@ if(!is_numeric($aClean['iBugId']))
|
|||||||
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
|
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
|
||||||
echo '<tr class='.$bgcolor.'>',"\n";
|
echo '<tr class='.$bgcolor.'>',"\n";
|
||||||
echo ' <td>',"\n";
|
echo ' <td>',"\n";
|
||||||
echo ' <a href="appview.php?iAppId='.$oRow->appId.'">'.$oRow->appName.'</a>',"\n";
|
echo " ".$oApp->objectMakeLink()."\n";
|
||||||
echo ' </td>',"\n";
|
echo ' </td>',"\n";
|
||||||
echo ' <td>'.$oRow->appDescription.'</td>',"\n";
|
echo ' <td>'.$oRow->appDescription.'</td>',"\n";
|
||||||
echo ' <td>',"\n";
|
echo ' <td>',"\n";
|
||||||
echo ' <a href="appview.php?iVersionId='.$oRow->versionId.'">'.$oRow->versionName.'</a>',"\n";
|
echo " ".$oVersion->objectMakeLink()."\n";
|
||||||
echo ' </td>',"\n";
|
echo ' </td>',"\n";
|
||||||
echo " <td>$sDownloadUrls</td>\n";
|
echo " <td>$sDownloadUrls</td>\n";
|
||||||
echo '</tr>',"\n";
|
echo '</tr>',"\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user