Empty commit

This commit is contained in:
Git 2013-11-01 08:01:02 +00:00
parent db5f412a18
commit d0edb680ad
26 changed files with 169 additions and 149 deletions

View File

@ -442,6 +442,8 @@ public static function gen_crypt_salt() {
return $Salt;
}
/**
* Returns a username string for display
*
@ -475,7 +477,16 @@ public static function format_username($UserID, $Badges = false, $IsWarned = tru
$Username = $UserInfo['Username'];
$Paranoia = $UserInfo['Paranoia'];
$ShowDonorIcon = (!in_array('hide_donor_heart', $Paranoia) || check_perms('users_override_paranoia', $UserInfo['Class']));
$MaxClassOverride = MOD;
if ($UserInfo['Class'] < $Classes[$MaxClassOverride]['Level']) {
$OverrideParanoia = check_perms('users_override_paranoia', $UserInfo['Class']);
} else {
// Don't override paranoia for mods who don't want to show their donor heart
$OverrideParanoia = false;
}
$ShowDonorIcon = (!in_array('hide_donor_heart', $Paranoia) || $OverrideParanoia);
if ($IsDonorForum) {
list($Prefix, $Suffix, $HasComma) = Donations::get_titles($UserID);
@ -530,6 +541,7 @@ public static function format_username($UserID, $Badges = false, $IsWarned = tru
. '><img src="'.STATIC_SERVER.'common/symbols/warned.png" alt="Warned" title="Warned'
. (G::$LoggedUser['ID'] === $UserID ? ' - Expires ' . date('Y-m-d H:i', strtotime($UserInfo['Warned'])) : '')
. '" /></a>' : '';
$Str .= ($IsEnabled && $UserInfo['Enabled'] == 2) ? '<a href="rules.php"><img src="'.STATIC_SERVER.'common/symbols/disabled.png" alt="Banned" title="Be good, and you won\'t end up like this user" /></a>' : '';
if ($Badges) {

View File

@ -205,17 +205,13 @@ public static function get_rank_all($GroupID) {
$Rankings = G::$Cache->get_value('voting_ranks_overall');
if ($Rankings === false) {
$Rankings = array();
$i = 0;
$QueryID = G::$DB->get_query_id();
G::$DB->query('
SELECT GroupID
SELECT GroupID, Score
FROM torrents_votes
ORDER BY Score DESC
LIMIT 100');
while (list($GID) = G::$DB->next_record()) {
$Rankings[$GID] = ++$i;
}
$Rankings = self::calc_ranks(G::$DB->to_pair(0, 1, false));
G::$DB->set_query_id($QueryID);
G::$Cache->cache_value('voting_ranks_overall', $Rankings, 259200); // 3 days
}
@ -238,19 +234,15 @@ public static function get_rank_year($GroupID, $Year) {
$Rankings = G::$Cache->get_value("voting_ranks_year_$Year");
if ($Rankings === false) {
$Rankings = array();
$i = 0;
$QueryID = G::$DB->get_query_id();
G::$DB->query("
SELECT GroupID
SELECT GroupID, Score
FROM torrents_votes AS v
JOIN torrents_group AS g ON g.ID = v.GroupID
WHERE g.Year = $Year
ORDER BY Score DESC
LIMIT 100");
while (list($GID) = G::$DB->next_record()) {
$Rankings[$GID] = ++$i;
}
$Rankings = self::calc_ranks(G::$DB->to_pair(0, 1, false));
G::$DB->set_query_id($QueryID);
G::$Cache->cache_value("voting_ranks_year_$Year", $Rankings, 259200); // 3 days
}
@ -276,25 +268,44 @@ public static function get_rank_decade($GroupID, $Year) {
$Rankings = G::$Cache->get_value("voting_ranks_decade_$Year");
if ($Rankings === false) {
$Rankings = array();
$i = 0;
$QueryID = G::$DB->get_query_id();
G::$DB->query("
SELECT GroupID
SELECT GroupID, Score
FROM torrents_votes AS v
JOIN torrents_group AS g ON g.ID = v.GroupID
WHERE g.Year BETWEEN $Year AND " . ($Year + 9) . "
AND g.CategoryID = 1
ORDER BY Score DESC
LIMIT 100");
while (list($GID) = G::$DB->next_record()) {
$Rankings[$GID] = ++$i;
}
$Rankings = self::calc_ranks(G::$DB->to_pair(0, 1, false));
G::$DB->set_query_id($QueryID);
G::$Cache->cache_value("voting_ranks_decade_$Year", $Rankings, 259200); // 3 days
}
return (isset($Rankings[$GroupID]) ? $Rankings[$GroupID] : false);
}
/**
* Turn vote scores into vote ranks. This basically only sorts out tied ranks
*
* @param array $GroupScores array (<GroupID> => <Score>) ordered by Score
* @return array (<GroupID> => <Rank>)
*/
public static function calc_ranks($GroupScores) {
$Rankings = array();
$PrevScore = $PrevRank = false;
$Rank = 1;
foreach ($GroupScores as $GroupID => $Score) {
if ($Score === $PrevScore) {
$Rankings[$GroupID] = $PrevRank;
} else {
$Rankings[$GroupID] = $Rank;
$PrevRank = $Rank;
$PrevScore = $Score;
}
$Rank++;
}
return $Rankings;
}
}
?>

