* (bug 1949) Profiling typo in rare error case
[lhc/web/wiklou.git] / includes / SpecialBrokenRedirects.php
index 42bba16..743e450 100644 (file)
@@ -1,26 +1,40 @@
 <?php
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 
+/**
+ *
+ */
 require_once('QueryPage.php');
 
+/**
+ *
+ * @package MediaWiki
+ * @subpackage SpecialPage
+ */
 class BrokenRedirectsPage extends PageQueryPage {
 
        function getName() {
-               return 'brokenredirects';
+               return 'BrokenRedirects';
        }
        
        function isExpensive( ) { return true; }
+       function isSyndicated() { return false; }
 
        function getPageHeader( ) {
                #FIXME : probably need to add a backlink to the maintenance page.
-               return '<p>'.wfMsg('brokenredirectstext')."</p><br>\n";
+               return '<p>'.wfMsg('brokenredirectstext')."</p><br />\n";
        }
 
        function getSQL() {
                $dbr =& wfGetDB( DB_SLAVE );
-               extract( $dbr->tableNames( 'cur', 'brokenlinks' ) );
+               extract( $dbr->tableNames( 'page', 'brokenlinks' ) );
 
-               $sql = "SELECT bl_to,cur_title FROM $brokenlinks,$cur " .
-                      "WHERE cur_is_redirect=1 AND cur_namespace=0 AND bl_from=cur_id ";
+               $sql = "SELECT bl_to,page_title FROM $brokenlinks,$page " .
+                      'WHERE page_is_redirect=1 AND page_namespace='.NS_MAIN.' AND bl_from=page_id ';
                return $sql;
        }
 
@@ -29,17 +43,20 @@ class BrokenRedirectsPage extends PageQueryPage {
        }
        
        function formatResult( $skin, $result ) {
-               global $wgLang ;
+               global $wgContLang ;
                
-               $ns = $wgLang->getNamespaces() ;
-               $from = $skin->makeKnownLink( $result->cur_title ,'', 'redirect=no' );
-               $edit = $skin->makeBrokenLink( $result->cur_title , "(".wfMsg("qbedit").")" , 'redirect=no');
+               $ns = $wgContLang->getNamespaces() ; /* not used, why bother? */
+               $from = $skin->makeKnownLink( $result->page_title ,'', 'redirect=no' );
+               $edit = $skin->makeBrokenLink( $result->page_title , "(".wfMsg("qbedit").")" , 'redirect=no');
                $to   = $skin->makeBrokenLink( $result->bl_to );
                                
                return "$from $edit => $to";
        }
 }
 
+/**
+ * constructor
+ */
 function wfSpecialBrokenRedirects() {
        list( $limit, $offset ) = wfCheckLimits();