From b1556f51c36add996493e1300a3be7384baca0f1 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 19 Jun 2008 13:22:57 +0000 Subject: [PATCH] Per r35950: removed unused file --- includes/specials/MissingFiles.php | 87 ------------------------------ 1 file changed, 87 deletions(-) delete mode 100644 includes/specials/MissingFiles.php diff --git a/includes/specials/MissingFiles.php b/includes/specials/MissingFiles.php deleted file mode 100644 index d2da51c741..0000000000 --- a/includes/specials/MissingFiles.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright Copyright © 2008, Matěj Grabovský - * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later - */ -class MissingFilesPage extends QueryPage { - function getName() { - return 'Missingfiles'; - } - - function isExpensive() { - return true; - } - - function isSyndicated() { - return false; - } - - function getSQL() { - $dbr = wfGetDB( DB_SLAVE ); - list( $imagelinks, $page ) = $dbr->tableNamesN( 'imagelinks', 'page' ); - $name = $dbr->addQuotes( $this->getName() ); - - return "SELECT $name as type, - " . NS_IMAGE . " as namespace, - il_to as title, - COUNT(*) as value - FROM $imagelinks - LEFT JOIN $page ON il_to = page_title AND page_namespace = ". NS_IMAGE ." - WHERE page_title IS NULL - GROUP BY 1,2,3 - "; - } - - function sortDescending() { - return true; - } - - /** - * Fetch user page links and cache their existence - */ - function preprocessResults( $db, $res ) { - $batch = new LinkBatch; - - while ( $row = $db->fetchObject( $res ) ) - $batch->addObj( Title::makeTitleSafe( $row->namespace, $row->title ) ); - - $batch->execute(); - - // Back to start for display - if ( $db->numRows( $res ) > 0 ) - - // If there are no rows we get an error seeking. - $db->dataSeek( $res, 0 ); - } - - public function formatResult( $skin, $result ) { - global $wgLang, $wgContLang; - - $nt = Title::makeTitle( $result->namespace, $result->title ); - $text = $wgContLang->convert( $nt->getText() ); - - $plink = $this->isCached() - ? '' . $skin->makeLinkObj( $nt, htmlspecialchars( $text ) ) . '' - : $skin->makeBrokenImageLinkObj( $nt, htmlspecialchars( $text ) ); - - $label = wfMsgExt( 'nlinks', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->value ) ); - $nlinks = $skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Whatlinkshere' ), $label, 'target=' . $nt->getPrefixedUrl() ); - return wfSpecialList( $plink, $nlinks ); - } -} - -/** - * Constructor - */ -function wfSpecialMissingFiles() { - list( $limit, $offset ) = wfCheckLimits(); - - $wpp = new MissingFilesPage(); - - $wpp->doQuery( $offset, $limit ); -} \ No newline at end of file -- 2.20.1