diff --git a/classes/class_view.php b/classes/class_view.php index 2785bf72..1208d40a 100644 --- a/classes/class_view.php +++ b/classes/class_view.php @@ -10,9 +10,9 @@ class View * This function is to include the header file on a page. * * @param $PageTitle the title of the page - * @param $JSIncludes is a comma separated list of js files to be inclides on - * the page, ONLY PUT THE RELATIVE LOCATION WITHOUT .js - * ex: 'somefile,somdire/somefile' + * @param $JSIncludes is a comma-separated list of JS files to be included on + * the page. ONLY PUT THE RELATIVE LOCATION WITHOUT '.js' + * example: 'somefile,somedir/somefile' */ public static function show_header($PageTitle='',$JSIncludes='') { @@ -93,7 +93,7 @@ public static function render_template ($TemplateName, $Args) * variables. * * All files must be placed within {self::IncludePath}. Create and organize - * new paths and files. (eg: /design/views/artist/, design/view/forums/, etc.) + * new paths and files. (e.g.: /design/views/artist/, design/view/forums/, etc.) * * @static * @param string $TemplateFile A relative path to a PHTML file @@ -129,4 +129,4 @@ public static function parse ($TemplateFile, array $Variables = null, $Buffer = return include $Template; } } -} \ No newline at end of file +} diff --git a/design/privatefooter.php b/design/privatefooter.php index 79e76324..0d9a7274 100644 --- a/design/privatefooter.php +++ b/design/privatefooter.php @@ -19,10 +19,10 @@ $Load = sys_getloadavg(); ?> -

- Site and design © -

-

Last activity from .

+

Site and design ©

+ +

Last activity from .

+

Time: ms Used: diff --git a/design/privateheader.php b/design/privateheader.php index e65ebae6..93c0a67f 100644 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -20,13 +20,16 @@ - - + @@ -45,13 +48,17 @@ - - + - + - - + @@ -61,22 +68,23 @@ var userid = ; //]]> - - @@ -100,7 +108,7 @@

