Use objectMakeLink()/Url() in more places
This commit is contained in:
committed by
WineHQ
parent
eeaf2c3642
commit
89535dbe01
@@ -24,7 +24,8 @@ if(!$_SESSION['current']->hasPriv("admin") &&
|
||||
//set link for version
|
||||
if(is_numeric($aClean['iVersionId']) and !empty($aClean['iVersionId']))
|
||||
{
|
||||
$sVersionLink = "iVersionId={$aClean['iVersionId']}";
|
||||
$oVersion = new version($aClean['iVersionId']);
|
||||
$sVersionLink = $oVersion->objectMakeUrl();
|
||||
}
|
||||
else
|
||||
exit;
|
||||
@@ -35,7 +36,7 @@ $oNote->GetOutputEditorValues($aClean);
|
||||
if($aClean['sSub'] == "Submit")
|
||||
{
|
||||
$oNote->create();
|
||||
util_redirect_and_exit(apidb_fullurl("appview.php?".$sVersionLink));
|
||||
util_redirect_and_exit($sVersionLink);
|
||||
}
|
||||
else if($aClean['sSub'] == 'Preview' OR empty($aClean['sSubmit']))
|
||||
{
|
||||
@@ -54,7 +55,7 @@ else if($aClean['sSub'] == 'Preview' OR empty($aClean['sSubmit']))
|
||||
echo '<input type="submit" name="sSub" value="Submit"></td></tr>',"\n";
|
||||
echo '</center>';
|
||||
|
||||
echo html_back_link(1,BASE."appview.php?".$sVersionLink);
|
||||
echo html_back_link(1,$sVersionLink);
|
||||
apidb_footer();
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -122,6 +122,8 @@ if ($aClean['sSub'])
|
||||
{
|
||||
while($oRow = mysql_fetch_object($hResult))
|
||||
{
|
||||
$oApp = new application($oRow->appId);
|
||||
$oVersion = new version($oRow->versionId);
|
||||
// set row color
|
||||
$bgcolor = ($c % 2 == 0) ? "color0" : "color1";
|
||||
echo '<tr class='.$bgcolor.'>',"\n";
|
||||
@@ -131,11 +133,11 @@ if ($aClean['sSub'])
|
||||
echo ' <td align=center>'.$oRow->bug_status.'</td>',"\n";
|
||||
echo ' <td>'.$oRow->short_desc.'</td>',"\n";
|
||||
echo ' <td>',"\n";
|
||||
echo ' <a href="'.apidb_fullurl('appview.php?iAppId='.$oRow->appId).'">'.$oRow->appName.'</a>',"\n";
|
||||
echo $oApp->objectMakeLink()."\n";
|
||||
echo ' </td>',"\n";
|
||||
echo ' <td>'.$oRow->appDescription.'</td>',"\n";
|
||||
echo ' <td>',"\n";
|
||||
echo ' <a href="'.apidb_fullurl('appview.php?iVersionId='.$oRow->versionId).'">'.$oRow->versionName.'</a>',"\n";
|
||||
echo $oVersion->objectMakeLink()."\n";
|
||||
echo ' </td>',"\n";
|
||||
echo ' <td align=center>[<a href="adminBugs.php?sSub=delete',"\n";
|
||||
echo '&iBuglinkId='.$oRow->linkId,"\n";
|
||||
|
||||
@@ -64,6 +64,7 @@ if ($aClean['sSub'])
|
||||
while($oRow = mysql_fetch_object($hResult))
|
||||
{
|
||||
$oUser = new User($oRow->userId);
|
||||
$oApp = new application($oRow->appId);
|
||||
if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; }
|
||||
|
||||
/* if this is a new user we should print a header that has the aggregate of the applications */
|
||||
@@ -105,14 +106,14 @@ if ($aClean['sSub'])
|
||||
echo "<tr class=$bgcolor>\n";
|
||||
echo " <td>".print_date(mysqldatetime_to_unixtimestamp($oRow->submitTime))." </td>\n";
|
||||
echo " <td><a href=\"mailto:".$oUser->sEmail."\">".$oUser->sRealname."</a></td>\n";
|
||||
echo " <td>".$oApp->objectMakeLink()."</td>\n";
|
||||
if($oRow->superMaintainer)
|
||||
{
|
||||
echo " <td><a href='".BASE."appview.php?iAppId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
|
||||
echo " <td>*</td>\n";
|
||||
} else
|
||||
{
|
||||
echo " <td><a href='".BASE."appview.php?iAppId=$oRow->appId'>".Application::lookup_name($oRow->appId)."</a></td>\n";
|
||||
echo " <td><a href='".BASE."appview.php?iVersionId=$oRow->versionId'>".Version::lookup_name($oRow->versionId)."</a> </td>\n";
|
||||
$oVersion = new version($oRow->versionId);
|
||||
echo " <td>".$oVersion->objectMakeLink()."</td>\n";
|
||||
}
|
||||
echo " <td align=\"center\">[<a href='adminMaintainers.php?sSub=delete&iMaintainerId=$oRow->maintainerId'>delete</a>]</td>\n";
|
||||
echo "</tr>\n\n";
|
||||
|
||||
@@ -116,13 +116,9 @@ while ($oRow = mysql_fetch_object($Ids))
|
||||
echo $img;
|
||||
echo "<div align=center>". substr($oRow->description,0,20). "\n";
|
||||
|
||||
echo "<br />[<a href='".apidb_fullurl("appview.php");
|
||||
echo "?iAppId=".$oApp->iAppId."'>";
|
||||
echo $oApp->sName."</a>]";
|
||||
echo "<br />[".$oApp->objectMakeLink()."]";
|
||||
|
||||
echo "<br />[<a href='".apidb_fullurl("appview.php");
|
||||
echo "?iVersionId=".$oVersion->iVersionId."'>";
|
||||
echo "Version: ".$oVersion->sName."</a>]";
|
||||
echo "<br />[".$oVersion->objectMakeLink()."]";
|
||||
|
||||
//show admin delete link
|
||||
if($_SESSION['current']->isLoggedIn() &&
|
||||
|
||||
@@ -48,7 +48,10 @@ if($aClean['sWhat'])
|
||||
if(!$oVersion->delete())
|
||||
util_show_error_page_and_exit();
|
||||
else
|
||||
util_redirect_and_exit(BASE."appview.php?iAppId=".$aClean['iAppId']);
|
||||
{
|
||||
$oApp = new application($aClean['iAppId']);
|
||||
util_redirect_and_exit($oApp->objectMakeUrl());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user