From: Bryan Tong Minh Date: Wed, 21 Jul 2010 14:40:24 +0000 (+0000) Subject: Follow-up r69233: Add existence check for NS_MEDIA titles X-Git-Tag: 1.31.0-rc.0~36029 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=1d2b69a414bbca54e8b00c66c110a480a933ad94;p=lhc%2Fweb%2Fwiklou.git Follow-up r69233: Add existence check for NS_MEDIA titles --- diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 43a2caf1e1..18c09549db 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -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; }