+ get_value('subscriptions_user_new_'.$LoggedUser['ID']); -if($NewSubscriptions === FALSE) { - if($LoggedUser['CustomForums']) { +if ($NewSubscriptions === false) { + if ($LoggedUser['CustomForums']) { unset($LoggedUser['CustomForums']['']); $RestrictedForums = implode("','", array_keys($LoggedUser['CustomForums'], 0)); $PermittedForums = implode("','", array_keys($LoggedUser['CustomForums'], 1)); @@ -179,9 +187,9 @@ $ModBar = array(); //Quotes -if($LoggedUser['NotifyOnQuote']) { +if ($LoggedUser['NotifyOnQuote']) { $QuoteNotificationsCount = $Cache->get_value('notify_quoted_'.$LoggedUser['ID']); - if($QuoteNotificationsCount === FALSE) { + if ($QuoteNotificationsCount === false) { if ($LoggedUser['CustomForums']) { unset($LoggedUser['CustomForums']['']); $RestrictedForums = implode("','", array_keys($LoggedUser['CustomForums'], 0)); @@ -191,22 +199,22 @@ FROM users_notify_quoted AS q LEFT JOIN forums_topics AS t ON t.ID = q.PageID LEFT JOIN forums AS f ON f.ID = t.ForumID - WHERE q.UserID='".$LoggedUser['ID']."' AND q.UnRead AND q.Page = 'forums' AND ((f.MinClassRead <= '$LoggedUser[Class]'"; - if(!empty($RestrictedForums)) { - $sql.=' AND f.ID NOT IN (\''.$RestrictedForums.'\')'; + WHERE q.UserID=$LoggedUser[ID] AND q.UnRead=1 AND q.Page = 'forums' AND ((f.MinClassRead<='$LoggedUser[Class]'"; + if (!empty($RestrictedForums)) { + $sql .= " AND f.ID NOT IN ('$RestrictedForums')"; } $sql .= ')'; - if(!empty($PermittedForums)) { - $sql.=' OR f.ID IN (\''.$PermittedForums.'\')'; + if (!empty($PermittedForums)) { + $sql .= " OR f.ID IN ('$PermittedForums')"; } $sql .= ')'; $DB->query($sql); list($QuoteNotificationsCount) = $DB->next_record(); $Cache->cache_value('notify_quoted_'.$LoggedUser['ID'], $QuoteNotificationsCount, 0); - } - if($QuoteNotificationsCount > 0) { - $Alerts[] = ''. 'New quote'. ($QuoteNotificationsCount > 1 ? 's' : '') . ''; - } + } + if ($QuoteNotificationsCount > 0) { + $Alerts[] = ''. 'New quote'. ($QuoteNotificationsCount > 1 ? 's' : '') . ''; + } } // News @@ -242,7 +250,7 @@ } // Staff blog -if(check_perms('users_mod')) { +if (check_perms('users_mod')) { global $SBlogReadTime, $LatestSBlogTime; if (!$SBlogReadTime && ($SBlogReadTime = $Cache->get_value('staff_blog_read_'.$LoggedUser['ID'])) === false) { $DB->query("SELECT Time FROM staff_blog_visits WHERE UserID = ".$LoggedUser['ID']); @@ -291,9 +299,9 @@ $Alerts[] = ''.'You have '.$NewMessages.(($NewMessages > 1) ? ' new messages' : ' new message').''; } -if($LoggedUser['RatioWatch']) { +if ($LoggedUser['RatioWatch']) { $Alerts[] = ''.'Ratio Watch'.': '.'You have '.time_diff($LoggedUser['RatioWatchEnds'], 3).' to get your ratio over your required ratio or your leeching abilities will be disabled.'; -} else if($LoggedUser['CanLeech'] != 1) { +} elseif ($LoggedUser['CanLeech'] != 1) { $Alerts[] = ''.'Ratio Watch'.': '.'Your downloading privileges are disabled until you meet your required ratio.'; } @@ -314,14 +322,14 @@ } // Collage subscriptions -if(check_perms('site_collages_subscribe')) { +if (check_perms('site_collages_subscribe')) { $NewCollages = $Cache->get_value('collage_subs_user_new_'.$LoggedUser['ID']); - if($NewCollages === FALSE) { + if ($NewCollages === false) { $DB->query("SELECT COUNT(DISTINCT s.CollageID) FROM users_collage_subs as s JOIN collages as c ON s.CollageID = c.ID JOIN collages_torrents as ct on ct.CollageID = c.ID - WHERE s.UserID = ".$LoggedUser['ID']." AND ct.AddedOn > s.LastVisit AND c.Deleted = '0'"); + WHERE s.UserID = $LoggedUser[ID] AND ct.AddedOn > s.LastVisit AND c.Deleted = '0'"); list($NewCollages) = $DB->next_record(); $Cache->cache_value('collage_subs_user_new_'.$LoggedUser['ID'], $NewCollages, 0); } @@ -329,16 +337,16 @@ $Alerts[] = ''.'You have '.$NewCollages.(($NewCollages > 1) ? ' new collage updates' : ' new collage update').''; } } -if(check_perms('users_mod')) { +if (check_perms('users_mod')) { $ModBar[] = ''.'Toolbox'.''; } if (check_perms('users_mod') || $LoggedUser['PermissionID'] == FORUM_MOD) { $NumStaffPMs = $Cache->get_value('num_staff_pms_'.$LoggedUser['ID']); if ($NumStaffPMs === false) { - if(check_perms('users_mod')) { + if (check_perms('users_mod')) { $DB->query("SELECT COUNT(ID) FROM staff_pm_conversations WHERE Status='Unanswered' AND (AssignedToUser=".$LoggedUser['ID']." OR (Level >= ".max(700,$Classes[MOD]['Level'])." AND Level <=".$LoggedUser['Class']."))"); } - if($LoggedUser['PermissionID'] == FORUM_MOD) { + if ($LoggedUser['PermissionID'] == FORUM_MOD) { $DB->query("SELECT COUNT(ID) FROM staff_pm_conversations WHERE Status='Unanswered' AND (AssignedToUser=".$LoggedUser['ID']." OR Level = '". $Classes[FORUM_MOD]['Level'] . "')"); } list($NumStaffPMs) = $DB->next_record(); @@ -349,7 +357,7 @@ $ModBar[] = ''.$NumStaffPMs.' Staff PMs'; } } -if(check_perms('admin_reports')) { +if (check_perms('admin_reports')) { $NumTorrentReports = $Cache->get_value('num_torrent_reportsv2'); if ($NumTorrentReports === false) { $DB->query("SELECT COUNT(ID) FROM reportsv2 WHERE Status='New'"); @@ -360,7 +368,7 @@ $ModBar[] = ''.$NumTorrentReports.(($NumTorrentReports == 1) ? ' Report' : ' Reports').''; } -if(check_perms('admin_reports')) { +if (check_perms('admin_reports')) { $NumOtherReports = $Cache->get_value('num_other_reports'); if ($NumOtherReports === false) { $DB->query("SELECT COUNT(ID) FROM reports WHERE Status='New'"); @@ -371,7 +379,7 @@ if ($NumOtherReports > 0) { $ModBar[] = ''.$NumOtherReports.(($NumTorrentReports == 1) ? ' Other report' : ' Other reports').''; } -} else if(check_perms('project_team')) { +} elseif (check_perms('project_team')) { $NumUpdateReports = $Cache->get_value('num_update_reports'); if ($NumUpdateReports === false) { $DB->query("SELECT COUNT(ID) FROM reports WHERE Status='New' AND Type = 'request_update'"); @@ -382,7 +390,7 @@ if ($NumUpdateReports > 0) { $ModBar[] = ''.'Request update reports'.''; } -} else if(check_perms('site_moderate_forums')) { +} elseif (check_perms('site_moderate_forums')) { $NumForumReports = $Cache->get_value('num_forum_reports'); if ($NumForumReports === false) { $DB->query("SELECT COUNT(ID) FROM reports WHERE Status='New' AND Type IN('collages_comment', 'Post', 'requests_comment', 'thread', 'torrents_comment')"); @@ -400,19 +408,17 @@ if (!empty($Alerts) || !empty($ModBar)) { ?>
- +
- +
- +
- -
-
diff --git a/sections/artist/delete_alias.php b/sections/artist/delete_alias.php index 87457d1c..46ce63ab 100644 --- a/sections/artist/delete_alias.php +++ b/sections/artist/delete_alias.php @@ -1,10 +1,12 @@ record_count() == 1) { +if ($DB->record_count() == 1) { //This is the last alias on the artist - error("That alias is the last alias for that artist, removing it would cause bad things to happen."); + error("That alias is the last alias for that artist; removing it would cause bad things to happen."); } $DB->query("SELECT GroupID FROM torrents_artists WHERE AliasID='$AliasID'"); -if($DB->record_count() > 0) { +if ($DB->record_count() > 0) { list($GroupID) = $DB->next_record(); - if($GroupID != 0) { - error("That alias still has the group ($GroupID) attached, fix that first."); + if ($GroupID != 0) { + error("That alias still has the group ($GroupID) attached. Fix that first."); } } -$DB->query("SELECT aa.ArtistID, ag.Name, aa.Name FROM artists_alias AS aa JOIN artists_group AS ag ON aa.ArtistID=ag.ArtistID WHERE aa.AliasID=".$AliasID); +$DB->query("SELECT aa.ArtistID, ag.Name, aa.Name FROM artists_alias AS aa JOIN artists_group AS ag ON aa.ArtistID=ag.ArtistID WHERE aa.AliasID=$AliasID"); list($ArtistID, $ArtistName, $AliasName) = $DB->next_record(MYSQLI_NUM, false); $DB->query("DELETE FROM artists_alias WHERE AliasID='$AliasID'"); $DB->query("UPDATE artists_alias SET Redirect='0' WHERE Redirect='$AliasID'"); -Misc::write_log("The alias ".$AliasID." (".$AliasName.") was removed from the artist ".$ArtistID." (".$ArtistName.") by user ".$LoggedUser['ID']." (".$LoggedUser['Username'].")"); +Misc::write_log("The alias $AliasID ($AliasName) was removed from the artist $ArtistID ($ArtistName) by user $LoggedUser[ID] ($LoggedUser[Username])"); -header('Location: '.$_SERVER['HTTP_REFERER']); +header("Location: $_SERVER[HTTP_REFERER]"); diff --git a/sections/rules/upload.php b/sections/rules/upload.php index 7bf2ceb0..dadb00ee 100644 --- a/sections/rules/upload.php +++ b/sections/rules/upload.php @@ -219,7 +219,7 @@
  • ↑_ 2.1.19.3. Bonus discs may be uploaded separately in accordance with 2.4. Please note that individual bonus tracks cannot be uploaded without the rest of the album. Bonus tracks are not bonus discs. Enhanced audio CDs with data or video tracks must be uploaded without the non-audio tracks. If you want to share the videos or data, you may host the files off-site with a file sharing service and include the link to that service in your torrent description.
  • -
  • ↑_ 2.1.20. User made discographies may not be uploaded. Multi-album torrents are not allowed on the site under any circumstances. That means no discographies, Pitchfork compilations, etc. If releases (e.g., CD singles) were never released as a bundled set, do not upload them together. Live Soundboard material should be uploaded as one torrent per night, per show, or per venue. Including more than one show in a torrent results in a multi-album torrent. Exceptions: Only official boxsets and official compilation collections can contain multiple albums.
  • +
  • ↑_ 2.1.20. User made discographies may not be uploaded. Multi-album torrents are not allowed on the site under any circumstances. That means no discographies, Pitchfork compilations, etc. If releases (e.g., CD singles) were never released as a bundled set, do not upload them together. Live soundboard material should be uploaded as one torrent per night, per show, or per venue. Including more than one show in a torrent results in a multi-album torrent. Exceptions: Only official boxsets and official compilation collections can contain multiple albums.
  • ↑_ 2.1.21. Pre-emphasis is allowed in lossless torrents only. Lossless FLAC torrents with pre-emphasis are allowed on the site. They are allowed to coexist with lossless de-emphasized torrents (both in their separate album edition groups). In contrast, lossy formats may not have pre-emphasis and will be deleted if uploaded.
  • ↑_ 2.1.22. Edition Information must be provided for digitally-sourced torrents. Digitally-sourced (including CD-sourced) rips of albums that were first released before the availability of their source medium must have accurate edition information. For example, if a CD rip is of an album whose original release date was 1957, predating the creation and distribution of CDs, then the uploader must make note of the correct year in which the CD was pressed, and preferably note the catalog identification as well. Rips for which Edition Information cannot be provided must be marked as an "Unknown Release." Under no circumstances may you guess or feign knowledge of the Edition Information. See this wiki for more information on album editions.
  • ↑_ 2.1.23. Audio can only be ripped from a video game CD under very specific circumstances. Audio ripped from a video game DVD is not allowed on site. @@ -423,7 +423,7 @@
  • ↑_ 2.6.4. Soundboards must comprise complete shows. Incomplete shows will be deleted.
  • ↑_ 2.6.5. Soundboards may not include soundchecks. Those uploaded with a soundcheck will be deleted.
  • -
  • ↑_ 2.6.6. One Tape generation and one CD-R generation are allowed for each Soundboard upload. +
  • ↑_ 2.6.6. One tape generation and one CD-R generation are allowed for each soundboard upload.