From 6e1cb6e003e9127d4996f15c2e0d9bfd7120d8cc Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 17 Jan 2004 11:33:58 +0000 Subject: - Patch #5184: fixed block path and aliases. Patch by Nick. --- modules/block.module | 2 +- modules/block/block.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/block.module b/modules/block.module index 4743ba507..23fc3b0a1 100644 --- a/modules/block.module +++ b/modules/block.module @@ -376,7 +376,7 @@ function block_list($region) { $result = db_query("SELECT * FROM {blocks} WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = %d " : "") ."ORDER BY weight, module", $region == "left" ? 0 : 1); while ($result && ($block = db_fetch_array($result))) { - if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && (!$block['path'] || preg_match($block['path'], str_replace("?q=", "", request_uri())))) { + if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && (!$block['path'] || preg_match($block['path'], "/" . $_GET["q"]))) { /* ** Check the current throttle status and see if block should be displayed diff --git a/modules/block/block.module b/modules/block/block.module index 4743ba507..23fc3b0a1 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -376,7 +376,7 @@ function block_list($region) { $result = db_query("SELECT * FROM {blocks} WHERE (status = '1' OR custom = '1') ". ($region != "all" ? "AND region = %d " : "") ."ORDER BY weight, module", $region == "left" ? 0 : 1); while ($result && ($block = db_fetch_array($result))) { - if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && (!$block['path'] || preg_match($block['path'], str_replace("?q=", "", request_uri())))) { + if ((($block['status'] && (!$user->uid || !$block['custom'])) || ($block['custom'] && $user->block[$block['module']][$block['delta']])) && (!$block['path'] || preg_match($block['path'], "/" . $_GET["q"]))) { /* ** Check the current throttle status and see if block should be displayed -- cgit v1.2.3