diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-14 01:24:59 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2012-07-15 22:44:51 +0200 |
commit | 2425f963f8ad45292c217914b5fee1ed18104c26 (patch) | |
tree | 9dd5bcd1d4c95d9bbe8a5d96cd9f6610bd665787 /web/html | |
parent | a03c684ecd51327f9c6921a6e0001d82e3223799 (diff) | |
download | aurweb-2425f963f8ad45292c217914b5fee1ed18104c26.tar.xz |
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>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/addvote.php | 2 | ||||
-rw-r--r-- | web/html/home.php | 2 | ||||
-rw-r--r-- | web/html/login.php | 4 | ||||
-rw-r--r-- | web/html/logout.php | 2 | ||||
-rw-r--r-- | web/html/passreset.php | 6 | ||||
-rw-r--r-- | web/html/pkgsubmit.php | 4 | ||||
-rw-r--r-- | web/html/tu.php | 8 | ||||
-rw-r--r-- | web/html/voters.php | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/web/html/addvote.php b/web/html/addvote.php index d3bd7d4..d1cd809 100644 --- a/web/html/addvote.php +++ b/web/html/addvote.php @@ -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); } ?>" /> diff --git a/web/html/home.php b/web/html/home.php index 48f5e00..df112b8 100644 --- a/web/html/home.php +++ b/web/html/home.php @@ -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" /> diff --git a/web/html/login.php b/web/html/login.php index 7f4f342..9c6a546 100644 --- a/web/html/login.php +++ b/web/html/login.php @@ -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> diff --git a/web/html/logout.php b/web/html/logout.php index fe8ffb0..835f1c9 100644 --- a/web/html/logout.php +++ b/web/html/logout.php @@ -20,5 +20,5 @@ if (isset($_COOKIE["AURSID"])) { clear_expired_sessions($dbh); } -header('Location: index.php'); +header('Location: /'); diff --git a/web/html/passreset.php b/web/html/passreset.php index cb88e5a..9fca505 100644 --- a/web/html/passreset.php +++ b/web/html/passreset.php @@ -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(); } diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 65e2f6d..8c93b0c 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -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" /> diff --git a/web/html/tu.php b/web/html/tu.php index 8619903..084a223 100644 --- a/web/html/tu.php +++ b/web/html/tu.php @@ -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); diff --git a/web/html/voters.php b/web/html/voters.php index 231e323..378e605 100644 --- a/web/html/voters.php +++ b/web/html/voters.php @@ -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> |