Use array for join condition
Change-Id: I52875ebd5fc67e74439faf703b8119fedd70bfc9
This commit is contained in:
parent
49f22bfa61
commit
31f3f93d9f
3 changed files with 15 additions and 5 deletions
|
|
@ -312,7 +312,10 @@ class CategoryViewer extends ContextSource {
|
|||
),
|
||||
array(
|
||||
'categorylinks' => array( 'INNER JOIN', 'cl_from = page_id' ),
|
||||
'category' => array( 'LEFT JOIN', 'cat_title = page_title AND page_namespace = ' . NS_CATEGORY )
|
||||
'category' => array( 'LEFT JOIN', array(
|
||||
'cat_title = page_title',
|
||||
'page_namespace' => NS_CATEGORY
|
||||
))
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -387,8 +387,11 @@ class SpecialRecentChanges extends IncludableSpecialPage {
|
|||
$tables[] = 'watchlist';
|
||||
$fields[] = 'wl_user';
|
||||
$fields[] = 'wl_notificationtimestamp';
|
||||
$join_conds['watchlist'] = array('LEFT JOIN',
|
||||
"wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace");
|
||||
$join_conds['watchlist'] = array('LEFT JOIN', array(
|
||||
'wl_user' => $uid,
|
||||
'wl_title=rc_title',
|
||||
'wl_namespace=rc_namespace'
|
||||
));
|
||||
}
|
||||
if ( $this->getUser()->isAllowed( 'rollback' ) ) {
|
||||
$tables[] = 'page';
|
||||
|
|
|
|||
|
|
@ -102,7 +102,11 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
|
|||
if( $uid ) {
|
||||
$tables[] = 'watchlist';
|
||||
$select[] = 'wl_user';
|
||||
$join_conds['watchlist'] = array( 'LEFT JOIN', "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace" );
|
||||
$join_conds['watchlist'] = array( 'LEFT JOIN', array(
|
||||
'wl_user' => $uid,
|
||||
'wl_title=rc_title',
|
||||
'wl_namespace=rc_namespace'
|
||||
));
|
||||
}
|
||||
if ( $this->getUser()->isAllowed( 'rollback' ) ) {
|
||||
$tables[] = 'page';
|
||||
|
|
@ -175,7 +179,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
|
|||
$subconds["rc_namespace"] = $link_ns;
|
||||
$subjoin = "rc_title = {$pfx}_to";
|
||||
} else {
|
||||
$subjoin = "rc_namespace = {$pfx}_namespace AND rc_title = {$pfx}_title";
|
||||
$subjoin = array( "rc_namespace = {$pfx}_namespace", "rc_title = {$pfx}_title" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue