From ab86423a715af5aef15de8d39f8dd121cf0f2af8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 2 Oct 2005 07:17:41 +0000 Subject: [PATCH] Fix namespace and notalk filters for dump --- includes/Export.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index 7f34a80f0a..7bbc667733 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -522,7 +522,7 @@ class DumpFilter { */ class DumpNotalkFilter extends DumpFilter { function pass( $page ) { - return Namespace::isTalk( $page->page_namespace ); + return !Namespace::isTalk( $page->page_namespace ); } } @@ -531,7 +531,7 @@ class DumpNotalkFilter extends DumpFilter { */ class DumpNamespaceFilter extends DumpFilter { var $invert = false; - var $match = array(); + var $namespaces = array(); function DumpNamespaceFilter( &$sink, $param ) { parent::DumpFilter( $sink ); @@ -561,12 +561,14 @@ class DumpNamespaceFilter extends DumpFilter { foreach( explode( ',', $param ) as $key ) { $key = trim( $key ); - if( isset( $contants[$key] ) ) { + if( isset( $constants[$key] ) ) { $ns = $constants[$key]; $this->namespaces[$ns] = true; } elseif( is_numeric( $key ) ) { $ns = intval( $key ); $this->namespaces[$ns] = true; + } else { + die( "Unrecognized namespace key '$key'\n" ); } } } -- 2.20.1