r45562 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45561‎ | r45562 | r45563 >
Date:13:23, 8 January 2009
Author:aaron
Status:ok (Comments)
Tags:todo 
Comment:
(bug 16931) Subpages ending with slashes (no parameter given) should behave like those without
Modified paths:
  • /trunk/extensions/CodeReview/SpecialCode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/SpecialCode.php
@@ -13,6 +13,8 @@
1414
1515 $this->setHeaders();
1616 $wgOut->addStyle( "$wgScriptPath/extensions/CodeReview/codereview.css?$wgCodeReviewStyleVersion" );
 17+ # Remove stray slashes
 18+ $subpage = preg_replace( '/\/$/','', $subpage );
1719
1820 if( $subpage == '' ) {
1921 $view = new CodeRepoListView();

Comments

#Comment by Simetrical (talk | contribs)   14:56, 8 January 2009

Would it be better to send a 301 so that we don't have duplicate URLs? (Actually, I notice that Special:Code is noindexed: surely that's not desirable.)

#Comment by Brion VIBBER (talk | contribs)   21:29, 13 January 2009

Redirects to canonical URLs make me warm and fuzzy! But this'll do for now, so I'm just marking it as a todo.

#Comment by Nikerabbit (talk | contribs)   16:56, 14 January 2009

Comments says slasheS, yet the code seems to remove only the last one. Would rtrim do it here?

Status & tagging log