Use virtual path feature for links

Use virtual paths in links (e.g. link to "/packages/" instead of
"/packages.php" etc.) if the virtual path feature is enabled.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-07-14 01:24:59 +02:00
parent a03c684ecd
commit 2425f963f8
24 changed files with 61 additions and 61 deletions

View file

@ -68,7 +68,7 @@ if ($atype == "Trusted User" || $atype == "Developer") {
<div class="box"> <div class="box">
<h2><?php print __("Submit a proposal to vote on.") ?></h2> <h2><?php print __("Submit a proposal to vote on.") ?></h2>
<form action="addvote.php" method="post"> <form action="<?php echo get_uri('/addvote/'); ?>" method="post">
<p> <p>
<b><?php print __("Applicant/TU") ?></b> <b><?php print __("Applicant/TU") ?></b>
<input type="text" name="user" value="<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>" /> <input type="text" name="user" value="<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>" />

View file

@ -91,7 +91,7 @@ $dbh = db_connect();
</div> </div>
<div id="content-right"> <div id="content-right">
<div id="pkgsearch" class="widget"> <div id="pkgsearch" class="widget">
<form id="pkgsearch-form" method="get" action="packages.php"> <form id="pkgsearch-form" method="get" action="<?php get_uri('/packages/'); ?>">
<fieldset> <fieldset>
<label for="pkgsearch-field">Package Search:</label> <label for="pkgsearch-field">Package Search:</label>
<input type="hidden" name="O" value="0" /> <input type="hidden" name="O" value="0" />

View file

@ -17,7 +17,7 @@ html_header('AUR ' . __("Login"));
<?php if (isset($_COOKIE["AURSID"])): ?> <?php if (isset($_COOKIE["AURSID"])): ?>
<p> <p>
<?php echo __("Logged-in as: %s", '<strong>' . username_from_sid($_COOKIE["AURSID"]) . '</strong>'); ?> <?php echo __("Logged-in as: %s", '<strong>' . username_from_sid($_COOKIE["AURSID"]) . '</strong>'); ?>
<a href="logout.php">[<?php print __("Logout"); ?>]</a> <a href="<?php get_uri('/logout/'); ?>">[<?php print __("Logout"); ?>]</a>
</p> </p>
<?php elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])): ?> <?php elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])): ?>
<form method="post" action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>"> <form method="post" action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>">
@ -40,7 +40,7 @@ html_header('AUR ' . __("Login"));
</p> </p>
<p> <p>
<input type="submit" class="button" value="<?php print __("Login"); ?>" /> <input type="submit" class="button" value="<?php print __("Login"); ?>" />
<a href="passreset.php">[<?php echo __('Forgot Password') ?>]</a> <a href="<?php echo get_uri('/passreset/') ?>">[<?php echo __('Forgot Password') ?>]</a>
</p> </p>
</fieldset> </fieldset>
</form> </form>

View file

@ -20,5 +20,5 @@ if (isset($_COOKIE["AURSID"])) {
clear_expired_sessions($dbh); clear_expired_sessions($dbh);
} }
header('Location: index.php'); header('Location: /');

View file

@ -8,7 +8,7 @@ set_lang(); # this sets up the visitor's language
check_sid(); # see if they're still logged in check_sid(); # see if they're still logged in
if (isset($_COOKIE["AURSID"])) { if (isset($_COOKIE["AURSID"])) {
header('Location: index.php'); header('Location: /');
exit(); exit();
} }
@ -48,14 +48,14 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
'your password follow the link below, otherwise ignore '. 'your password follow the link below, otherwise ignore '.
'this message and nothing will happen.'). 'this message and nothing will happen.').
"\n\n". "\n\n".
"{$AUR_LOCATION}/passreset.php?". "{$AUR_LOCATION}/" . get_uri('/passreset/') . "?".
"resetkey={$resetkey}"; "resetkey={$resetkey}";
$body = wordwrap($body, 70); $body = wordwrap($body, 70);
$headers = "Reply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR"; $headers = "Reply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR";
@mail($email, 'AUR Password Reset', $body, $headers); @mail($email, 'AUR Password Reset', $body, $headers);
} }
header('Location: passreset.php?step=confirm'); header('Location: ' . get_uri('/passreset/') . '?step=confirm');
exit(); exit();
} }

View file

