1
0

merge Smarty3 by ophian

This commit is contained in:
Garvin Hicking
2011-11-24 12:14:03 +01:00
parent ebe6d10848
commit 23e5de77b7
176 changed files with 25733 additions and 19682 deletions

View File

@@ -0,0 +1,30 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty upper modifier plugin
*
* Type: modifier<br>
* Name: lower<br>
* Purpose: convert string to uppercase
*
* @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)
* @author Uwe Tews
* @param array $params parameters
* @return string with compiled code
*/
function smarty_modifiercompiler_upper($params, $compiler)
{
if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
return 'mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET)' ;
}
// no MBString fallback
return 'strtoupper(' . $params[0] . ')';
}
?>