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

4.7.x
Dries Buytaert 2005-07-20 11:44:40 +00:00
parent 31387c5a77
commit 7ab84f9fcf
2 changed files with 4 additions and 4 deletions

View File

@ -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']);

View File

@ -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']);