BUG#1860 - Anchors of interwiki links did not get normalized
[lhc/web/wiklou.git] / includes / SpecialDeadendpages.php
index 9e730b1..3329e33 100644 (file)
@@ -1,28 +1,61 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 
+/**
+ *
+ */
 require_once( "QueryPage.php" );
 
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 class DeadendPagesPage extends PageQueryPage {
 
-    function getName( ) {
-       return "Deadendpages";
-    }
+       function getName( ) {
+               return "Deadendpages";
+       }
 
-    # LEFT JOIN is expensive
-    
-    function isExpensive( ) {
-       return 1;
-    }
-    
-    function getSQL( $offset, $limit ) {
-       return "SELECT cur_namespace AS namespace, cur_title as title, 0 as value " . 
-         "FROM cur LEFT JOIN links ON cur_id = l_from " .
-         "WHERE l_from IS NULL " .
-         "AND cur_namespace = 0 " .
-         "AND cur_is_redirect = 0";
+       /**
+        * LEFT JOIN is expensive
+        *
+        * @return true
+        */
+       function isExpensive( ) {
+               return 1;
+       }
+       
+       function isSyndicated() { return false; }
+
+       /**
+        * @return false
+        */
+       function sortDescending() {
+               return false;
+       }
+       
+    /**
+        * @return string an sqlquery
+        */
+       function getSQL() {
+               $dbr =& wfGetDB( DB_SLAVE );
+               extract( $dbr->tableNames( 'page', 'links' ) );
+               return "SELECT 'Deadendpages' as type, page_namespace AS namespace, page_title as title, page_title AS value " . 
+       "FROM $page LEFT JOIN $links ON page_id = l_from " .
+       "WHERE l_from IS NULL " .
+       "AND page_namespace = 0 " .
+       "AND page_is_redirect = 0";
     }
 }
 
+/**
+ * Constructor
+ */
 function wfSpecialDeadendpages() {
     
     list( $limit, $offset ) = wfCheckLimits();