Sources for file plugins/smarty/block.access.php in version 2.0 Beta 4



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

/*
 * Smarty plugin - Onyx: PHP Application Backend
 * -------------------------------------------------------------
 * Type:      block function
 * Name:      access
 * Purpose:   display contents only if access is permitted
 * Arguments: acl - comma delimited list of groups/users allowed to access
 * -------------------------------------------------------------
 */
function smarty_block_access($args$content$this)
{

    global 
$access;
    if (!
is_null($content)) {

        if (
$access->check($this->_tag_stack[0][1]['acl']))
            echo 
$content;

    }

}

/* vim: set expandtab: */

?>


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