Followup to r53087 / r53052 - Change dieUsage to setWarning per CodeReview
authorAlex Z <mrzman@users.mediawiki.org>
Mon, 13 Jul 2009 14:54:38 +0000 (14:54 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Mon, 13 Jul 2009 14:54:38 +0000 (14:54 +0000)
includes/api/ApiQueryCategoryMembers.php

index 5fc9957..253c693 100644 (file)
@@ -87,10 +87,10 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                # how to have efficient subcategory access :-) ~~~~ (oh well, domas)
                global $wgMiserMode;
                if ( $wgMiserMode && isset($params['namespace']) ) { 
-                       $this->dieUsage("The cmnamespace option is disabled on this site", 'namespacedisabled');
+                       $this->setWarning("The cmnamespace option is disabled on this site");
+               } else {
+                       $this->addWhereFld('page_namespace', $params['namespace']);
                }
-               $this->addWhereFld('page_namespace', $params['namespace']);
-
                if($params['sort'] == 'timestamp')
                        $this->addWhereRange('cl_timestamp', ($params['dir'] == 'asc' ? 'newer' : 'older'), $params['start'], $params['end']);
                else