- fixed two-side-bar-theme-bug-with-latest-headlines

3-00
Dries Buytaert 2001-03-08 21:00:28 +00:00
parent a1b158334a
commit 5d08572dc6
1 changed files with 5 additions and 3 deletions

View File

@ -73,9 +73,11 @@ function theme_blocks($region, $theme) {
switch (strrchr($PHP_SELF, "/")) { switch (strrchr($PHP_SELF, "/")) {
case "/story.php": case "/story.php":
if ($region != "left") {
if ($user->id) $story = db_fetch_object(db_query("SELECT * FROM stories WHERE id = '$id'")); if ($user->id) $story = db_fetch_object(db_query("SELECT * FROM stories WHERE id = '$id'"));
if ($story->status == 1) theme_moderation_results($theme, $story); if ($story->status == 1) theme_moderation_results($theme, $story);
else theme_new_headlines($theme); else theme_new_headlines($theme);
}
break; break;
case "/index.php": case "/index.php":
if ($user->id) $result = db_query("SELECT * FROM blocks b LEFT JOIN layout l ON b.name = l.block WHERE (b.status = 2 OR (b.status = 1 AND l.user = '$user->id'))". (($region == "left" || $region == "right") ? ($region == "left" ? " AND b.region = 0" : " AND b.region = 1") : "") ." ORDER BY weight"); if ($user->id) $result = db_query("SELECT * FROM blocks b LEFT JOIN layout l ON b.name = l.block WHERE (b.status = 2 OR (b.status = 1 AND l.user = '$user->id'))". (($region == "left" || $region == "right") ? ($region == "left" ? " AND b.region = 0" : " AND b.region = 1") : "") ." ORDER BY weight");