From efbb7586c6915f3d225defff5d8b678333c441e4 Mon Sep 17 00:00:00 2001 From: Git Date: Fri, 28 Oct 2016 08:00:28 +0000 Subject: [PATCH] Empty commit --- gazelle.sql | 8 ++++++++ sections/reportsv2/array.php | 17 +++++++++++++++++ sections/reportsv2/takeresolve.php | 16 +++++++++------- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/gazelle.sql b/gazelle.sql index cbdf9ad0..fa872b5c 100644 --- a/gazelle.sql +++ b/gazelle.sql @@ -1343,6 +1343,14 @@ CREATE TABLE `torrents_votes` ( CONSTRAINT `torrents_votes_ibfk_1` FOREIGN KEY (`GroupID`) REFERENCES `torrents_group` (`ID`) ON DELETE CASCADE ) ENGINE=InnoDB CHARSET utf8; +CREATE TABLE `upload_contest` ( + `TorrentID` int(10) unsigned NOT NULL, + `UserID` int(10) unsigned NOT NULL, + PRIMARY KEY (`TorrentID`), + KEY `UserID` (`UserID`), + CONSTRAINT `upload_contest_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `users_main` (`ID`) ON DELETE CASCADE +) ENGINE=InnoDB CHARSET utf8; + CREATE TABLE `user_questions` ( `ID` int(10) NOT NULL AUTO_INCREMENT, `Question` mediumtext NOT NULL, diff --git a/sections/reportsv2/array.php b/sections/reportsv2/array.php index b87bad96..1be47b90 100644 --- a/sections/reportsv2/array.php +++ b/sections/reportsv2/array.php @@ -623,6 +623,23 @@ Your torrent has now been properly scored by the staff.' 'warn' => '0', 'delete' => '0' ) + ), + 'upload_contest' => array( + 'priority' => '162', + 'reason' => '-1', + 'title' => 'Upload Contest Approval Request', + 'report_messages' => array( + 'Please include a photograph of the CD next to a piece of paper with your username written on it.', + 'Anything included in the proof images field will only be viewable by staff.' + ), + 'report_fields' => array( + 'proofimages' => '2' + ), + 'resolve_options' => array( + 'upload' => '0', + 'warn' => '0', + 'delete' => '0' + ) ) ), '2' => array( //Applications Rules Broken diff --git a/sections/reportsv2/takeresolve.php b/sections/reportsv2/takeresolve.php index 492a32d0..fb1d110d 100644 --- a/sections/reportsv2/takeresolve.php +++ b/sections/reportsv2/takeresolve.php @@ -151,14 +151,13 @@ if ($DB->affected_rows() > 0 || !$Report) { $Cache->decrement('num_torrent_reportsv2'); } - if (isset($Escaped['upload'])) { $Upload = true; } else { $Upload = false; } - if ($_POST['resolve_type'] == 'tags_lots') { + if ($_POST['resolve_type'] === 'tags_lots') { $DB->query(" INSERT IGNORE INTO torrents_bad_tags (TorrentID, UserID, TimeAdded) @@ -172,8 +171,7 @@ if ($DB->affected_rows() > 0 || !$Report) { $Cache->delete_value("torrents_details_$GroupID"); $SendPM = true; } - - if ($_POST['resolve_type'] == 'folders_bad') { + elseif ($_POST['resolve_type'] === 'folders_bad') { $DB->query(" INSERT IGNORE INTO torrents_bad_folders (TorrentID, UserID, TimeAdded) @@ -187,7 +185,7 @@ if ($DB->affected_rows() > 0 || !$Report) { $Cache->delete_value("torrents_details_$GroupID"); $SendPM = true; } - if ($_POST['resolve_type'] == 'filename') { + elseif ($_POST['resolve_type'] === 'filename') { $DB->query(" INSERT IGNORE INTO torrents_bad_files (TorrentID, UserID, TimeAdded) @@ -201,8 +199,7 @@ if ($DB->affected_rows() > 0 || !$Report) { $Cache->delete_value("torrents_details_$GroupID"); $SendPM = true; } - - if ($_POST['resolve_type'] == 'lossyapproval') { + elseif ($_POST['resolve_type'] === 'lossyapproval') { $DB->query(" INSERT INTO torrents_lossymaster_approved VALUES ($TorrentID, ".$LoggedUser['ID'].", '".sqltime()."')"); @@ -213,6 +210,11 @@ if ($DB->affected_rows() > 0 || !$Report) { list($GroupID) = $DB->next_record(); $Cache->delete_value("torrents_details_$GroupID"); } + elseif ($_POST['resolve_type'] === 'upload_contest') { + $DB->query(" + INSERT INTO upload_contest + VALUES ($TorrentID, $UploaderID)"); + } //Log and delete if (isset($Escaped['delete']) && check_perms('users_mod')) {