function reallyGetQueryInfo( $namespace = null, $title = null ) {
$limitToTitle = !( $namespace === null && $title === null );
$dbr = wfGetDB( DB_SLAVE );
- $retval = array(
- 'tables' => array(
+ $retval = [
+ 'tables' => [
'ra' => 'redirect',
'rb' => 'redirect',
'pa' => 'page',
'pb' => 'page'
- ),
- 'fields' => array(
+ ],
+ 'fields' => [
'namespace' => 'pa.page_namespace',
'title' => 'pa.page_title',
'value' => 'pa.page_title',
'nsc' => 'rb.rd_namespace',
'tc' => 'rb.rd_title',
'iwc' => 'rb.rd_interwiki',
- ),
- 'conds' => array(
+ ],
+ 'conds' => [
'ra.rd_from = pa.page_id',
// Filter out redirects where the target goes interwiki (bug 40353).
'pb.page_title = ra.rd_title',
'rb.rd_from = pb.page_id',
- )
- );
+ ]
+ ];
if ( $limitToTitle ) {
$retval['conds']['pa.page_namespace'] = $namespace;
}
function getOrderFields() {
- return array( 'ra.rd_namespace', 'ra.rd_title' );
+ return [ 'ra.rd_namespace', 'ra.rd_title' ];
}
/**
}
}
if ( !$result ) {
- return '<del>' . Linker::link( $titleA, null, array(), array( 'redirect' => 'no' ) ) . '</del>';
+ return '<del>' . Linker::link( $titleA, null, [], [ 'redirect' => 'no' ] ) . '</del>';
}
$titleB = Title::makeTitle( $result->nsb, $result->tb );
$linkA = Linker::linkKnown(
$titleA,
null,
- array(),
- array( 'redirect' => 'no' )
+ [],
+ [ 'redirect' => 'no' ]
);
// if the page is editable, add an edit link
$edit = Linker::linkKnown(
$titleA,
$this->msg( 'parentheses', $this->msg( 'editlink' )->text() )->escaped(),
- array(),
- array(
+ [],
+ [
'action' => 'edit'
- )
+ ]
);
} else {
$edit = '';
$linkB = Linker::linkKnown(
$titleB,
null,
- array(),
- array( 'redirect' => 'no' )
+ [],
+ [ 'redirect' => 'no' ]
);
$linkC = Linker::linkKnown( $titleC );