@ -400,7 +400,7 @@ if ($uid):
# Entire package creation process is atomic # Entire package creation process is atomic
end_atomic_commit($dbh); end_atomic_commit($dbh);
header('Location: packages.php?ID=' . $packageID); header('Location: ' . get_uri('/packages/') . '?ID=' . $packageID);
} }
chdir($cwd); chdir($cwd);
@ -429,7 +429,7 @@ html_header("Submit");
$pkg_categories = pkgCategories(); $pkg_categories = pkgCategories();
?> ?>
<form action="pkgsubmit.php" method="post" enctype="multipart/form-data"> <form action="<?php echo get_uri('/submit/'); ?>" method="post" enctype="multipart/form-data">
<fieldset> <fieldset>
<div> <div>
<input type="hidden" name="pkgsubmit" value="1" /> <input type="hidden" name="pkgsubmit" value="1" />

View file

@ -116,17 +116,17 @@ if ($atype == "Trusted User" || $atype == "Developer") {
$nextresult = proposal_count(); $nextresult = proposal_count();
?> ?>
<div class="box"> <div class="box">
<p><a href="addvote.php"><?php print __("Add Proposal") ?></a></p> <p><a href="<?php echo get_uri('/addvote/'); ?>"><?php print __("Add Proposal") ?></a></p>
<?php if ($result): <?php if ($result):
$by = htmlentities($by, ENT_QUOTES); ?> $by = htmlentities($by, ENT_QUOTES); ?>
<?php if ($off != 0): <?php if ($off != 0):
$back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?> $back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?>
<a href='tu.php?off=<?php print $back ?>&amp;by=<?php print $by ?>'><?php print __("Back") ?></a> <a href='<?php echo get_uri('/tu/'); ?>?off=<?php print $back ?>&amp;by=<?php print $by ?>'><?php print __("Back") ?></a>
<?php endif; ?> <?php endif; ?>
<?php if (($off + $limit) < $nextresult): <?php if (($off + $limit) < $nextresult):
$forw = $off + $limit; ?> $forw = $off + $limit; ?>
<a href="tu.php?off=<?php print $forw ?>&amp;by=<?php print $by ?>"><?php print __("Next") ?></a> <a href="<?php echo get_uri('/tu/'); ?>?off=<?php print $forw ?>&amp;by=<?php print $by ?>"><?php print __("Next") ?></a>
<?php endif; ?> <?php endif; ?>
<?php endif; ?> <?php endif; ?>
</div> </div>
@ -134,7 +134,7 @@ if ($atype == "Trusted User" || $atype == "Developer") {
} }
} }
else { else {
header('Location: index.php'); header('Location: /');
} }
html_footer(AUR_VERSION); html_footer(AUR_VERSION);

View file

@ -15,12 +15,12 @@ if ($atype == 'Trusted User' || $atype== 'Developer'):
?> ?>
<div class="box"> <div class="box">
<h2>Votes for <a href="packages.php?ID=<?php echo $pkgid ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2> <h2>Votes for <a href="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $pkgid ?>"><?php echo pkgname_from_id($pkgid) ?></a></h2>
<div class="boxbody"> <div class="boxbody">
<?php <?php
while (list($indx, $row) = each($votes)): ?> while (list($indx, $row) = each($votes)): ?>
<a href="account.php?Action=AccountInfo&amp;ID=<?php echo $row['UsersID'] ?>"><?php echo htmlspecialchars($row['Username']) ?></a><br /> <a href="<?php echo get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?php echo $row['UsersID'] ?>"><?php echo htmlspecialchars($row['Username']) ?></a><br />
<?php endwhile; ?> <?php endwhile; ?>
</div> </div>
</div> </div>

View file

