Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Usage {coalesce ...=... assign='...'}
- * Returns the first value of all parameters (except 'assign') that is not empty.
- * If 'assign' specified, sets Smarty variable. Otherwise prints.
- */
- foreach ($params as $name => $value) {
- if ($name != 'assign' && !empty($value)) {
- if ($params['assign']) {
- cmsms()->GetSmarty()->assign($params['assign'], $value);
- } else {
- echo $value;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement