r97219 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97218‎ | r97219 | r97220 >
Date:23:17, 15 September 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 30920) Workaround DumpHTML vs Collection compat problem

Ignores raw-HTML sidebar sections like Collection adds so it doesn't spew warnings while processing it.
Modified paths:
  • /trunk/extensions/DumpHTML/SkinOffline.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DumpHTML/SkinOffline.php
@@ -31,8 +31,13 @@
3232 foreach ( $badMessages as $msg ) {
3333 $badUrls[] = self::makeInternalOrExternalUrl( wfMsgForContent( $msg ) );
3434 }
35 -
3635 foreach ( $sections as $heading => $section ) {
 36+ if (!is_array($section)) {
 37+ // A raw HTML chunk, such as provided by Collection ext.
 38+ // Just ignore these so they don't explode.
 39+ unset( $sections[$heading] );
 40+ continue;
 41+ }
3742 foreach ( $section as $index => $link ) {
3843 if ( in_array( $link['href'], $badUrls ) ) {
3944 unset( $sections[$heading][$index] );

Status & tagging log