} elseif ( $this->history & WikiExporter::RANGE ) {
# Dump of revisions within a specified range
$join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
- $opts['ORDER BY'] = 'rev_page ASC, rev_id ASC';
+ $opts['ORDER BY'] = array( 'rev_page ASC', 'rev_id ASC' );
} else {
# Uknown history specification parameter?
wfProfileOut( __METHOD__ );
$join_conds = isset( $info['join_conds'] ) ? $info['join_conds'] : array();
$sortColumns = array_merge( array( $this->mIndexField ), $this->mExtraSortFields );
if ( $descending ) {
- $options['ORDER BY'] = implode( ',', $sortColumns );
+ $options['ORDER BY'] = $sortColumns;
$operator = '>';
} else {
$orderBy = array();
foreach ( $sortColumns as $col ) {
$orderBy[] = $col . ' DESC';
}
- $options['ORDER BY'] = implode( ',', $orderBy );
+ $options['ORDER BY'] = $orderBy;
$operator = '<';
}
if ( $offset != '' ) {
$options = isset( $query['options'] ) ? (array)$query['options'] : array();
$join_conds = isset( $query['join_conds'] ) ? (array)$query['join_conds'] : array();
if ( count( $order ) ) {
- $options['ORDER BY'] = implode( ', ', $order );
+ $options['ORDER BY'] = $order;
}
if ( $limit !== false ) {
$options['LIMIT'] = intval( $limit );
'MAX(ipb_user) AS blocked'
),
'options' => array(
- 'GROUP BY' => 'rc_user_text, user_id',
+ 'GROUP BY' => array( 'rc_user_text', 'user_id' ),
'USE INDEX' => array( 'recentchanges' => 'rc_user_text' )
),
'join_conds' => array(
array( 'wl_namespace', 'wl_title' ),
array( 'wl_user' => $this->getUser()->getId() ),
__METHOD__,
- array( 'ORDER BY' => 'wl_namespace, wl_title' )
+ array( 'ORDER BY' => array( 'wl_namespace', 'wl_title' ) )
);
$lb = new LinkBatch();
// useful to remove this. People _do_ create pages
// and never revise them, they aren't necessarily
// redirects.
- 'GROUP BY' => 'page_namespace, page_title, page_is_redirect' )
+ 'GROUP BY' => array( 'page_namespace', 'page_title', 'page_is_redirect' ) )
);
}
if( $dbr->implicitGroupby() ) {
$options = array( 'GROUP BY' => 'img_name' );
} else {
- $columnlist = implode( ',',
- preg_grep( '/^img/', array_keys( $this->getFieldNames() ) ) );
- $options = array( 'GROUP BY' => "img_user, $columnlist" );
+ $columnlist = preg_grep( '/^img/', array_keys( $this->getFieldNames() ) );
+ $options = array( 'GROUP BY' => array_merge( array( 'img_user' ), $columnlist ) );
}
$join_conds = array( 'oldimage' => array( 'LEFT JOIN', 'oi_name = img_name' ) );
}
'COUNT(*) AS value' ),
'conds' => array ( 'page_namespace' => MWNamespace::getContentNamespaces() ),
'options' => array ( 'HAVING' => 'COUNT(*) > 1',
- 'GROUP BY' => 'page_namespace, page_title' ),
+ 'GROUP BY' => array( 'page_namespace', 'page_title' ) ),
'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
'page_id = cl_from' ) )
);
'COUNT(*) AS value',
'page_namespace' ),
'options' => array ( 'HAVING' => 'COUNT(*) > 1',
- 'GROUP BY' => 'pl_namespace, pl_title, '.
- 'page_namespace' ),
+ 'GROUP BY' => array( 'pl_namespace', 'pl_title',
+ 'page_namespace' ) ),
'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
array ( 'page_namespace = pl_namespace',
'page_title = pl_title' ) ) )
'tl_title AS title',
'COUNT(*) AS value' ),
'conds' => array ( 'tl_namespace' => NS_TEMPLATE ),
- 'options' => array( 'GROUP BY' => 'tl_namespace, tl_title' )
+ 'options' => array( 'GROUP BY' => array( 'tl_namespace', 'tl_title' ) )
);
}
$condition,
__METHOD__,
array(
- 'GROUP BY' => 'ar_namespace,ar_title',
- 'ORDER BY' => 'ar_namespace,ar_title',
+ 'GROUP BY' => array( 'ar_namespace', 'ar_title' ),
+ 'ORDER BY' => array( 'ar_namespace', 'ar_title' ),
'LIMIT' => 100,
)
)
),
'options' => array(
'HAVING' => "COUNT(*) > $count",
- 'GROUP BY' => 'pl_namespace, pl_title'
+ 'GROUP BY' => array( 'pl_namespace', 'pl_title' )
),
'join_conds' => array(
'pg1' => array(
'conds' => array ( 'page_title IS NULL',
'tl_namespace' => NS_TEMPLATE ),
'options' => array (
- 'GROUP BY' => 'tl_namespace, tl_title' ),
+ 'GROUP BY' => array( 'tl_namespace', 'tl_title' ) ),
'join_conds' => array ( 'page' => array ( 'LEFT JOIN',
array ( 'page_namespace = tl_namespace',
'page_title = tl_title' ) ) )