} elseif (!empty($_GET['ref'])) {
// Set refid=ref (the referral link uses such variable)
$GLOBALS['refid'] = SQL_ESCAPE(strip_tags($_GET['ref']));
-} elseif (!empty($_SESSION['refid'])) {
+} elseif (isSessionVariableSet('refid')) {
// Set session refid als global
- $GLOBALS['refid'] = bigintval($_SESSION['refid']);
+ $GLOBALS['refid'] = bigintval(get_session('refid'));
} elseif (GET_EXT_VERSION("sql_patches") != "") {
// Set default refid as refid in URL
$GLOBALS['refid'] = bigintval($_CONFIG['def_refid']);
}
// Set cookie when default refid > 0
-if (empty($_SESSION['refid']) || (!empty($GLOBALS['refid'])) || (($_SESSION['refid'] == "0") && ($_CONFIG['def_refid'] > 0))) {
+if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((get_session('refid') == "0") && ($_CONFIG['def_refid'] > 0))) {
// Set cookie
set_session("refid", $GLOBALS['refid']);
}