MediaWiki  REL1_22
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(
00063                 'namespace' => 'page_namespace',
00064                 'title' => 'page_title',
00065                 'value' => 'page_title'
00066             ),
00067             'conds' => array(
00068                 'pl_from IS NULL',
00069                 'page_namespace' => MWNamespace::getContentNamespaces(),
00070                 'page_is_redirect' => 0
00071             ),
00072             'join_conds' => array(
00073                 'pagelinks' => array(
00074                     'LEFT JOIN',
00075                     array( 'page_id=pl_from' )
00076                 )
00077             )
00078         );
00079     }
00080 
00081     function getOrderFields() {
00082         // For some crazy reason ordering by a constant
00083         // causes a filesort
00084         if ( count( MWNamespace::getContentNamespaces() ) > 1 ) {
00085             return array( 'page_namespace', 'page_title' );
00086         } else {
00087             return array( 'page_title' );
00088         }
00089     }
00090 
00091     protected function getGroupName() {
00092         return 'maintenance';
00093     }
00094 }