A lot while() conditions rewritten to SQL_FETCHARRAY(), see bug #107, @TODO tags...
[mailer.git] / ref.php
diff --git a/ref.php b/ref.php
index c83f596ccb619c1e946708f3b1264d4abf8e0a0b..66d545f342c0fe37f95ef79d58ffdc28fe35d8c1 100644 (file)
--- a/ref.php
+++ b/ref.php
 require("inc/libs/security_functions.php");
 
 // Init "action" and "what"
-global $what, $action;
-$GLOBALS['what'] = ""; $GLOBALS['action'] = "";
+$GLOBALS['what'] = "";
+$GLOBALS['action'] = "";
 
 // Set module
-$GLOBALS['module'] = "ref"; $CSS = -1;
+$GLOBALS['module'] = "ref";
+$GLOBALS['output_mode'] = -1;
 
 // Load the required file(s)
 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'))
        {
@@ -59,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 = REQUEST_GET('ref');
+        elseif (REQUEST_ISSET_GET(('refid'))) $ref = REQUEST_GET('refid');
 
        if (!empty($ref)) {
                // Test if nickname or numeric id