'SetupAfterCache': Called in Setup.php, after cache objects are set
+'ShortPagesQuery': Allow extensions to modify the query used by
+Special:ShortPages.
+&$tables: tables to join in the query
+&$conds: conditions for the query
+&$joinConds: join conditions for the query
+&$options: options for the query
+
'ShowMissingArticle': Called when generating the output for a non-existent page.
$article: The article object corresponding to the page
}
public function getQueryInfo() {
+ $tables = array( 'page' );
+ $conds = array(
+ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ 'page_is_redirect' => 0
+ );
+ $joinConds = array();
+ $options = array( 'USE INDEX' => array( 'page' => 'page_redirect_namespace_len' ) );
+
+ // Allow extensions to modify the query
+ Hooks::run( 'ShortPagesQuery', array( &$tables, &$conds, &$joinConds, &$options ) );
+
return array(
- 'tables' => array( 'page' ),
+ 'tables' => $tables,
'fields' => array(
'namespace' => 'page_namespace',
'title' => 'page_title',
'value' => 'page_len'
),
- 'conds' => array(
- 'page_namespace' => MWNamespace::getContentNamespaces(),
- 'page_is_redirect' => 0
- ),
- 'options' => array( 'USE INDEX' => 'page_redirect_namespace_len' )
+ 'conds' => $conds,
+ 'join_conds' => $joinConds,
+ 'options' => $options
);
}