r94155 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94154‎ | r94155 | r94156 >
Date:14:23, 10 August 2011
Author:catrope
Status:ok
Tags:
Comment:
(bug 30074) Moving user JS subpages resulted in JS errors because #REDIRECT [[Foo]] is invalid JS. Fix this by refusing to load redirect pages in ResourceLoaderWikiModule. Patch by John Du Hart
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -91,7 +91,7 @@
9292 continue;
9393 }
9494 $title = Title::newFromText( $titleText );
95 - if ( !$title ) {
 95+ if ( !$title || $title->isRedirect() ) {
9696 continue;
9797 }
9898 $script = $this->getContent( $title );
@@ -119,7 +119,7 @@
120120 continue;
121121 }
122122 $title = Title::newFromText( $titleText );
123 - if ( !$title ) {
 123+ if ( !$title || $title->isRedirect() ) {
124124 continue;
125125 }
126126 $media = isset( $options['media'] ) ? $options['media'] : 'all';

Follow-up revisions

RevisionCommit summaryAuthorDate
r94425Add RELEASE-NOTES for r93818 and r94155. Adding to the 1.18 file since they'r...catrope18:33, 13 August 2011
r94446MFT to REL1_18:...hashar09:27, 14 August 2011
r94472MFT to REL1_18:...hashar19:43, 14 August 2011
r945571.17wmf1: MFT r87099, r90729, r93141, r93517, r93891, r94155, r94277, r94372catrope20:12, 15 August 2011

Status & tagging log