mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
LSsession / Smarty : Added getFData() smarty function
This commit is contained in:
parent
88bd4b7cf1
commit
90e471646d
2 changed files with 7 additions and 0 deletions
|
@ -149,6 +149,8 @@ class LSsession {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$GLOBALS['Smarty'] -> register_function('getFData','smarty_getFData');
|
||||||
|
|
||||||
$GLOBALS['Smarty'] -> assign('LS_CSS_DIR',LS_CSS_DIR);
|
$GLOBALS['Smarty'] -> assign('LS_CSS_DIR',LS_CSS_DIR);
|
||||||
$GLOBALS['Smarty'] -> assign('LS_IMAGES_DIR',LS_IMAGES_DIR);
|
$GLOBALS['Smarty'] -> assign('LS_IMAGES_DIR',LS_IMAGES_DIR);
|
||||||
|
|
||||||
|
|
|
@ -164,6 +164,11 @@ function _getFData_extractAndModify($data,$ch) {
|
||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function smarty_getFData($params) {
|
||||||
|
extract($params);
|
||||||
|
echo getFData($format,$data,$meth=NULL);
|
||||||
|
}
|
||||||
|
|
||||||
function getFieldInFormat($format) {
|
function getFieldInFormat($format) {
|
||||||
$fields=array();
|
$fields=array();
|
||||||
$expr="%{([A-Za-z0-9]+)(\:(-?[0-9])+)?(\:(-?[0-9]+))?(-)?(\!|\_)?(~)?}";
|
$expr="%{([A-Za-z0-9]+)(\:(-?[0-9])+)?(\:(-?[0-9]+))?(-)?(\!|\_)?(~)?}";
|
||||||
|
|
Loading…
Reference in a new issue