/[drupal]/drupal/modules/block.module
ViewVC logotype

Diff of /drupal/modules/block.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.206.2.4, Wed Oct 18 20:14:42 2006 UTC revision 1.206.2.5, Wed Nov 1 19:19:16 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: block.module,v 1.206.2.3 2006/08/20 11:32:00 killes Exp $  // $Id: block.module,v 1.206.2.4 2006/10/18 20:14:42 killes Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 627  function block_list($region) { Line 627  function block_list($region) {
627          if ($block->visibility < 2) {          if ($block->visibility < 2) {
628            $path = drupal_get_path_alias($_GET['q']);            $path = drupal_get_path_alias($_GET['q']);
629            $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($block->pages, '/')) .')$/';            $regexp = '/^('. preg_replace(array('/(\r\n?|\n)/', '/\\\\\*/', '/(^|\|)\\\\<front\\\\>($|\|)/'), array('|', '.*', '\1'. preg_quote(variable_get('site_frontpage', 'node'), '/') .'\2'), preg_quote($block->pages, '/')) .')$/';
630            $page_match = !($block->visibility xor preg_match($regexp, $path));            // Compare with the internal and path alias (if any).
631              $page_match = preg_match($regexp, $path);
632              if ($path != $_GET['q']) {
633                $page_match = $page_match || preg_match($regexp, $_GET['q']);
634              }
635              // When $block->visibility has a value of 0, the block is displayed on
636              // all pages except those listed in $block->pages. When set to 1, it
637              // is displayed only on those pages listed in $block->pages.
638              $page_match = !($block->visibility xor $page_match);
639          }          }
640          else {          else {
641            $page_match = drupal_eval($block->pages);            $page_match = drupal_eval($block->pages);

Legend:
Removed from v.1.206.2.4  
changed lines
  Added in v.1.206.2.5

  ViewVC Help
Powered by ViewVC 1.1.2