mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Empty commit
This commit is contained in:
parent
cbd522aa87
commit
58b07964b6
@ -1,5 +1,8 @@
|
||||
CHANGE LOG
|
||||
|
||||
2016-02-06 by newman
|
||||
Fix some Staff PM bugs
|
||||
|
||||
2016-02-05 by newman
|
||||
Add tool to mark multiple torrent groups/collages as FL/NL/Regular, optionally NLing torrents above a certain size. Add level cap to Staff PMs
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
SELECT Level
|
||||
FROM staff_pm_conversations
|
||||
WHERE ID = $ConvID");
|
||||
list($Level) = $DB->next_record;
|
||||
list($Level) = $DB->next_record();
|
||||
|
||||
if ($Level == 0) {
|
||||
// FLS conversation, assign to staff (moderator)
|
||||
@ -49,9 +49,12 @@
|
||||
SELECT Level, AssignedToUser
|
||||
FROM staff_pm_conversations
|
||||
WHERE ID = $ConvID");
|
||||
list($Level, $AssignedToUser) = $DB->next_record;
|
||||
list($Level, $AssignedToUser) = $DB->next_record();
|
||||
|
||||
$LevelCap = 1000;
|
||||
|
||||
|
||||
if ($LoggedUser['EffectiveClass'] >= $Level || $AssignedToUser == $LoggedUser['ID']) {
|
||||
if ($LoggedUser['EffectiveClass'] >= min($Level, $LevelCap) || $AssignedToUser == $LoggedUser['ID']) {
|
||||
// Staff member is allowed to assign conversation, assign
|
||||
list($LevelType, $NewLevel) = explode('_', db_string($_POST['assign']));
|
||||
|
||||
|
@ -24,12 +24,15 @@
|
||||
} elseif ($ConvID = (int)$_POST['convid']) {
|
||||
// Check if conversation belongs to user
|
||||
$DB->query("
|
||||
SELECT UserID, AssignedToUser
|
||||
SELECT UserID, AssignedToUser, Level
|
||||
FROM staff_pm_conversations
|
||||
WHERE ID = $ConvID");
|
||||
list($UserID, $AssignedToUser) = $DB->next_record();
|
||||
list($UserID, $AssignedToUser, $Level) = $DB->next_record();
|
||||
|
||||
if ($UserID == $LoggedUser['ID'] || $IsFLS || $UserID == $AssignedToUser) {
|
||||
$LevelCap = 1000;
|
||||
|
||||
$Level = min($Level, $LevelCap);
|
||||
if ($UserID == $LoggedUser['ID'] || ($IsFLS && $LoggedUser['EffectiveClass'] >= $Level) || $UserID == $AssignedToUser) {
|
||||
// Response to existing conversation
|
||||
$DB->query("
|
||||
INSERT INTO staff_pm_messages
|
||||
|
@ -11,6 +11,7 @@
|
||||
$LevelCap = 1000;
|
||||
|
||||
|
||||
$PMLevel = $Level;
|
||||
$Level = min($Level, $LevelCap);
|
||||
|
||||
if (!(($UserID == $LoggedUser['ID'])
|
||||
@ -170,14 +171,14 @@
|
||||
<select id="assign_to" name="assign">
|
||||
<optgroup label="User classes">
|
||||
<? // FLS "class"
|
||||
$Selected = ((!$AssignedToUser && $Level == 0) ? ' selected="selected"' : '');
|
||||
$Selected = ((!$AssignedToUser && $PMLevel == 0) ? ' selected="selected"' : '');
|
||||
?>
|
||||
<option value="class_0"<?=$Selected?>>First Line Support</option>
|
||||
<? // Staff classes
|
||||
foreach ($ClassLevels as $Class) {
|
||||
// Create one <option> for each staff user class
|
||||
if ($Class['Level'] >= 650) {
|
||||
$Selected = ((!$AssignedToUser && ($Level == $Class['Level'])) ? ' selected="selected"' : '');
|
||||
$Selected = ((!$AssignedToUser && ($PMLevel == $Class['Level'])) ? ' selected="selected"' : '');
|
||||
?>
|
||||
<option value="class_<?=$Class['Level']?>"<?=$Selected?>><?=$Class['Name']?></option>
|
||||
<?
|
||||
|
Loading…
Reference in New Issue
Block a user