http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54815

Revision: 54815
Author:   demon
Date:     2009-08-11 21:47:55 +0000 (Tue, 11 Aug 2009)

Log Message:
-----------
Revert r35877, early commit that can only be explained by a complete naivete. 
Nobody ever used this because they weren't idiots.

Modified Paths:
--------------
    trunk/phase3/includes/DefaultSettings.php
    trunk/phase3/includes/User.php

Modified: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php   2009-08-11 21:41:41 UTC (rev 
54814)
+++ trunk/phase3/includes/DefaultSettings.php   2009-08-11 21:47:55 UTC (rev 
54815)
@@ -1539,14 +1539,6 @@
  */
 $wgDeleteRevisionsLimit = 0;
 
-/**
- * Used to figure out if a user is "active" or not. User::isActiveEditor()
- * sees if a user has made at least $wgActiveUserEditCount number of edits
- * within the last $wgActiveUserDays days.
- */
-$wgActiveUserEditCount = 30;
-$wgActiveUserDays = 30;
-
 # Proxy scanner settings
 #
 

Modified: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php      2009-08-11 21:41:41 UTC (rev 54814)
+++ trunk/phase3/includes/User.php      2009-08-11 21:47:55 UTC (rev 54815)
@@ -2689,32 +2689,6 @@
        }
 
        /**
-        * Is the user active? We check to see if they've made at least
-        * X number of edits in the last Y days.
-        *
-        * @return \bool True if the user is active, false if not.
-        */
-       public function isActiveEditor() {
-               global $wgActiveUserEditCount, $wgActiveUserDays;
-               $dbr = wfGetDB( DB_SLAVE );
-
-               // Stolen without shame from RC
-               $cutoff_unixtime = time() - ( $wgActiveUserDays * 86400 );
-               $cutoff_unixtime = $cutoff_unixtime - ( $cutoff_unixtime % 
86400 );
-               $oldTime = $dbr->addQuotes( $dbr->timestamp( $cutoff_unixtime ) 
);
-
-               $res = $dbr->select( 'revision', '1',
-                               array( 'rev_user_text' => $this->getName(), 
"rev_timestamp > $oldTime"),
-                               __METHOD__,
-                               array('LIMIT' => $wgActiveUserEditCount ) );
-
-               $count = $dbr->numRows($res);
-               $dbr->freeResult($res);
-
-               return $count == $wgActiveUserEditCount;
-       }
-
-       /**
         * Check to see if the given clear-text password is one of the accepted 
passwords
         * @param $password \string user password.
         * @return \bool True if the given password is correct, otherwise False.



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to