mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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:
parent
a03c684ecd
commit
2425f963f8
24 changed files with 61 additions and 61 deletions
|
@ -68,7 +68,7 @@ if ($atype == "Trusted User" || $atype == "Developer") {
|
|||
<div class="box">
|
||||
<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>
|
||||
<b><?php print __("Applicant/TU") ?></b>
|
||||
<input type="text" name="user" value="<?php if (!empty($_POST['user'])) { print htmlentities($_POST['user'], ENT_QUOTES); } ?>" />
|
||||
|
|
|
@ -91,7 +91,7 @@ $dbh = db_connect();
|
|||
</div>
|
||||
<div id="content-right">
|
||||
<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>
|
||||
<label for="pkgsearch-field">Package Search:</label>
|
||||
<input type="hidden" name="O" value="0" />
|
||||
|
|
|
@ -17,7 +17,7 @@ html_header('AUR ' . __("Login"));
|
|||
<?php if (isset($_COOKIE["AURSID"])): ?>
|
||||
<p>
|
||||
<?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>
|
||||
<?php elseif (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])): ?>
|
||||
<form method="post" action="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES) ?>">
|
||||
|
@ -40,7 +40,7 @@ html_header('AUR ' . __("Login"));
|
|||
</p>
|
||||
<p>
|
||||
<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>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
@ -20,5 +20,5 @@ if (isset($_COOKIE["AURSID"])) {
|
|||
clear_expired_sessions($dbh);
|
||||
}
|
||||
|
||||
header('Location: index.php');
|
||||
header('Location: /');
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ set_lang(); # this sets up the visitor's language
|
|||
check_sid(); # see if they're still logged in
|
||||
|
||||
if (isset($_COOKIE["AURSID"])) {
|
||||
header('Location: index.php');
|
||||
header('Location: /');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
@ -48,14 +48,14 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
|
|||
'your password follow the link below, otherwise ignore '.
|
||||
'this message and nothing will happen.').
|
||||
"\n\n".
|
||||
"{$AUR_LOCATION}/passreset.php?".
|
||||
"{$AUR_LOCATION}/" . get_uri('/passreset/') . "?".
|
||||
"resetkey={$resetkey}";
|
||||
$body = wordwrap($body, 70);
|
||||
$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);
|
||||
|
||||
}
|
||||
header('Location: passreset.php?step=confirm');
|
||||
header('Location: ' . get_uri('/passreset/') . '?step=confirm');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
@ -400,7 +400,7 @@ if ($uid):
|
|||
# Entire package creation process is atomic
|
||||
end_atomic_commit($dbh);
|
||||
|
||||
header('Location: packages.php?ID=' . $packageID);
|
||||
header('Location: ' . get_uri('/packages/') . '?ID=' . $packageID);
|
||||
}
|
||||
|
||||
chdir($cwd);
|
||||
|
@ -429,7 +429,7 @@ html_header("Submit");
|
|||
$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>
|
||||
<div>
|
||||
<input type="hidden" name="pkgsubmit" value="1" />
|
||||
|
|
|
@ -116,17 +116,17 @@ if ($atype == "Trusted User" || $atype == "Developer") {
|
|||
$nextresult = proposal_count();
|
||||
?>
|
||||
<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):
|
||||
$by = htmlentities($by, ENT_QUOTES); ?>
|
||||
<?php if ($off != 0):
|
||||
$back = (($off - $limit) <= 0) ? 0 : $off - $limit; ?>
|
||||
<a href='tu.php?off=<?php print $back ?>&by=<?php print $by ?>'><?php print __("Back") ?></a>
|
||||
<a href='<?php echo get_uri('/tu/'); ?>?off=<?php print $back ?>&by=<?php print $by ?>'><?php print __("Back") ?></a>
|
||||
<?php endif; ?>
|
||||
<?php if (($off + $limit) < $nextresult):
|
||||
$forw = $off + $limit; ?>
|
||||
<a href="tu.php?off=<?php print $forw ?>&by=<?php print $by ?>"><?php print __("Next") ?></a>
|
||||
<a href="<?php echo get_uri('/tu/'); ?>?off=<?php print $forw ?>&by=<?php print $by ?>"><?php print __("Next") ?></a>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
@ -134,7 +134,7 @@ if ($atype == "Trusted User" || $atype == "Developer") {
|
|||
}
|
||||
}
|
||||
else {
|
||||
header('Location: index.php');
|
||||
header('Location: /');
|
||||
}
|
||||
|
||||
html_footer(AUR_VERSION);
|
||||
|
|
|
@ -15,12 +15,12 @@ if ($atype == 'Trusted User' || $atype== 'Developer'):
|
|||
?>
|
||||
|
||||
<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">
|
||||
|
||||
<?php
|
||||
while (list($indx, $row) = each($votes)): ?>
|
||||
<a href="account.php?Action=AccountInfo&ID=<?php echo $row['UsersID'] ?>"><?php echo htmlspecialchars($row['Username']) ?></a><br />
|
||||
<a href="<?php echo get_uri('/account/'); ?>?Action=AccountInfo&ID=<?php echo $row['UsersID'] ?>"><?php echo htmlspecialchars($row['Username']) ?></a><br />
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue