MediaWiki  REL1_19
SpecialDeadendpages.php
Go to the documentation of this file.
00001 <?php
00029 class DeadendPagesPage extends PageQueryPage {
00030 
00031         function __construct( $name = 'Deadendpages' ) {
00032                 parent::__construct( $name );
00033         }
00034 
00035         function getPageHeader() {
00036                 return $this->msg( 'deadendpagestext' )->parseAsBlock();
00037         }
00038 
00044         function isExpensive() {
00045                 return true;
00046         }
00047 
00048         function isSyndicated() {
00049                 return false;
00050         }
00051 
00055         function sortDescending() {
00056                 return false;
00057         }
00058 
00059         function getQueryInfo() {
00060                 return array(
00061                         'tables' => array( 'page', 'pagelinks' ),
00062                         'fields' => array( 'page_namespace AS namespace',
00063                                         'page_title AS title',
00064                                         'page_title AS value'
00065                         ),
00066                         'conds' => array( 'pl_from IS NULL',
00067                                         'page_namespace' => MWNamespace::getContentNamespaces(),
00068                                         'page_is_redirect' => 0
00069                         ),
00070                         'join_conds' => array( 'pagelinks' => array( 'LEFT JOIN', array(
00071                                         'page_id=pl_from'
00072                         ) ) )
00073                 );
00074         }
00075 
00076         function getOrderFields() {
00077                 // For some crazy reason ordering by a constant
00078                 // causes a filesort
00079                 if( count( MWNamespace::getContentNamespaces() ) > 1 ) {
00080                         return array( 'page_namespace', 'page_title' );
00081                 } else {
00082                         return array( 'page_title' );
00083                 }
00084         }
00085 }