(bug 9046) Special page to list pages without language links
authorRob Church <robchurch@users.mediawiki.org>
Sat, 31 Mar 2007 22:54:30 +0000 (22:54 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Sat, 31 Mar 2007 22:54:30 +0000 (22:54 +0000)
RELEASE-NOTES
includes/AutoLoader.php
includes/QueryPage.php
includes/SpecialPage.php
includes/SpecialWithoutinterwiki.php [new file with mode: 0644]
languages/messages/MessagesEn.php

index 5a435b8..2cb1968 100644 (file)
@@ -109,6 +109,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 9069) Use galleries in query pages dedicated to images
 * (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
 
 == Bugfixes since 1.9 ==
 * (bug 7292) Fix site statistics when moving pages in/out of content namespaces
index 153cc30..b4b8ef8 100644 (file)
@@ -216,6 +216,7 @@ function __autoload($className) {
                'WantedCategoriesPage' => 'includes/SpecialWantedcategories.php',
                'WantedPagesPage' => 'includes/SpecialWantedpages.php',
                'WhatLinksHerePage' => 'includes/SpecialWhatlinkshere.php',
+               'WithoutInterwikiPage' => 'includes/SpecialWithoutinterwiki.php',
                'SquidUpdate' => 'includes/SquidUpdate.php',
                'ReplacementArray' => 'includes/StringUtils.php',
                'Replacer' => 'includes/StringUtils.php',
index 781a482..9571827 100644 (file)
@@ -19,7 +19,7 @@ $wgQueryPages = array(
        array( 'DeadendPagesPage',              'Deadendpages'                  ),
        array( 'DisambiguationsPage',           'Disambiguations'               ),
        array( 'DoubleRedirectsPage',           'DoubleRedirects'               ),
-       array( 'ListredirectsPage',             'Listredirects' ),
+       array( 'ListredirectsPage',             'Listredirects'                                 ),
        array( 'LonelyPagesPage',               'Lonelypages'                   ),
        array( 'LongPagesPage',                 'Longpages'                     ),
        array( 'MostcategoriesPage',            'Mostcategories'                ),
@@ -31,13 +31,14 @@ $wgQueryPages = array(
        array( 'ShortPagesPage',                'Shortpages'                    ),
        array( 'UncategorizedCategoriesPage',   'Uncategorizedcategories'       ),
        array( 'UncategorizedPagesPage',        'Uncategorizedpages'            ),
-       array( 'UncategorizedImagesPage',       'Uncategorizedimages' ),
+       array( 'UncategorizedImagesPage',       'Uncategorizedimages'                   ),
        array( 'UnusedCategoriesPage',          'Unusedcategories'              ),
        array( 'UnusedimagesPage',              'Unusedimages'                  ),
        array( 'WantedCategoriesPage',          'Wantedcategories'              ),
        array( 'WantedPagesPage',               'Wantedpages'                   ),
        array( 'UnwatchedPagesPage',            'Unwatchedpages'                ),
-       array( 'UnusedtemplatesPage',           'Unusedtemplates' ),
+       array( 'UnusedtemplatesPage',           'Unusedtemplates'                               ),
+       array( 'WithoutInterwikiPage',                  'Withoutinterwiki'                              ),
 );
 wfRunHooks( 'wgQueryPages', array( &$wgQueryPages ) );
 
index 9950715..2816b87 100644 (file)
@@ -137,6 +137,7 @@ class SpecialPage
                'Revisiondelete'            => array( 'SpecialPage', 'Revisiondelete', 'deleterevision' ),
                'Unusedtemplates'           => array( 'SpecialPage', 'Unusedtemplates' ),
                'Randomredirect'            => array( 'SpecialPage', 'Randomredirect' ),
+               'Withoutinterwiki'                      => array( 'SpecialPage', 'Withoutinterwiki' ),
 
                'Mypage'                    => array( 'SpecialMypage' ),
                'Mytalk'                    => array( 'SpecialMytalk' ),
diff --git a/includes/SpecialWithoutinterwiki.php b/includes/SpecialWithoutinterwiki.php
new file mode 100644 (file)
index 0000000..1567b29
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * Special page lists pages without language links
+ *
+ * @package MediaWiki
+ * @author Rob Church <robchur@gmail.com>
+ */
+class WithoutInterwikiPage extends PageQueryPage {
+
+       function getName() {
+               return 'Withoutinterwiki';
+       }
+       
+       function getPageHeader() {
+               return '<p>' . wfMsgHtml( 'withoutinterwiki-header' ) . '</p>';
+       }
+
+       function sortDescending() {
+               return false;
+       }
+
+       function isExpensive() {
+               return true;
+       }
+       
+       function isSyndicated() {
+               return false;
+       }
+
+       function getSQL() {
+               $dbr = wfGetDB( DB_SLAVE );
+               list( $page, $langlinks ) = $dbr->tableNamesN( 'page', 'langlinks' );
+               return
+                 "SELECT 'Withoutinterwiki'  AS type,
+                         page_namespace AS namespace,
+                         page_title     AS title,
+                         page_title     AS value
+                    FROM $page
+               LEFT JOIN $langlinks
+                      ON ll_from = page_id
+                   WHERE ll_title IS NULL
+                     AND page_namespace=" . NS_MAIN . "
+                     AND page_is_redirect = 0";
+       }
+       
+}
+
+function wfSpecialWithoutinterwiki() {
+       list( $limit, $offset ) = wfCheckLimits();
+       $wip = new WithoutInterwikiPage();
+       $wip->doQuery( $offset, $limit );
+}
+
+?>
\ No newline at end of file
index d3f51fe..8fd3cd4 100644 (file)
@@ -1509,6 +1509,9 @@ The [http://meta.wikimedia.org/wiki/Help:Job_queue job queue] length is '''$7'''
 'brokenredirects-edit' => '(edit)',
 'brokenredirects-delete' => '(delete)',
 
+'withoutinterwiki' => 'Pages without language links',
+'withoutinterwiki-header' => 'The following pages do not link to other language versions:',
+
 # Miscellaneous special pages
 #
 'nbytes'               => '$1 {{PLURAL:$1|byte|bytes}}',