'user' => array( 'JOIN',
'user_id=log_user' ),
'page' => array( 'LEFT JOIN',
- array( 'log_namespace=page_namespace',
+ array( 'log_namespace=page_namespace',
'log_title=page_title' ) ) ) );
$index = array( 'logging' => 'times' ); // default, may change
if ( is_null( $title ) ) {
$this->dieUsage( "Bad title value '$prefix'", 'param_prefix' );
}
- $this->addWhereFld( 'log_namespace', $title->getNamespace() );
+ $this->addWhereFld( 'log_namespace', $title->getNamespace() );
$this->addWhere( 'log_title ' . $db->buildLike( $title->getDBkey(), $db->anyString() ) );
}
public static function addLogParams( $result, &$vals, $params, $type, $action, $ts, $legacy = false ) {
switch ( $type ) {
case 'move':
- if ( $legacy ){
+ if ( $legacy ) {
$targetKey = 0;
$noredirKey = 1;
} else {
$noredirKey = '5::noredir';
}
- if ( isset( $params[ $targetKey ] ) ) {
- $title = Title::newFromText( $params[ $targetKey ] );
+ if ( isset( $params[$targetKey] ) ) {
+ $title = Title::newFromText( $params[$targetKey] );
if ( $title ) {
$vals2 = array();
ApiQueryBase::addTitleInfo( $vals2, $title, 'new_' );
$vals[$type] = $vals2;
}
}
- if ( isset( $params[ $noredirKey ] ) && $params[ $noredirKey ] ) {
+ if ( isset( $params[$noredirKey] ) && $params[$noredirKey] ) {
$vals[$type]['suppressedredirect'] = '';
}
$params = null;
break;
case 'patrol':
- if ( $legacy ){
+ if ( $legacy ) {
$cur = 0;
$prev = 1;
$auto = 2;
public function getHelpUrls() {
return 'https://www.mediawiki.org/wiki/API:Logevents';
}
-
- public function getVersion() {
- return __CLASS__ . ': $Id$';
- }
}