From: Brian Wolff Date: Sat, 19 Jul 2014 15:06:48 +0000 (-0300) Subject: Better false positive detection for Special:Wantedfiles X-Git-Tag: 1.31.0-rc.0~14011^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=6c12fad6dd1158103cfea104c6afb217d7f63b6d;p=lhc%2Fweb%2Fwiklou.git Better false positive detection for Special:Wantedfiles Previously the page crossed out entries based on Title::isKnown. This could potentially catch pages which are valid file redirects, which shouldn't be crossed out. This shouldn't affect anything performance wise, as the previous Title::isKnown check would call wfFindFile anyways. Change-Id: Ia9eac8f5618181c631a5b2b1c461b12a90f2dde7 --- diff --git a/includes/specials/SpecialWantedfiles.php b/includes/specials/SpecialWantedfiles.php index 8269b01c01..937a503c0f 100644 --- a/includes/specials/SpecialWantedfiles.php +++ b/includes/specials/SpecialWantedfiles.php @@ -93,6 +93,18 @@ class WantedFilesPage extends WantedQueryPage { return true; } + /** + * Does the file exist? + * + * Use wfFindFile so we still think file namespace pages without + * files are missing, but valid file redirects and foreign files are ok. + * + * @return boolean + */ + protected function existenceCheck( Title $title ) { + return (bool) wfFindFile( $title ); + } + function getQueryInfo() { return array( 'tables' => array(