Commit 5f85bd0d authored by Laurence Sebastian Bowes's avatar Laurence Sebastian Bowes
Browse files

Make the previous commit a little more robust and add some comments

parent 54d868d5
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ if (count($members->memberView($who)) > 0) {
    header("Location: https://$preferred_hostname$baseurl/Community/Members/$who");
} else {
    // banana admin bits
	// Tell the banana library that the person/organisation/thing we're dealing with isn't a SUCS member
	$isnonmember = true;
    if ($mode == "detail") {
        if ($session->loggedin) {
+3 −1
Original line number Diff line number Diff line
@@ -33,6 +33,8 @@ if ($session->loggedin) {
            $smarty->assign('who', $usernames[0]['uid']);
            // Add banana widget to the sidebar
			$who = $usernames[0]['uid'];
			//Tell the banana library that we're dealing with a real member
			$isnonmember = false;
            include("../lib/banana-admin.php");
            // Needs Redirection
            if ($uid) {
+1 −0
Original line number Diff line number Diff line
@@ -51,6 +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";
		//Make sure we send out the right link depending on whether they are a member or not
        $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);