* (bug 9177) Installer now warns of various conditions affecting session.save_path
which can lead to broken session storage
* (bug 9046) Special page to list pages without language links
-* Predefined block reasons added to special:blockip
+* Predefined block reasons added to Special:Blockip
+* (bug 9508) Special page to list articles with the fewest revisions
== Bugfixes since 1.9 ==
* (bug 7292) Fix site statistics when moving pages in/out of content namespaces
'MostlinkedPage' => 'includes/SpecialMostlinked.php',
'MostlinkedCategoriesPage' => 'includes/SpecialMostlinkedcategories.php',
'MostrevisionsPage' => 'includes/SpecialMostrevisions.php',
+ 'FewestrevisionsPage' => 'includes/SpecialFewestrevisions.php',
'MovePageForm' => 'includes/SpecialMovepage.php',
'NewbieContributionsPage' => 'includes/SpecialNewbieContributions.php',
'NewPagesPage' => 'includes/SpecialNewpages.php',
array( 'MostlinkedCategoriesPage', 'Mostlinkedcategories' ),
array( 'MostlinkedPage', 'Mostlinked' ),
array( 'MostrevisionsPage', 'Mostrevisions' ),
+ array( 'FewestrevisionsPage', 'Fewestrevisions' ),
array( 'NewPagesPage', 'Newpages' ),
array( 'ShortPagesPage', 'Shortpages' ),
array( 'UncategorizedCategoriesPage', 'Uncategorizedcategories' ),
}
}
-?>
\ No newline at end of file
+?>
--- /dev/null
+<?php
+
+/**
+ *
+ * Special page for listing the articles with the fewest revisions.
+ *
+ * @package MediaWiki
+ * @subpackage Special pages
+ * @author Martin Drashkov
+ */
+
+class FewestrevisionsPage extends QueryPage {
+
+ function getName() {
+ return 'Fewestrevisions';
+ }
+
+ function isExpensive() {
+ return true;
+ }
+
+ function isSyndicated() {
+ return false;
+ }
+
+ function getSql() {
+ $dbr = wfGetDB( DB_SLAVE );
+ list( $revision, $page ) = $dbr->tableNamesN( 'revision', 'page' );
+
+ return "SELECT 'Fewestrevisions' as type,
+ page_namespace as namespace,
+ page_title as title,
+ COUNT(*) as value
+ FROM $revision
+ JOIN $page ON page_id = rev_page
+ WHERE page_namespace = " . NS_MAIN . "
+ GROUP BY 1,2,3
+ HAVING COUNT(*) > 1";
+ }
+
+ function sortDescending() {
+ return false;
+ }
+
+ function formatResult( $skin, $result ) {
+ global $wgLang, $wgContLang;
+
+ $nt = Title::makeTitleSafe( $result->namespace, $result->title );
+ $text = $wgContLang->convert( $nt->getPrefixedText() );
+
+ $plink = $skin->makeKnownLinkObj( $nt, $text );
+
+ $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape'),
+ $wgLang->formatNum( $result->value ) );
+ $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' );
+
+ return wfSpecialList( $plink, $nlink );
+ }
+}
+
+function wfSpecialFewestrevisions() {
+ list( $limit, $offset ) = wfCheckLimits();
+ $frp = new FewestrevisionsPage();
+ $frp->doQuery( $offset, $limit );
+}
+
+?>
+
'Mostcategories' => array( 'SpecialPage', 'Mostcategories' ),
'Mostimages' => array( 'SpecialPage', 'Mostimages' ),
'Mostrevisions' => array( 'SpecialPage', 'Mostrevisions' ),
+ 'Fewestrevisions' => array( 'SpecialPage', 'Fewestrevisions' ),
'Shortpages' => array( 'SpecialPage', 'Shortpages' ),
'Longpages' => array( 'SpecialPage', 'Longpages' ),
'Newpages' => array( 'IncludableSpecialPage', 'Newpages' ),
'Mostcategories' => array( 'Mostcategories' ),
'Mostimages' => array( 'Mostimages' ),
'Mostrevisions' => array( 'Mostrevisions' ),
+ 'Fewestrevisions' => array( 'Fewestrevisions' ),
'Shortpages' => array( 'Shortpages' ),
'Longpages' => array( 'Longpages' ),
'Newpages' => array( 'Newpages' ),
'withoutinterwiki' => 'Pages without language links',
'withoutinterwiki-header' => 'The following pages do not link to other language versions:',
+'fewestrevisions' => 'Articles with the fewest revisions',
+
# Miscellaneous special pages
#
'nbytes' => '$1 {{PLURAL:$1|byte|bytes}}',
'mostimages-summary',
'mostrevisions',
'mostrevisions-summary',
+ 'fewestrevisions',
'allpages',
'allpages-summary',
'prefixindex',