MediaWiki
REL1_24
|
00001 <?php 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( 00053 'namespace' => 'page_namespace', 00054 'title' => 'page_title', 00055 'value' => 'page_title' 00056 ), 00057 // default for page_namespace is all content namespaces (if requestedNamespace is false) 00058 // otherwise, page_namespace is requestedNamespace 00059 'conds' => array( 00060 'cl_from IS NULL', 00061 'page_namespace' => $this->requestedNamespace !== false 00062 ? $this->requestedNamespace 00063 : MWNamespace::getContentNamespaces(), 00064 'page_is_redirect' => 0 00065 ), 00066 'join_conds' => array( 00067 'categorylinks' => array( 'LEFT JOIN', 'cl_from = page_id' ) 00068 ) 00069 ); 00070 } 00071 00072 function getOrderFields() { 00073 // For some crazy reason ordering by a constant 00074 // causes a filesort 00075 if ( $this->requestedNamespace === false && count( MWNamespace::getContentNamespaces() ) > 1 ) { 00076 return array( 'page_namespace', 'page_title' ); 00077 } 00078 00079 return array( 'page_title' ); 00080 } 00081 00082 protected function getGroupName() { 00083 return 'maintenance'; 00084 } 00085 }