diff --git a/classes/class_torrents.php b/classes/class_torrents.php index 30cccaf5..59aca00c 100644 --- a/classes/class_torrents.php +++ b/classes/class_torrents.php @@ -583,7 +583,7 @@ public static function has_snatched($TorrentID) { // Torrent was not found in the previously inspected snatch lists $CurSnatchedTorrents =& $SnatchedTorrents[$BucketID]; - if (empty($CurSnatchedTorrents)) { + if ($CurSnatchedTorrents === false) { $CurTime = time(); // This bucket hasn't been checked before $CurSnatchedTorrents = $Cache->get_value('users_snatched_'.$UserID.'_'.$BucketID, true); diff --git a/sections/artist/artist.php b/sections/artist/artist.php index 07ccfbf8..8d1994d6 100644 --- a/sections/artist/artist.php +++ b/sections/artist/artist.php @@ -828,7 +828,6 @@ function compare($X, $Y){ $Similar->write_artists(); ?> -
+ } } ?> -diff --git a/sections/collages/browse.php b/sections/collages/browse.php index c834ad6c..cf1c4735 100644 --- a/sections/collages/browse.php +++ b/sections/collages/browse.php @@ -47,14 +47,14 @@ } // Ordering -if(!empty($_GET['order']) && !empty($OrderTable[$_GET['order']])) { - $Order = $OrderTable[$_GET['order']]; +if(!empty($_GET['order_by']) && !empty($OrderTable[$_GET['order_by']])) { + $Order = $OrderTable[$_GET['order_by']]; } else { $Order = 'ID'; } -if(!empty($_GET['way']) && !empty($WayTable[$_GET['way']])) { - $Way = $WayTable[$_GET['way']]; +if(!empty($_GET['order_way']) && !empty($WayTable[$_GET['order_way']])) { + $Way = $WayTable[$_GET['order_way']]; } else { $Way = 'DESC'; } @@ -91,10 +91,20 @@ $SQL .= "%'"; } +if (isset($_GET['tags_type']) && $_GET['tags_type'] == 0) { // Any + $_GET['tags_type'] = 0; +} else { // All + $_GET['tags_type'] = 1; +} + if(!empty($Tags)) { - $SQL.= " AND TagList LIKE '%"; - $SQL .= implode("%' AND TagList LIKE '%", $Tags); - $SQL .= "%'"; + $SQL.= " AND (TagList LIKE '%"; + if ($_GET['tags_type'] == 0) { + $SQL .= implode("%' OR TagList LIKE '%", $Tags); + } else { + $SQL .= implode("%' AND TagList LIKE '%", $Tags); + } + $SQL .= "%')"; } if(!empty($_GET['userid'])) { @@ -153,50 +163,54 @@ |