1: <?php
2: /**
3: * XOOPS securityToken Smarty compiler plug-in
4: *
5: * @copyright XOOPS Project (http://xoops.org)
6: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
7: * @author Richard Griffith <richard@geekwright.com>
8: */
9:
10: /**
11: * Inserts a XOOPS security token
12: *
13: * Not sure if this is a good idea (sounds like application logic, not presentation,)
14: * but there are several token generations done in {php} tags which don't work with
15: * Smarty 3.1
16: *
17: * @param $params
18: * @param $smarty
19: * @return null
20: */
21: function smarty_function_securityToken($params, &$smarty)
22: {
23: echo $GLOBALS['xoopsSecurity']->getTokenHTML();
24: }
25: