diff options
Diffstat (limited to 'modules/block/block.module')
-rw-r--r-- | modules/block/block.module | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/block/block.module b/modules/block/block.module index ae79d143e..9a46ba7d4 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -113,10 +113,6 @@ function block_perm() { 'title' => t('Administer blocks'), 'description' => t('Select which blocks are displayed, and arrange them on the page.'), ), - 'use PHP for block visibility' => array( - 'title' => t('Use PHP for block visibility'), - 'description' => t('Enter PHP code in the field for block visibility settings. %warning', array('%warning' => t('Warning: Give to trusted roles only; this permission has security implications.'))), - ), ); } @@ -608,8 +604,11 @@ function _block_load_blocks() { // is displayed only on those pages listed in $block->pages. $page_match = !($block->visibility xor $page_match); } + elseif (module_exists('php')) { + $page_match = php_eval($block->pages); + } else { - $page_match = drupal_eval($block->pages); + $page_match = FALSE; } } else { |