diff --git a/classes/class_feed.php b/classes/class_feed.php index 7baae3d6..5d472b62 100644 --- a/classes/class_feed.php +++ b/classes/class_feed.php @@ -1,5 +1,7 @@ \n","\n\t\n"; @@ -8,11 +10,12 @@ function close_feed() { echo "\t\n"; } function channel($Title, $Description, $Section='') { - echo "\t\t", $Title, " :: ", SITE_NAME, "\n"; - echo "\t\thttp://", SITE_URL, "/", $Section, "\n"; - echo "\t\t", $Description, "\n"; + $Site = $this->UseSSL ? 'https://'.SSL_SITE_URL : 'http://'.NONSSL_SITE_URL; + echo "\t\t$Title :: ". SITE_NAME. "\n"; + echo "\t\t$Site/$Section\n"; + echo "\t\t$Description\n"; echo "\t\ten-us\n"; - echo "\t\t", date('r'), "\n"; + echo "\t\t". date('r'). "\n"; echo "\t\thttp://blogs.law.harvard.edu/tech/rss\n"; echo "\t\tGazelle Feed Class\n\n"; } @@ -22,15 +25,15 @@ function item($Title, $Description, $Page, $Creator, $Comments='', $Category='', } else { $Date = date("r",strtotime($Date)); } - $Site = NONSSL_SITE_URL; + $Site = $this->UseSSL ? 'https://'.SSL_SITE_URL : 'http://'.NONSSL_SITE_URL; $Item = "\t\t\n"; $Item .= "\t\t\t<![CDATA[$Title]]>\n"; $Item .= "\t\t\t\n"; $Item .= "\t\t\t$Date\n"; - $Item .= "\t\t\thttp://$Site/$Page\n"; - $Item .= "\t\t\thttp://$Site/$Page\n"; + $Item .= "\t\t\t$Site/$Page\n"; + $Item .= "\t\t\t$Site/$Page\n"; if ($Comments != '') { - $Item .= "\t\t\thttp://$Site/$Comments\n"; + $Item .= "\t\t\t$Site/$Comments\n"; } if ($Category != '') { $Item .= "\t\t\t\n"; diff --git a/classes/config.template b/classes/config.template index 138a37de..7f35b907 100644 --- a/classes/config.template +++ b/classes/config.template @@ -108,6 +108,8 @@ define('STATUS_CHAN', '#'); // Miscellaneous values +$ForumsRevealVoters = array(); + $Categories = array('Music', 'Applications', 'E-Books', 'Audiobooks', 'E-Learning Videos', 'Comedy', 'Comics'); $CategoryIcons = array('music.png', 'apps.png', 'ebook.png', 'audiobook.png', 'elearning.png', 'comedy.png', 'comics.png'); diff --git a/classes/script_start.php b/classes/script_start.php index b96cc78f..fe9c171e 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -193,7 +193,6 @@ // Update LastUpdate every 10 minutes if(strtotime($UserSessions[$SessionID]['LastUpdate'])+600query("UPDATE users_main SET LastAccess='".sqltime()."' WHERE ID='$LoggedUser[ID]'"); - $DB->query("UPDATE users_sessions SET IP='".$_SERVER['REMOTE_ADDR']."', Browser='".$Browser."', OperatingSystem='".$OperatingSystem."', LastUpdate='".sqltime()."' WHERE UserID='$LoggedUser[ID]' AND SessionID='".db_string($SessionID)."'"); $Cache->begin_transaction('users_sessions_'.$UserID); $Cache->delete_row($SessionID); @@ -1224,7 +1223,7 @@ function update_hash($GroupID) { MAX(t.Scene) AS Scene, MAX(t.HasLog) AS HasLog, MAX(t.HasCue) AS HasCue, - MAX(t.FreeTorrent) AS FreeTorrent, + BIT_OR(t.FreeTorrent-1) AS FreeTorrent, GROUP_CONCAT(DISTINCT t.Media SEPARATOR ' ') AS Media, GROUP_CONCAT(DISTINCT t.Format SEPARATOR ' ') AS Format, GROUP_CONCAT(DISTINCT t.Encoding SEPARATOR ' ') AS Encoding, diff --git a/feeds.php b/feeds.php index 313c6c82..f69e69f1 100644 --- a/feeds.php +++ b/feeds.php @@ -87,4 +87,5 @@ function display_array($Array, $Escape = array()) { header('Expires: '.date('D, d M Y H:i:s', time()+(2*60*60)).' GMT'); header('Last-Modified: '.date('D, d M Y H:i:s').' GMT'); +$Feed->UseSSL = (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443); require(SERVER_ROOT.'/sections/feeds/index.php'); diff --git a/sections/forums/thread.php b/sections/forums/thread.php index 5fe6d59b..dfa8eda4 100644 --- a/sections/forums/thread.php +++ b/sections/forums/thread.php @@ -168,13 +168,14 @@ $MaxVotes = 0; } + $RevealVoters = in_array($ForumID, $ForumsRevealVoters); //Polls lose the you voted arrow thingy $DB->query("SELECT Vote FROM forums_polls_votes WHERE UserID='".$LoggedUser['ID']."' AND TopicID='$ThreadID'"); list($UserResponse) = $DB->next_record(); if (!empty($UserResponse) && $UserResponse != 0) { $Answers[$UserResponse] = '» '.$Answers[$UserResponse]; } else { - if(!empty($UserResponse) && $ForumID == STAFF_FORUM) { + if(!empty($UserResponse) && $RevealVoters) { $Answers[$UserResponse] = '» '.$Answers[$UserResponse]; } } @@ -187,7 +188,7 @@ +
Votes: /
Missing Votes:

