+
+ /**
+ * @param $from int
+ * @param $to int
+ * @access private
+ */
+ function reassignEdits( $from, $to ) {
+ $set = $this->newSchema()
+ ? array( 'revision' => 'rev_user' )
+ : array( 'cur' => 'cur_user', 'old' => 'old_user' );
+ foreach( $set as $table => $field ) {
+ $this->reassignEditsOn( $table, $field, $from, $to );
+ }
+ }
+
+ /**
+ * @param $table string
+ * @param $field string
+ * @param $from int
+ * @param $to int
+ * @access private
+ */
+ function reassignEditsOn( $table, $field, $from, $to ) {
+ $fname = 'UserDupes::reassignEditsOn';
+ wfOut( "reassigning on $table... " );
+ $this->db->update( $table,
+ array( $field => $to ),
+ array( $field => $from ),
+ $fname );
+ wfOut( "ok. " );
+ }
+