[SUCS Devel] [Git][sucssite/sucs-site][master] Fix sending out broken links in banana emails

Laurence Sebastian Bowes elbows at sucs.org
Wed Nov 11 15:42:14 GMT 2015


Laurence Sebastian Bowes pushed to branch master at sucssite / sucs-site


Commits:
54d868d5 by Laurence Sebastian Bowes at 2015-11-11T15:42:05Z
Fix sending out broken links in banana emails

- - - - -


2 changed files:

- components/bananas.php
- lib/banana-admin.php


Changes:

=====================================
components/bananas.php
=====================================
--- a/components/bananas.php
+++ b/components/bananas.php
@@ -24,6 +24,7 @@ if (count($members->memberView($who)) > 0) {
     header("Location: https://$preferred_hostname$baseurl/Community/Members/$who");
 } else {
     // banana admin bits
+	$isnonmember = true;
     if ($mode == "detail") {
         if ($session->loggedin) {
             include("../lib/banana-admin.php");
@@ -37,7 +38,6 @@ if (count($members->memberView($who)) > 0) {
 if (isset($who))
     $smarty->assign('who', "$who");
 
-
 $smarty->assign('mode', "$mode");
 $smarty->assign('users', $users);
 


=====================================
lib/banana-admin.php
=====================================
--- a/lib/banana-admin.php
+++ b/lib/banana-admin.php
@@ -51,7 +51,7 @@ if (isset($session->groups[$permission])) {
 
         // Send a mail to someone about them bananas
         $msgbody = $session->username . " thinks $who deserves $number bananas:\r\n";
-        $msgbody .= "\"$why\"\r\n\r\nVisit https://sucs.org/Community/Members/$who if you want to make an award.";
+        $msgbody .= "\"$why\"\r\n\r\nVisit https://sucs.org/Community/" . ($isnonmember ? 'Bananas' : 'Members') . "/$who if you want to make an award.";
         mail($contact, "Banana Award Nomination", $msgbody, $msgheaders);
         $smarty->assign("awarded", TRUE);
 



View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/commit/54d868d554fb85506547a84754515092ccde2483
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20151111/1c248d71/attachment.html>


More information about the Devel mailing list