diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-06 01:17:31 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-06 01:17:31 +0000 |
commit | 9d6253374de94cb1423e76fab9015fa938f37ec1 (patch) | |
tree | 5b8a414d0aa7e8f39fccb827b862b5747cc70fdf | |
parent | fc143ca3aff2ed6fdff2be424730507a7312ef36 (diff) | |
download | brdo-9d6253374de94cb1423e76fab9015fa938f37ec1.tar.gz brdo-9d6253374de94cb1423e76fab9015fa938f37ec1.tar.bz2 |
#15185: Fix front page handling of blocks
-rw-r--r-- | modules/block.module | 2 | ||||
-rw-r--r-- | modules/block/block.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/block.module b/modules/block.module index 5b0733a87..cec0a6c0b 100644 --- a/modules/block.module +++ b/modules/block.module @@ -414,7 +414,7 @@ function block_list($region) { // Match path if necessary if ($block['pages']) { $path = drupal_get_path_alias($_GET['q']); - $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1\2'), preg_quote($block['pages'], '/')) .')$/'; + $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. variable_get('site_frontpage', 'node') .'\2'), preg_quote($block['pages'], '/')) .')$/'; $matched = !($block['visibility'] xor preg_match($regexp, $path)); } else { diff --git a/modules/block/block.module b/modules/block/block.module index 5b0733a87..cec0a6c0b 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -414,7 +414,7 @@ function block_list($region) { // Match path if necessary if ($block['pages']) { $path = drupal_get_path_alias($_GET['q']); - $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1\2'), preg_quote($block['pages'], '/')) .')$/'; + $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. variable_get('site_frontpage', 'node') .'\2'), preg_quote($block['pages'], '/')) .')$/'; $matched = !($block['visibility'] xor preg_match($regexp, $path)); } else { |