+ [+] - +
diff --git a/sections/schedule/index.php b/sections/schedule/index.php index 3f62d12a..56f38b1a 100644 --- a/sections/schedule/index.php +++ b/sections/schedule/index.php @@ -432,7 +432,7 @@ function next_hour() { foreach($Passkeys as $Passkey) { update_tracker('update_user', array('passkey' => $Passkey, 'can_leech' => '1')); } -/* + // Put user on ratio watch if he doesn't meet the standards sleep(10); @@ -440,6 +440,7 @@ function next_hour() { WHERE m.Uploaded/m.Downloaded < m.RequiredRatio AND i.RatioWatchEnds='0000-00-00 00:00:00' AND m.Enabled='1' + AND m.Downloaded > 100<<30 AND m.can_leech='1'"); $OnRatioWatch = $DB->collect('ID'); @@ -458,7 +459,7 @@ function next_hour() { send_pm($UserID, 0, db_string("You have been put on Ratio Watch"), db_string("This happens when your ratio falls below the requirements we have outlined in the rules located [url=http://".NONSSL_SITE_URL."/rules.php?p=ratio]here[/url].\n For information about ratio watch, click the link above."), ''); echo "Ratio watch on: $UserID\n"; } -*/ + sleep(5); //------------- Rescore 0.95 logs of disabled users diff --git a/sections/tools/services/get_cc.php b/sections/tools/services/get_cc.php index 9431c7a3..61688fca 100644 --- a/sections/tools/services/get_cc.php +++ b/sections/tools/services/get_cc.php @@ -13,7 +13,4 @@ die("Invalid IP"); } -$DB->query("SELECT Code FROM geoip_country WHERE ".ip2long($_GET['ip'])." BETWEEN StartIP AND EndIP LIMIT 1"); -list($CC) = $DB->next_record(); -die($CC); - +die(geoip($_GET['ip'])); diff --git a/sections/torrents/browse2.php b/sections/torrents/browse2.php index f46cf8e6..d59b39e0 100644 --- a/sections/torrents/browse2.php +++ b/sections/torrents/browse2.php @@ -240,7 +240,16 @@ function header_link($SortKey,$DefaultWay="desc") { foreach(array('hascue','scene','freetorrent','releasetype') as $Search) { if(isset($_GET[$Search]) && $_GET[$Search]!=='') { - $SS->set_filter($Search, array($_GET[$Search])); + if($Search == 'freetorrent') { + switch($_GET[$Search]) { + case 0: $SS->set_filter($Search, array(0)); break; + case 1: $SS->set_filter($Search, array(1)); break; + case 2: $SS->set_filter($Search, array(2)); break; + case 3: $SS->set_filter($Search, array(0), true); break; + } + } else { + $SS->set_filter($Search, array($_GET[$Search])); + } } } @@ -479,9 +488,11 @@ function header_link($SortKey,$DefaultWay="desc") { @@ -784,7 +795,7 @@ function header_link($SortKey,$DefaultWay="desc") { } if(isset($_GET['freetorrent']) && $_GET['freetorrent']!=='') { $Filter = true; - if((int)$Data['FreeTorrent']==$_GET['freetorrent']) { + if((int)$Data['FreeTorrent'] & $_GET['freetorrent'] || (int)$Data['FreeTorrent'] == $_GET['freetorrent']) { $Pass = true; } } diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index 93323fa6..c84aa0c6 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -229,9 +229,7 @@ $UpdateSet[]="PermissionID='$Class'"; $EditSummary[]="class changed to ".make_class_string($Class); $LightUpdates['PermissionID']=$Class; - if ($Class == 6) { - $DB->query("UPDATE users_info SET RestrictedForums = CONCAT('30,', RestrictedForums) WHERE UserID = ".$UserID); - } + $DB->query("SELECT DISTINCT DisplayStaff FROM permissions WHERE ID = $Class OR ID = ".$ClassLevels[$Cur['Class']]['ID']); if($DB->record_count() == 2) { if($Classes[$Class]['Level'] < $Cur['Class']) { diff --git a/sphinx.conf b/sphinx.conf index 7c49ffd5..735446d1 100644 --- a/sphinx.conf +++ b/sphinx.conf @@ -23,7 +23,7 @@ source torrents { g.CatalogueNumber, g.CategoryID, UNIX_TIMESTAMP(g.Time) AS Time, g.ReleaseType, \ MAX(CEIL(t.Size/1024)) AS Size, SUM(t.Snatched) AS Snatched, SUM(t.Seeders) AS Seeders, \ SUM(t.Leechers) AS Leechers, MAX(t.LogScore) AS LogScore, MAX(t.Scene) AS Scene, \ - MAX(t.HasLog) AS HasLog, MAX(t.HasCue) AS HasCue, MAX(t.FreeTorrent) AS FreeTorrent, \ + MAX(t.HasLog) AS HasLog, MAX(t.HasCue) AS HasCue, BIT_OR(t.FreeTorrent-1) AS FreeTorrent, \ GROUP_CONCAT(DISTINCT t.Media SEPARATOR ' ') AS Media, \ GROUP_CONCAT(DISTINCT t.Format SEPARATOR ' ') AS Format, \ GROUP_CONCAT(DISTINCT t.Encoding SEPARATOR ' ') AS Encoding, \ @@ -68,7 +68,7 @@ source torrents { sql_attr_bool = scene sql_attr_bool = haslog sql_attr_bool = hascue - sql_attr_bool = freetorrent + sql_attr_uint = freetorrent sql_query_info = SELECT ID, GroupName, ArtistName, TagList, Filelist FROM sphinx_hash WHERE ID = $id }