A lot while() conditions rewritten to SQL_FETCHARRAY(), see bug #107, @TODO tags...
[mailer.git] / doubler.php
index 9eb0c4e9180ef6962a441aa04ff6c966022ac543..0faafa9c69a3a8c8ef3ea98b9a8380f5fd6de97e 100644 (file)
@@ -51,9 +51,9 @@ require("inc/config.php");
 REDIRECT_ON_UNINSTALLED_EXTENSION("doubler");
 
 // Is the script installed?
-if (isBooleanConstantAndTrue('mxchange_installed')) {
+if (isInstalled()) {
        // Probe for referal ID
-       if (REQUEST_ISSET_GET(('refid'))) $GLOBALS['refid'] = SQL_ESCAPE(REQUEST_GET('refid'));
+       if (REQUEST_ISSET_GET(('refid'))) $GLOBALS['refid'] = REQUEST_GET(('refid'));
 
        // Only check this if refid is provided!
        if ($GLOBALS['refid'] > 0) {
@@ -123,7 +123,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                        // Check all together
                        if ((!empty($uid)) && ($password == generateHash(REQUEST_POST('pass'), substr($password, 0, -40))) && ($status == "CONFIRMED") && ($probe_points)) {
                                // Nickname resolved to a unique userid or direct userid entered by the member
-                               $DOUBLER_UID = $uid;
+                               $GLOBALS['doubler_uid'] = $uid;
 
                                // Calulcate points
                                $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points");