]> git.mxchange.org Git - mailer.git/commitdiff
Now with refid.php
authorRoland Häder <roland@mxchange.org>
Sat, 27 Sep 2008 20:03:11 +0000 (20:03 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 27 Sep 2008 20:03:11 +0000 (20:03 +0000)
inc/databases.php
ref.php

index 391cb43638c4d21f71eecb2eeda77ce17f4e45eb..0507ac7fbf6f87083c7e1571078442fc1124eb2c 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', "406");
+define('CURR_SVN_REVISION', "408");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
diff --git a/ref.php b/ref.php
index 905abf7122db965a1c657283365f881151d8f2b3..c9b37ece10ba3cb8f43d4730814a1b7d4fa28966 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -64,12 +64,21 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
 
        if (!empty($ref)) {
                // Test if nickname or numeric id
-               if ((EXT_IS_ACTIVE("nickname")) && ($ref != "".bigintval($ref)."")) {
-                       // Nickname in URL, so load the ID
-                       $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
-                               array($ref), __FILE__, __LINE__);
-                       list($ref) = SQL_FETCHROW($result);
-                       SQL_FREERESULT($result);
+               if ($ref != "".bigintval($ref)."") {
+                       if (EXT_IS_ACTIVE("nickname")) {
+                               // Nickname in URL, so load the ID
+                               $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
+                                       array($ref), __FILE__, __LINE__);
+
+                               // Load userid
+                               list($ref) = SQL_FETCHROW($result);
+
+                               // Free result
+                               SQL_FREERESULT($result);
+                       } else {
+                               // Invalid request!
+                               $ref = 0;
+                       }
                } // END - if
 
                // Also edit this 0 !