Fix Userlogin
authorJens Frank <jeluf@users.mediawiki.org>
Mon, 19 Jul 2004 06:35:56 +0000 (06:35 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Mon, 19 Jul 2004 06:35:56 +0000 (06:35 +0000)
includes/Database.php
includes/User.php

index 3ba8998..29d7e96 100644 (file)
@@ -642,11 +642,11 @@ class Database {
        # If it's a string, adds quotes and backslashes
        # Otherwise returns as-is
        function addQuotes( $s ) {
-               if ( !is_numeric( $s ) ) {
-                       $s = "'" . $this->strencode( $s ) . "'";
-               } else if ( is_null( $s ) ) {
+               if ( is_null( $s ) ) {
                        $s = 'NULL';
-               }
+               } else if ( !is_numeric( $s ) ) {
+                       $s = "'" . $this->strencode( $s ) . "'";
+               } 
                return $s;
        }
                
index 9170ce7..f31c81b 100644 (file)
@@ -81,7 +81,7 @@ class User {
 
                $this->mId = $this->mNewtalk = 0;
                $this->mName = $wgIP;
-               $this->mEmail = '';
+               $this->mRealName = $this->mEmail = '';
                $this->mPassword = $this->mNewpassword = '';
                $this->mRights = array();
                $defOpt = $wgLang->getDefaultUserOptions() ;