$_CONFIG['num_templates']++;
// Init some data
- $ACTION = SQL_ESCAPE($GLOBALS['action']);
- $WHAT = SQL_ESCAPE($GLOBALS['what']);
$ret = "";
if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0;
- $REFID = $GLOBALS['refid'];
// @DEPRECATED Try to remove this if() block
if ($template == "member_support_form") {
}
// Returns wether the value of the session variable or NULL if not set
function get_session($var) {
+ global $cacheArray;
+
// Default is not found! ;-)
$value = null;
- // Is the variable there?
- if (isSessionVariableSet($var)) {
+ // Is the variable there or cached values?
+ if (isset($cacheArray['session'][$var])) {
+ // Get cached value (skips a lot SQL_ESCAPE() calles!
+ $value = $cacheArray['session'][$var];
+ } elseif (isSessionVariableSet($var)) {
// Then get it secured!
$value = SQL_ESCAPE($_SESSION[$var]);
+
+ // Cache the value
+ $cacheArray['session'][$var] = $value;
} // END - if
// Return the value