gluon-web-remote

Web remote Administration for big size of gluon routers
git clone git://archive.git.mtrnord.blog/MTRNord/gluon-web-remote.git
Log | Files | Refs | README

commit b6672f375586dfb187dc246c71d9fa1b6ae48575
parent 8e071f2b53d4de9d3996b7e98e1452ef7b760cb9
Author: Marcel <MTRNord@users.noreply.github.com>
Date:   Sat, 31 Oct 2015 17:28:03 +0100

Create smarty_internal_compile_debug.php
Diffstat:
Alibs/smarty/sysplugins/smarty_internal_compile_debug.php | 41+++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+), 0 deletions(-)

diff --git a/libs/smarty/sysplugins/smarty_internal_compile_debug.php b/libs/smarty/sysplugins/smarty_internal_compile_debug.php @@ -0,0 +1,41 @@ +<?php +/** + * Smarty Internal Plugin Compile Debug + * Compiles the {debug} tag. + * It opens a window the the Smarty Debugging Console. + * + * @package Smarty + * @subpackage Compiler + * @author Uwe Tews + */ + +/** + * Smarty Internal Plugin Compile Debug Class + * + * @package Smarty + * @subpackage Compiler + */ +class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase +{ + /** + * Compiles code for the {debug} tag + * + * @param array $args array with attributes from parser + * @param object $compiler compiler object + * + * @return string compiled code + */ + public function compile($args, $compiler) + { + // check and get attributes + $_attr = $this->getAttributes($compiler, $args); + + // compile always as nocache + $compiler->tag_nocache = true; + + // display debug template + $_output = "<?php \$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>"; + + return $_output; + } +}