diff --git a/sections/staff/index.php b/sections/staff/index.php index 6b351bb8..782dd04b 100644 --- a/sections/staff/index.php +++ b/sections/staff/index.php @@ -3,6 +3,7 @@ show_header('Staff'); include(SERVER_ROOT.'/sections/staff/functions.php'); +include(SERVER_ROOT.'/sections/staffpm/functions.php'); $SupportStaff = get_support(); list($FrontLineSupport, $ForumStaff, $Staff) = $SupportStaff; @@ -13,32 +14,12 @@

Contact Staff

-

If you are looking for help with a general question, we appreciate it if you would only message through the staff inbox, where we can all help you.

-

You can do that by sending a message to the Staff Inbox.

+

You can do that by sending a message to the Staff Inbox.

+ +

First-line Support

These users are not official staff members - they're users who have volunteered their time to help people in need. Please treat them with respect and read this before contacting them.

diff --git a/sections/staffpm/assign.php b/sections/staffpm/assign.php index efa7f662..7ce8ea4f 100644 --- a/sections/staffpm/assign.php +++ b/sections/staffpm/assign.php @@ -11,10 +11,25 @@ if ($Level == 0) { // FLS conversation, assign to staff (moderator) - $DB->query("UPDATE staff_pm_conversations SET Level=650 WHERE ID=$ConvID"); - - header('Location: staffpm.php'); - + if(!empty($_GET['to'])) { + $Level = 0; + switch($_GET['to']) { + case 'forum' : + $Level = 650; + break; + case 'staff' : + $Level = 700; + break; + default : + error(404); + break; + } + + $DB->query("UPDATE staff_pm_conversations SET Level=".$Level." WHERE ID=$ConvID"); + header('Location: staffpm.php'); + } else { + error(404); + } } else { // FLS trying to assign non-FLS conversation error(403); diff --git a/sections/staffpm/functions.php b/sections/staffpm/functions.php new file mode 100644 index 00000000..f233d6c7 --- /dev/null +++ b/sections/staffpm/functions.php @@ -0,0 +1,25 @@ + +
+
+ + + +
+ + + +
+ + Send to: + + + + + +
+ diff --git a/sections/staffpm/unresolve.php b/sections/staffpm/unresolve.php index 070467d5..350a2a70 100644 --- a/sections/staffpm/unresolve.php +++ b/sections/staffpm/unresolve.php @@ -1,10 +1,14 @@ query("SELECT UserID, AssignedToUser FROM staff_pm_conversations WHERE ID=$ID"); - list($UserID, $AssignedToUser) = $DB->next_record(); + $DB->query("SELECT UserID, Level, AssignedToUser FROM staff_pm_conversations WHERE ID=$ID"); + list($UserID, $Level, $AssignedToUser) = $DB->next_record(); - if ($UserID == $LoggedUser['ID'] || $IsStaff || $AssignedToUser == $LoggedUser['ID']) { + if ($UserID == $LoggedUser['ID'] || $IsFLS || $AssignedToUser == $LoggedUser['ID']) { + if($Level != 0 && $IsStaff == false) { + error(403); + } + // Conversation belongs to user or user is staff, unresolve it $DB->query("UPDATE staff_pm_conversations SET Status='Unanswered' WHERE ID=$ID"); // Clear cache for user diff --git a/sections/staffpm/user_inbox.php b/sections/staffpm/user_inbox.php index 6fcd4c08..56fa4edb 100644 --- a/sections/staffpm/user_inbox.php +++ b/sections/staffpm/user_inbox.php @@ -1,4 +1,7 @@
- +
- + +