forked from halo-battle/game
Update Smarty to v2.6.31 (fix compatibility with PHP 7.2)
This commit is contained in:
parent
aebcb5b82b
commit
f88f9499d0
400 changed files with 3366 additions and 49622 deletions
31
onyx2/modules/templates/smarty/plugins/modifier.ucfirst.php3
Normal file
31
onyx2/modules/templates/smarty/plugins/modifier.ucfirst.php3
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
/**
|
||||
* Smarty plugin
|
||||
* @package Smarty
|
||||
* @subpackage plugins
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Smarty capitalize modifier plugin
|
||||
*
|
||||
* Type: modifier<br>
|
||||
* Name: capitalize<br>
|
||||
* Purpose: capitalize words in the string
|
||||
* @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE
|
||||
* capitalize (Smarty online manual)
|
||||
* @author Monte Ohrt <monte at ohrt dot com>
|
||||
* @param string
|
||||
* @return string
|
||||
*/
|
||||
function smarty_modifier_ucfirst($chaine)
|
||||
{
|
||||
$chaineS = strtr($chaine, "áàâäãéèêëẽíìîïĩóòôöõúùûüũýỳŷÿỹ", "ÁÀÂÄÃÉÈÊËẼÍÌÎÏĨÓÒÔÖÕÚÙÛÜŨÝỲŶŸỸ");
|
||||
if ($chaineS[0].$chaineS[1] != $chaine[0].$chaine[1])
|
||||
return $chaineS[0].$chaineS[1].substr($chaine, 2);
|
||||
else
|
||||
return ucfirst($chaine);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue