]> git.mxchange.org Git - mailer.git/commitdiff
Hotfix for counting refback points
authorRoland Häder <roland@mxchange.org>
Sun, 28 Sep 2008 01:39:46 +0000 (01:39 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 28 Sep 2008 01:39:46 +0000 (01:39 +0000)
inc/databases.php
inc/extensions/ext-sql_patches.php
inc/mysql-manager.php

index 97529671745fe24c15a19d981a65811c20dafe81..fd4c517ccae2d00f1a1b55dd90a43c3e950c577d 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "411");
+define('CURR_SVN_REVISION', "412");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 4517ec3a44a4e0e67ad814080da95abdb2c01a8c..1cfd76056c9d036024c3ac569e9918ae19c9bd97 100644 (file)
@@ -644,6 +644,7 @@ PRIMARY KEY (id)
 `level` smallint(6) NOT NULL DEFAULT 0,
 `refid` bigint(20) NOT NULL DEFAULT 0,
 `refback` float(4,1) NOT NULL DEFAULT 0.0,
+`points` FLOAT( 20,5) DEFAULT '0.00000' NOT NULL,
 PRIMARY KEY (`id`),
 UNIQUE `user_refid` (`userid`,`level`,`refid`),
 KEY (`level`),
index 84d2a4ddbfee90768fd295b2aebe63f4ff7cd29f..26e6870c0c059400f990685bfa05df85f31c44e7 100644 (file)
@@ -1293,6 +1293,10 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points) {
                        //* DEBUG: */ echo __FUNCTION__.":refback={$refback}<br />\n";
                        ADD_POINTS_REFSYSTEM($uid, $refback, false, "0", false, "direct");
 
+                       // Update refback table
+                       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_refs SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
+                               array($refback, $uid, $refid), __FILE__, __LINE__);
+
                        // Reduce points if refid is found
                        if ($refid == $ref) {
                                // Reduce points here!