MediaWiki  1.23.12
SpecialLonelypages.php
Go to the documentation of this file.
1 <?php
31  function __construct( $name = 'Lonelypages' ) {
32  parent::__construct( $name );
33  }
34 
35  function getPageHeader() {
36  return $this->msg( 'lonelypagestext' )->parseAsBlock();
37  }
38 
39  function sortDescending() {
40  return false;
41  }
42 
43  function isExpensive() {
44  return true;
45  }
46 
47  function isSyndicated() {
48  return false;
49  }
50 
51  function getQueryInfo() {
52  $tables = array( 'page', 'pagelinks', 'templatelinks' );
53  $conds = array(
54  'pl_namespace IS NULL',
55  'page_namespace' => MWNamespace::getContentNamespaces(),
56  'page_is_redirect' => 0,
57  'tl_namespace IS NULL'
58  );
59  $joinConds = array(
60  'pagelinks' => array(
61  'LEFT JOIN', array(
62  'pl_namespace = page_namespace',
63  'pl_title = page_title'
64  )
65  ),
66  'templatelinks' => array(
67  'LEFT JOIN', array(
68  'tl_namespace = page_namespace',
69  'tl_title = page_title'
70  )
71  )
72  );
73 
74  // Allow extensions to modify the query
75  wfRunHooks( 'LonelyPagesQuery', array( &$tables, &$conds, &$joinConds ) );
76 
77  return array(
78  'tables' => $tables,
79  'fields' => array(
80  'namespace' => 'page_namespace',
81  'title' => 'page_title',
82  'value' => 'page_title'
83  ),
84  'conds' => $conds,
85  'join_conds' => $joinConds
86  );
87  }
88 
89  function getOrderFields() {
90  // For some crazy reason ordering by a constant
91  // causes a filesort in MySQL 5
92  if ( count( MWNamespace::getContentNamespaces() ) > 1 ) {
93  return array( 'page_namespace', 'page_title' );
94  } else {
95  return array( 'page_title' );
96  }
97  }
98 
99  protected function getGroupName() {
100  return 'maintenance';
101  }
102 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
$tables
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
Definition: hooks.txt:815
LonelyPagesPage\isExpensive
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
Definition: SpecialLonelypages.php:43
LonelyPagesPage\getOrderFields
getOrderFields()
Subclasses return an array of fields to order by here.
Definition: SpecialLonelypages.php:89
MWNamespace\getContentNamespaces
static getContentNamespaces()
Get a list of all namespace indices which are considered to contain content.
Definition: Namespace.php:334
PageQueryPage
Variant of QueryPage which formats the result as a simple link to the page.
Definition: PageQueryPage.php:29
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4058
LonelyPagesPage\isSyndicated
isSyndicated()
Sometime we don't want to build rss / atom feeds.
Definition: SpecialLonelypages.php:47
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
LonelyPagesPage\sortDescending
sortDescending()
Override to sort by increasing values.
Definition: SpecialLonelypages.php:39
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
LonelyPagesPage\getPageHeader
getPageHeader()
The content returned by this function will be output before any result.
Definition: SpecialLonelypages.php:35
LonelyPagesPage\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialLonelypages.php:99
LonelyPagesPage
A special page looking for articles with no article linking to them, thus being lonely.
Definition: SpecialLonelypages.php:30
LonelyPagesPage\getQueryInfo
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
Definition: SpecialLonelypages.php:51
LonelyPagesPage\__construct
__construct( $name='Lonelypages')
Definition: SpecialLonelypages.php:31