CLEANUP: cleaned up some debug message and error checking
authorArun Persaud <arun@nubati.net>
Sat, 25 Apr 2009 05:27:26 +0000 (22:27 -0700)
committerArun Persaud <arun@nubati.net>
Sat, 25 Apr 2009 05:27:26 +0000 (22:27 -0700)
include/db.php

index e389db410d3e0f5ffc258534c1068a9d8ee59aeb..3d9d98c9cf9272b83b5d0f5390fc359398f6bb56 100644 (file)
@@ -18,8 +18,10 @@ function DB_open()
       mysql_select_db($DB_database) or die('Could not select database');
     }
   else
       mysql_select_db($DB_database) or die('Could not select database');
     }
   else
-    return -1;
-
+    {
+      echo mysql_errno() . ": " . mysql_error(). "\n";
+      return -1;
+    }
   return 0;
 }
 
   return 0;
 }
 
@@ -1036,7 +1038,7 @@ function DB_get_userid($type,$var1="",$var2="")
       /* test if a recovery password has been set */
       if(!$r)
        {
       /* test if a recovery password has been set */
       if(!$r)
        {
-         echo "testing alternative password";
+         /* testing alternative password */
          $result = DB_query("SELECT User.id FROM User".
                             " LEFT JOIN Recovery ON User.id=Recovery.user_id".
                             " WHERE email=".DB_quote_smart($var1).
          $result = DB_query("SELECT User.id FROM User".
                             " LEFT JOIN Recovery ON User.id=Recovery.user_id".
                             " WHERE email=".DB_quote_smart($var1).