Blame view

application/_libs/Smarty-3.0.9/libs/plugins/block.php.php 589 Bytes
8d65d0ce   andryeyev   init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  <?php
  /**
   * Smarty plugin to execute PHP code
   * 
   * @package Smarty
   * @subpackage PluginsBlock
   * @author Uwe Tews 
   */
  
  /**
   * Smarty {php}{/php} block plugin
   * 
   * @param string $content contents of the block
   * @param object $template template object
   * @param boolean $ &$repeat repeat flag
   * @return string content re-formatted
   */
  function smarty_block_php($params, $content, $template, &$repeat)
  { 
      if (!$template->allow_php_tag) {
          throw new SmartyException("{php} is deprecated, set allow_php_tag = true to enable");
      } 
      eval($content);
      return '';
  }
  
  ?>