diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-12-13 15:28:05 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-12-13 15:28:54 +0100 |
commit | 5ebf534ba7e90ccb12007c137ecea1cfcc4876da (patch) | |
tree | 7bee294ccb46e920288990d6fe1b2f6c46c2cd6f /web/lib/pkgbasefuncs.inc.php | |
parent | aa2724bbfee4b2504a4e9d27e06037639c3bc3cc (diff) | |
download | aur-5ebf534ba7e90ccb12007c137ecea1cfcc4876da.tar.gz aur-5ebf534ba7e90ccb12007c137ecea1cfcc4876da.tar.xz |
Avoid double slashes in notification email body
Refactor some of the URI generation code to avoid double slashes in
absolute URIs.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/pkgbasefuncs.inc.php')
-rw-r--r-- | web/lib/pkgbasefuncs.inc.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 9cdd8a3a..708f861f 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -131,8 +131,7 @@ function pkgbase_add_comment($base_id, $uid, $comment) { * work, users would be getting emails in the language that the * user who posted the comment was in. */ - $body = - 'from ' . aur_location() . get_pkgbase_uri($row['Name']) . "\n" + $body = 'from ' . get_pkgbase_uri($row['Name'], true) . "\n" . username_from_sid($_COOKIE['AURSID']) . " wrote:\n\n" . $comment . "\n\n---\nIf you no longer wish to receive notifications about this package, please go the the above package page and click the UnNotify button."; @@ -380,7 +379,7 @@ function pkgbase_flag($base_ids) { $result = $dbh->query($q); if ($result) { while ($row = $result->fetch(PDO::FETCH_ASSOC)) { - $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_pkgbase_uri($row['Name']) . "\n\n[1] - " . aur_location() . get_user_uri($f_name); + $body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . " [1]. You may view your package at:\n" . get_pkgbase_uri($row['Name'], true) . "\n\n[1] - " . get_user_uri($f_name, true); $body = wordwrap($body, 70); $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . |