From c29d0ad1b91446829105fef186b74c55ffe1d010 Mon Sep 17 00:00:00 2001 From: Git Date: Sun, 4 Dec 2011 08:00:16 +0000 Subject: [PATCH] Empty commit --- classes/script_start.php | 4 +- sections/staffpm/assign.php | 130 ++++++++++++++++----------------- static/styles/anorex/style.css | 4 + 3 files changed, 71 insertions(+), 67 deletions(-) diff --git a/classes/script_start.php b/classes/script_start.php index a3c0d67c..dc7db4a9 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -1358,7 +1358,7 @@ function update_hash($GroupID) { FROM torrents_artists AS ta JOIN artists_alias AS aa ON aa.AliasID=ta.AliasID JOIN torrents_group AS tg ON tg.ID=ta.GroupID - WHERE ta.GroupID=$GroupID AND ta.Importance IN ('1', '4', '5') + WHERE ta.GroupID=$GroupID AND ta.Importance IN ('1', '4', '5', '6') GROUP BY tg.ID ON DUPLICATE KEY UPDATE ArtistName=values(ArtistName)"); @@ -1742,7 +1742,7 @@ function get_groups($GroupIDs, $Return = true, $GetArtists = true) { $NotFound = array_flip($GroupIDs); foreach($GroupIDs as $GroupID) { - $Data = $Cache->get_value('torrent_group_'.$GroupID, true); + $Data = $Cache->get_value('torrent_group_'.$GroupID); if(!empty($Data) && (@$Data['ver'] >= 4)) { unset($NotFound[$GroupID]); $Found[$GroupID] = $Data['d']; diff --git a/sections/staffpm/assign.php b/sections/staffpm/assign.php index 7ce8ea4f..f87c7472 100644 --- a/sections/staffpm/assign.php +++ b/sections/staffpm/assign.php @@ -1,65 +1,65 @@ -query("SELECT Level FROM staff_pm_conversations WHERE ID=$ConvID"); - list($Level) = $DB->next_record; - - if ($Level == 0) { - // FLS conversation, assign to staff (moderator) - 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); - } - -} elseif ($ConvID = (int)$_POST['convid']) { - // Staff (via ajax), get current assign of conversation - $DB->query("SELECT Level, AssignedToUser FROM staff_pm_conversations WHERE ID=$ConvID"); - list($Level, $AssignedToUser) = $DB->next_record; - - if ($LoggedUser['Class'] >= $Level || $AssignedToUser == $LoggedUser['ID']) { - // Staff member is allowed to assign conversation, assign - list($LevelType, $NewLevel) = explode("_", db_string($_POST['assign'])); - - if ($LevelType == 'class') { - // Assign to class - $DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', Level=$NewLevel, AssignedToUser=NULL WHERE ID=$ConvID"); - } else { - // Assign to user - $DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', AssignedToUser=$NewLevel WHERE ID=$ConvID"); - } - echo '1'; - - } else { - // Staff member is not allowed to assign conversation - echo '-1'; - } - -} else { - // No id - header('Location: staffpm.php'); -} -?> +query("SELECT Level FROM staff_pm_conversations WHERE ID=$ConvID"); + list($Level) = $DB->next_record; + + if ($Level == 0) { + // FLS conversation, assign to staff (moderator) + 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 Status='Unanswered', Level=".$Level." WHERE ID=$ConvID"); + header('Location: staffpm.php'); + } else { + error(404); + } + } else { + // FLS trying to assign non-FLS conversation + error(403); + } + +} elseif ($ConvID = (int)$_POST['convid']) { + // Staff (via ajax), get current assign of conversation + $DB->query("SELECT Level, AssignedToUser FROM staff_pm_conversations WHERE ID=$ConvID"); + list($Level, $AssignedToUser) = $DB->next_record; + + if ($LoggedUser['Class'] >= $Level || $AssignedToUser == $LoggedUser['ID']) { + // Staff member is allowed to assign conversation, assign + list($LevelType, $NewLevel) = explode("_", db_string($_POST['assign'])); + + if ($LevelType == 'class') { + // Assign to class + $DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', Level=$NewLevel, AssignedToUser=NULL WHERE ID=$ConvID"); + } else { + // Assign to user + $DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', AssignedToUser=$NewLevel WHERE ID=$ConvID"); + } + echo '1'; + + } else { + // Staff member is not allowed to assign conversation + echo '-1'; + } + +} else { + // No id + header('Location: staffpm.php'); +} +?> diff --git a/static/styles/anorex/style.css b/static/styles/anorex/style.css index cc4aae9a..6409f5c2 100644 --- a/static/styles/anorex/style.css +++ b/static/styles/anorex/style.css @@ -368,6 +368,10 @@ p.min_padding { margin: 0px 5px 10px 5px; } +#AddArtists input { + width: 100px; +} + .head { padding: 4px; background: #b78234 url(images/woodnavcenter.png) repeat-x;