- Patch #26217 by HellRaider: fixed problem <front> setting in presence of slashes.
parent
31387c5a77
commit
7ab84f9fcf
|
@ -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']);
|
||||
|
|
Loading…
Reference in New Issue