Follow-up to r75282: don't query if there are no pages to query
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 29 Dec 2010 20:32:14 +0000 (20:32 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 29 Dec 2010 20:32:14 +0000 (20:32 +0000)
includes/api/ApiQueryPageProps.php

index debf562..6eb8b80 100644 (file)
@@ -47,6 +47,10 @@ class ApiQueryPageProps extends ApiQueryBase {
                
                # Only operate on existing pages
                $pages = $this->getPageSet()->getGoodTitles();
+               if ( !count( $pages ) ) {
+                       # Nothing to do
+                       return;
+               }
                
                $this->addTables( 'page_props' );
                $this->addFields( array( 'pp_page', 'pp_propname', 'pp_value' ) );