summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgfuncs.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2012-07-14 01:24:59 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2012-07-15 22:44:51 +0200
commit2425f963f8ad45292c217914b5fee1ed18104c26 (patch)
tree9dd5bcd1d4c95d9bbe8a5d96cd9f6610bd665787 /web/lib/pkgfuncs.inc.php
parenta03c684ecd51327f9c6921a6e0001d82e3223799 (diff)
downloadaurweb-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/lib/pkgfuncs.inc.php')
-rw-r--r--web/lib/pkgfuncs.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 0009b93..bdf8976 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -238,7 +238,7 @@ function add_package_comment($pkgid, $uid, $comment, $dbh=NULL) {
# 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
$body =
- 'from ' . $AUR_LOCATION . '/packages.php?ID='
+ 'from ' . $AUR_LOCATION . '/' . get_uri('/packages/') . '?ID='
. $pkgid . "\n"
. username_from_sid($_COOKIE['AURSID'], $dbh) . " wrote:\n\n"
. $comment
@@ -744,7 +744,7 @@ function pkg_flag ($atype, $ids, $action=true, $dbh=NULL) {
if (mysql_num_rows($result)) {
while ($row = mysql_fetch_assoc($result)) {
# 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);
$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);
@@ -813,7 +813,7 @@ function pkg_delete ($atype, $ids, $mergepkgid, $dbh=NULL) {
$body = "";
if ($mergepkgid) {
$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 {
$body .= username_from_sid($_COOKIE['AURSID']) . " deleted \"".$pkgname."\".\n\n";
$body .= "You will no longer receive notifications about this package.";