r106816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106815‎ | r106816 | r106817 >
Date:17:14, 20 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Followup r106813, make batchRecord protected not private

Add BatchCAAntiSpoof script for CA usage
Modified paths:
  • /trunk/extensions/AntiSpoof/batchAntiSpoof.php (modified) (history)
  • /trunk/extensions/CentralAuth/AntiSpoof/batchCAAntiSpoof.php (added) (history)

Diff [purge]

Index: trunk/extensions/CentralAuth/AntiSpoof/batchCAAntiSpoof.php
@@ -0,0 +1,28 @@
 2+<?php
 3+// Go through all usernames and calculate and record spoof thingies
 4+
 5+$IP = getenv( 'MW_INSTALL_PATH' );
 6+if ( $IP === false ) {
 7+ $IP = dirname( __FILE__ ) . '/../../..';
 8+}
 9+require( "$IP/maintenance/Maintenance.php" );
 10+
 11+class BatchCAAntiSpoof extends BatchAntiSpoof {
 12+
 13+ /**
 14+ * @param $items array
 15+ */
 16+ protected function batchRecord( $items ) {
 17+ CentralAuthSpoofUser::batchRecord( $items );
 18+ }
 19+
 20+ /**
 21+ * @return DatabaseBase
 22+ */
 23+ protected function getDB() {
 24+ CentralAuthUser::getCentralDB();
 25+ }
 26+}
 27+
 28+$maintClass = "BatchCAAntiSpoof";
 29+require_once( DO_MAINTENANCE );
Property changes on: trunk/extensions/CentralAuth/AntiSpoof/batchCAAntiSpoof.php
___________________________________________________________________
Added: svn:eol-style
130 + native
Index: trunk/extensions/AntiSpoof/batchAntiSpoof.php
@@ -12,7 +12,7 @@
1313 /**
1414 * @param $items array
1515 */
16 - private function batchRecord( $items ) {
 16+ protected function batchRecord( $items ) {
1717 SpoofUser::batchRecord( $items );
1818 }
1919

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r106813Refactored batchAntiSpoof.php to subclass Maintenance...reedy17:04, 20 December 2011

Status & tagging log