Namespace changes initial setup

* move all the libs into the correct folders
* libs folder is now called lib
* Smarty update to 3.1.30
* main config update with / is now set via core variable (dynamic)
This commit is contained in:
Clemens Schwaighofer
2018-03-23 13:43:22 +09:00
parent 7d42256a30
commit 5474ae2dda
313 changed files with 19000 additions and 14776 deletions

View File

@@ -0,0 +1,35 @@
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty default modifier plugin
* Type: modifier<br>
* Name: default<br>
* Purpose: designate default value for empty variables
*
* @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual)
* @author Uwe Tews
*
* @param array $params parameters
*
* @return string with compiled code
*/
function smarty_modifiercompiler_default($params)
{
$output = $params[ 0 ];
if (!isset($params[ 1 ])) {
$params[ 1 ] = "''";
}
array_shift($params);
foreach ($params as $param) {
$output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)';
}
return $output;
}