]> git.mxchange.org Git - mailer.git/blobdiff - inc/session.php
Wernis extension added
[mailer.git] / inc / session.php
index b0420aa12d9ef849f36d6b47ff008dc72ce9521e..b8143d261719da51ea8037746008c6150b2bff81 100644 (file)
@@ -67,10 +67,10 @@ if (!empty($_POST['refid'])) {
 } 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']);
-} elseif (GET_EXT_VERSION("sql_patches") != "") {
+       $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']);
 } else {
@@ -79,7 +79,7 @@ if (!empty($_POST['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']);
 }