diff --git a/Rocksolid_Light/rocksolid/article-flat.php b/Rocksolid_Light/rocksolid/article-flat.php index 0304f0c..2eb0358 100644 --- a/Rocksolid_Light/rocksolid/article-flat.php +++ b/Rocksolid_Light/rocksolid/article-flat.php @@ -30,16 +30,18 @@ $articles_dbh = article_db_open($database); $articles_query = $articles_dbh->prepare('SELECT * FROM articles WHERE msgid=:messageid'); $articles_query->execute(['messageid' => $id]); + $found = 0; while ($row = $articles_query->fetch()) { $id = $row['number']; + $found = 1; break; } $dbh = null; - $newurl = 'article-flat.php?id='.$id.'&group='.$group.'#'.$id; -// $newurl.='#'.$id; - - header("Location: $newurl"); - die(); + if($found) { + $newurl = 'article-flat.php?id='.$id.'&group='.$group.'#'.$id; + header("Location: $newurl"); + die(); + } } }