if ( $feedType ) {
$this->feed( $feedType );
wfProfileOut( __METHOD__ );
+
return;
}
)
);
wfProfileOut( __METHOD__ );
+
return;
}
}
if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
$checkDeleted = Xml::checkLabel( $this->msg( 'history-show-deleted' )->text(),
- 'deleted', 'mw-show-deleted-only', $request->getBool( 'deleted' ) ) . "\n";
+ 'deleted', 'mw-show-deleted-only', $request->getBool( 'deleted' ) ) . "\n";
} else {
$checkDeleted = '';
}
$wgContLang->time( $rev->getTimestamp() ) )->inContentLanguage()->text();
} else {
$title = $rev->getUserText() .
- $this->msg( 'colon-separator' )->inContentLanguage()->text() .
- FeedItem::stripComment( $rev->getComment() );
+ $this->msg( 'colon-separator' )->inContentLanguage()->text() .
+ FeedItem::stripComment( $rev->getComment() );
}
+
return new FeedItem(
$title,
$text,
$this->tagFilter
);
wfRunHooks( 'PageHistoryPager::getQueryInfo', array( &$this, &$queryInfo ) );
+
return $queryInfo;
}
$s = '';
}
$this->lastRow = $row;
+
return $s;
}
$s .= $this->buttons;
$s .= '<ul id="pagehistory">' . "\n";
+
return $s;
}
private function getRevisionButton( $name, $msg ) {
$this->preventClickjacking();
# Note bug #20966, <button> is non-standard in IE<8
- $element = Html::element( 'button',
+ $element = Html::element(
+ 'button',
array(
'type' => 'submit',
'name' => $name,
$s .= $this->buttons;
}
$s .= '</form>';
+
return $s;
}
* @return String: HTML output for the row
*/
function historyLine( $row, $next, $notificationtimestamp = false,
- $latest = false, $firstInList = false )
- {
+ $latest = false, $firstInList = false ) {
$rev = new Revision( $row );
$rev->setTitle( $this->getTitle() );
$lastlink = $this->lastLink( $rev, $next );
$diffButtons = $this->diffButtons( $rev, $firstInList );
$histLinks = Html::rawElement(
- 'span',
- array( 'class' => 'mw-history-histlinks' ),
- $this->msg( 'parentheses' )->rawParams( $curlink . $this->historyPage->message['pipe-separator'] . $lastlink )->escaped()
+ 'span',
+ array( 'class' => 'mw-history-histlinks' ),
+ $this->msg( 'parentheses' )->rawParams( $curlink . $this->historyPage->message['pipe-separator'] . $lastlink )->escaped()
);
$s = $histLinks . $diffButtons;
}
if ( !$rev->isDeleted( Revision::DELETED_TEXT )
- && !$prevRev->isDeleted( Revision::DELETED_TEXT ) )
- {
+ && !$prevRev->isDeleted( Revision::DELETED_TEXT )
+ ) {
# Create undo tooltip for the first (=latest) line only
$undoTooltip = $latest
? array( 'title' => $this->msg( 'tooltip-undo' )->text() )
if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
$link = "<span class=\"history-deleted\">$link</span>";
}
+
return $link;
}
)
);
} elseif ( !$prevRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
- || !$nextRev->userCan( Revision::DELETED_TEXT, $this->getUser() ) )
- {
+ || !$nextRev->userCan( Revision::DELETED_TEXT, $this->getUser() )
+ ) {
return $last;
} else {
return Linker::linkKnown(
array_merge( $radio, $checkmark, array(
'name' => 'diff',
'id' => "mw-diff-$id" ) ) );
+
return $first . $second;
} else {
return '';
*/
protected function makeHeader( $header ) {
$spanAttribs = array( 'class' => 'mw-headline', 'id' => Sanitizer::escapeId( $header ) );
+
return Html::rawElement( 'h2', array(), Html::element( 'span', $spanAttribs, $header ) );
}
if (
$user->isAllowed( 'unwatchedpages' ) ||
( $wgUnwatchedPageThreshold !== false &&
- $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
+ $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
) {
// Number of page watchers
$pageInfo['header-basic'][] = array(
);
wfProfileOut( __METHOD__ );
+
return $result;
}
}
$count = count( $fulllist );
+
# "Based on work by ..."
return $count
? $this->msg( 'othercontribs' )->rawParams(
$this->getOutput()->showErrorPage( 'nosuchaction', 'nosuchactiontext' );
}
- public function execute() {}
+ public function execute() {
+ }
}
/**
$oldimage = $this->getRequest()->getText( 'oldimage' );
if ( strlen( $oldimage ) < 16
|| strpos( $oldimage, '/' ) !== false
- || strpos( $oldimage, '\\' ) !== false )
- {
+ || strpos( $oldimage, '\\' ) !== false
+ ) {
throw new ErrorPageError( 'internalerror', 'unexpected', array( 'oldimage', $oldimage ) );
}
public function onSubmit( $data ) {
$source = $this->page->getFile()->getArchiveVirtualUrl( $this->getRequest()->getText( 'oldimage' ) );
$comment = $data['comment'];
+
// TODO: Preserve file properties from database instead of reloading from file
return $this->page->getFile()->upload( $source, $comment, $comment, 0, false, false, $this->getUser() );
}
protected function getDescription() {
$this->getOutput()->addBacklinkSubtitle( $this->getTitle() );
+
return '';
}
}
wfProfileIn( __METHOD__ );
self::doWatch( $this->getTitle(), $this->getUser() );
wfProfileOut( __METHOD__ );
+
return true;
}
return self::doUnwatch( $title, $user );
}
}
+
return Status::newGood();
}
$user->addWatch( $title, $checkRights );
wfRunHooks( 'WatchArticleComplete', array( &$user, &$page ) );
}
+
return $status;
}
$user->removeWatch( $title );
wfRunHooks( 'UnwatchArticleComplete', array( &$user, &$page ) );
}
+
return $status;
}
wfProfileIn( __METHOD__ );
self::doUnwatch( $this->getTitle(), $this->getUser() );
wfProfileOut( __METHOD__ );
+
return true;
}