X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=nucleus%2Flibs%2FPARSER.php;h=06f67cb40fa267f28076d71ebaf48e0432911d89;hb=14a726735c722a6fbe83843ae57dd98a782b317c;hp=0581e9346ca2ee388cd5fc8bafdb2dd778073720;hpb=06d9b29c7bc0693ed5e210530acfead37daeea64;p=nucleus-jp%2Fnucleus-next.git diff --git a/nucleus/libs/PARSER.php b/nucleus/libs/PARSER.php index 0581e93..06f67cb 100644 --- a/nucleus/libs/PARSER.php +++ b/nucleus/libs/PARSER.php @@ -1,7 +1,7 @@ )', $pdelim = ',') + public function __construct( &$handler, $delim = '(<%|%>)', $pdelim = ',') { - $this->actions = $allowedActions; - $this->handler =& $handler; - $this->delim = $delim; - $this->pdelim = $pdelim; + $this->handler = &$handler; + $this->actions = $handler->getAvailableActions(); + $this->delim = $delim; + $this->pdelim = $pdelim; $this->norestrictions = 0; // set this to 1 to disable checking for allowedActions + + $this->skin = NULL; + + $handler->setParser($this); + return; } @@ -121,7 +128,7 @@ class Parser // skip execution of skinvars while inside an if condition which hides this part of the page $if_tags = array('else', 'elseif', 'endif', 'ifnot', 'elseifnot'); - if ( !$this->handler->if_currentlevel + if ( !$this->handler->getTopIfCondition() && !in_array($actionlc, $if_tags) && (i18n::substr($actionlc, 0, 2) != 'if') ) { @@ -151,6 +158,18 @@ class Parser } /** + * Parser::setSkin() + * Set the skin + * @param object $skin an instance of Skin class + * @return void + */ + public function setSkin(&$skin) + { + $this->skin = &$skin; + return; + } + + /** * Parser::setProperty() * Set a property of the parser in the manager *