diff --git a/sections/ajax/announcements.php b/sections/ajax/announcements.php
index 6ed31e75..ccc280a4 100644
--- a/sections/ajax/announcements.php
+++ b/sections/ajax/announcements.php
@@ -40,9 +40,8 @@
$Blog = $DB->to_array();
$Cache->cache_value('blog',$Blog,1209600);
}
-
$JsonBlog = array();
-for ($i = 0; $i < $Limit; $i++) {
+for ($i = 0; $i < 5; $i++) {
list($BlogID, $Author, $Title, $Body, $BlogTime, $ThreadID) = $Blog[$i];
$JsonBlog[] = array(
'blogId' => (int) $BlogID,
diff --git a/sections/reports/takereport.php b/sections/reports/takereport.php
index 2fa191a1..6a145b65 100644
--- a/sections/reports/takereport.php
+++ b/sections/reports/takereport.php
@@ -93,6 +93,7 @@
send_irc("PRIVMSG ".$Channel." :".$ReportID." - ".$LoggedUser['Username']." just reported a ".$Short.": https://".SSL_SITE_URL."/".$Link." : ".strtr($Reason, "\n", " "));
}
+
$Cache->delete_value('num_other_reports');
header('Location: '.$Link);
diff --git a/sections/top10/torrents.php b/sections/top10/torrents.php
index e799db59..fb44dac0 100644
--- a/sections/top10/torrents.php
+++ b/sections/top10/torrents.php
@@ -3,26 +3,34 @@
$Where = array();
-if(!empty($_GET['advanced']) && check_perms('site_advanced_top10')) {
+if (!empty($_GET['advanced']) && check_perms('site_advanced_top10')) {
$Details = 'all';
$Limit = 10;
-
- if($_GET['tags']) {
+
+ if ($_GET['tags']) {
+ $TagWhere = array();
$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)."[[:>:]]'";
+ if ($Tag != '') {
+ $TagWhere[] = "g.TagList REGEXP '[[:<:]]".db_string($Tag)."[[:>:]]'";
+ }
+ }
+ if (!empty($TagWhere)) {
+ if ($_GET['anyall'] == 'any') {
+ $Where[] = '('.implode(' OR ', $TagWhere).')';
+ } else {
+ $Where[] = '('.implode(' AND ', $TagWhere).')';
}
}
}
-
- if($_GET['format']) {
- if(in_array($_GET['format'], $Formats)) {
- $Where[]="t.Format='".db_string($_GET['format'])."'";
+
+ if ($_GET['format']) {
+ if (in_array($_GET['format'], $Formats)) {
+ $Where[] = "t.Format='".db_string($_GET['format'])."'";
}
}
-
+
} else {
// error out on invalid requests (before caching)
if(isset($_GET['details'])) {
@@ -121,13 +129,12 @@
-if ($_GET['anyall'] == 'any' && !empty($Where)) {
- $Where = '('.implode(' OR ', $Where).')';
+if (!empty($Where)) {
+ $Where = '('.implode(' AND ', $Where).')';
+ $WhereSum = md5($Where);
} else {
- $Where = implode(' AND ', $Where);
+ $WhereSum = '';
}
-
-$WhereSum = (empty($Where)) ? '' : md5($Where);
$BaseQuery = "SELECT
t.ID,
g.ID,
diff --git a/sections/user/edit.php b/sections/user/edit.php
index 39e00d23..3c4e4e63 100644
--- a/sections/user/edit.php
+++ b/sections/user/edit.php
@@ -263,51 +263,8 @@ function checked($Checked) {
checked="checked" } ?>/>Announcements
checked="checked" } ?>/>Private Messages
- /* checked="checked" } ?>/>Rippys
*/ ?>
-
- [Test Push]
- [Wiki Guide]
-
-
-
-