r54815 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54814‎ | r54815 | r54816 >
Date:21:47, 11 August 2009
Author:demon
Status:ok
Tags:
Comment:
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 (modified) (history)
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -2689,32 +2689,6 @@
26902690 }
26912691
26922692 /**
2693 - * Is the user active? We check to see if they've made at least
2694 - * X number of edits in the last Y days.
2695 - *
2696 - * @return \bool True if the user is active, false if not.
2697 - */
2698 - public function isActiveEditor() {
2699 - global $wgActiveUserEditCount, $wgActiveUserDays;
2700 - $dbr = wfGetDB( DB_SLAVE );
2701 -
2702 - // Stolen without shame from RC
2703 - $cutoff_unixtime = time() - ( $wgActiveUserDays * 86400 );
2704 - $cutoff_unixtime = $cutoff_unixtime - ( $cutoff_unixtime % 86400 );
2705 - $oldTime = $dbr->addQuotes( $dbr->timestamp( $cutoff_unixtime ) );
2706 -
2707 - $res = $dbr->select( 'revision', '1',
2708 - array( 'rev_user_text' => $this->getName(), "rev_timestamp > $oldTime"),
2709 - __METHOD__,
2710 - array('LIMIT' => $wgActiveUserEditCount ) );
2711 -
2712 - $count = $dbr->numRows($res);
2713 - $dbr->freeResult($res);
2714 -
2715 - return $count == $wgActiveUserEditCount;
2716 - }
2717 -
2718 - /**
27192693 * Check to see if the given clear-text password is one of the accepted passwords
27202694 * @param $password \string user password.
27212695 * @return \bool True if the given password is correct, otherwise False.
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1539,14 +1539,6 @@
15401540 */
15411541 $wgDeleteRevisionsLimit = 0;
15421542
1543 -/**
1544 - * Used to figure out if a user is "active" or not. User::isActiveEditor()
1545 - * sees if a user has made at least $wgActiveUserEditCount number of edits
1546 - * within the last $wgActiveUserDays days.
1547 - */
1548 -$wgActiveUserEditCount = 30;
1549 -$wgActiveUserDays = 30;
1550 -
15511543 # Proxy scanner settings
15521544 #
15531545

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r35877Recommitting User::isActiveUser() as User::isActiveEditor() per suggestions f...demon20:07, 4 June 2008

Status & tagging log