r90923 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90922‎ | r90923 | r90924 >
Date:23:20, 27 June 2011
Author:reedy
Status:resolved
Tags:
Comment:
Don't put a quoted/regexed prefix back out again
Modified paths:
  • /trunk/phase3/includes/specials/SpecialAllmessages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialAllmessages.php
@@ -88,7 +88,7 @@
8989 */
9090 class AllmessagesTablePager extends TablePager {
9191
92 - protected $filter, $prefix, $langcode;
 92+ protected $filter, $prefix, $langcode, $displayPrefix;
9393
9494 public $mLimitsShown;
9595
@@ -132,8 +132,10 @@
133133 $prefix = $wgLang->ucfirst( $wgRequest->getVal( 'prefix', '' ) );
134134 $prefix = $prefix != '' ? Title::makeTitleSafe( NS_MEDIAWIKI, $wgRequest->getVal( 'prefix', null ) ) : null;
135135 if( $prefix !== null ){
136 - $this->prefix = '/^' . preg_quote( $prefix->getDBkey() ) . '/i';
 136+ $this->displayPrefix = $prefix->getDBkey();
 137+ $this->prefix = '/^' . preg_quote( $this->displayPrefix ) . '/i';
137138 } else {
 139+ $this->displayPrefix = false;
138140 $this->prefix = false;
139141 }
140142 $this->getSkin();

Follow-up revisions

RevisionCommit summaryAuthorDate
r90924Followup r90923, best to actually use displayPrefixreedy23:25, 27 June 2011

Status & tagging log