mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 11:13:27 +02:00
* updated Twig to the latest version in 1.x series (v1.35.0)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
/*
|
||||
* This file is part of Twig.
|
||||
*
|
||||
* (c) 2010 Fabien Potencier
|
||||
* (c) Fabien Potencier
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
@@ -21,16 +21,11 @@ class Twig_Node_Sandbox extends Twig_Node
|
||||
parent::__construct(array('body' => $body), array(), $lineno, $tag);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compiles the node to PHP.
|
||||
*
|
||||
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
||||
*/
|
||||
public function compile(Twig_Compiler $compiler)
|
||||
{
|
||||
$compiler
|
||||
->addDebugInfo($this)
|
||||
->write("\$sandbox = \$this->env->getExtension('sandbox');\n")
|
||||
->write("\$sandbox = \$this->env->getExtension('Twig_Extension_Sandbox');\n")
|
||||
->write("if (!\$alreadySandboxed = \$sandbox->isSandboxed()) {\n")
|
||||
->indent()
|
||||
->write("\$sandbox->enableSandbox();\n")
|
||||
@@ -45,3 +40,5 @@ class Twig_Node_Sandbox extends Twig_Node
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
class_alias('Twig_Node_Sandbox', 'Twig\Node\SandboxNode', false);
|
||||
|
Reference in New Issue
Block a user