Commit 7ab84f9f authored by Dries's avatar Dries

- Patch #26217 by HellRaider: fixed problem <front> setting in presence of slashes.

parent 31387c5a
......@@ -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']);
......
......@@ -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']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment