init
This commit is contained in:
28
include/Smarty/plugins/function.sugar_getjspath.php
Executable file
28
include/Smarty/plugins/function.sugar_getjspath.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?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_getjspath($params, &$smarty)
|
||||
{
|
||||
if(!isset($params['file'])) {
|
||||
$smarty->trigger_error($GLOBALS['app_strings']['ERR_MISSING_REQUIRED_FIELDS'] . 'file');
|
||||
}
|
||||
return getJSPath($params['file']);
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user