mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
Prevent the merging of non-music groups
Include empty values in cache debug table Clear cache when replying to staff pm
This commit is contained in:
parent
faa6c0c055
commit
2ddca2c7b4
@ -107,7 +107,7 @@ public function get_value($Key, $NoCache=false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$Return = $this->get($Key);
|
$Return = $this->get($Key);
|
||||||
if ($Return && !$NoCache) {
|
if ($Return !== false && !$NoCache) {
|
||||||
$this->CacheHits[$Key] = $Return;
|
$this->CacheHits[$Key] = $Return;
|
||||||
}
|
}
|
||||||
$this->Time+=(microtime(true)-$StartTime)*1000;
|
$this->Time+=(microtime(true)-$StartTime)*1000;
|
||||||
|
@ -234,7 +234,6 @@
|
|||||||
$ModBar[] = '<a href="staffpm.php">'.$NumStaffPMs.' Staff PMs</a>';
|
$ModBar[] = '<a href="staffpm.php">'.$NumStaffPMs.' Staff PMs</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(check_perms('admin_reports')) {
|
if(check_perms('admin_reports')) {
|
||||||
$NumTorrentReports = $Cache->get_value('num_torrent_reportsv2');
|
$NumTorrentReports = $Cache->get_value('num_torrent_reportsv2');
|
||||||
if ($NumTorrentReports === false) {
|
if ($NumTorrentReports === false) {
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
if ($IsFLS) {
|
if ($IsFLS) {
|
||||||
// FLS/Staff
|
// FLS/Staff
|
||||||
$DB->query("UPDATE staff_pm_conversations SET Date='".sqltime()."', Unread=true, Status='Open' WHERE ID=$ConvID");
|
$DB->query("UPDATE staff_pm_conversations SET Date='".sqltime()."', Unread=true, Status='Open' WHERE ID=$ConvID");
|
||||||
|
$Cache->delete_value('num_staff_pms_'.$LoggedUser['ID']);
|
||||||
} else {
|
} else {
|
||||||
// User
|
// User
|
||||||
$DB->query("UPDATE staff_pm_conversations SET Date='".sqltime()."', Unread=true, Status='Unanswered' WHERE ID=$ConvID");
|
$DB->query("UPDATE staff_pm_conversations SET Date='".sqltime()."', Unread=true, Status='Unanswered' WHERE ID=$ConvID");
|
||||||
|
@ -29,9 +29,12 @@
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
list($Name) = $DB->next_record();
|
list($Name) = $DB->next_record();
|
||||||
$DB->query("SELECT Name FROM torrents_group WHERE ID = ".$GroupID);
|
$DB->query("SELECT CategoryID, Name FROM torrents_group WHERE ID = ".$GroupID);
|
||||||
list($NewName) = $DB->next_record();
|
list($CategoryID, $NewName) = $DB->next_record();
|
||||||
|
if($Categories[$CategoryID-1] != 'Music') {
|
||||||
|
error('Target must be a music group.');
|
||||||
|
}
|
||||||
|
|
||||||
$Artists = get_artists(array($OldGroupID, $GroupID));
|
$Artists = get_artists(array($OldGroupID, $GroupID));
|
||||||
|
|
||||||
show_header();
|
show_header();
|
||||||
|
@ -10,17 +10,18 @@
|
|||||||
if($NewGroupID == $GroupID) {
|
if($NewGroupID == $GroupID) {
|
||||||
error('Old group ID is the same as new group ID!');
|
error('Old group ID is the same as new group ID!');
|
||||||
}
|
}
|
||||||
$DB->query("SELECT ID FROM torrents_group WHERE ID='$NewGroupID'");
|
$DB->query("SELECT CategoryID, Name FROM torrents_group WHERE ID='$NewGroupID'");
|
||||||
if($DB->record_count()==0) {
|
if($DB->record_count()==0) {
|
||||||
error('Target group does not exist.');
|
error('Target group does not exist.');
|
||||||
}
|
}
|
||||||
|
list($CategoryID, $NewName) = $DB->next_record();
|
||||||
|
if($Categories[$CategoryID-1] != 'Music') {
|
||||||
|
error('Only music groups can be merged.');
|
||||||
|
}
|
||||||
//Everything is legit, let's just confim they're not retarded
|
//Everything is legit, let's just confim they're not retarded
|
||||||
if(empty($_POST['confirm'])) {
|
if(empty($_POST['confirm'])) {
|
||||||
$DB->query("SELECT Name FROM torrents_group WHERE ID = ".$GroupID);
|
$DB->query("SELECT Name FROM torrents_group WHERE ID = ".$GroupID);
|
||||||
list($Name) = $DB->next_record();
|
list($Name) = $DB->next_record();
|
||||||
$DB->query("SELECT Name FROM torrents_group WHERE ID = ".$NewGroupID);
|
|
||||||
list($NewName) = $DB->next_record();
|
|
||||||
|
|
||||||
$Artists = get_artists(array($GroupID, $NewGroupID));
|
$Artists = get_artists(array($GroupID, $NewGroupID));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user