summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-01-24 08:24:37 +0000
committerDries Buytaert <dries@buytaert.net>2001-01-24 08:24:37 +0000
commite87e7816c8dd94446b00f0cc1c74b5a5e9f2697c (patch)
treea6bfa6d053654145fa5ab1d077a5bcad26039931
parent9d108b4071b7832bc5ae763dce1d56065d8b18a5 (diff)
downloadbrdo-e87e7816c8dd94446b00f0cc1c74b5a5e9f2697c.tar.gz
brdo-e87e7816c8dd94446b00f0cc1c74b5a5e9f2697c.tar.bz2
- fix for the "block problem" reported by martin@abol.com:
it only happened when you hosted drupal in a subdirectory a la http://yourserver.com/drupal/
-rw-r--r--includes/theme.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/theme.inc b/includes/theme.inc
index bc09e1588..6f9785aa4 100644
--- a/includes/theme.inc
+++ b/includes/theme.inc
@@ -73,13 +73,13 @@ function theme_account($theme) {
function theme_blocks($region, $theme) {
global $id, $PHP_SELF, $user;
- switch (strtok($PHP_SELF, ".")) {
- case "/story":
+ switch (strrchr($PHP_SELF, "/")) {
+ case "/story.php":
if ($user->id) $story = db_fetch_object(db_query("SELECT * FROM stories WHERE id = '$id'"));
if ($story->status == 1) theme_moderation_results($theme, $story);
else theme_new_headlines($theme);
break;
- case "/index":
+ 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 AND l.user = '$user->id'))". (($region == "left" || $region == "right") ? ($region == "left" ? " AND b.region = 0" : " AND b.region = 1") : "") ." ORDER BY weight");
else $result = db_query("SELECT * FROM blocks WHERE status = 2 ORDER BY weight");
while ($block = db_fetch_object($result)) {