Comment tweak, remove strcmp().
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 24 Jan 2008 02:00:33 +0000 (02:00 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 24 Jan 2008 02:00:33 +0000 (02:00 +0000)
includes/User.php

index 08bf83c..ba77fdd 100644 (file)
@@ -2018,11 +2018,11 @@ class User {
 
 
        /**
-        * Checks if a user with the given name exists, returns the ID
+        * Checks if a user with the given name exists, returns the ID.
         */
        function idForName() {
                $s = trim( $this->getName() );
-               if ( 0 == strcmp( '', $s ) ) return 0;
+               if ( $s === '' ) return 0;
 
                $dbr = wfGetDB( DB_SLAVE );
                $id = $dbr->selectField( 'user', 'user_id', array( 'user_name' => $s ), __METHOD__ );