diff --git a/classes/class_irc.php b/classes/class_irc.php index 4046dd51..2decd32e 100644 --- a/classes/class_irc.php +++ b/classes/class_irc.php @@ -138,20 +138,10 @@ protected function ip_check($IP,$Gline=false,$Channel=BOT_REPORT_CHAN) { $this->send_raw('GLINE *@'.$IP.' 90d :DNSBL Proxy'); } } - $IPBans = $Cache->get_value('ip_bans'); - if(!is_array($IPBans)) { - $DB->query("SELECT FromIP, ToIP FROM ip_bans"); - $IPBans = $DB->to_array(); - $Cache->cache_value('ip_bans', $IPBans, 0); - } - foreach($IPBans as $IPBan) { - list($FromIP, $ToIP) = $IPBan; - $Long = ip2long($IP); - if($Long >= $FromIP && $Long <= $ToIP) { - $this->send_to($Channel, 'Site IP Ban Detected: '.$IP); - if ($Gline) { - $this->send_raw('GLINE *@'.$IP.' 90d :IP Ban'); - } + if(Tools::site_ban_ip($IP)) { + $this->send_to($Channel, 'Site IP Ban Detected: '.$IP); + if ($Gline) { + $this->send_raw('GLINE *@'.$IP.' 90d :IP Ban'); } } }*/ diff --git a/classes/class_text.php b/classes/class_text.php index f2c2665b..7ef19037 100644 --- a/classes/class_text.php +++ b/classes/class_text.php @@ -623,7 +623,7 @@ private function to_html ($Array) { $Str.=''.$Block['Val'].''; break; case 'tex': - $Str.=''; + $Str.='TeX'; break; case 'plain': $Str.=$Block['Val']; @@ -710,11 +710,11 @@ private function to_html ($Array) { $Str.=''; } else { - $Str .= 'Use of the [mature] tag requires a description. The correct format is as follows: [mature=description] ...content... [/mature], where "description" is a mandatory description of the post. Misleading descriptions will be penalized. For further information on our mature content policies, please refer to this wiki.'; + $Str .= 'Use of the [mature] tag requires a description. The correct format is as follows: [mature=description] ...content... [/mature], where "description" is a mandatory description of the post. Misleading descriptions will be penalized. For further information on our mature content policies, please refer to this wiki.'; } } else { - $Str .= 'Mature content has been blocked. You can choose to view mature content by editing your settings.'; + $Str .= 'Mature content has been blocked. You can choose to view mature content by editing your settings.'; } break; case 'img': diff --git a/classes/class_text3.php b/classes/class_text3.php index 4ad84d92..b84b1e2b 100644 --- a/classes/class_text3.php +++ b/classes/class_text3.php @@ -440,7 +440,7 @@ function to_html($Array) { $Str.=''.$Block['Val'].''; break; case 'tex': - $Str.=''; + $Str.='TeX'; break; case 'plain': $Str.=$Block['Val']; diff --git a/sections/inbox/inbox.php b/sections/inbox/inbox.php index 6ee5b6af..084ba517 100644 --- a/sections/inbox/inbox.php +++ b/sections/inbox/inbox.php @@ -111,9 +111,9 @@
-   -   - +   +   + diff --git a/sections/requests/new_edit.php b/sections/requests/new_edit.php index 750ac772..a114bd58 100644 --- a/sections/requests/new_edit.php +++ b/sections/requests/new_edit.php @@ -310,7 +310,7 @@ - + - + diff --git a/sections/requests/takenew_edit.php b/sections/requests/takenew_edit.php index d19abe95..7e8c7edb 100644 --- a/sections/requests/takenew_edit.php +++ b/sections/requests/takenew_edit.php @@ -165,7 +165,7 @@ } if (($NeedCue || $NeedLog)) { - if (!empty($_POST['all_media']) || $MediaArray[0] != 0) { + if (!(empty($_POST['all_media']) && $MediaArray[0] == 0)) { $Err = "Only CD is allowed as media for FLAC Log/Cue Requests."; } } diff --git a/sections/rules/chat.php b/sections/rules/chat.php index c4dfdbad..6ee3edd7 100644 --- a/sections/rules/chat.php +++ b/sections/rules/chat.php @@ -68,17 +68,17 @@
  • No requesting invites to any sites anywhere on the site or IRC. Invites may be offered in the invite forum, and nowhere else.
  • -
  • - No language other than English is permitted in the forums. If we can't understand it, we can't moderate it. -
  • - Be cautious when posting mature content on the forums. All mature imagery must abide by the rules found here. Gratuitously sexual or violent content which falls outside of the allowable categories will result in a warning or worse. + No language other than English is permitted in the forums. If we can't understand it, we can't moderate it.
  • - Mature content in posts must be properly tagged. The correct format is as follows: [mature=description] ...content... [/mature], where “description” is a mandatory description of the post contents. Misleading or inadequate descriptions will be penalized. + Be cautious when posting mature content on the forums. All mature imagery must abide by the rules found here. Gratuitously sexual or violent content which falls outside of the allowable categories will result in a warning or worse.
  • - Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum you’re posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests & Designs, The Laboratory. If you are in doubt about a post’s appropriateness, send a Staff PM to the Forum Moderators and wait for a reply before proceeding. + Mature content in posts must be properly tagged. The correct format is as follows: [mature=description] ...content... [/mature], where “description” is a mandatory description of the post contents. Misleading or inadequate descriptions will be penalized. +
  • +
  • + Threads created for the exclusive purpose of posting mature imagery will be trashed. Mature content (including graphic album art) should be contextually relevant to the thread and/or forum you’re posting in. Mature content is only allowed in: The Lounge, The Lounge +1, The Library, Music, Power Users, Elite, Torrent Masters, VIPs, Comics, Contests & Designs, The Laboratory. If you are in doubt about a post’s appropriateness, send a Staff PM to the Forum Moderators and wait for a reply before proceeding.
  • diff --git a/sections/rules/clients.php b/sections/rules/clients.php index 28563d7a..a3215b05 100644 --- a/sections/rules/clients.php +++ b/sections/rules/clients.php @@ -16,7 +16,7 @@
    Required FLAC only extra(s)Required CD FLAC only extra(s)
    - +
  • - Power Users and Donors get one personal collage. Elites can have two, Torrent Masters can have up to three, Power TMs up to four and Elite TM+ up to five. Donors always receive one more than the class maximum. + Power Users and Donors get one personal collage. Elites can have two, Torrent Masters can have up to three, Power TMs up to four and Elite TM+ up to five. Donors always receive one more than the class maximum.
  • Every collage must have at least 3 torrent groups in it, except for collages of type "Label", "Personal", and "Staff Picks". diff --git a/sections/rules/rules.php b/sections/rules/rules.php index 5d9477f1..4c0e7c5e 100644 --- a/sections/rules/rules.php +++ b/sections/rules/rules.php @@ -14,9 +14,9 @@
  • One account per person per lifetime. Anyone creating additional accounts will be banned.
  • Avatars must not exceed 256 kB or be vertically longer than 400 pixels. Avatars must be safe for work, be entirely unoffensive, and cannot contain any nudity or religious imagery. Use common sense.
  • Do not post our .torrent files on other sites. Every .torrent file has your personal passkey embedded in it. The tracker will automatically disable your account if you share your torrent files with others. You will not get your account back. This doesn't prohibit you from sharing the content on other sites, but does prohibit you from sharing the .torrent file.
  • -
  • Any torrent you are seeding to this tracker must only have our tracker's URL in it. Adding another tracker's URL will cause incorrect data to be sent to our tracker, and will lead to your getting disabled for cheating. Similarly, your client must have DHT and PEX (peer exchange) disabled for all What.CD torrents.
  • +
  • Any torrent you are seeding to this tracker must only have our tracker's URL in it. Adding another tracker's URL will cause incorrect data to be sent to our tracker, and will lead to your getting disabled for cheating. Similarly, your client must have DHT and PEX (peer exchange) disabled for all What.CD torrents.
  • This is a torrent site which promotes sharing amongst the community. If you are not willing to give back to the community what you take from it, this site is not for you. In other words, we expect you to have an acceptable share ratio. If you download a torrent, please, seed the copy you have until there are sufficient people seeding the torrent data before you stop.
  • -
  • Do not browse the site using proxies or TOR. The site will automatically alert us. This includes VPNs with dynamic IP addresses.
  • +
  • Do not browse the site using proxies or TOR. The site will automatically alert us. This includes VPNs with dynamic IP addresses.
  • Asking for invites to any site is not allowed anywhere on What.CD or our IRC network. Invites may be offered in the Invites forum, and nowhere else.
  • Trading and selling invites is strictly prohibited, as is offering them in public - this includes on any forum which is not a class-restricted section on an invitation-only torrent site.
  • Trading, selling, sharing, or giving away your account is prohibited. If you no longer want your account, send a staff PM requesting that it be disabled.
  • diff --git a/sections/staff/functions.php b/sections/staff/functions.php index 0cbe3830..91806ad5 100644 --- a/sections/staff/functions.php +++ b/sections/staff/functions.php @@ -17,7 +17,7 @@ function get_fls() { JOIN users_main AS m ON m.ID=i.UserID JOIN permissions AS p ON p.ID=m.PermissionID JOIN users_levels AS l ON l.UserID = i.UserID - WHERE l.PermissionID = 41"); + WHERE l.PermissionID = ".FLS_TEAM); $FLS = $DB->to_array(false, MYSQLI_BOTH, array(3,'Paranoia')); $Cache->cache_value('fls', $FLS, 180); } diff --git a/sections/staff/index.php b/sections/staff/index.php index 79ad9ac5..260689a3 100644 --- a/sections/staff/index.php +++ b/sections/staff/index.php @@ -23,7 +23,7 @@

    First-line Support

    -

    These users are not official staff members - they're users who have volunteered their time to help people in need. Please treat them with respect and read this before contacting them.

    +

    These users are not official staff members - they're users who have volunteered their time to help people in need. Please treat them with respect and read this before contacting them.

    Allowed Client
    @@ -53,7 +53,7 @@

    Forum Moderators

    -

    Forum Mods are users who have been promoted to help moderate the forums. They can only help with forum oriented questions

    +

    Forum Moderators are users who have been promoted to help moderate the forums. They can only help with forum-oriented questions.

    Username
    diff --git a/sections/staffpm/staff_inbox.php b/sections/staffpm/staff_inbox.php index f4ab1a85..68b1337a 100644 --- a/sections/staffpm/staff_inbox.php +++ b/sections/staffpm/staff_inbox.php @@ -89,7 +89,7 @@ [Open][Resolved] - [Scoreboard] + [Scoreboard] diff --git a/sections/tools/index.php b/sections/tools/index.php index b72fce46..9e02b573 100644 --- a/sections/tools/index.php +++ b/sections/tools/index.php @@ -169,10 +169,10 @@ include('managers/official_tags.php'); break; - case 'tag_aliases': - include('managers/tag_aliases.php'); - break; - case 'permissions': + case 'tag_aliases': + include('managers/tag_aliases.php'); + break; + case 'permissions': if (!check_perms('admin_manage_permissions')) { error(403); } if (!empty($_REQUEST['id'])) { @@ -218,15 +218,15 @@ if (!$Err) { if (!is_numeric($_REQUEST['id'])) { $DB->query("INSERT INTO permissions (Level,Name,Secondary,PermittedForums,`Values`,DisplayStaff) - VALUES ('".db_string($Level)."', - '".db_string($Name)."', + VALUES ('".db_string($Level)."', + '".db_string($Name)."', ".$Secondary.", '".db_string($Forums)."', '".db_string(serialize($Values))."', '".db_string($DisplayStaff)."')"); } else { $DB->query("UPDATE permissions SET Level='".db_string($Level)."', - Name='".db_string($Name)."', + Name='".db_string($Name)."', Secondary=".$Secondary.", PermittedForums='".db_string($Forums)."', `Values`='".db_string(serialize($Values))."', diff --git a/sections/tools/managers/bans.php b/sections/tools/managers/bans.php index 20a6831e..c1fa511d 100644 --- a/sections/tools/managers/bans.php +++ b/sections/tools/managers/bans.php @@ -4,10 +4,11 @@ if (isset($_POST['submit'])) { authorize(); + $IPA = substr($_POST['start'], 0, strcspn($_POST['start'], '.')); if ($_POST['submit'] == 'Delete') { //Delete if(!is_number($_POST['id']) || $_POST['id'] == ''){ error(0); } $DB->query('DELETE FROM ip_bans WHERE ID='.$_POST['id']); - $Bans = $Cache->delete_value('ip_bans'); + $Cache->delete_value('ip_bans_'.$IPA); } else { //Edit & Create, Shared Validation $Val->SetFields('start', '1','regex','You must include the starting IP address.',array('regex'=>'/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/i')); $Val->SetFields('end', '1','regex','You must include the ending IP address.',array('regex'=>'/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/i')); @@ -28,19 +29,12 @@ ToIP='$End', Reason='$Notes' WHERE ID='".$_POST['id']."'"); - $Bans = $Cache->get_value('ip_bans'); - $Cache->begin_transaction(); - $Cache->update_row($_POST['id'], array($_POST['id'], $Start, $End)); - $Cache->commit_transaction(); } else { //Create $DB->query("INSERT INTO ip_bans (FromIP, ToIP, Reason) VALUES ('$Start','$End', '$Notes')"); - $ID = $DB->inserted_id(); - $Bans = $Cache->get_value('ip_bans'); - $Bans[$ID] = array($ID, $Start, $End); - $Cache->cache_value('ip_bans', $Bans, 0); } + $Cache->delete_value('ip_bans_'.$IPA); } } diff --git a/sections/tools/misc/quick_ban.php b/sections/tools/misc/quick_ban.php index f5ed7cdd..9f0453ae 100644 --- a/sections/tools/misc/quick_ban.php +++ b/sections/tools/misc/quick_ban.php @@ -1,22 +1,21 @@ query('DELETE FROM ip_bans WHERE ID='.$_GET['id']); - $Bans = $Cache->delete_value('ip_bans'); - } - elseif($_GET['perform'] == 'create') { +if (!check_perms('admin_manage_ipbans')) { error(403); } + if (isset($_GET['perform'])) { + $IPA = substr($_GET['ip'], 0, strcspn($_GET['ip'], '.')); + if ($_GET['perform'] == 'delete') { + if (!is_number($_GET['id']) || $_GET['id'] == '') { + error(0); + } + $DB->query('DELETE FROM ip_bans WHERE ID='.$_GET['id']); + $Bans = $Cache->delete_value('ip_bans_'.$IPA); + } elseif ($_GET['perform'] == 'create') { $Notes = db_string($_GET['notes']); - $IP = Tools::ip_to_unsigned($_GET['ip']); //Sanitized by Validation regex - $DB->query("INSERT INTO ip_bans - (FromIP, ToIP, Reason) VALUES - ('$IP','$IP', '$Notes')"); - $ID = $DB->inserted_id(); - $Bans = $Cache->get_value('ip_bans'); - $Bans[$ID] = array($ID, $Start, $End); - $Cache->cache_value('ip_bans', $Bans, 0); + $IP = Tools::ip_to_unsigned($_GET['ip']); //Sanitized by Validation regex + $DB->query("INSERT INTO ip_bans + (FromIP, ToIP, Reason) VALUES + ('$IP','$IP', '$Notes')"); + $Cache->delete_value('ip_bans_'.$IPA); } } diff --git a/sections/torrents/add_tag.php b/sections/torrents/add_tag.php index cf92445e..e8332f9d 100644 --- a/sections/torrents/add_tag.php +++ b/sections/torrents/add_tag.php @@ -14,9 +14,9 @@ $Tags = explode(',', $_POST['tagname']); foreach($Tags as $TagName) { $TagName = Misc::sanitize_tag($TagName); - + if(!empty($TagName)) { - $TagName = Misc::get_alias_tag($TagName); + $TagName = Misc::get_alias_tag($TagName); // Check DB for tag matching name $DB->query("SELECT t.ID FROM tags AS t WHERE t.Name LIKE '".$TagName."'"); list($TagID) = $DB->next_record(); diff --git a/sections/torrents/delete.php b/sections/torrents/delete.php index 8b275c7f..0be2ba5e 100644 --- a/sections/torrents/delete.php +++ b/sections/torrents/delete.php @@ -161,7 +161,7 @@
    Username (Deleted) - + [DL] uploaded by diff --git a/sections/torrents/download.php b/sections/torrents/download.php index edb3b73d..438069f4 100644 --- a/sections/torrents/download.php +++ b/sections/torrents/download.php @@ -3,8 +3,8 @@ enforce_login(); $TorrentPass = $LoggedUser['torrent_pass']; $DownloadAlt = $LoggedUser['DownloadAlt']; - $UserID = $LoggedUser['ID']; - $AuthKey = $LoggedUser['AuthKey']; + $UserID = $LoggedUser['ID']; + $AuthKey = $LoggedUser['AuthKey']; } else { $UserInfo = $Cache->get_value('user_'.$_REQUEST['torrent_pass']); if(!is_array($UserInfo)) { @@ -33,12 +33,12 @@ if (!is_number($TorrentID)){ error(0); } /* uTorrent remote redownloads .torrent files every fifteen minutes - to prevent this retardation from blowing bandwidth etc., let's block it - if he's downloaded the .torrent file twice before */ + to prevent this retardation from blowing bandwidth etc., let's block it + if he's downloaded the .torrent file twice before */ if (strpos($_SERVER['HTTP_USER_AGENT'], 'BTWebClient') !== FALSE) { $DB->query("SELECT 1 FROM users_downloads WHERE UserID=$UserID AND TorrentID=$TorrentID LIMIT 3"); if ($DB->record_count() > 2) { - error('You have already downloaded this .torrent three times. If you need to download it again, please do so from your browser, not through uTorrent remote.'); + error('You have already downloaded this .torrent three times. If you need to download it again, please do so from your browser, not through uTorrent remote.'); die(); } } @@ -96,10 +96,10 @@ if (!Torrents::has_token($TorrentID)) { if ($FLTokens <= 0) { - error("You do not have any freeleech tokens left. Please use the regular DL link."); + error("You do not have any freeleech tokens left. Please use the regular DL link."); } if ($Size >= 1073741824) { - error("This torrent is too large. Please use the regular DL link."); + error("This torrent is too large. Please use the regular DL link."); } // Let the tracker know about this diff --git a/sections/torrents/edit.php b/sections/torrents/edit.php index 63de4c1c..ec86c88d 100644 --- a/sections/torrents/edit.php +++ b/sections/torrents/edit.php @@ -1,12 +1,12 @@ " />

    Description


    - + - +
    -

    Vanity House />

    - +

    Vanity House />

    +

    Edit summary


    diff --git a/sections/torrents/index.php b/sections/torrents/index.php index ad4bce4f..5859102f 100644 --- a/sections/torrents/index.php +++ b/sections/torrents/index.php @@ -357,12 +357,12 @@ function js_pages($Action, $TorrentID, $NumResults, $CurrentPage) { error(403); } break; - case 'warn' : - include(SERVER_ROOT.'/sections/torrents/warn.php'); - break; - case 'take_warn' : - include(SERVER_ROOT.'/sections/torrents/take_warn.php'); - break; + case 'warn' : + include(SERVER_ROOT.'/sections/torrents/warn.php'); + break; + case 'take_warn' : + include(SERVER_ROOT.'/sections/torrents/take_warn.php'); + break; default: enforce_login(); diff --git a/sections/torrents/merge.php b/sections/torrents/merge.php index 3ffec808..26f1db6c 100644 --- a/sections/torrents/merge.php +++ b/sections/torrents/merge.php @@ -52,7 +52,7 @@ } else { authorize(); - // Votes ninjutsu. This is so annoyingly complicated. + // Votes ninjutsu. This is so annoyingly complicated. // 1. Get a list of everybody who voted on the old group and clear their cache keys $DB->query("SELECT UserID FROM users_votes WHERE GroupID='$GroupID'"); while (list($UserID) = $DB->next_record()) { @@ -64,12 +64,12 @@ $DB->query("DELETE FROM users_votes WHERE GroupID='$GroupID'"); $DB->query("INSERT INTO torrents_votes (GroupID, Ups, Total, Score) SELECT $NewGroupID, UpVotes, TotalVotes, VoteScore - FROM (SELECT IFNULL(SUM(IF(Type='Up',1,0)),0) As UpVotes, + FROM (SELECT IFNULL(SUM(IF(Type='Up',1,0)),0) As UpVotes, COUNT(1) AS TotalVotes, binomial_ci(IFNULL(SUM(IF(Type='Up',1,0)),0), COUNT(1)) AS VoteScore - FROM users_votes - WHERE GroupID = $NewGroupID - GROUP BY GroupID) AS a + FROM users_votes + WHERE GroupID = $NewGroupID + GROUP BY GroupID) AS a ON DUPLICATE KEY UPDATE Ups = a.UpVotes, Total = a.TotalVotes, @@ -126,4 +126,4 @@ header('Location: torrents.php?id='.$GroupID); } -?> \ No newline at end of file +?> diff --git a/sections/torrents/notify.php b/sections/torrents/notify.php index 1a43f27e..c46c5a8b 100644 --- a/sections/torrents/notify.php +++ b/sections/torrents/notify.php @@ -190,7 +190,7 @@ function header_link($SortKey, $DefaultWay = "desc") { diff --git a/sections/torrents/rename.php b/sections/torrents/rename.php index 852358cf..3e803d03 100644 --- a/sections/torrents/rename.php +++ b/sections/torrents/rename.php @@ -21,7 +21,7 @@ Torrents::update_hash($GroupID); -Misc::write_log("Torrent Group ".$GroupID." (".$OldName.") was renamed to '".$NewName."' by ".$LoggedUser['Username']); +Misc::write_log("Torrent Group ".$GroupID." (".$OldName.") was renamed to '".$NewName."' by ".$LoggedUser['Username']); Torrents::write_group_log($GroupID, 0, $LoggedUser['ID'], "renamed to ".$NewName." from ".$OldName, 0); header('Location: torrents.php?id='.$GroupID); diff --git a/sections/torrents/takeedit.php b/sections/torrents/takeedit.php index 2e731407..ef0bc546 100644 --- a/sections/torrents/takeedit.php +++ b/sections/torrents/takeedit.php @@ -1,9 +1,9 @@ next_record(); if (!$caID && $Properties['CassetteApproved']) { - $DB->query("INSERT INTO torrents_cassette_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')"); + $DB->query("INSERT INTO torrents_cassette_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')"); } if ($caID && !$Properties['CassetteApproved']) { - $DB->query("DELETE FROM torrents_cassette_approved WHERE TorrentID='$TorrentID'"); + $DB->query("DELETE FROM torrents_cassette_approved WHERE TorrentID='$TorrentID'"); } $DB->query("SELECT TorrentID FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'"); list($lmaID) = $DB->next_record(); if (!$lmaID && $Properties['LossymasterApproved']) { - $DB->query("INSERT INTO torrents_lossymaster_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')"); + $DB->query("INSERT INTO torrents_lossymaster_approved VALUES($TorrentID, $LoggedUser[ID], '".sqltime()."')"); } if ($lmaID && !$Properties['LossymasterApproved']) { - $DB->query("DELETE FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'"); + $DB->query("DELETE FROM torrents_lossymaster_approved WHERE TorrentID='$TorrentID'"); } $DB->query("SELECT TorrentID FROM torrents_lossyweb_approved WHERE TorrentID='$TorrentID'"); diff --git a/sections/torrents/takegroupedit.php b/sections/torrents/takegroupedit.php index 7021bd45..53dcccb3 100644 --- a/sections/torrents/takegroupedit.php +++ b/sections/torrents/takegroupedit.php @@ -51,7 +51,7 @@ if(!preg_match("/^".IMAGE_REGEX."$/i", $Image)) { $Image = ''; } - check_imagehost($Image); + check_imagehost($Image); $Summary = db_string($_POST['summary']); } diff --git a/sections/torrents/vote.php b/sections/torrents/vote.php index 968a3f33..75c83332 100644 --- a/sections/torrents/vote.php +++ b/sections/torrents/vote.php @@ -3,7 +3,7 @@ $GroupVotes = Votes::get_group_votes($GroupID); $TotalVotes = $GroupVotes['Total']; - $UpVotes = $GroupVotes['Ups']; + $UpVotes = $GroupVotes['Ups']; $Voted = isset($UserVotes[$GroupID])?$UserVotes[$GroupID]['Type']:false; ?> diff --git a/sections/torrents/warn.php b/sections/torrents/warn.php index 424fdf28..b613b743 100644 --- a/sections/torrents/warn.php +++ b/sections/torrents/warn.php @@ -8,10 +8,10 @@ $Key = (int) $_POST['key']; $UserInfo = Users::user_info($UserID); $DB -> query("SELECT - tc.Body, - tc.AddedTime - FROM torrents_comments AS tc - WHERE tc.ID='" . db_string($PostID) . "'"); + tc.Body, + tc.AddedTime + FROM torrents_comments AS tc + WHERE tc.ID='" . db_string($PostID) . "'"); list($PostBody) = $DB -> next_record(); View::show_header('Warn User'); diff --git a/sections/upload/upload.php b/sections/upload/upload.php index cd2bcddc..576d2c3d 100644 --- a/sections/upload/upload.php +++ b/sections/upload/upload.php @@ -1,13 +1,13 @@ get_value('genre_tags'); if(!$GenreTags) { $DB->query("SELECT Name FROM tags WHERE TagType='genre' ORDER BY Name"); - $GenreTags = $DB->collect('Name'); + $GenreTags = $DB->collect('Name'); $Cache->cache_value('genre_tags', $GenreTags, 3600*6); } @@ -105,7 +105,7 @@

    ':''?>Last Updated: ':''?>

    The following releases are currently forbidden from being uploaded to the site. Do not upload them unless your torrent meets a condition specified in the comment. - (Show) + (Show)

    diff --git a/sections/upload/upload_handle.php b/sections/upload/upload_handle.php index 0e89c429..7e0315fd 100644 --- a/sections/upload/upload_handle.php +++ b/sections/upload/upload_handle.php @@ -1,8 +1,8 @@ $TorrentInfo['Format'], 'bitrate' => $TorrentInfo['Encoding']); } } @@ -843,21 +843,21 @@ if($Properties['Format']) { - $SQL.=" AND (Formats LIKE '%|".db_string(trim($Properties['Format']))."|%' OR Formats='') "; + $SQL.=" AND (Formats LIKE '%|".db_string(trim($Properties['Format']))."|%' OR Formats='') "; } else { - $SQL.=" AND (Formats='') "; + $SQL.=" AND (Formats='') "; } if($_POST['bitrate']) { - $SQL.=" AND (Encodings LIKE '%|".db_string(trim($_POST['bitrate']))."|%' OR Encodings='') "; + $SQL.=" AND (Encodings LIKE '%|".db_string(trim($_POST['bitrate']))."|%' OR Encodings='') "; } else { - $SQL.=" AND (Encodings='') "; + $SQL.=" AND (Encodings='') "; } if($Properties['Media']) { - $SQL.=" AND (Media LIKE '%|".db_string(trim($Properties['Media']))."|%' OR Media='') "; + $SQL.=" AND (Media LIKE '%|".db_string(trim($Properties['Media']))."|%' OR Media='') "; } else { - $SQL.=" AND (Media='') "; + $SQL.=" AND (Media='') "; } // Either they aren't using NewGroupsOnly diff --git a/sections/user/community_stats.php b/sections/user/community_stats.php index 74046be6..7bccefbc 100644 --- a/sections/user/community_stats.php +++ b/sections/user/community_stats.php @@ -43,29 +43,29 @@ +if (($Override=check_paranoia_here('collages+'))) { ?>
  • >Collages started: [ + :'' ?> href="collages.php?userid=" title="View">View]
  • +if (($Override=check_paranoia_here('collagecontribs+'))) { ?>
  • >Collages contributed to: [ href="collages.php?userid=&contrib=1" title="View">View] + 'class="paranoia_override"' : ''?> href="collages.php?userid=&contrib=1" title="View">View]
  • + if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
  • Requests filled:
  • Requests voted: collected
  • @@ -80,11 +80,11 @@ + if ($ViewCount && !$ViewBounty && !$ViewAll) { ?>
  • Requests voted:
  • Requests voted: spent
  • @@ -97,13 +97,13 @@ [ title="View">View] +if (($Override=check_paranoia_here('uploads+'))) { ?>
  • >Uploaded: - [ href="torrents.php?type=uploaded&userid=" title="View">View] [[ href="torrents.php?type=uploaded&userid=" title="View">View] [Download]
  • +if (($Override=check_paranoia_here('uniquegroups+'))) { ?>
  • > Unique groups: @@ -111,12 +111,12 @@
  • +if (($Override=check_paranoia_here('perfectflacs+'))) { ?>
  • >"Perfect" FLACs: + if (($Override=check_paranoia_here('perfectflacs'))) { ?> [ href="torrents.php?type=uploaded&userid=&filter=perfectflac">View]
  • query("SELECT IF(remaining=0,'Seeding','Leeching') AS Type, COUNT(x.uid) FROM xbt_files_users AS x INNER JOIN torrents AS t ON t.ID=x.fid WHERE x.uid='$UserID' AND x.active=1 GROUP BY Type"); @@ -138,7 +138,7 @@ +if (($Override=check_paranoia_here('leeching+'))) { ?>
  • >Leeching: [ href="torrents.php?type=leeching&userid=" title="View">View] diff --git a/sections/user/connchecker.php b/sections/user/connchecker.php index ae727567..d9ff89e6 100644 --- a/sections/user/connchecker.php +++ b/sections/user/connchecker.php @@ -20,7 +20,7 @@ die('Invalid IP'); } - if (empty($_GET['port']) || !is_number($_GET['port']) || $_GET['port']<1 || $_GET['port']>65535){ + if (empty($_GET['port']) || !is_number($_GET['port']) || $_GET['port']<1 || $_GET['port']>65535){ die('Invalid Port'); } @@ -41,7 +41,7 @@
  • - + @@ -57,7 +57,7 @@
    - - \ No newline at end of file + diff --git a/sections/user/edit.php b/sections/user/edit.php index b5ed8dd6..69fc3a02 100644 --- a/sections/user/edit.php +++ b/sections/user/edit.php @@ -37,15 +37,15 @@ } function paranoia_level($Setting) { - global $Paranoia; - // 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid - return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2); + global $Paranoia; + // 0: very paranoid; 1: stats allowed, list disallowed; 2: not paranoid + return (in_array($Setting . '+', $Paranoia)) ? 0 : (in_array($Setting, $Paranoia) ? 1 : 2); } function display_paranoia($FieldName) { - $Level = paranoia_level($FieldName); - print ''."  \n"; - print ''; + $Level = paranoia_level($FieldName); + print ''."  \n"; + print ''; } function checked($Checked) { @@ -89,7 +89,7 @@ function checked($Checked) { @@ -111,12 +111,12 @@ function checked($Checked) { @@ -124,15 +124,15 @@ function checked($Checked) { @@ -140,9 +140,9 @@ function checked($Checked) { @@ -216,52 +216,52 @@ function checked($Checked) { - - - - - - - - + + + + + + + + @@ -290,12 +290,12 @@ function checked($Checked) {

    If changing this field, you must enter your current password in the "Current password" field before saving your changes.

    - - - - + + + + diff --git a/sections/user/index.php b/sections/user/index.php index 9f839cd4..e28aebe0 100644 --- a/sections/user/index.php +++ b/sections/user/index.php @@ -34,8 +34,8 @@ if (check_perms('admin_advanced_user_search') && check_perms('users_view_ips') && check_perms('users_view_email')) { include('advancedsearch.php'); } - - else { + + else { include('search.php'); } break; @@ -91,38 +91,38 @@ $Cache->delete_value('collage_subs_user_new_'.$UserID); include(SERVER_ROOT.'/sections/user/user.php'); break; - - //Provide public methods for Last.fm data gets. - case 'lastfm_compare': - if(isset($_GET['username'])) { - echo LastFM::compare_user_with($_GET['username']); - } - break; - case 'lastfm_last_played_track': - if(isset($_GET['username'])) { - echo LastFM::get_last_played_track($_GET['username']); - } - break; - case 'lastfm_top_artists': - if(isset($_GET['username'])) { - echo LastFM::get_top_artists($_GET['username']); - } - break; - case 'lastfm_top_albums': - if(isset($_GET['username'])) { - echo LastFM::get_top_albums($_GET['username']); - } - break; - case 'lastfm_top_tracks': - if(isset($_GET['username'])) { - echo LastFM::get_top_tracks($_GET['username']); - } - break; - case 'lastfm_clear_cache': - if(isset($_GET['username']) && isset($_GET['uid'])) { - echo LastFM::clear_cache($_GET['username'],$_GET['uid']); - } - break; + + //Provide public methods for Last.fm data gets. + case 'lastfm_compare': + if(isset($_GET['username'])) { + echo LastFM::compare_user_with($_GET['username']); + } + break; + case 'lastfm_last_played_track': + if(isset($_GET['username'])) { + echo LastFM::get_last_played_track($_GET['username']); + } + break; + case 'lastfm_top_artists': + if(isset($_GET['username'])) { + echo LastFM::get_top_artists($_GET['username']); + } + break; + case 'lastfm_top_albums': + if(isset($_GET['username'])) { + echo LastFM::get_top_albums($_GET['username']); + } + break; + case 'lastfm_top_tracks': + if(isset($_GET['username'])) { + echo LastFM::get_top_tracks($_GET['username']); + } + break; + case 'lastfm_clear_cache': + if(isset($_GET['username']) && isset($_GET['uid'])) { + echo LastFM::clear_cache($_GET['username'],$_GET['uid']); + } + break; default: if (isset($_REQUEST['id'])) { include(SERVER_ROOT.'/sections/user/user.php'); diff --git a/sections/user/invite.php b/sections/user/invite.php index 9e4c6865..75c93c51 100644 --- a/sections/user/invite.php +++ b/sections/user/invite.php @@ -148,7 +148,7 @@
    - You may not send invites while on Ratio Watch or while your leeching privileges are disabled. Please read this article for more information. + You may not send invites while on Ratio Watch or while your leeching privileges are disabled. Please read this article for more information.
    query("SELECT username FROM lastfm_users WHERE ID = '$UserID'"); if ($DB->record_count()) { - list($LastFMUsername) = $DB->next_record(); - $LastFMInfo = LastFM::get_user_info($LastFMUsername); - //Hand everything else over to js (gets data via the username in an id-d div) to allow faster page loading. - ?> -
    -
    Last.fm
    -
      -
    • - Username: -
    • -
      data-uid=""> -
      -
    • - [Show more info] - get_value('lastfm_clear_cache_' . $LoggedUser . '_' . $_GET['id']); - if (empty($Response)) : - ?> - - [Reload stats] - - -
    • -
    -
    - + list($LastFMUsername) = $DB->next_record(); + $LastFMInfo = LastFM::get_user_info($LastFMUsername); + //Hand everything else over to js (gets data via the username in an id-d div) to allow faster page loading. + ?> +
    +
    Last.fm
    +
      +
    • + Username: +
    • +
      data-uid=""> +
      +
    • + [Show more info] + get_value('lastfm_clear_cache_' . $LoggedUser . '_' . $_GET['id']); + if (empty($Response)) : + ?> + + [Reload stats] + + +
    • +
    +
    diff --git a/sections/user/linkedfunctions.php b/sections/user/linkedfunctions.php index 287d500e..46a9da04 100644 --- a/sections/user/linkedfunctions.php +++ b/sections/user/linkedfunctions.php @@ -58,8 +58,8 @@ function link_users($UserID, $TargetID) { } $AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] and [user]".$TargetInfo['Username']."[/user] linked by ".$LoggedUser['Username']; - $DB->query("UPDATE users_info AS i - JOIN users_dupes AS d ON d.UserID = i.UserID + $DB->query("UPDATE users_info AS i + JOIN users_dupes AS d ON d.UserID = i.UserID SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment) WHERE d.GroupID = $GroupID"); } @@ -80,9 +80,9 @@ function unlink_user($UserID) { return; } $AdminComment = sqltime()." - Linked accounts updated: [user]".$UserInfo['Username']."[/user] unlinked by ".$LoggedUser['Username']; - $DB->query("UPDATE users_info AS i - JOIN users_dupes AS d1 ON d1.UserID = i.UserID - JOIN users_dupes AS d2 ON d2.GroupID = d1.GroupID + $DB->query("UPDATE users_info AS i + JOIN users_dupes AS d1 ON d1.UserID = i.UserID + JOIN users_dupes AS d2 ON d2.GroupID = d1.GroupID SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment) WHERE d2.UserID = $UserID"); $DB->query("DELETE FROM users_dupes WHERE UserID='$UserID'"); @@ -126,8 +126,8 @@ function dupe_comments($GroupID, $Comments) { $DB->query("UPDATE dupe_groups SET Comments = CONCAT('".db_string($Comments)."\n\n',Comments) WHERE ID = '$GroupID'"); } - $DB->query("UPDATE users_info AS i - JOIN users_dupes AS d ON d.UserID = i.UserID + $DB->query("UPDATE users_info AS i + JOIN users_dupes AS d ON d.UserID = i.UserID SET i.AdminComment = CONCAT('".db_string($AdminComment)."\n\n', i.AdminComment) WHERE d.GroupID = $GroupID"); } diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index 0fe79e57..25334cfe 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -36,7 +36,7 @@ $Warned = (isset($_POST['Warned']))? 1 : 0; $Logs095 = (int)$_POST['095logs']; if(isset($_POST['Uploaded']) && isset($_POST['Downloaded'])) { - $Uploaded = ($_POST['Uploaded'] == "" ? 0 : $_POST['Uploaded']); + $Uploaded = ($_POST['Uploaded'] == "" ? 0 : $_POST['Uploaded']); if($Arithmetic = strpbrk($Uploaded, '+-')) { $Uploaded += max(-$Uploaded, Format::get_bytes($Arithmetic)); } @@ -140,7 +140,7 @@ $Cur = $DB->next_record(MYSQLI_ASSOC, false); if ($_POST['comment_hash'] != $Cur['CommentHash']) { - error("Somebody else has moderated this user since you loaded it. Please go back and refresh the page."); + error("Somebody else has moderated this user since you loaded it. Please go back and refresh the page."); } //NOW that we know the class of the current user, we can see if one staff member is trying to hax0r us. @@ -292,7 +292,7 @@ } } -if ($Donor!=$Cur['Donor'] && check_perms('users_give_donor')) { +if ($Donor!=$Cur['Donor'] && check_perms('users_give_donor')) { $UpdateSet[]="Donor='$Donor'"; $EditSummary[]="donor status changed"; $LightUpdates['Donor']=$Donor; @@ -332,7 +332,7 @@ $DeleteKeys = true; } -if ($Visible!=$Cur['Visible'] && check_perms('users_make_invisible')) { +if ($Visible!=$Cur['Visible'] && check_perms('users_make_invisible')) { $UpdateSet[]="Visible='$Visible'"; $EditSummary[]="visibility changed"; $LightUpdates['Visible']=$Visible; @@ -393,7 +393,7 @@ Misc::send_pm($UserID,0,db_string('Your warning has been reduced'),db_string("Your warning has been reduced by $ReduceWarning week(s) by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason")); $UpdateSet[]="Warned=Warned - INTERVAL $ReduceWarning WEEK"; - $DB->query("SELECT Warned - INTERVAL $ReduceWarning WEEK FROM users_info WHERE UserID='$UserID'"); + $DB->query("SELECT Warned - INTERVAL $ReduceWarning WEEK FROM users_info WHERE UserID='$UserID'"); list($WarnedUntil) = $DB->next_record(); $Msg = "warning reduced by $ReduceWarning week(s) to $WarnedUntil"; if ($WarnReason) { $Msg.=" for $WarnReason"; } diff --git a/sections/user/user.php b/sections/user/user.php index eff1c1bd..b2ba72c5 100644 --- a/sections/user/user.php +++ b/sections/user/user.php @@ -241,13 +241,13 @@ function check_paranoia_here($Setting) {
  • >Tokens:
  • + if (($OwnProfile || check_perms('users_mod')) && $Warned!='0000-00-00 00:00:00') { ?>
  • >Warning expires:
  • - - + + diff --git a/sections/userhistory/email_history.php b/sections/userhistory/email_history.php index 8f21b40a..c3d99749 100644 --- a/sections/userhistory/email_history.php +++ b/sections/userhistory/email_history.php @@ -29,23 +29,23 @@ if ($UsersOnly == 1) { $DB->query("SELECT - u.Email, - '".sqltime()."' AS Time, - u.IP, - c.Code + u.Email, + '".sqltime()."' AS Time, + u.IP, + c.Code FROM users_main AS u LEFT JOIN users_main AS u2 ON u2.Email = u.Email AND u2.ID != '$UserID' - LEFT JOIN geoip_country AS c ON INET_ATON(u.IP) BETWEEN c.StartIP AND c.EndIP - WHERE u.ID='$UserID' AND u2.ID > 0 - UNION SELECT - h.Email, - h.Time, - h.IP, - c.Code + LEFT JOIN geoip_country AS c ON INET_ATON(u.IP) BETWEEN c.StartIP AND c.EndIP + WHERE u.ID='$UserID' AND u2.ID > 0 + UNION SELECT + h.Email, + h.Time, + h.IP, + c.Code FROM users_history_emails AS h LEFT JOIN users_history_emails AS h2 ON h2.email=h.email and h2.UserID != '$UserID' - LEFT JOIN geoip_country AS c ON INET_ATON(h.IP) BETWEEN c.StartIP AND c.EndIP - WHERE h.UserID='$UserID' AND h2.UserID>0"/*AND Time<>'0000-00-00 00:00:00'*/." + LEFT JOIN geoip_country AS c ON INET_ATON(h.IP) BETWEEN c.StartIP AND c.EndIP + WHERE h.UserID='$UserID' AND h2.UserID>0"/*AND Time<>'0000-00-00 00:00:00'*/." ORDER BY Time DESC"); } else { $DB->query("SELECT diff --git a/sections/userhistory/email_history2.php b/sections/userhistory/email_history2.php index f59cd770..361998b9 100644 --- a/sections/userhistory/email_history2.php +++ b/sections/userhistory/email_history2.php @@ -36,7 +36,7 @@ GROUP_CONCAT(h.Time SEPARATOR '|') AS UserSetTimes, GROUP_CONCAT(h.IP SEPARATOR '|') AS UserIPs, GROUP_CONCAT(m2.Username SEPARATOR '|') AS Usernames, - GROUP_CONCAT(m2.Enabled SEPARATOR '|') AS UsersEnabled, + GROUP_CONCAT(m2.Enabled SEPARATOR '|') AS UsersEnabled, GROUP_CONCAT(i.Donor SEPARATOR '|') AS UsersDonor, GROUP_CONCAT(i.Warned SEPARATOR '|') AS UsersWarned FROM users_main AS m @@ -57,7 +57,7 @@ h3.Time AS UserSetTimes, h3.IP AS UserIPs, m3.Username AS Usernames, - m3.Enabled AS UsersEnabled, + m3.Enabled AS UsersEnabled, i2.Donor AS UsersDonor, i2.Warned AS UsersWarned FROM users_history_emails AS h2 @@ -118,7 +118,7 @@ $Old[$Key]['EndTime'] = $Val['Time']; $Old[$Key]['IP'] = $Val['IP']; $Old[$Key]['ElapsedTime'] = date(time() + strtotime($Old[$Key]['EndTime']) - strtotime($Old[$Key]['StartTime'])); - $Old[$Key]['Email'] = $Val['Email']; + $Old[$Key]['Email'] = $Val['Email']; } else { // Shouldn't have to be here but I'll leave it anyway @@ -126,7 +126,7 @@ $Other[$Key]['EndTime'] = $Val['Time']; $Other[$Key]['IP'] = $Val['IP']; $Other[$Key]['ElapsedTime'] = date(time() + strtotime($Other[$Key]['EndTime']) - strtotime($Other[$Key]['StartTime'])); - $Other[$Key]['Email'] = $Val['Email']; + $Other[$Key]['Email'] = $Val['Email']; } if ($Val['Usernames'] != '') { diff --git a/sections/userhistory/index.php b/sections/userhistory/index.php index 4d772cae..387cc734 100644 --- a/sections/userhistory/index.php +++ b/sections/userhistory/index.php @@ -57,17 +57,17 @@ break; case 'subscribed_collages': require('subscribed_collages.php'); - break; - case 'catchup_collages': - require('catchup_collages.php'); - break; - - case 'token_history': - require('token_history.php'); - break; - case 'quote_notifications': - require('quote_notifications.php'); - break; + break; + case 'catchup_collages': + require('catchup_collages.php'); + break; + + case 'token_history': + require('token_history.php'); + break; + case 'quote_notifications': + require('quote_notifications.php'); + break; default: //You trying to mess with me query string? To the home page with you! header('Location: index.php'); diff --git a/sections/userhistory/ip_history.php b/sections/userhistory/ip_history.php index e5e741c6..ad6cb22f 100644 --- a/sections/userhistory/ip_history.php +++ b/sections/userhistory/ip_history.php @@ -31,7 +31,7 @@ View::show_header("IP history for $Username"); ?> -query("SELECT SQL_CALC_FOUND_ROWS - h1.IP, - h1.StartTime, - h1.EndTime, - GROUP_CONCAT(h2.UserID SEPARATOR '|'), - GROUP_CONCAT(h2.StartTime SEPARATOR '|'), - GROUP_CONCAT(IFNULL(h2.EndTime,0) SEPARATOR '|'), - GROUP_CONCAT(um2.Username SEPARATOR '|'), - GROUP_CONCAT(um2.Enabled SEPARATOR '|'), - GROUP_CONCAT(ui2.Donor SEPARATOR '|'), - GROUP_CONCAT(ui2.Warned SEPARATOR '|') - FROM users_history_ips AS h1 - LEFT JOIN users_history_ips AS h2 ON h2.IP=h1.IP AND h2.UserID!=$UserID - LEFT JOIN users_main AS um2 ON um2.ID=h2.UserID - LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID + h1.IP, + h1.StartTime, + h1.EndTime, + GROUP_CONCAT(h2.UserID SEPARATOR '|'), + GROUP_CONCAT(h2.StartTime SEPARATOR '|'), + GROUP_CONCAT(IFNULL(h2.EndTime,0) SEPARATOR '|'), + GROUP_CONCAT(um2.Username SEPARATOR '|'), + GROUP_CONCAT(um2.Enabled SEPARATOR '|'), + GROUP_CONCAT(ui2.Donor SEPARATOR '|'), + GROUP_CONCAT(ui2.Warned SEPARATOR '|') + FROM users_history_ips AS h1 + LEFT JOIN users_history_ips AS h2 ON h2.IP=h1.IP AND h2.UserID!=$UserID + LEFT JOIN users_main AS um2 ON um2.ID=h2.UserID + LEFT JOIN users_info AS ui2 ON ui2.UserID=h2.UserID WHERE h1.UserID='$UserID' AND h2.UserID>0 $SearchIPQuery - GROUP BY h1.IP, h1.StartTime + GROUP BY h1.IP, h1.StartTime ORDER BY h1.StartTime DESC LIMIT $Limit"); } else { $RS = $DB->query("SELECT SQL_CALC_FOUND_ROWS - h1.IP, - h1.StartTime, + h1.IP, + h1.StartTime, h1.EndTime, GROUP_CONCAT(h2.UserID SEPARATOR '|'), GROUP_CONCAT(h2.StartTime SEPARATOR '|'), @@ -126,7 +127,7 @@ function UnBan(ip, id, elemID) { ?>
    -

    IP history for

    +

    IP address history for

    -
    IPIP address      - Or -      @@ -101,8 +101,8 @@ function checked($Checked) { Default search type
    Torrent grouping  
    Discography view
    Show snatched torrents - checked="checked" /> + checked="checked" />
    Forum posts per page
    Mature content - checked="checked" /> - -
    Avatars - - -
    Mature content + checked="checked" /> + +
    Avatars + + +
    Auto-save text - checked="checked" /> + checked="checked" />
    Voting links - checked="checked" /> + checked="checked" />
    Download torrents as text files - checked="checked" /> + checked="checked" />
    Last.fm Username -

    Your Last.fm username. Will be used to display Last.fm information on your profile which can be seen by other users.

    -
    Last.fm username +

    Your Last.fm username. Will be used to display Last.fm information on your profile which can be seen by other users.

    +
    Info - +    (+) @@ -1095,19 +1095,19 @@ function check_paranoia_here($Setting) {
    Disable: - checked="checked" /> - | - checked="checked" /> | - checked="checked" /> | - checked="checked" /> | - checked="checked" /> | - checked="checked" /> + checked="checked" /> + | + checked="checked" /> | + checked="checked" /> | + checked="checked" /> | + checked="checked" /> | + checked="checked" />
    - checked="checked" /> | - checked="checked" /> | - checked="checked" /> | - checked="checked" /> | - checked="checked" /> + checked="checked" /> | + checked="checked" /> | + checked="checked" /> | + checked="checked" /> | + checked="checked" />
    + in + if ((!$Locked || $Sticky) && (!$LastRead || $LastRead < $LastPostID)) { ?> (New!)
    full_format($Body)?> - +

    « - + Last edited by diff --git a/sections/userhistory/quote_notifications.php b/sections/userhistory/quote_notifications.php index 45019f9a..f47152f5 100644 --- a/sections/userhistory/quote_notifications.php +++ b/sections/userhistory/quote_notifications.php @@ -20,8 +20,8 @@ $PermittedForums = implode("','", array_keys($LoggedUser['CustomForums'], 1)); } $sql = "SELECT SQL_CALC_FOUND_ROWS f.ID as ForumID, f.Name as ForumName, t.Title, q.TopicID, q.PostID, q.QuoterID - FROM users_notify_quoted AS q LEFT JOIN forums_topics AS t ON t.ID = q.TopicID LEFT JOIN forums AS f ON f.ID = q.ForumID - WHERE q.UserID = $LoggedUser[ID] AND ((f.MinClassRead <= '$LoggedUser[Class]'"; + FROM users_notify_quoted AS q LEFT JOIN forums_topics AS t ON t.ID = q.TopicID LEFT JOIN forums AS f ON f.ID = q.ForumID + WHERE q.UserID = $LoggedUser[ID] AND ((f.MinClassRead <= '$LoggedUser[Class]'"; if (!empty($RestrictedForums)) { $sql .= ' AND f.ID NOT IN (\'' . $RestrictedForums . '\')'; diff --git a/sections/userhistory/subscribed_collages.php b/sections/userhistory/subscribed_collages.php index d25397f8..123962b0 100644 --- a/sections/userhistory/subscribed_collages.php +++ b/sections/userhistory/subscribed_collages.php @@ -13,20 +13,20 @@ if (!$ShowAll) { $sql = "SELECT c.ID, - c.Name, - c.NumTorrents, - s.LastVisit + c.Name, + c.NumTorrents, + s.LastVisit FROM collages AS c JOIN users_collage_subs AS s ON s.CollageID = c.ID JOIN collages_torrents AS ct ON ct.CollageID = c.ID WHERE s.UserID = ".$LoggedUser['ID']." AND c.Deleted='0' - AND ct.AddedOn > s.LastVisit + AND ct.AddedOn > s.LastVisit GROUP BY c.ID"; } else { $sql = "SELECT c.ID, - c.Name, - c.NumTorrents, - s.LastVisit + c.Name, + c.NumTorrents, + s.LastVisit FROM collages AS c JOIN users_collage_subs AS s ON s.CollageID = c.ID LEFT JOIN collages_torrents AS ct ON ct.CollageID = c.ID @@ -79,10 +79,10 @@ $RS = $DB->query("SELECT ct.GroupID, tg.WikiImage, tg.CategoryID - FROM collages_torrents AS ct + FROM collages_torrents AS ct JOIN torrents_group AS tg ON ct.GroupID = tg.ID WHERE ct.CollageID = $CollageID - AND ct.AddedOn > '$LastVisit' + AND ct.AddedOn > '$LastVisit' ORDER BY ct.AddedOn"); $NewTorrentCount = $DB->record_count(); //$NewTorrents = $DB->to_array(); diff --git a/sections/userhistory/subscriptions.php b/sections/userhistory/subscriptions.php index d05ee5b5..9f688e66 100644 --- a/sections/userhistory/subscriptions.php +++ b/sections/userhistory/subscriptions.php @@ -34,7 +34,7 @@ FROM users_subscriptions WHERE UserID = '.$LoggedUser['ID'].') AS s LEFT JOIN forums_last_read_topics AS l ON s.TopicID = l.TopicID AND l.UserID = '.$LoggedUser['ID'].' - JOIN forums_topics AS t ON t.ID = s.TopicID + JOIN forums_topics AS t ON t.ID = s.TopicID JOIN forums_posts AS p ON t.ID = p.TopicID JOIN forums AS f ON f.ID = t.ForumID WHERE p.ID <= IFNULL(l.PostID,t.LastPostID) diff --git a/sections/userhistory/token_history.php b/sections/userhistory/token_history.php index b78f7d30..d79b5440 100644 --- a/sections/userhistory/token_history.php +++ b/sections/userhistory/token_history.php @@ -45,15 +45,15 @@ list($Page,$Limit) = Format::page_limit(25); $DB->query("SELECT SQL_CALC_FOUND_ROWS - f.TorrentID, - t.GroupID, - f.Time, - f.Expired, - f.Downloaded, - f.Uses, - g.Name, - t.Format, - t.Encoding + f.TorrentID, + t.GroupID, + f.Time, + f.Expired, + f.Downloaded, + f.Uses, + g.Name, + t.Format, + t.Encoding FROM users_freeleeches AS f JOIN torrents AS t ON t.ID = f.TorrentID JOIN torrents_group AS g ON g.ID = t.GroupID diff --git a/sections/wiki/search.php b/sections/wiki/search.php index 47c490de..abc6e73d 100644 --- a/sections/wiki/search.php +++ b/sections/wiki/search.php @@ -57,7 +57,7 @@
    diff --git a/sections/wiki/takecreate.php b/sections/wiki/takecreate.php index a929d024..f94bb8ac 100644 --- a/sections/wiki/takecreate.php +++ b/sections/wiki/takecreate.php @@ -46,7 +46,7 @@ // $DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('$NewAlias', '$ArticleID')"); //} -$TitleAlias = $Alias->convert($_POST['title']); +$TitleAlias = $Alias->convert($_POST['title']); if($TitleAlias!=$Alias) { $DB->query("INSERT INTO wiki_aliases (Alias, ArticleID) VALUES ('".db_string($TitleAlias)."', '$ArticleID')"); }