More rewrites of constants and fix for loading mass-included scripts by GET_DIR_AS_AR...
[mailer.git] / ref.php
diff --git a/ref.php b/ref.php
index 34fe633411a77cb65c3135af6de2a93b06f7f990..c26ce8bfde155334eabeb6ad31918cb9b0cad3be 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -46,7 +46,7 @@ $GLOBALS['output_mode'] = -1;
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Base URL for redirection
        switch (getConfig('refid_target'))
        {
@@ -60,8 +60,8 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        }
 
        // Get referal ID from ref or refid variable
-       if (!empty($_GET['ref']))        $ref = secureString($_GET['ref']);
-        elseif (!empty($_GET['refid'])) $ref = secureString($_GET['refid']);
+       if (REQUEST_ISSET_GET(('ref')))        $ref = secureString(REQUEST_GET('ref'));
+        elseif (REQUEST_ISSET_GET(('refid'))) $ref = secureString(REQUEST_GET('refid'));
 
        if (!empty($ref)) {
                // Test if nickname or numeric id