Follow-up r69233: Add existence check for NS_MEDIA titles
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 21 Jul 2010 14:40:24 +0000 (14:40 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Wed, 21 Jul 2010 14:40:24 +0000 (14:40 +0000)
includes/api/ApiQuery.php

index 43a2caf..18c0954 100644 (file)
@@ -397,6 +397,9 @@ class ApiQuery extends ApiBase {
                        if ( $title->getNamespace() == NS_SPECIAL && 
                                        !SpecialPage::exists( $title->getText() ) ) {
                                $vals['missing'] = '';                  
+                       } elseif ( $title->getNamespace() == NS_MEDIA &&
+                                       !wfFindFile( $title ) ) {
+                               $vals['missing'] = '';
                        }
                        $pages[$fakeId] = $vals;
                }