* (bug 56033) Add content model to the page information.
* Added Article::MissingArticleConditions hook to give extensions a chance to
hide their (unrelated) log entries.
+* Added LonelyPagesQuery hook to let extensions modify the query used to
+ generate Special:LonelyPages.
* Added $wgOpenSearchDefaultLimit defining the default number of entries to show
on action=opensearch API call.
* For namespaces with $wgNamespaceProtection (including the MediaWiki
&$revert: string that is displayed in the UI, similar to $comment.
$time: timestamp of the log entry (added in 1.12)
+'LonelyPagesQuery': Allow extensions to modify the query used by
+Special:LonelyPages.
+&$tables: tables to join in the query
+&$conds: conditions for the query
+&$joinConds: join conditions for the query
+
'MaintenanceRefreshLinksInit': before executing the refreshLinks.php maintenance
script.
$refreshLinks: RefreshLinks object
}
function getQueryInfo() {
- return array(
- 'tables' => array(
- 'page', 'pagelinks',
- 'templatelinks'
+ $tables = array( 'page', 'pagelinks', 'templatelinks' );
+ $conds = array(
+ 'pl_namespace IS NULL',
+ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ 'page_is_redirect' => 0,
+ 'tl_namespace IS NULL'
+ );
+ $joinConds = array(
+ 'pagelinks' => array(
+ 'LEFT JOIN', array(
+ 'pl_namespace = page_namespace',
+ 'pl_title = page_title'
+ )
),
+ 'templatelinks' => array(
+ 'LEFT JOIN', array(
+ 'tl_namespace = page_namespace',
+ 'tl_title = page_title'
+ )
+ )
+ );
+
+ // Allow extensions to modify the query
+ wfRunHooks( 'LonelyPagesQuery', array( &$tables, &$conds, &$joinConds ) );
+
+ return array(
+ 'tables' => $tables,
'fields' => array(
'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_title'
),
- 'conds' => array(
- 'pl_namespace IS NULL',
- 'page_namespace' => MWNamespace::getContentNamespaces(),
- 'page_is_redirect' => 0,
- 'tl_namespace IS NULL'
- ),
- 'join_conds' => array(
- 'pagelinks' => array(
- 'LEFT JOIN', array(
- 'pl_namespace = page_namespace',
- 'pl_title = page_title'
- )
- ),
- 'templatelinks' => array(
- 'LEFT JOIN', array(
- 'tl_namespace = page_namespace',
- 'tl_title = page_title'
- )
- )
- )
+ 'conds' => $conds,
+ 'join_conds' => $joinConds
);
}