9 * Smarty assign_smarty_interface core plugin
12 * Name: assign_smarty_interface<br>
13 * Purpose: assign the $smarty interface variable
14 * @param array Format: null
17 function smarty_core_assign_smarty_interface($params, &$smarty)
19 if (isset($smarty->_smarty_vars
) && isset($smarty->_smarty_vars
['request'])) {
23 $_globals_map = array('g' => 'HTTP_GET_VARS',
24 'p' => 'HTTP_POST_VARS',
25 'c' => 'HTTP_COOKIE_VARS',
26 's' => 'HTTP_SERVER_VARS',
27 'e' => 'HTTP_ENV_VARS');
29 $_smarty_vars_request = array();
31 foreach (preg_split('!!', strtolower($smarty->request_vars_order
)) as $_c) {
32 if (isset($_globals_map[$_c])) {
33 $_smarty_vars_request = array_merge($_smarty_vars_request, $GLOBALS[$_globals_map[$_c]]);
36 $_smarty_vars_request = @array_merge
($_smarty_vars_request, $GLOBALS['HTTP_SESSION_VARS']);
38 $smarty->_smarty_vars
['request'] = $_smarty_vars_request;
41 /* vim: set expandtab: */