r42732 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r42731 | r42732 (on ViewVC) | r42733 >
Date:14:35, 28 October 2008
Author:catrope
Status:ok
Tags:api 
Comment:API: (bug 16158) Generators choke on pagelinks entries with negative pl_namespace. Throw a warning instead of an error for the time being
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/api/ApiPageSet.php
===================================================================
--- trunk/phase3/includes/api/ApiPageSet.php	(revision 42731)
+++ trunk/phase3/includes/api/ApiPageSet.php	(revision 42732)
@@ -587,9 +587,9 @@
 
 				// Validation
 				if ($titleObj->getNamespace() < 0)
-					$this->dieUsage("No support for special pages has been implemented", 'unsupportednamespace');
-
-				$linkBatch->addObj($titleObj);
+					$this->setWarning("No support for special pages has been implemented");
+				else
+					$linkBatch->addObj($titleObj);
 			}
 
 			// Make sure we remember the original title that was given to us
Views
Toolbox