Use local tpldata for INCLUDE without arguments

master
Vitaliy Filippov 2015-08-15 13:22:05 +03:00
parent fc01aaeeb4
commit 0d0cfa98fd
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
* Homepage: http://yourcmc.ru/wiki/VMX::Template * Homepage: http://yourcmc.ru/wiki/VMX::Template
* License: GNU GPLv3 or later * License: GNU GPLv3 or later
* Author: Vitaliy Filippov, 2006-2015 * Author: Vitaliy Filippov, 2006-2015
* Version: V3 (LALR), 2015-05-25 * Version: V3 (LALR), 2015-08-15
* *
* This file contains the implementation of VMX::Template compiler. * This file contains the implementation of VMX::Template compiler.
* It is only used when a template is compiled in runtime. * It is only used when a template is compiled in runtime.
@ -558,10 +558,10 @@ $code
/* Аргументы для функций включения /* Аргументы для функций включения
аргументы ::= hash(ключ => значение, ...) | ключ => значение, ... аргументы ::= hash(ключ => значение, ...) | ключ => значение, ...
*/ */
function auto_hash($args) protected function auto_hash($args)
{ {
if (!($n = count($args))) if (!($n = count($args)))
$args = NULL; $args = ', $this->tpldata';
elseif ($n == 1) elseif ($n == 1)
$args = ", ".$args[0]; $args = ", ".$args[0];
else else

View File

@ -8,7 +8,7 @@
* Homepage: http://yourcmc.ru/wiki/VMX::Template * Homepage: http://yourcmc.ru/wiki/VMX::Template
* License: GNU GPLv3 or later * License: GNU GPLv3 or later
* Author: Vitaliy Filippov, 2006-2015 * Author: Vitaliy Filippov, 2006-2015
* Version: V3 (LALR), 2015-07-15 * Version: V3 (LALR), 2015-08-15
* *
* The template engine is split into two parts: * The template engine is split into two parts:
* (1) This file - always used when running templates * (1) This file - always used when running templates