* Refactoring ApiQueryImageInfo to use new File::loadHistory() interface. No change...
[lhc/web/wiklou.git] / includes / SpecialLonelypages.php
index a143f14..e652f9d 100644 (file)
@@ -1,25 +1,22 @@
 <?php
 /**
  *
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
  */
 
 /**
- *
- */
-require_once( "QueryPage.php" );
-
-/**
- *
- * @package MediaWiki
- * @subpackage SpecialPage
+ * A special page looking for articles with no article linking to them,
+ * thus being lonely.
+ * @addtogroup SpecialPage
  */
 class LonelyPagesPage extends PageQueryPage {
 
        function getName() {
                return "Lonelypages";
        }
+       function getPageHeader() {
+               return wfMsgExt( 'lonelypagestext', array( 'parse' ) );
+       }
 
        function sortDescending() {
                return false;
@@ -29,10 +26,10 @@ class LonelyPagesPage extends PageQueryPage {
                return true;
        }
        function isSyndicated() { return false; }
-       
+
        function getSQL() {
-               $dbr =& wfGetDB( DB_SLAVE );
-               extract( $dbr->tableNames( 'page', 'pagelinks' ) );
+               $dbr = wfGetDB( DB_SLAVE );
+               list( $page, $pagelinks ) = $dbr->tableNamesN( 'page', 'pagelinks' );
 
                return
                  "SELECT 'Lonelypages'  AS type,
@@ -60,4 +57,4 @@ function wfSpecialLonelypages() {
        return $lpp->doQuery( $offset, $limit );
 }
 
-?>
+