r11175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11174‎ | r11175 | r11176 >
Date:07:17, 2 October 2005
Author:vibber
Status:old
Tags:
Comment:
Fix namespace and notalk filters for dump
Modified paths:
  • /trunk/phase3/includes/Export.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Export.php
@@ -522,7 +522,7 @@
523523 */
524524 class DumpNotalkFilter extends DumpFilter {
525525 function pass( $page ) {
526 - return Namespace::isTalk( $page->page_namespace );
 526+ return !Namespace::isTalk( $page->page_namespace );
527527 }
528528 }
529529
@@ -531,7 +531,7 @@
532532 */
533533 class DumpNamespaceFilter extends DumpFilter {
534534 var $invert = false;
535 - var $match = array();
 535+ var $namespaces = array();
536536
537537 function DumpNamespaceFilter( &$sink, $param ) {
538538 parent::DumpFilter( $sink );
@@ -561,12 +561,14 @@
562562
563563 foreach( explode( ',', $param ) as $key ) {
564564 $key = trim( $key );
565 - if( isset( $contants[$key] ) ) {
 565+ if( isset( $constants[$key] ) ) {
566566 $ns = $constants[$key];
567567 $this->namespaces[$ns] = true;
568568 } elseif( is_numeric( $key ) ) {
569569 $ns = intval( $key );
570570 $this->namespaces[$ns] = true;
 571+ } else {
 572+ die( "Unrecognized namespace key '$key'\n" );
571573 }
572574 }
573575 }

Status & tagging log