profiling
authorTim Starling <tstarling@users.mediawiki.org>
Mon, 22 Jan 2007 19:19:43 +0000 (19:19 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Mon, 22 Jan 2007 19:19:43 +0000 (19:19 +0000)
includes/User.php

index b9706d5..6475a2f 100644 (file)
@@ -545,6 +545,7 @@ class User {
         * @static
         */
        static function edits( $uid ) {
+               wfProfileIn( __METHOD__ );
                $dbr =& wfGetDB( DB_SLAVE );
 
                // check if the user_editcount field has been initialized
@@ -567,10 +568,11 @@ class User {
                                array( 'user_id' => $uid ),
                                __METHOD__
                        );
-                       return $count;
                } else {
-                       return $field;
+                       $count = $field;
                }
+               wfProfileOut( __METHOD__ );
+               return $count;
        }
 
        /**