diff --git a/classes/script_start.php b/classes/script_start.php index c3657bf5..e038df72 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -1502,7 +1502,7 @@ function display_artists($Artists, $MakeLink = true, $IncludeHyphen = true) { $link = display_artist($Artists[1][0], $MakeLink); break; case 2: - $link = display_artist($Artists[1][0], $MakeLink).' '.($MakeLink ? '&' : '&').' '.display_artist($Artists[1][1], $MakeLink); + $link = display_artist($Artists[1][0], $MakeLink).' & '.display_artist($Artists[1][1], $MakeLink); break; default: $link = 'Various Artists'; @@ -1513,7 +1513,7 @@ function display_artists($Artists, $MakeLink = true, $IncludeHyphen = true) { $link .= ' with '.display_artist($Artists[2][0], $MakeLink); break; case 2: - $link .= ' with '.display_artist($Artists[2][0], $MakeLink).' '.($MakeLink ? '&' : '&').' '.display_artist($Artists[2][1], $MakeLink); + $link .= ' with '.display_artist($Artists[2][0], $MakeLink).' & '.display_artist($Artists[2][1], $MakeLink); break; } } diff --git a/sections/artist/artist.php b/sections/artist/artist.php index 138b8560..a7688c49 100644 --- a/sections/artist/artist.php +++ b/sections/artist/artist.php @@ -588,14 +588,14 @@ function compare($X, $Y){ - +    (+) - + diff --git a/sections/artist/artist_rearrange.php b/sections/artist/artist_rearrange.php index 774c3d3f..122a5320 100644 --- a/sections/artist/artist_rearrange.php +++ b/sections/artist/artist_rearrange.php @@ -616,7 +616,7 @@ function display_name($ReleaseType) { -    (+) +    (+) diff --git a/sections/login/index.php b/sections/login/index.php index 9a899355..148daaaf 100644 --- a/sections/login/index.php +++ b/sections/login/index.php @@ -180,25 +180,25 @@ function log_attempt($UserID) { Bans=Bans+1 WHERE ID='".db_string($AttemptID)."'"); - if ($Bans>9) { // Automated bruteforce prevention - $IP = ip2unsigned($_SERVER['REMOTE_ADDR']); - $DB->query("SELECT Reason FROM ip_bans WHERE ".$IP." BETWEEN FromIP AND ToIP"); - if($DB->record_count() > 0) { - //Ban exists already, only add new entry if not for same reason - list($Reason) = $DB->next_record(MYSQLI_BOTH, false); - if($Reason != "Automated ban per >60 failed login attempts") { - $DB->query("UPDATE ip_bans - SET Reason = CONCAT('Automated ban per >60 failed login attempts AND ', Reason) - WHERE FromIP = ".$IP." AND ToIP = ".$IP); - } - } else { - //No ban - $DB->query("INSERT INTO ip_bans - (FromIP, ToIP, Reason) VALUES - ('$IP','$IP', 'Automated ban per >60 failed login attempts')"); - $Cache->delete_value('ip_bans'); + if ($Bans>9) { // Automated bruteforce prevention + $IP = ip2unsigned($_SERVER['REMOTE_ADDR']); + $DB->query("SELECT Reason FROM ip_bans WHERE ".$IP." BETWEEN FromIP AND ToIP"); + if($DB->record_count() > 0) { + //Ban exists already, only add new entry if not for same reason + list($Reason) = $DB->next_record(MYSQLI_BOTH, false); + if($Reason != "Automated ban per >60 failed login attempts") { + $DB->query("UPDATE ip_bans + SET Reason = CONCAT('Automated ban per >60 failed login attempts AND ', Reason) + WHERE FromIP = ".$IP." AND ToIP = ".$IP); } + } else { + //No ban + $DB->query("INSERT INTO ip_bans + (FromIP, ToIP, Reason) VALUES + ('$IP','$IP', 'Automated ban per >60 failed login attempts')"); + $Cache->delete_value('ip_bans'); } + } } else { // User has attempted fewer than 6 logins $DB->query("UPDATE login_attempts SET @@ -285,10 +285,6 @@ function log_attempt($UserID) { $DB->query($Sql); - if($Attempts > 0) { - $DB->query("DELETE FROM login_attempts WHERE ID='".db_string($AttemptID)."'"); - } - if (!empty($_COOKIE['redirect'])) { $URL = $_COOKIE['redirect']; setcookie('redirect','',time()-60*60*24,'/','',false); diff --git a/sections/requests/index.php b/sections/requests/index.php index 9b96c181..aa21bdb5 100644 --- a/sections/requests/index.php +++ b/sections/requests/index.php @@ -4,6 +4,10 @@ $RequestTax = 0.5; +// Minimum and default amount of upload to remove from the user when they vote. +// Also change in static/functions/requests.js +$MinimumVote = 20*1024*1024; + if(!empty($LoggedUser['DisableRequests'])) { error('Your request privileges have been removed.'); } diff --git a/sections/requests/request.php b/sections/requests/request.php index 4d2b94cc..56b7f933 100644 --- a/sections/requests/request.php +++ b/sections/requests/request.php @@ -233,8 +233,8 @@ -  (+) - Costs 20 MB +  (+) + Costs diff --git a/sections/requests/takevote.php b/sections/requests/takevote.php index 7f3fc457..253a88a4 100644 --- a/sections/requests/takevote.php +++ b/sections/requests/takevote.php @@ -15,8 +15,8 @@ $RequestID = $_GET['id']; -if(empty($_GET['amount']) || !is_number($_GET['amount']) || $_GET['amount'] < 20*1024*1024) { - $Amount = 20*1024*1024; +if(empty($_GET['amount']) || !is_number($_GET['amount']) || $_GET['amount'] < $MinimumVote) { + $Amount = $MinimumVote; } else { $Amount = $_GET['amount']; } @@ -63,6 +63,7 @@ $Cache->delete_value('user_stats_'.$LoggedUser['ID']); update_sphinx_requests($RequestID); + echo 'success'; } elseif($LoggedUser['BytesUploaded'] < $Amount) { echo 'bankrupt'; } diff --git a/sections/rules/upload.php b/sections/rules/upload.php index 362fa881..fd545372 100644 --- a/sections/rules/upload.php +++ b/sections/rules/upload.php @@ -239,7 +239,7 @@
  • ↑_ 2.1.4. Bitrates must accurately reflect encoder presets or average bitrate of the audio files. You are responsible for supplying correct format and bitrate information on the upload page. All audio torrents must have accurate labeling for the encoder settings used or the average bitrate. This means that lossy formats such as MP3, AAC, DTS, and Ogg Vorbis cannot have a bitrate of "lossless." Conversely, FLAC cannot have fixed bitrates or xxx(VBR) bitrates. Non-LAME formats and MP3 encoders cannot use LAME's VBR switches (-V0, -V1, -V2, etc). If you are uploading a non-LAME MP3, determine the average bitrate of the files. Then select "Other" for bitrate and type in xxx (VBR) where "xxx" is the bitrate you found. Some tools to determine the bitrates of audio files are Audio Identifier, Mr. Questionman (mirror), or Dnuos. If the bitrate is labeled incorrectly on your torrent, your torrent may be deleted if reported.
  • -
  • ↑_ 2.1.5. Albums must not be ripped or uploaded as a single track. If the tracks on the original CD were separate, you must rip them to separate files. Clearly, CDs with single tracks are permitted to be uploaded without prior splitting. You are encouraged to use MusiCutter or MP3DirectCut for MP3 and CUE Tools, XLD, or EAC for lossless if you need to split up an album image into individual tracks. Exceptions: Gapless DJ or professional mixes released as MP3+CUE images are allowed as unseparated album images on the site. This includes scene DJ mixes. No other format is allowed in this unsplit form. Unsplit MP3 albums containing separate tracks are not allowed if missing a cue sheet. +
  • ↑_ 2.1.5. Albums must not be ripped or uploaded as a single track. If the tracks on the original CD were separate, you must rip them to separate files. Clearly, CDs with single tracks are permitted to be uploaded without prior splitting. You are encouraged to use MusiCutter or MP3DirectCut for MP3 and CUE Tools, XLD, or EAC for lossless if you need to split up an album image into individual tracks. Exceptions: Gapless DJ or professional mixes released as MP3+CUE images are allowed as unseparated album images on the site. This includes scene DJ mixes. No other format is allowed in this unsplit form. Unsplit MP3 albums containing separate tracks are not allowed if missing a cue sheet.
  • ↑_ 2.1.6. All music torrents must be encoded with a single encoder using the same settings. This means you cannot create a torrent which contains both CBR and VBR files, nor can you upload torrents containing a mix of APS (VBR)/-V2 (VBR) and APX (VBR)/-V0 (VBR). Including other kinds of audio quality, such as duplicate lossy files in a lossless torrent is also prohibited. This kind of release is referred to as a "mutt rip." @@ -375,23 +375,23 @@
  • ↑_ 2.2.15. Lossless Specific Dupe Rules