r68810 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68809‎ | r68810 | r68811 >
Date:03:03, 1 July 2010
Author:juliano
Status:deferred
Tags:
Comment:
Fix author filter in Special:Wikilog, which was searching for title dbkey
instead of the actual user name stored in the tables.
Modified paths:
  • /trunk/extensions/Wikilog/WikilogQuery.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikilog/WikilogQuery.php
@@ -253,7 +253,7 @@
254254 } elseif ( is_string( $author ) ) {
255255 $t = Title::makeTitleSafe( NS_USER, $author );
256256 if ( $t !== null ) {
257 - $this->mAuthor = $t;
 257+ $this->mAuthor = User::getCanonicalName( $t->getText() );
258258 }
259259 }
260260 }
@@ -354,7 +354,7 @@
355355 if ( $this->mAuthor ) {
356356 $q_tables[] = 'wikilog_authors';
357357 $q_joins['wikilog_authors'] = array( 'JOIN', 'wlp_page = wla_page' );
358 - $q_conds['wla_author_text'] = $this->mAuthor->getDBkey();
 358+ $q_conds['wla_author_text'] = $this->mAuthor;
359359 }
360360
361361 # Filter by tag.
@@ -412,7 +412,7 @@
413413 }
414414
415415 if ( $this->mAuthor ) {
416 - $query['author'] = $this->mAuthor->getDBKey();
 416+ $query['author'] = $this->mAuthor;
417417 }
418418
419419 if ( $this->mTag ) {
@@ -594,7 +594,7 @@
595595 } elseif ( is_string( $author ) ) {
596596 $t = Title::makeTitleSafe( NS_USER, $author );
597597 if ( $t !== null ) {
598 - $this->mAuthor = $t;
 598+ $this->mAuthor = User::getCanonicalName( $t->getText() );
599599 }
600600 }
601601 }
@@ -686,7 +686,7 @@
687687
688688 # Filter by author.
689689 if ( $this->mAuthor ) {
690 - $q_conds['wlc_user_text'] = $this->mAuthor->getDBkey();
 690+ $q_conds['wlc_user_text'] = $this->mAuthor;
691691 }
692692
693693 # Filter by date.
@@ -737,7 +737,7 @@
738738 }
739739
740740 if ( $this->mAuthor ) {
741 - $query['author'] = $this->mAuthor->getDBKey();
 741+ $query['author'] = $this->mAuthor;
742742 }
743743
744744 if ( $this->mDate ) {

Status & tagging log