Redbean + Smarty update
This commit is contained in:
parent
c1b8226466
commit
eb0835ff74
122 changed files with 12653 additions and 11637 deletions
|
@ -1,12 +1,11 @@
|
|||
<?php
|
||||
/**
|
||||
* Smarty Internal Plugin Smarty Template Compiler Base
|
||||
* This file contains the basic classes and methods for compiling Smarty templates with lexer/parser
|
||||
*
|
||||
* This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser
|
||||
*
|
||||
* @package Smarty
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
* @author Uwe Tews
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -17,7 +16,7 @@ include 'smarty_internal_parsetree.php';
|
|||
/**
|
||||
* Class SmartyTemplateCompiler
|
||||
*
|
||||
* @package Smarty
|
||||
* @package Smarty
|
||||
* @subpackage Compiler
|
||||
*/
|
||||
class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCompilerBase
|
||||
|
@ -81,9 +80,10 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
|
|||
}
|
||||
|
||||
/**
|
||||
* Methode to compile a Smarty template
|
||||
* method to compile a Smarty template
|
||||
*
|
||||
* @param mixed $_content template source
|
||||
*
|
||||
* @return bool true if compiling succeeded, false if it failed
|
||||
*/
|
||||
protected function doCompile($_content)
|
||||
|
@ -98,6 +98,13 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
|
|||
// start state on child templates
|
||||
$this->lex->yypushstate(Smarty_Internal_Templatelexer::CHILDBODY);
|
||||
}
|
||||
if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) {
|
||||
$mbEncoding = mb_internal_encoding();
|
||||
mb_internal_encoding('ASCII');
|
||||
} else {
|
||||
$mbEncoding = null;
|
||||
}
|
||||
|
||||
if ($this->smarty->_parserdebug) {
|
||||
$this->parser->PrintTrace();
|
||||
$this->lex->PrintTrace();
|
||||
|
@ -117,6 +124,9 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
|
|||
}
|
||||
// finish parsing process
|
||||
$this->parser->doParse(0, 0);
|
||||
if ($mbEncoding) {
|
||||
mb_internal_encoding($mbEncoding);
|
||||
}
|
||||
// check for unclosed tags
|
||||
if (count($this->_tag_stack) > 0) {
|
||||
// get stacked info
|
||||
|
@ -127,5 +137,4 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom
|
|||
// return str_replace(array("? >\n<?php","? ><?php"), array('',''), $this->parser->retvalue);
|
||||
return $this->parser->retvalue;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue