From 7ab02831465a57d4816198bab91fdd9d6bf1f1a5 Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Mon, 19 Nov 2018 08:48:11 +0000 Subject: [PATCH 1/6] Fix banana award system --- lib/banana-admin.php | 10 +++++----- templates/banana-award.tpl | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/banana-admin.php b/lib/banana-admin.php index 8df49d4..e608987 100644 --- a/lib/banana-admin.php +++ b/lib/banana-admin.php @@ -23,10 +23,10 @@ if (isset($session->groups[$permission])) { $smarty->assign("banana_admin", TRUE); if ($_REQUEST['action'] == "award") { - if (trim($_POST['why']) !== "") { - $number = intval($_POST['number']); + if (trim($_REQUEST['why']) !== "") { + $number = intval($_REQUEST['number']); - $why = $_POST['why']; + $why = $_REQUEST['why']; if ((abs($number) <= $maxbanana) && $number) { @@ -46,8 +46,8 @@ if (isset($session->groups[$permission])) { } } elseif ($session->loggedin) { if ($_REQUEST['action'] == "award") { - $number = intval($_POST['number']); - $why = $_POST['why']; + $number = intval($_REQUEST['number']); + $why = $_REQUEST['why']; // Send a mail to someone about them bananas $msgbody = $session->username . " thinks $who deserves $number bananas:\r\n"; diff --git a/templates/banana-award.tpl b/templates/banana-award.tpl index e6f6820..a077c77 100644 --- a/templates/banana-award.tpl +++ b/templates/banana-award.tpl @@ -17,7 +17,7 @@

Please tell us if you think this user has done something good recently (deserving yellowy recognition) or something dumb (deserving of greenish derision)

{/if} -
+
@@ -33,7 +33,7 @@

Why

- +
-- GitLab From 9fa6882df44d3e6f1ecf9f0bbe8c31132df36c37 Mon Sep 17 00:00:00 2001 From: Laurence Sebastian Bowes Date: Wed, 21 Nov 2018 14:39:07 +0000 Subject: [PATCH 2/6] Make signup send one email, and fix some grammar that has been annoying me since I joined --- components/signup.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/components/signup.php b/components/signup.php index 31633b9..1835f09 100644 --- a/components/signup.php +++ b/components/signup.php @@ -167,7 +167,7 @@ if (isset($_REQUEST['signupid']) && isset($_REQUEST['signuppw'])) { mail( $error_email, "Signup Error", - "User " . $fields['username'] . " already exists in the databse, THIS SHOULD NEVER HAPPEN\n Love the signup system.\n\nP.S. the signup id is: " . $signupid, + "User " . $fields['username'] . " already exists in the database, THIS SHOULD NEVER HAPPEN\n Love, the signup system.\n\nP.S. the signup id is: " . $signupid, "From: \"SUCS Admin\" " ); $failed = true; @@ -251,16 +251,10 @@ if (isset($_REQUEST['signupid']) && isset($_REQUEST['signuppw'])) { if ($override) { $logsmessage .= "User " . $session->username . " overrode validation.\n"; } - $logsmessage .= "Love The Signup System"; + $logsmessage .= "Love, The Signup System"; // DEV: CHANGE THIS EMAIL ADDRESS mail( - "logs@sucs.org", - "User '" . $fields['username'] . "' Created on SUCS", - $logsmessage, - "From: \"SUCS Admin\" " - ); - mail( - "treasurer@sucs.org", + "logs@sucs.org,treasurer@sucs.org", "User '" . $fields['username'] . "' Created on SUCS", $logsmessage, "From: \"SUCS Admin\" " @@ -335,7 +329,7 @@ if (isset($_REQUEST['signupid']) && isset($_REQUEST['signuppw'])) { foreach ($errorreparray as $key => $value) { $errorreport .= $key . ": " . $value . "\n"; } - $errorreport .= "\nLove from the Signup System"; + $errorreport .= "\nLove, the Signup System"; mail( $error_email, "Signup system error report", -- GitLab From 949b18958db8b1fdbbfe24653fed4fb87e6a13a9 Mon Sep 17 00:00:00 2001 From: Imran Hussain Date: Wed, 21 Nov 2018 17:23:31 +0000 Subject: [PATCH 3/6] We would like to thank ~rollercow for everything he has done for the soc, his input is always useful. --- static/About/Staff.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/About/Staff.txt b/static/About/Staff.txt index b4bd1a5..c537f20 100644 --- a/static/About/Staff.txt +++ b/static/About/Staff.txt @@ -28,7 +28,6 @@

Additional Staff

If you're trying to contact the Admin team please email admin@