Sources for file plugins/smarty/modifier.default.php in version 2.0 Release Candidate 2



Click on a comment to hide it. Click here to show all comments.

/*
 * Smarty plugin
 * -------------------------------------------------------------
 * Type:     modifier
 * Name:     default
 * Purpose:  designate default value for empty variables
 * -------------------------------------------------------------
 */
function smarty_modifier_default($string$default '')
{
    if (!isset(
$string) || $string == '')
        return 
$default;
    else
        return 
$string;
}

/* vim: set expandtab: */

?>


Website is Copyright © Odynia.org 2000-2005 - Xnyo is released under a BSD license.