MediaWiki
REL1_22
|
00001 <?php 00029 // @todo FIXME: Make $requestedNamespace selectable, unify all subclasses into one 00030 class UncategorizedPagesPage extends PageQueryPage { 00031 protected $requestedNamespace = false; 00032 00033 function __construct( $name = 'Uncategorizedpages' ) { 00034 parent::__construct( $name ); 00035 } 00036 00037 function sortDescending() { 00038 return false; 00039 } 00040 00041 function isExpensive() { 00042 return true; 00043 } 00044 00045 function isSyndicated() { 00046 return false; 00047 } 00048 00049 function getQueryInfo() { 00050 return array( 00051 'tables' => array( 'page', 'categorylinks' ), 00052 'fields' => array( 'namespace' => 'page_namespace', 00053 'title' => 'page_title', 00054 'value' => 'page_title' ), 00055 // default for page_namespace is all content namespaces (if requestedNamespace is false) 00056 // otherwise, page_namespace is requestedNamespace 00057 'conds' => array( 'cl_from IS NULL', 00058 'page_namespace' => ( $this->requestedNamespace !== false ? $this->requestedNamespace : MWNamespace::getContentNamespaces() ), 00059 'page_is_redirect' => 0 ), 00060 'join_conds' => array( 'categorylinks' => array( 00061 'LEFT JOIN', 'cl_from = page_id' ) ) 00062 ); 00063 } 00064 00065 function getOrderFields() { 00066 // For some crazy reason ordering by a constant 00067 // causes a filesort 00068 if ( $this->requestedNamespace === false && count( MWNamespace::getContentNamespaces() ) > 1 ) { 00069 return array( 'page_namespace', 'page_title' ); 00070 } 00071 return array( 'page_title' ); 00072 } 00073 00074 protected function getGroupName() { 00075 return 'maintenance'; 00076 } 00077 }