r75314 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75313‎ | r75314 | r75315 >
Date:15:33, 24 October 2010
Author:btongminh
Status:resolved (Comments)
Tags:
Comment:
(bug 23923) Special:Prefixindex no longer shows results if nothing was requested.

I believe that this was the intention of the original code anyway, but isset was used on places where it should not have been.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPrefixindex.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPrefixindex.php
@@ -44,7 +44,7 @@
4545 $this->outputHeader();
4646
4747 # GET values
48 - $from = $wgRequest->getVal( 'from' );
 48+ $from = $wgRequest->getVal( 'from', '' );
4949 $prefix = $wgRequest->getVal( 'prefix', '' );
5050 $namespace = $wgRequest->getInt( 'namespace' );
5151 $namespaces = $wgContLang->getNamespaces();
@@ -56,9 +56,9 @@
5757
5858 if( isset( $par ) ){
5959 $this->showPrefixChunk( $namespace, $par, $from );
60 - } elseif( isset( $prefix ) ){
 60+ } elseif( $prefix ){
6161 $this->showPrefixChunk( $namespace, $prefix, $from );
62 - } elseif( isset( $from ) ){
 62+ } elseif( $from ){
6363 $this->showPrefixChunk( $namespace, $from, $from );
6464 } else {
6565 $wgOut->addHTML( $this->namespacePrefixForm( $namespace, null ) );
Index: trunk/phase3/RELEASE-NOTES
@@ -362,6 +362,8 @@
363363 available via the API
364364 * (bug 23934) Groups defined in $wgRevokePermissions but not in
365365 $wgGroupPermissions now appear on Special:ListGroupRights
 366+* (bug 23923) Special:Prefixindex no longer shows results if nothing was
 367+ requested.
366368
367369 === API changes in 1.17 ===
368370 * (bug 22738) Allow filtering by action type on query=logevent.

Follow-up revisions

RevisionCommit summaryAuthorDate
r75402Followup for r75314 (bug 23923) -- regression fix for prefix of '0' being ign...brion23:49, 25 October 2010
r79851* (bug 26625) fix regression in Special:PrefixIndex from r75314; pages weren'...brion23:52, 7 January 2011

Comments

#Comment by Brion VIBBER (talk | contribs)   23:39, 25 October 2010

Hrm, won't this fail if from or prefix params are set to the string '0'?

#Comment by Brion VIBBER (talk | contribs)   23:49, 25 October 2010

Fixed in r75402

Status & tagging log