28 lines
626 B
PHP
Executable File
28 lines
626 B
PHP
Executable File
<?php
|
|
/**
|
|
* Smarty plugin
|
|
* @package Smarty
|
|
* @subpackage plugins
|
|
*/
|
|
|
|
|
|
/**
|
|
* Smarty {sugar_include} function plugin
|
|
*
|
|
* Type: function<br>
|
|
* Name: sugar_include<br>
|
|
* Purpose: Handles rendering the global file includes from the metadata files defined
|
|
* in templateMeta=>includes.
|
|
*
|
|
* @author Collin Lee {clee@sugarcrm.com}
|
|
* @param array
|
|
* @param Smarty
|
|
*/
|
|
function smarty_function_sugar_getwebpath($params, &$smarty)
|
|
{
|
|
if(!isset($params['file'])) {
|
|
$smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
|
|
}
|
|
return getWebPath($params['file']);
|
|
}
|
|
?>
|