summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-07-20 11:44:40 +0000
committerDries Buytaert <dries@buytaert.net>2005-07-20 11:44:40 +0000
commit7ab84f9fcf0fa73b4cf911f41680849d040511f2 (patch)
treea72fa7fbb3f7ae6cc04622a66d504b2cc9629b95 /modules
parent31387c5a77f6331a65360ddc9acd1e8053da2e3f (diff)
downloadbrdo-7ab84f9fcf0fa73b4cf911f41680849d040511f2.tar.gz
brdo-7ab84f9fcf0fa73b4cf911f41680849d040511f2.tar.bz2
- Patch #26217 by HellRaider: fixed problem <front> setting in presence of slashes.
Diffstat (limited to 'modules')
-rw-r--r--modules/block.module4
-rw-r--r--modules/block/block.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/block.module b/modules/block.module
index f19f1d59d..7ceec94ce 100644
--- a/modules/block.module
+++ b/modules/block.module
@@ -463,8 +463,8 @@ function block_list($region, $regions = array('left' => 0, 'right' => 1, 'all' =
if ($block['pages']) {
if ($block['visibility'] < 2) {
$path = drupal_get_path_alias($_GET['q']);
- $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. variable_get('site_frontpage', 'node') .'\2'), preg_quote($block['pages'], '/')) .')$/';
- $page_match = !($block['visibility'] xor preg_match($regexp, $path));
+ $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($block['pages'], '/')) .')$/';
+ $page_match = !($block['visibility'] xor preg_match($regexp, $path));
}
else {
$page_match = drupal_eval($block['pages']);
diff --git a/modules/block/block.module b/modules/block/block.module
index f19f1d59d..7ceec94ce 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -463,8 +463,8 @@ function block_list($region, $regions = array('left' => 0, 'right' => 1, 'all' =
if ($block['pages']) {
if ($block['visibility'] < 2) {
$path = drupal_get_path_alias($_GET['q']);
- $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. variable_get('site_frontpage', 'node') .'\2'), preg_quote($block['pages'], '/')) .')$/';
- $page_match = !($block['visibility'] xor preg_match($regexp, $path));
+ $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($block['pages'], '/')) .')$/';
+ $page_match = !($block['visibility'] xor preg_match($regexp, $path));
}
else {
$page_match = drupal_eval($block['pages']);