Skip to content

Commit 9cf2c4c

Browse files
authored
bugfix
1 parent 40dc7bb commit 9cf2c4c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

microblog/blog.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ function outputCategoryPage(){
2525
function outputCategoryPosts(){
2626
$values["category"] = htmlspecialchars($_GET["category"], ENT_QUOTES, 'UTF-8');
2727
outputTemplate($values,"categoryfilter");
28-
foreach (DB::$obj as &$entry) {
29-
30-
if(isset($entry[ID]) && (in_array($entry[ID],DB::$obj["categories"][$_GET["category"]]) || $_GET["category"]==="all") ){
28+
foreach (DB::$obj as &$entry) {
29+
if(isset($entry[ID]) && ( $_GET["category"]==="all" || in_array($entry[ID],DB::$obj["categories"][$_GET["category"]])) ){
3130
$values["id"]=$entry[ID];
3231
$values["title"]=$entry[TITLE];
3332
$values["href"]=blogURL.blogParameterChar.PLS.'='.$entry[ID];

0 commit comments

Comments
 (0)