View File

@ -1,5 +1,14 @@
CHANGE LOG
2013-10-31 by porkpie
Albums with the same vote score are tied on toplists
2013-10-31 by alderaan
Remove redundant sentences from and fix other issues with automatic PMs sent via Reports v2.
2013-10-31 by alderaan
Fix cache bug when making an artist into a non-redirecting alias of another artist (typo'd name of cache key)
2013-10-31 by alderaan
Renamed take*.php files in sections/requests/ (added underscores)

View File

@ -325,11 +325,6 @@ CREATE TABLE `drives` (
KEY `Name` (`Name`)
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `drone_warnings` (
`UserID` int(10) NOT NULL,
PRIMARY KEY (`UserID`)
) ENGINE=InnoDB CHARSET utf8;
CREATE TABLE `dupe_groups` (
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Comments` text,

View File

@ -333,9 +333,9 @@ function compare($X, $Y) {
<td class="small"><!-- expand/collapse --></td>
<td width="70%"><a href="#">&uarr;</a>&nbsp;<strong><?=$DisplayName?></strong> (<a href="#" onclick="$('.releases_<?=$ReleaseType?>').gtoggle(true); return false;">View</a>)</td>
<td>Size</td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
<td class="sign snatches"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign seeders"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign leechers"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
</tr>
<? $OpenTable = true;
$LastReleaseType = $ReleaseType;

View File

@ -25,7 +25,7 @@
WHERE ArtistID = $ArtistID
LIMIT 1");
if (!(list($ArtistName) = $DB->next_record(MYSQLI_NUM, false))) {
error('An error has occured.');
error('An error has occurred.');
}
if ($NewArtistID > 0) {
@ -143,7 +143,7 @@
}
if (!empty($Requests)) {
foreach ($Requests as $RequestID) {
$Cache->delete_value("request_artist_$RequestID");
$Cache->delete_value("request_artists_$RequestID");
Requests::update_sphinx_requests($RequestID);
}
}

View File

@ -17,13 +17,13 @@
$UserID = $LoggedUser['ID'];
$ArtistID = $_REQUEST['artistid'];
if (check_perms('artist_edit_vanityhouse')) {
$VanityHouse = ( isset($_POST['vanity_house']) ? 1 : 0 );
$VanityHouse = isset($_POST['vanity_house']) ? 1 : 0 ;
}
if ($_GET['action'] == 'revert') { // if we're reverting to a previous revision
if ($_GET['action'] === 'revert') { // if we're reverting to a previous revision
authorize();
$RevisionID=$_GET['revisionid'];
$RevisionID = $_GET['revisionid'];
if (!is_number($RevisionID)) {
error(0);
}
@ -41,14 +41,16 @@
// Insert revision
if (!$RevisionID) { // edit
$DB->query("
INSERT INTO wiki_artists (PageID, Body, Image, UserID, Summary, Time)
VALUES ('$ArtistID', '$Body', '$Image', '$UserID', '$Summary', '".sqltime()."')");
INSERT INTO wiki_artists
(PageID, Body, Image, UserID, Summary, Time)
VALUES
('$ArtistID', '$Body', '$Image', '$UserID', '$Summary', '".sqltime()."')");
} else { // revert
$DB->query("
INSERT INTO wiki_artists (PageID, Body, Image, UserID, Summary, Time)
SELECT '$ArtistID', Body, Image, '$UserID', 'Reverted to revision $RevisionID', '".sqltime()."'
FROM wiki_artists
WHERE RevisionID='$RevisionID'");
WHERE RevisionID = '$RevisionID'");
}
$RevisionID = $DB->inserted_id();
@ -57,11 +59,11 @@
$DB->query("
UPDATE artists_group
SET
". (isset($VanityHouse) ? "VanityHouse='$VanityHouse'," : '') ."
RevisionID='$RevisionID'
WHERE ArtistID='$ArtistID'");
". (isset($VanityHouse) ? "VanityHouse = '$VanityHouse'," : '') ."
RevisionID = '$RevisionID'
WHERE ArtistID = '$ArtistID'");
// There we go, all done!
$Cache->delete_value('artist_'.$ArtistID); // Delete artist cache
header('Location: artist.php?id='.$ArtistID);
$Cache->delete_value("artist_$ArtistID"); // Delete artist cache
header("Location: artist.php?id=$ArtistID");
?>

View File

@ -358,9 +358,9 @@ function compare($X, $Y) {
<td><!-- Category --></td>
<td width="70%"><strong>Torrents</strong></td>
<td>Size</td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
<td class="sign snatches"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign seeders"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign leechers"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
</tr>
<?=$TorrentTable?>
</table>

View File

@ -5,20 +5,14 @@
$ChangeJS = " onchange=\"if ( this.options[this.selectedIndex].value == '0') { $('#namebox').ghide(); $('#personal').gshow(); } else { $('#namebox').gshow(); $('#personal').ghide(); }\"";
}
$Name = $_REQUEST['name'];
$Category = $_REQUEST['cat'];
$Description = $_REQUEST['descr'];
$Tags = $_REQUEST['tags'];
$Error = $_REQUEST['err'];
if (!check_perms('site_collages_renamepersonal') && $Category === '0') {
$NoName = true;
}
?>
<div class="thin">
<?
if (!empty($Error)) { ?>
<div class="save_message error"><?=$Error?></div>
if (isset($Err)) { ?>
<div class="save_message error"><?=$Err?></div>
<br />
<?
} ?>

View File

@ -31,7 +31,7 @@
$Err = $Val->ValidateForm($_POST);
if ($P['category'] === '0') {
if (!$Err && $P['category'] === '0') {
$DB->query("
SELECT COUNT(ID)
FROM collages
@ -68,13 +68,11 @@
}
if ($Err) {
//error($Err);
$Err = urlencode($Err);
$Name = urlencode($_POST['name']);
$Category = urlencode($_POST['category']);
$Tags = urlencode($_POST['tags']);
$Description = urlencode($_POST['description']);
header("Location: collages.php?action=new&err=$Err&name=$Name&cat=$Category&tags=$Tags&descr=$Description");
$Name = $_POST['name'];
$Category = $_POST['category'];
$Tags = $_POST['tags'];
$Description = $_POST['description'];
include(SERVER_ROOT.'/sections/collages/new.php');
die();
}

View File

@ -576,9 +576,9 @@
<td><!-- Category --></td>
<td width="70%"><strong>Torrents</strong></td>
<td>Size</td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
<td class="sign snatches"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign seeders"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign leechers"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
</tr>
<?=$TorrentTable?>
</table>

View File

@ -96,6 +96,7 @@
case 'warn':
require(SERVER_ROOT.'/sections/forums/warn.php');
break;
default:
error(404);
}

View File

@ -493,6 +493,7 @@
- <a href="#" onclick="$('#warn<?=$PostID?>').raw().submit(); return false;" class="brackets">Warn</a>
<? }
}
?>
&nbsp;
<a href="#">&uarr;</a>

View File

@ -6,7 +6,6 @@
authorize();
if (!check_perms('admin_reports')) {
echo 'HAX on premissions!';
die();
}
@ -21,7 +20,7 @@
}
if (!is_number($_POST['categoryid']) || !is_number($TorrentID)) {
echo 'HAX on categoryid!';
echo 'Hax on category ID!';
die();
} else {
$CategoryID = $_POST['categoryid'];
@ -33,14 +32,14 @@
$ReportType = $Types['master'][$_POST['type']];
} else {
//There was a type but it wasn't an option!
echo 'HAX on section type';
echo 'Hax on section type';
die();
}
if (!isset($_POST['from_delete'])) {
$Report = true;
} elseif (!is_number($_POST['from_delete'])) {
echo 'Hax occured in from_delete';
echo 'Hax occurred in from_delete';
}
if ($Recipient == 'Uploader') {
@ -60,7 +59,7 @@
$Subject = $_POST['raw_name'];
if (!is_number($ToID)) {
$Err = "Haxx occuring, non number present";
$Err = "Haxx occurring, non-number present";
}
if ($ToID == $LoggedUser['ID']) {

View File

@ -48,7 +48,7 @@
'upload' => '0',
'warn' => '4',
'delete' => '1',
'pm' => '[rule]h1.2[/rule]. You have uploaded material that is currently forbidden. Items on the Do Not Upload list (at the top of the [url=https://'.SSL_SITE_URL.'/upload.php]upload page[/url]) and in the [url=https://'.SSL_SITE_URL.'/rules.php?p=upload#h1.2]Specifically Banned[/url] portion of the uploading rules cannot be uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comments of the DNU list.
'pm' => '[rule]h1.2[/rule]. You have uploaded material that is currently forbidden. Items on the Do Not Upload (DNU) list (at the top of the [url='.site_url().'/upload.php]upload page[/url]) and in the [url='.site_url().'/rules.php?p=upload#h1.2]Specifically Banned[/url] portion of the uploading rules cannot be uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comments of the DNU list.
Your torrent was reported because it contained material from the DNU list or from the Specifically Banned section of the rules.'
)
),
@ -186,7 +186,7 @@
'upload' => '0',
'warn' => '0',
'delete' => '1',
'pm' => '[rule]2.3.2[/rule]. Name your directories with meaningful titles, such as "Artist - Album (Year) - Format." The minimum acceptable is "Album" although it is preferable to include more information. If the directory name does not include this minimum then another user can rename the directory, re-upload, and report your torrent for deletion. In addition, torrent folders that are named using the scene convention will be trumpable if the Scene label is absent from the torrent.
'pm' => '[rule]2.3.2[/rule]. Name your directories with meaningful titles, such as "Artist - Album (Year) - Format". The minimum acceptable is "Album" although it is preferable to include more information. If the directory name does not include this minimum then another user can rename the directory, re-upload, and report your torrent for deletion. In addition, torrent folders that are named using the scene convention will be trumpable if the Scene label is absent from the torrent.
[rule]2.3.3[/rule]. Avoid creating unnecessary nested folders (such as an extra folder for the actual album) inside your properly named directory. A torrent with unnecessary nested folders is trumpable by a torrent with such folders removed. For single disc albums, all audio files must be included in the main torrent folder. For multi-disc albums, the main torrent folder may include one sub-folder that holds the audio file contents for each disc in the box set, i.e., the main torrent folder is "Adele - 19 (2008) - FLAC" while appropriate sub-folders may include "19 (Disc 1of2)" or "19" and "Live From The Hotel Cafe (Disc 2of2)" or "Acoustic Set Live From The Hotel Cafe, Los Angeles." Additional folders are unnecessary because they do nothing to improve the organization of the torrent. If you are uncertain about what to do for other cases, PM a staff member for guidance.
Your torrent was reported because it was trumped by another torrent with an improved folder name and directory structure.'
)
@ -354,7 +354,7 @@
'title' => 'Bad Tags / No Tags at All',
'report_messages' => array(
"Please specify which tags are missing, and whether they're missing from all tracks.",
"Ideally, you will replace this torrent with one with fixed tags and report this with the reason 'Tag Trump' <3"
"Ideally, you will replace this torrent with one with fixed tags and report this with the reason \"Tag Trump\"."
),
'report_fields' => array(
'track' => '0'
@ -363,9 +363,8 @@
'upload' => '0',
'warn' => '0',
'delete' => '0',
'pm' => '[rule]2.3.16[/rule]. Properly tag your music files.
The Uploading Rules require that all uploads be properly tagged. Your torrent has been marked as having poor tags. It is now listed on [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the required tags and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Tag Trump" and indicate in the report comments that you have fixed the tags. Be sure to provide a link (PL) to the new replacement torrent.
Your torrent has been labeled as having bad tags and is now eligible for trumping through the [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] listing.'
'pm' => "[rule]2.3.16[/rule]. Properly tag your music files.
The Uploading Rules require that all uploads be properly tagged. Your torrent has been marked as having bad tags. It is now listed on [url=".site_url()."/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the required tags and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category \"Tag Trump\" and indicate in the report comments that you have fixed the tags. Be sure to provide a link (PL) to the new replacement torrent."
)
),
'folders_bad' => array(
@ -374,16 +373,15 @@
'title' => 'Bad Folder Names',
'report_messages' => array(
"Please specify the issue with the folder names.",
"Ideally you will replace this torrent with one with fixed folder names and report this with the reason 'Trumped'."
"Ideally you will replace this torrent with one with fixed folder names and report this with the reason \"Bad Folder Name Trump\"."
),
'report_fields' => array(),
'resolve_options' => array(
'upload' => '0',
'warn' => '0',
'delete' => '0',
'pm' => '[rule]2.3.2[/rule]. Name your directories with meaningful titles, such as "Artist - Album (Year) - Format."
The Uploading Rules require that all uploads contain torrent directories with meaningful names. Your torrent has been marked as having a poorly named torrent directory. It is now listed on [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the folder/directory name(s) and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Folder Trump" and indicate in the report comments that you have fixed the directory name(s). Be sure to provide a link (PL) to the new replacement torrent.
Your torrent has been labeled as having a bad folder name (or directory structure) and is now eligible for trumping through the [url=https://'.SSL_SITE_URL.'/better.php]Better.php[/url] listing.'
'pm' => "[rule]2.3.2[/rule]. Name your directories with meaningful titles, such as \"Artist - Album (Year) - Format\".
The Uploading Rules require that all uploads contain torrent directories with meaningful names. Your torrent has been marked as having a poorly named torrent directory. It is now listed on [url=".site_url()."/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the folder/directory name(s) and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category \"Folder Trump\" and indicate in the report comments that you have fixed the directory name(s). Be sure to provide a link (PL) to the new replacement torrent."
)
),
'wrong_format' => array(
@ -581,10 +579,10 @@
'upload' => '0',
'warn' => '0',
'delete' => '0',
'pm' => '[rule]2.3.11[/rule]. File names must accurately reflect the song titles. You may not have file names like 01track.mp3, 02track.mp3, etc. Torrents containing files that are named with incorrect song titles can be trumped by properly labeled torrents. Also, torrents that are sourced from the scene but do not have the Scene label must comply with site naming rules (no release group names in the file names, no advertisements in the file names, etc.). If all the letters in the track titles are capitalized, the torrent is trumpable.
'pm' => '[rule]2.3.11[/rule]. File names must accurately reflect the song titles. You may not have file names like 01track.mp3, 02track.mp3, etc. Torrents containing files that are named with incorrect song titles can be trumped by properly labeled torrents. Also, torrents that are sourced from the scene but do not have the "Scene" label must comply with site naming rules (no release group names in the file names, no advertisements in the file names, etc.). If all the letters in the track titles are capitalized, the torrent is trumpable.
[rule]2.3.13[/rule]. Track numbers are required in file names (e.g., "01 - TrackName.mp3"). If a torrent without track numbers in the file names is uploaded, then a torrent with the track numbers in the file names can take its place. When formatted properly, file names will sort in order by track number or playing order. Also see [rule]2.3.14[/rule].
The Uploading Rules require that all uploads contain audio tracks with accurate file names. Your torrent has been marked as having incorrect or incomplete file names. It is now listed on [url=https://'.SSL_SITE_URL.'/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the file names and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Bad File Names Trump" and indicate in the report comments that you have fixed the file names. Be sure to provide a link (PL) to the new replacement torrent.
Your torrent has been labeled as having bad file names and is now eligible for trumping through the [url=https://'.SSL_SITE_URL.'/better.php]better.php[/url] listing.'
The Uploading Rules require that all uploads contain audio tracks with accurate file names. Your torrent has been marked as having incorrect or incomplete file names. It is now listed on [url='.site_url().'/better.php]better.php[/url] and is eligible for trumping. You are of course free to fix this torrent yourself. Add or fix the file names and upload the replacement torrent to the site. Then, report (RP) the older torrent using the category "Bad File Names Trump" and indicate in the report comments that you have fixed the file names. Be sure to provide a permalink (PL) to the new replacement torrent.'
)
),
'cassette' => array(
@ -602,7 +600,8 @@
'warn' => '1',
'delete' => '1',
'pm' => '[rule]2.10.1[/rule]. Cassettes are allowed under strict conditions.
[rule]2.10.1.1[/rule]. Releases available only on cassette may be uploaded under special strict conditions (see [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&amp;id=593]this wiki[/url] for information on cassette ripping).
[rule]2.10.1.1[/rule]. Releases available only on cassette may be uploaded under special strict conditions (see [url='.site_url().'/wiki.php?action=article&amp;id=593]this wiki[/url] for information on cassette ripping).
[rule]2.10.1.2[/rule]. Rips must be made from official cassette sources. Bootlegs are often from unofficial sources and may be deleted if they do not meet high quality audio standards (see rule [rule]2.10.8[/rule]).
When uploading new cassette-sourced torrents, be sure to include in the release description evidence of its uniqueness in the form of discography information from a reputable source as well as pictures of the cassette you ripped.'
)
@ -639,7 +638,7 @@
'upload' => '0',
'warn' => '0',
'delete' => '0',
'pm' => '[rule]2.2.10.3[/rule]. A FLAC upload with an EAC or XLD rip log that scores 100% on the log checker replaces one with a lower score... . Note: A FLAC upload with a log that scores 95% for not defeating the audio cache may be rescored to 100% following the procedure outlined in [url=https://'.SSL_SITE_URL.'/wiki.php?action=article&amp;id=219]this wiki[/url].
'pm' => '[rule]2.2.10.3[/rule]. A FLAC upload with an EAC or XLD rip log that scores 100% on the log checker replaces one with a lower score... . Note: A FLAC upload with a log that scores 95% for not defeating the audio cache may be rescored to 100% following the procedure outlined in [url='.site_url().'/wiki.php?action=article&amp;id=219]this wiki[/url].
[rule]2.2.10.5[/rule]. XLD and EAC logs in languages other than English require a manual log checker score adjustment by staff.
[rule]2.2.10.6.2[/rule]. If you created a CD range rip that has matching CRCs for test and copy, and where every track has an AccurateRip score of 2 or more, then you may submit your torrent for manual score adjustment.
[rule]2.2.10.9.2[/rule]. If you find that an appended log has not been scored properly, please report the torrent and use the log rescore option.

View File

@ -80,9 +80,9 @@
<tr class="colhead_dark">
<td width="80%"><strong>Reported torrent</strong></td>
<td><strong>Size</strong></td>
<td class="sign"><img src="static/styles/<?=($LoggedUser['StyleName'])?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign"><img src="static/styles/<?=($LoggedUser['StyleName'])?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign"><img src="static/styles/<?=($LoggedUser['StyleName'])?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
<td class="sign snatches"><img src="static/styles/<?=($LoggedUser['StyleName'])?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign seeders"><img src="static/styles/<?=($LoggedUser['StyleName'])?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign leechers"><img src="static/styles/<?=($LoggedUser['StyleName'])?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
</tr>
<?
build_torrents_table($Cache, $DB, $LoggedUser, $GroupID, $GroupName, $GroupCategoryID, $ReleaseType, $TorrentList, $Types, $Text, $Username, $ReportedTimes);

View File

@ -19,7 +19,7 @@
if (!isset($Escaped['from_delete'])) {
$Report = true;
} elseif (!is_number($Escaped['from_delete'])) {
echo 'Hax occured in from_delete';
echo 'Hax occurred in from_delete';
} else {
$Report = false;
}
@ -29,7 +29,7 @@
if (is_number($Escaped['reportid'])) {
$ReportID = $Escaped['reportid'];
} else {
echo 'Hax occured in the reportid';
echo 'Hax occurred in the reportid';
die();
}
@ -39,19 +39,19 @@
$UploaderID = (int)$Escaped['uploaderid'];
if (!is_number($UploaderID)) {
echo 'Hax occuring on the uploaderid';
echo 'Hax occurring on the uploaderid';
die();
}
$Warning = (int)$Escaped['warning'];
if (!is_number($Warning)) {
echo 'Hax occuring on the warning';
echo 'Hax occurring on the warning';
die();
}
$CategoryID = $Escaped['categoryid'];
if (!isset($CategoryID)) {
echo 'Hax occuring on the categoryid';
echo 'Hax occurring on the categoryid';
die();
}
@ -278,34 +278,34 @@
//PM
if ($Escaped['uploader_pm'] || $Warning > 0 || isset($Escaped['delete']) || $SendPM) {
if (isset($Escaped['delete'])) {
$PM = '[url=https://'.SSL_SITE_URL."/torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported and has been deleted.\n\n";
$PM = '[url='.site_url()."/torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported and has been deleted.\n\n";
} else {
$PM = '[url=https://'.SSL_SITE_URL."/torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported but not deleted.\n\n";
$PM = '[url='.site_url()."/torrents.php?torrentid=$TorrentID]Your above torrent[/url] was reported but not deleted.\n\n";
}
$Preset = $ResolveType['resolve_options']['pm'];
if ($Preset != '') {
$PM .= "Reason: $Preset";
$PM .= "Reason: $Preset\n\n";
}
if ($Warning > 0) {
$PM .= "\nThis has resulted in a [url=https://".SSL_SITE_URL."/wiki.php?action=article&amp;id=218]$Warning week warning.[/url]\n";
$PM .= "This has resulted in a [url=".site_url()."/wiki.php?action=article&amp;id=218]$Warning week warning.[/url]\n\n";
}
if ($Upload) {
$PM .= 'This has '.($Warning > 0 ? 'also ' : '').'resulted in you losing your upload privileges.';
$PM .= 'This has '.($Warning > 0 ? 'also ' : '')."resulted in the loss of your upload privileges.\n\n";
}
if ($Log) {
$PM = "$PM\nLog Message: $Log\n";
$PM .= "Log Message: $Log\n\n";
}
if ($Escaped['uploader_pm']) {
$PM .= "\nMessage from ".$LoggedUser['Username'].": $PMMessage";
$PM .= "Message from ".$LoggedUser['Username'].": $PMMessage\n\n";
}
$PM .= "\n\nReport was handled by [user]".$LoggedUser['Username'].'[/user].';
$PM .= "Report was handled by [user]".$LoggedUser['Username'].'[/user].';
Misc::send_pm($UploaderID, 0, $Escaped['raw_name'], $PM);
}

View File

@ -9,14 +9,17 @@
$Details = 'all';
$Limit = 25;
if ($_GET['tags']) {
if (!empty($_GET['tags'])) {
$TagsAny = isset($_GET['anyall']) && $_GET['anyall'] === 'any';
$Tags = explode(',', str_replace('.', '_', trim($_GET['tags'])));
foreach ($Tags as $Tag) {
$Tag = preg_replace('/[^a-z0-9_]/', '', $Tag);
if ($Tag != '') {
$Where[] = "g.TagList REGEXP '[[:<:]]".db_string($Tag)."[[:>:]]'";
$TagWhere[] = "g.TagList REGEXP '[[:<:]]".db_string($Tag)."[[:>:]]'";
}
}
$Operator = $TagsAny ? ' OR ' : ' AND ';
$Where[] = '('.implode($Operator, $TagWhere).')';
}
$Year1 = (int)$_GET['year1'];
$Year2 = (int)$_GET['year2'];
@ -35,9 +38,7 @@
}
$Filtered = !empty($Where);
if ($_GET['anyall'] === 'any' && !empty($Where)) {
$Where = '('.implode(' OR ', $Where).')';
} else {
if (!empty($Where)) {
$Where = implode(' AND ', $Where);
}
$WhereSum = (empty($Where)) ? '' : md5($Where);
@ -66,17 +67,18 @@
if ($Cache->get_query_lock('top10votes')) {
$DB->query($Query);
$Results = $DB->collect('GroupID');
$Data = $DB->to_array('GroupID');
$Results = $DB->to_array('GroupID', MYSQLI_ASSOC, false);
$Ranks = Votes::calc_ranks($DB->to_pair('GroupID', 'Score', false));
$Groups = Torrents::get_groups($Results);
$Groups = Torrents::get_groups(array_keys($Results));
$TopVotes = array();
foreach ($Results as $GroupID) {
foreach ($Results as $GroupID => $Votes) {
$TopVotes[$GroupID] = $Groups[$GroupID];
$TopVotes[$GroupID]['Ups'] = $Data[$GroupID]['Ups'];
$TopVotes[$GroupID]['Total'] = $Data[$GroupID]['Total'];
$TopVotes[$GroupID]['Score'] = $Data[$GroupID]['Score'];
$TopVotes[$GroupID]['Ups'] = $Votes['Ups'];
$TopVotes[$GroupID]['Total'] = $Votes['Total'];
$TopVotes[$GroupID]['Score'] = $Votes['Score'];
$TopVotes[$GroupID]['Rank'] = $Ranks[$GroupID];
}
$Cache->cache_value('top10votes_'.$Limit.$WhereSum, $TopVotes, 60 * 30);
@ -85,7 +87,6 @@
$TopVotes = false;
}
}
View::show_header("Top $Limit Voted Groups",'browse,voting');
?>
<div class="thin">
@ -104,8 +105,8 @@
<td class="label">Tags (comma-separated):</td>
<td class="ft_taglist">
<input type="text" name="tags" size="75" value="<? if (!empty($_GET['tags'])) { echo display_str($_GET['tags']);} ?>" />&nbsp;
<input type="radio" id="rdoAll" name="anyall" value="all"<?=($_GET['anyall'] !== 'any' ? ' checked="checked"' : '')?> /><label for="rdoAll"> All</label>&nbsp;&nbsp;
<input type="radio" id="rdoAny" name="anyall" value="any"<?=($_GET['anyall'] === 'any' ? ' checked="checked"' : '')?> /><label for="rdoAny"> Any</label>
<input type="radio" id="rdoAll" name="anyall" value="all"<?=(!isset($TagsAny) ? ' checked="checked"' : '')?> /><label for="rdoAll"> All</label>&nbsp;&nbsp;
<input type="radio" id="rdoAny" name="anyall" value="any"<?=(isset($TagsAny) ? ' checked="checked"' : '')?> /><label for="rdoAny"> Any</label>
</td>
</tr>
<tr id="yearfilter">
@ -128,7 +129,7 @@
$Bookmarks = Bookmarks::all_bookmarks('torrent');
?>
<h3>Top <?="$Limit $Caption"?>
<h3>Top <?=$Limit?>
<?
if (empty($_GET['advanced'])) { ?>
<small class="top10_quantity_links">
@ -155,9 +156,8 @@
</h3>
<?
// This code was copy-pasted from collages and should die in a fire
$Number = 0;
$NumGroups = 0;
$TorrentTable = '';
foreach ($TopVotes as $GroupID => $Group) {
extract(Torrents::array_group($Group));
$UpVotes = $Group['Ups'];
@ -166,21 +166,17 @@
$DownVotes = $TotalVotes - $UpVotes;
$IsBookmarked = in_array($GroupID, $Bookmarks);
// Handle stats and stuff
$Number++;
$NumGroups++;
$UserVote = isset($UserVotes[$GroupID]) ? $UserVotes[$GroupID]['Type'] : '';
$TorrentTags = new Tags($TagList);
$DisplayName = $Number.' - ';
$DisplayName = "$Group[Rank] - ";
if (!empty($ExtendedArtists[1]) || !empty($ExtendedArtists[4]) || !empty($ExtendedArtists[5])|| !empty($ExtendedArtists[6])) {
unset($ExtendedArtists[2]);
unset($ExtendedArtists[3]);
$DisplayName .= Artists::display_artists($ExtendedArtists);
} elseif (count($GroupArtists) > 0) {
$DisplayName .= Artists::display_artists(array('1'=>$GroupArtists));
} elseif (count($Artists) > 0) {
$DisplayName .= Artists::display_artists(array('1' => $Artists));
}
$DisplayName .= '<a href="torrents.php?id='.$GroupID.'" class="tooltip" title="View torrent group" dir="ltr">'.$GroupName.'</a>';
@ -221,7 +217,7 @@
<? } ?>
<div class="group_info clear">
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID,$UserVotes[$GroupID]['Type']);?>-->
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID, $UserVote);?>-->
<? if ($IsBookmarked) { ?>
<span class="bookmark" style="float: right;"><a href="#" class="bookmarklink_torrent_<?=$GroupID?> brackets remove_bookmark" onclick="Unbookmark('torrent', <?=$GroupID?>, 'Bookmark'); return false;">Remove bookmark</a></span>
<? } else { ?>
@ -352,7 +348,7 @@
<? } ?>
]
</span>
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID, $UserVotes[$GroupID]['Type']);?>-->
<strong><?=$DisplayName?></strong> <!--<?Votes::vote_link($GroupID, $UserVote);?>-->
<div class="tags"><?=$TorrentTags->format()?></div>
</div>
</td>
@ -372,12 +368,12 @@
<td class="cats_col"><!-- category --></td>
<td width="70%">Torrents</td>
<td>Size</td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" alt="Snatches" title="Snatches" class="tooltip" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" alt="Seeders" title="Seeders" class="tooltip" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" alt="Leechers" title="Leechers" class="tooltip" /></td>
<td class="sign snatches"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" alt="Snatches" title="Snatches" class="tooltip" /></td>
<td class="sign seeders"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" alt="Seeders" title="Seeders" class="tooltip" /></td>
<td class="sign leechers"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" alt="Leechers" title="Leechers" class="tooltip" /></td>
</tr>
<?
if ($TorrentList === false) { ?>
if ($TopVotes === false) { ?>
<tr>
<td colspan="7" class="center">Server is busy processing another top list request. Please try again in a minute.</td>
</tr>

View File

@ -952,17 +952,17 @@ function header_link($SortKey, $DefaultWay = 'DESC') {
<td>Files</td>
<td><a href="<?=header_link('s3')?>"><?=$TimeLabel?></a></td>
<td><a href="<?=header_link('s4')?>">Size</a></td>
<td class="sign">
<td class="sign snatches">
<a href="<?=header_link('s5')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" />
</a>
</td>
<td class="sign">
<td class="sign seeders">
<a href="<?=header_link('s6')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" />
</a>
</td>
<td class="sign">
<td class="sign leechers">
<a href="<?=header_link('s7')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" />
</a>

View File

@ -966,17 +966,17 @@ function header_link($SortKey, $DefaultWay = 'desc') {
<td>Files</td>
<td><a href="<?=header_link('time')?>">Time</a></td>
<td><a href="<?=header_link('size')?>">Size</a></td>
<td class="sign">
<td class="sign snatches">
<a href="<?=header_link('snatched')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" />
</a>
</td>
<td class="sign">
<td class="sign seeders">
<a href="<?=header_link('seeders')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" />
</a>
</td>
<td class="sign">
<td class="sign leechers">
<a href="<?=header_link('leechers')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" />
</a>

View File

@ -517,9 +517,9 @@ function compare($X, $Y) {
<tr class="colhead_dark">
<td width="80%"><strong>Torrents</strong></td>
<td><strong>Size</strong></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
<td class="sign snatches"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign seeders"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign leechers"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
</tr>
<?
function filelist($Str) {

View File

@ -233,9 +233,9 @@ function header_link($SortKey, $DefaultWay = 'desc') {
<td>Files</td>
<td><a href="<?=header_link('time')?>">Time</a></td>
<td><a href="<?=header_link('size')?>">Size</a></td>
<td class="sign"><a href="<?=header_link('snatches')?>"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></a></td>
<td class="sign"><a href="<?=header_link('seeders')?>"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></a></td>
<td class="sign"><a href="<?=header_link('leechers')?>"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></a></td>
<td class="sign snatches"><a href="<?=header_link('snatches')?>"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></a></td>
<td class="sign seeders"><a href="<?=header_link('seeders')?>"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></a></td>
<td class="sign leechers"><a href="<?=header_link('leechers')?>"><img src="static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></a></td>
</tr>
<?
unset($FilterResults['FilterLabel']);

View File

@ -473,17 +473,17 @@ function header_link($SortKey, $DefaultWay = 'DESC') {
<td><a href="<?=header_link('Name', 'ASC')?>">Torrent</a></td>
<td><a href="<?=header_link('Time')?>">Time</a></td>
<td><a href="<?=header_link('Size')?>">Size</a></td>
<td class="sign">
<td class="sign snatches">
<a href="<?=header_link('Snatched')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" />
</a>
</td>
<td class="sign">
<td class="sign seeders">
<a href="<?=header_link('Seeders')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" />
</a>
</td>
<td class="sign">
<td class="sign leechers">
<a href="<?=header_link('Leechers')?>">
<img src="static/styles/<?=$LoggedUser['StyleName']?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" />
</a>

View File

@ -262,9 +262,9 @@
<td width="1%"><!-- expand/collapse --></td>
<td width="70%"><strong>Torrents</strong></td>
<td>Size</td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
<td class="sign snatches"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/snatched.png" class="tooltip" alt="Snatches" title="Snatches" /></td>
<td class="sign seeders"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/seeders.png" class="tooltip" alt="Seeders" title="Seeders" /></td>
<td class="sign leechers"><img src="static/styles/<?=$LoggedUser['StyleName'] ?>/images/leechers.png" class="tooltip" alt="Leechers" title="Leechers" /></td>
</tr>
<?=$TorrentTable?>
</table>

View File

@ -31,6 +31,9 @@ function changeRippyImage() {
case 6:
image = "cassie.png";
break;
case 7:
image = "drone.png";
break;
default:
image = "rippy.png";
break;

View File

@ -182,7 +182,7 @@ function commStats(userid) {
ajax.get('ajax.php?action=community_stats&userid=' + userid, function(JSONresponse) {
var response = JSON.parse(JSONresponse) || false;
if (!response || response.status == 'failure') {
$('.user_commstats').html('An error occured');
$('.user_commstats').html('An error occurred');
return;
}
displayCommStats(response.response);