@ -545,7 +545,7 @@ function password_reset($hash, $salt, $resetkey, $email, $dbh=NULL) {
$error = __('Invalid e-mail and reset key combination.'); $error = __('Invalid e-mail and reset key combination.');
return $error; return $error;
} else { } else {
header('Location: passreset.php?step=complete'); header('Location: ' . get_uri('/passreset/') . '?step=complete');
exit(); exit();
} }
} }
@ -817,7 +817,7 @@ function voter_list($voteid, $dbh=NULL) {
$result = db_query($q, $dbh); $result = db_query($q, $dbh);
if ($result) { if ($result) {
while ($row = mysql_fetch_assoc($result)) { while ($row = mysql_fetch_assoc($result)) {
$whovoted.= '<a href="account.php?Action=AccountInfo&amp;ID='.$row['UserID'].'">'.$row['Username'].'</a> '; $whovoted.= '<a href="' . get_uri('/accounts/') . '?Action=AccountInfo&amp;ID='.$row['UserID'].'">'.$row['Username'].'</a> ';
} }
} }
return $whovoted; return $whovoted;

View file

@ -238,7 +238,7 @@ function add_package_comment($pkgid, $uid, $comment, $dbh=NULL) {
# Simply making these strings translatable won't work, users would be # Simply making these strings translatable won't work, users would be
# getting emails in the language that the user who posted the comment was in # getting emails in the language that the user who posted the comment was in
$body = $body =
'from ' . $AUR_LOCATION . '/packages.php?ID=' 'from ' . $AUR_LOCATION . '/' . get_uri('/packages/') . '?ID='
. $pkgid . "\n" . $pkgid . "\n"
. username_from_sid($_COOKIE['AURSID'], $dbh) . " wrote:\n\n" . username_from_sid($_COOKIE['AURSID'], $dbh) . " wrote:\n\n"
. $comment . $comment
@ -744,7 +744,7 @@ function pkg_flag ($atype, $ids, $action=true, $dbh=NULL) {
if (mysql_num_rows($result)) { if (mysql_num_rows($result)) {
while ($row = mysql_fetch_assoc($result)) { while ($row = mysql_fetch_assoc($result)) {
# construct email # construct email
$body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . " [1]. You may view your package at:\n" . $AUR_LOCATION . "/packages.php?ID=" . $row['ID'] . "\n\n[1] - " . $AUR_LOCATION . "/account.php?Action=AccountInfo&ID=" . $f_uid; $body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . " [1]. You may view your package at:\n" . $AUR_LOCATION . "/" . get_uri('/packages/') . "?ID=" . $row['ID'] . "\n\n[1] - " . $AUR_LOCATION . "/" . get_uri('/accounts/') . "?Action=AccountInfo&ID=" . $f_uid;
$body = wordwrap($body, 70); $body = wordwrap($body, 70);
$headers = "Reply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR\n"; $headers = "Reply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR\n";
@mail($row['Email'], "AUR Out-of-date Notification for ".$row['Name'], $body, $headers); @mail($row['Email'], "AUR Out-of-date Notification for ".$row['Name'], $body, $headers);
@ -813,7 +813,7 @@ function pkg_delete ($atype, $ids, $mergepkgid, $dbh=NULL) {
$body = ""; $body = "";
if ($mergepkgid) { if ($mergepkgid) {
$body .= username_from_sid($_COOKIE['AURSID']) . " merged \"".$pkgname."\" into \"$mergepkgname\".\n\n"; $body .= username_from_sid($_COOKIE['AURSID']) . " merged \"".$pkgname."\" into \"$mergepkgname\".\n\n";
$body .= "You will no longer receive notifications about this package, please go to https://aur.archlinux.org/packages.php?ID=".$mergepkgid." and click the Notify button if you wish to recieve them again."; $body .= "You will no longer receive notifications about this package, please go to https://aur.archlinux.org/" . get_uri('/packages/') . "?ID=".$mergepkgid." and click the Notify button if you wish to recieve them again.";
} else { } else {
$body .= username_from_sid($_COOKIE['AURSID']) . " deleted \"".$pkgname."\".\n\n"; $body .= username_from_sid($_COOKIE['AURSID']) . " deleted \"".$pkgname."\".\n\n";
$body .= "You will no longer receive notifications about this package."; $body .= "You will no longer receive notifications about this package.";

View file

@ -51,7 +51,7 @@
</tr> </tr>
<tr> <tr>
<td colspan="2"><a href="packages.php?K=<?php echo $row['Username'] ?>&amp;SeB=m"><?php echo __("View this user's packages") ?></a></td> <td colspan="2"><a href="<?php echo get_uri('/packages/'); ?>?K=<?php echo $row['Username'] ?>&amp;SeB=m"><?php echo __("View this user's packages") ?></a></td>
</tr> </tr>
</table> </table>

View file

@ -1,4 +1,4 @@
<form action="account.php" method="post"> <form action="<?php echo get_uri('/account/'); ?>" method="post">
<fieldset> <fieldset>
<input type="hidden" name="Action" value="<?php echo $A ?>" /> <input type="hidden" name="Action" value="<?php echo $A ?>" />
<?php if ($UID): ?> <?php if ($UID): ?>

View file

@ -28,7 +28,7 @@ else:
?> ?>
<tbody> <tbody>
<tr class ="<?php echo $c ?>"> <tr class ="<?php echo $c ?>">
<td><a href="packages.php?SeB=m&amp;K=<?php echo $row["Username"] ?>"><?php echo $row["Username"] ?></a></td> <td><a href="<?php echo get_uri('/packages/'); ?>?SeB=m&amp;K=<?php echo $row["Username"] ?>"><?php echo $row["Username"] ?></a></td>
<td><?php echo $row["AccountType"] ?></td> <td><?php echo $row["AccountType"] ?></td>
<td> <td>
<?php <?php
@ -50,7 +50,7 @@ else:
print "&nbsp;"; print "&nbsp;";
else: else:
?> ?>
<a href="account.php?Action=DisplayAccount&amp;ID=<?php echo $row["ID"] ?>"><?php echo __("Edit") ?></a> <a href="<?php echo get_uri('/account/'); ?>?Action=DisplayAccount&amp;ID=<?php echo $row["ID"] ?>"><?php echo __("Edit") ?></a>
<?php endif; ?> <?php endif; ?>
</td> </td>
</tr> </tr>
@ -63,7 +63,7 @@ else:
<table class="results"> <table class="results">
<tr> <tr>
<td align="left"> <td align="left">
<form action="account.php" method="post"> <form action="<?php echo get_uri('/account/'); ?>" method="post">
<fieldset> <fieldset>
<input type="hidden" name="Action" value="SearchAccounts" /> <input type="hidden" name="Action" value="SearchAccounts" />
<input type="hidden" name="O" value="<?php echo ($OFFSET-$HITS_PER_PAGE) ?>" /> <input type="hidden" name="O" value="<?php echo ($OFFSET-$HITS_PER_PAGE) ?>" />
@ -78,7 +78,7 @@ else:
</form> </form>
</td> </td>
<td align="right"> <td align="right">
<form action="account.php" method="post"> <form action="<?php echo get_uri('/account/'); ?>" method="post">
<fieldset> <fieldset>
<input type="hidden" name="Action" value="SearchAccounts" /> <input type="hidden" name="Action" value="SearchAccounts" />
<input type="hidden" name="O" value="<?php echo ($OFFSET+$HITS_PER_PAGE) ?>" /> <input type="hidden" name="O" value="<?php echo ($OFFSET+$HITS_PER_PAGE) ?>" />

View file

@ -1,5 +1,5 @@
<div class="box"> <div class="box">
<form action="packages.php?ID=<?php echo $row['ID'] ?>" method="post"> <form action="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $row['ID'] ?>" method="post">
<fieldset> <fieldset>
<input type="hidden" name="IDs[<?php echo $row['ID'] ?>]" value="1" /> <input type="hidden" name="IDs[<?php echo $row['ID'] ?>]" value="1" />
<input type="hidden" name="ID" value="<?php echo $row['ID'] ?>" /> <input type="hidden" name="ID" value="<?php echo $row['ID'] ?>" />

View file

@ -8,7 +8,7 @@
<link rel='stylesheet' type='text/css' href='/css/archweb.css' /> <link rel='stylesheet' type='text/css' href='/css/archweb.css' />
<link rel='stylesheet' type='text/css' href='/css/aur.css' /> <link rel='stylesheet' type='text/css' href='/css/aur.css' />
<link rel='shortcut icon' href='/images/favicon.ico' /> <link rel='shortcut icon' href='/images/favicon.ico' />
<link rel='alternate' type='application/rss+xml' title='Newest Packages RSS' href='rss.php' /> <link rel='alternate' type='application/rss+xml' title='Newest Packages RSS' href='<?php echo get_uri('/rss/'); ?>' />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head> </head>
<body> <body>
@ -50,17 +50,17 @@
</div> </div>
<div id="archdev-navbar"> <div id="archdev-navbar">
<ul> <ul>
<li><a href="index.php">AUR <?php print __("Home"); ?></a></li> <li><a href="<?php echo get_uri('/'); ?>">AUR <?php print __("Home"); ?></a></li>
<li><a href="packages.php"><?php print __("Packages"); ?></a></li> <li><a href="<?php echo get_uri('/packages/'); ?>"><?php print __("Packages"); ?></a></li>
<?php if (isset($_COOKIE['AURSID'])): ?> <?php if (isset($_COOKIE['AURSID'])): ?>
<li><a href="packages.php?SeB=m&amp;K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li> <li><a href="<?php echo get_uri('/packages/'); ?>?SeB=m&amp;K=<?php print username_from_sid($_COOKIE["AURSID"]); ?>"><?php print __("My Packages"); ?></a></li>
<li><a href="pkgsubmit.php"><?php print __("Submit"); ?></a></li> <li><a href="<?php echo get_uri('/submit/'); ?>"><?php print __("Submit"); ?></a></li>
<li><a href="account.php"><?php print __("Accounts"); ?></a></li> <li><a href="<?php echo get_uri('/accounts/'); ?>"><?php print __("Accounts"); ?></a></li>
<?php if (check_user_privileges()): ?><li><a href="tu.php"><?php print __("Trusted User"); ?></a></li><?php endif; ?> <?php if (check_user_privileges()): ?><li><a href="<?php echo get_uri('/tu/'); ?>"><?php print __("Trusted User"); ?></a></li><?php endif; ?>
<li><a href="logout.php"><?php print __("Logout"); ?></a></li> <li><a href="<?php echo get_uri('/logout/'); ?>"><?php print __("Logout"); ?></a></li>
<?php else: ?> <?php else: ?>
<li><a href="account.php"><?php print __("Register"); ?></a></li> <li><a href="<?php echo get_uri('/register/'); ?>"><?php print __("Register"); ?></a></li>
<li><a href="login.php"><?php print __("Login"); ?></a></li> <li><a href="<?php echo get_uri('/login/'); ?>"><?php print __("Login"); ?></a></li>
<?php endif; ?> <?php endif; ?>
</ul> </ul>
</div><!-- #archdev-navbar --> </div><!-- #archdev-navbar -->

View file

@ -10,11 +10,11 @@ $count = package_comments_count($_GET['ID']);
<?php while (list($indx, $row) = each($comments)): ?> <?php while (list($indx, $row) = each($comments)): ?>
<?php if ($SID): <?php if ($SID):
$row['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$row['UsersID']}\">{$row['UserName']}</a>"; $row['UserName'] = "<a href=\"<?php echo get_uri('/account/'); ?>?Action=AccountInfo&amp;ID={$row['UsersID']}\">{$row['UserName']}</a>";
endif; ?> endif; ?>
<h4> <h4>
<?php if (canDeleteCommentArray($row, $atype, $uid)): ?> <?php if (canDeleteCommentArray($row, $atype, $uid)): ?>
<form method="post" action="packages.php?ID=<?php echo $row['ID'] ?>"> <form method="post" action="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $row['ID'] ?>">
<fieldset style="display:inline;"> <fieldset style="display:inline;">
<input type="hidden" name="action" value="do_DeleteComment" /> <input type="hidden" name="action" value="do_DeleteComment" />
<input type="hidden" name="comment_id" value="<?php echo $row['ID'] ?>" /> <input type="hidden" name="comment_id" value="<?php echo $row['ID'] ?>" />

View file

@ -57,7 +57,7 @@ if ($SID && ($uid == $row["MaintainerUID"] ||
($atype == "Developer" || $atype == "Trusted User"))): ($atype == "Developer" || $atype == "Trusted User"))):
?> ?>
<td> <td>
<form method="post" action="packages.php?ID=<?php echo $pkgid ?>"> <form method="post" action="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $pkgid ?>">
<div> <div>
<input type="hidden" name="action" value="do_ChangeCategory" /> <input type="hidden" name="action" value="do_ChangeCategory" />
<?php if ($SID): ?> <?php if ($SID): ?>
@ -75,7 +75,7 @@ if ($SID && ($uid == $row["MaintainerUID"] ||
</form> </form>
<?php else: ?> <?php else: ?>
<td> <td>
<a href="packages.php?C=<?php echo $row['CategoryID'] ?>"><?php print $row['Category'] ?></a> <a href="<?php echo get_uri('/packages/'); ?>?C=<?php echo $row['CategoryID'] ?>"><?php print $row['Category'] ?></a>
<?php endif; ?> <?php endif; ?>
</td> </td>
<tr> <tr>
@ -88,7 +88,7 @@ if ($SID && ($uid == $row["MaintainerUID"] ||
if ($row["SubmitterUID"]): if ($row["SubmitterUID"]):
if ($SID): if ($SID):
?> ?>
<td><a href="account.php?Action=AccountInfo&amp;ID=<?php echo htmlspecialchars($row['SubmitterUID'], ENT_QUOTES) ?>" title="<?php echo __('View account information for')?> <?php echo htmlspecialchars($submitter) ?>"><?php echo htmlspecialchars($submitter) ?></a></td> <td><a href="<?php echo get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?php echo htmlspecialchars($row['SubmitterUID'], ENT_QUOTES) ?>" title="<?php echo __('View account information for')?> <?php echo htmlspecialchars($submitter) ?>"><?php echo htmlspecialchars($submitter) ?></a></td>
<?php else: ?> <?php else: ?>
<td><?php echo htmlspecialchars($submitter) ?></td> <td><?php echo htmlspecialchars($submitter) ?></td>
<?php endif; ?> <?php endif; ?>
@ -101,7 +101,7 @@ if ($row["SubmitterUID"]):
if ($row["MaintainerUID"]): if ($row["MaintainerUID"]):
if ($SID): if ($SID):
?> ?>
<td><a href="account.php?Action=AccountInfo&amp;ID=<?php echo htmlspecialchars($row['MaintainerUID'], ENT_QUOTES) ?>" title="<?php echo __('View account information for')?> <?php echo htmlspecialchars($maintainer) ?>"><?php echo htmlspecialchars($maintainer) ?></a></td> <td><a href="<?php echo get_uri('/account/'); ?>?Action=AccountInfo&amp;ID=<?php echo htmlspecialchars($row['MaintainerUID'], ENT_QUOTES) ?>" title="<?php echo __('View account information for')?> <?php echo htmlspecialchars($maintainer) ?>"><?php echo htmlspecialchars($maintainer) ?></a></td>
<?php else: ?> <?php else: ?>
<td><?php echo htmlspecialchars($maintainer) ?></td> <td><?php echo htmlspecialchars($maintainer) ?></td>
<?php endif; ?> <?php endif; ?>
@ -114,7 +114,7 @@ if ($row["MaintainerUID"]):
<?php <?php
if ($atype == "Developer" || $atype == "Trusted User"): if ($atype == "Developer" || $atype == "Trusted User"):
?> ?>
<td><a href="voters.php?ID=<?php echo$pkgid ?>"><?php echo $votes ?></a> <td><a href="<?php echo get_uri('/voters/'); ?>?ID=<?php echo$pkgid ?>"><?php echo $votes ?></a>
<?php else: ?> <?php else: ?>
<td><?php echo $votes ?></td> <td><?php echo $votes ?></td>
<?php endif; ?> <?php endif; ?>
@ -139,7 +139,7 @@ if ($atype == "Developer" || $atype == "Trusted User"):
# darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist # darr: (DepName, DepCondition, PackageID), where ID is NULL if it didn't exist
if (!is_null($darr[2])): if (!is_null($darr[2])):
?> ?>
<li><a href="packages.php?ID=<?php echo $darr[2]?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1]?>"><?php echo $darr[0].$darr[1]?></a></li> <li><a href="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $darr[2]?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1]?>"><?php echo $darr[0].$darr[1]?></a></li>
<?php else: ?> <?php else: ?>
<li><a href="http://www.archlinux.org/packages/?q=<?php echo urlencode($darr[0])?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1] ?>"><?php echo $darr[0].$darr[1] ?></a></li> <li><a href="http://www.archlinux.org/packages/?q=<?php echo urlencode($darr[0])?>" title="<?php echo __('View packages details for').' '.$darr[0].$darr[1] ?>"><?php echo $darr[0].$darr[1] ?></a></li>
<?php endif; ?> <?php endif; ?>
@ -155,7 +155,7 @@ if ($atype == "Developer" || $atype == "Trusted User"):
# darr: (PackageName, PackageID) # darr: (PackageName, PackageID)
while (list($k, $darr) = each($requiredby)): while (list($k, $darr) = each($requiredby)):
?> ?>
<li><a href="packages.php?ID=<?php echo $darr[1] ?>" title="<?php echo __('View packages details for').' '.$darr[0]?>"><?php echo $darr[0] ?></a></li> <li><a href="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $darr[1] ?>" title="<?php echo __('View packages details for').' '.$darr[0]?>"><?php echo $darr[0] ?></a></li>
<?php endwhile; ?> <?php endwhile; ?>
</ul> </ul>
<?php endif; ?> <?php endif; ?>

View file

@ -36,7 +36,7 @@ $pages = array(50, 100, 250);
<div id="pkglist-search" class="box filter-criteria"> <div id="pkglist-search" class="box filter-criteria">
<h2><?php print __("Search Criteria"); ?></h2> <h2><?php print __("Search Criteria"); ?></h2>
<form action='packages.php' method='get'> <form action='<?php echo get_uri('/packages/'); ?>' method='get'>
<p><input type='hidden' name='O' value='0' /></p> <p><input type='hidden' name='O' value='0' /></p>
<fieldset> <fieldset>

View file

@ -20,13 +20,13 @@ if (!$result): ?>
<?php elseif ($pagestart + 1 == $first): ?> <?php elseif ($pagestart + 1 == $first): ?>
<span class="page"><?php echo $pagenr ?></span> <span class="page"><?php echo $pagenr ?></span>
<?php else: ?> <?php else: ?>
<a class="page" href="packages.php?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a> <a class="page" href="<?php echo get_uri('/packages/'); ?>?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</p> </p>
</div> </div>
<form id="pkglist-results-form" method="post" action="packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>"> <form id="pkglist-results-form" method="post" action="<?php echo get_uri('/packages/'); ?>?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>">
<table class="results"> <table class="results">
<thead> <thead>
<tr> <tr>
@ -52,7 +52,7 @@ if (!$result): ?>
<td><input type="checkbox" name="IDs[<?php echo $row["ID"] ?>]" value="1" /></td> <td><input type="checkbox" name="IDs[<?php echo $row["ID"] ?>]" value="1" /></td>
<?php endif; ?> <?php endif; ?>
<td><?php echo htmlspecialchars($row["Category"]) ?></td> <td><?php echo htmlspecialchars($row["Category"]) ?></td>
<td><a href="packages.php?ID=<?php echo $row["ID"] ?>"><?php echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]) ?></a></td> <td><a href="<?php echo get_uri('/packages/'); ?>?ID=<?php echo $row["ID"] ?>"><?php echo htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]) ?></a></td>
<td><?php echo $row["NumVotes"] ?></td> <td><?php echo $row["NumVotes"] ?></td>
<?php if ($SID): ?> <?php if ($SID): ?>
<td> <td>
@ -69,7 +69,7 @@ if (!$result): ?>
<td><?php echo htmlspecialchars($row['Description'], ENT_QUOTES); ?></td> <td><?php echo htmlspecialchars($row['Description'], ENT_QUOTES); ?></td>
<td> <td>
<?php if (isset($row["Maintainer"])): ?> <?php if (isset($row["Maintainer"])): ?>
<a href="packages.php?K=<?php echo htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m"><?php echo htmlspecialchars($row['Maintainer']) ?></a> <a href="<?php echo get_uri('/packages/'); ?>?K=<?php echo htmlspecialchars($row['Maintainer'], ENT_QUOTES) ?>&amp;SeB=m"><?php echo htmlspecialchars($row['Maintainer']) ?></a>
<?php else: ?> <?php else: ?>
<span><?php echo __("orphan") ?></span> <span><?php echo __("orphan") ?></span>
<?php endif; ?> <?php endif; ?>
@ -90,7 +90,7 @@ if (!$result): ?>
<?php elseif ($pagestart + 1 == $first): ?> <?php elseif ($pagestart + 1 == $first): ?>
<span class="page"><?php echo $pagenr ?></span> <span class="page"><?php echo $pagenr ?></span>
<?php else: ?> <?php else: ?>
<a class="page" href="packages.php?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a> <a class="page" href="<?php echo get_uri('/packages/'); ?>?<?php echo mkurl('O=' . $pagestart) ?>"><?php echo $pagenr ?></a>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</p> </p>

View file

@ -1,5 +1,5 @@
<br /> <br />
<form action="account.php" method="post"> <form action="<?php echo get_uri('/account/'); ?>" method="post">
<table> <table>
<tr> <tr>

View file

@ -6,7 +6,7 @@
<?php foreach ($newest_packages->getIterator() as $row): ?> <?php foreach ($newest_packages->getIterator() as $row): ?>
<tr> <tr>
<td> <td>
<a href="packages.php?ID=<?php print intval($row["ID"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a> <a href="<?php echo get_uri('/packages/'); ?>?ID=<?php print intval($row["ID"]); ?>"><?php print htmlspecialchars($row["Name"]) . ' ' . htmlspecialchars($row["Version"]); ?></a>
</td> </td>
<td> <td>
<span><?php print gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span> <span><?php print gmdate("Y-m-d H:i", intval($row["ModifiedTS"])); ?></span>

View file

@ -7,14 +7,14 @@ $username = username_from_sid($_COOKIE["AURSID"]);
<table> <table>
<tr> <tr>
<td> <td>
<a href="packages.php?SeB=m&amp;L=2&amp;K=<?php echo $username; ?>"> <a href="<?php echo get_uri('/packages/'); ?>?SeB=m&amp;L=2&amp;K=<?php echo $username; ?>">
<?php print __("Packages in unsupported"); ?></a> <?php print __("Packages in unsupported"); ?></a>
</td> </td>
<td><?php print $maintainer_unsupported_count; ?></td> <td><?php print $maintainer_unsupported_count; ?></td>
</tr> </tr>
<tr> <tr>
<td> <td>
<a href="packages.php?SeB=m&amp;outdated=on&amp;K=<?php echo $username; ?>"><?php print __("Out of Date"); ?></a> <a href="<?php echo get_uri('/packages/'); ?>?SeB=m&amp;outdated=on&amp;K=<?php echo $username; ?>"><?php print __("Out of Date"); ?></a>
</td> </td>
<td><?php echo $flagged_outdated ?></td> <td><?php echo $flagged_outdated ?></td>
</tr> </tr>

View file

@ -11,7 +11,7 @@
<?php echo __("User") ?>: <?php echo __("User") ?>:
<b> <b>
<?php if (!empty($row['User'])): ?> <?php if (!empty($row['User'])): ?>
<a href="packages.php?K=<?php print $row['User'] ?>&amp;SeB=m"><?php print $row['User'] ?></a> <a href="<?php echo get_uri('/packages/'); ?>?K=<?php print $row['User'] ?>&amp;SeB=m"><?php print $row['User'] ?></a>
<?php else: ?> <?php else: ?>
N/A N/A
<?php endif; ?> <?php endif; ?>
@ -61,7 +61,7 @@
<div class="box"> <div class="box">
<?php if ($canvote == 1): ?> <?php if ($canvote == 1): ?>
<form action="tu.php?id=<?php print $row['ID'] ?>" method="post"> <form action="<?php echo get_uri('/tu/'); ?>?id=<?php print $row['ID'] ?>" method="post">
<fieldset> <fieldset>
<input type="submit" class="button" name="voteYes" value="<?php print __("Yes") ?>" /> <input type="submit" class="button" name="voteYes" value="<?php print __("Yes") ?>" />
<input type="submit" class="button" name="voteNo" value="<?php print __("No") ?>" /> <input type="submit" class="button" name="voteNo" value="<?php print __("No") ?>" />

View file

@ -25,13 +25,13 @@
?> ?>
<tr class="<?php print $c ?>"> <tr class="<?php print $c ?>">
<td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?> <td><?php $row["Agenda"] = htmlspecialchars(substr($row["Agenda"], 0, $prev_Len)); ?>
<a href="tu.php?id=<?php print $row['ID'] ?>"><?php print $row["Agenda"] ?></a></span></span> <a href="<?php echo get_uri('/tu/'); ?>?id=<?php print $row['ID'] ?>"><?php print $row["Agenda"] ?></a></span></span>
</td> </td>
<td><?php print gmdate("Y-m-d", $row["Submitted"]) ?></td> <td><?php print gmdate("Y-m-d", $row["Submitted"]) ?></td>
<td><?php print gmdate("Y-m-d", $row["End"]) ?></td> <td><?php print gmdate("Y-m-d", $row["End"]) ?></td>
<td> <td>
<?php if (!empty($row['User'])): ?> <?php if (!empty($row['User'])): ?>
<a href="packages.php?K=<?php echo $row['User'] ?>&amp;SeB=m"><?php echo $row['User'] ?></a> <a href="<?php echo get_uri('/packages/'); ?>?K=<?php echo $row['User'] ?>&amp;SeB=m"><?php echo $row['User'] ?></a>
<?php else: <?php else:
print "N/A"; print "N/A";
endif; endif;