/**#@-*/
/**
- * @param IContextSource $context Context to use, anything else will be ignored
+ * @param IContextSource|null $context Context to use, anything else will be ignored
* @param int $old Old ID we want to show and diff with.
* @param string|int $new Either revision ID or 'prev' or 'next'. Default: 0.
* @param int $rcid Deprecated, no longer used!
}
/**
+ * Get the language of the difference engine, defaults to page content language
+ *
* @return Language
*/
public function getDiffLang() {
$rollbackLink = Linker::generateRollback( $this->mNewRev, $this->getContext() );
if ( $rollbackLink ) {
$out->preventClickjacking();
- $rollback = '   ' . $rollbackLink;
+ $rollback = "\u{00A0}\u{00A0}\u{00A0}" . $rollbackLink;
}
}
[ 'diff' => 'prev', 'oldid' => $this->mOldid ] + $query
);
} else {
- $prevlink = ' ';
+ $prevlink = "\u{00A0}";
}
if ( $this->mOldRev->isMinor() ) {
[ 'diff' => 'next', 'oldid' => $this->mNewid ] + $query
);
} else {
- $nextlink = ' ';
+ $nextlink = "\u{00A0}";
}
if ( $this->mNewRev->isMinor() ) {
protected function revisionDeleteLink( $rev ) {
$link = Linker::getRevDeleteLink( $this->getUser(), $rev, $rev->getTitle() );
if ( $link !== '' ) {
- $link = '   ' . $link . ' ';
+ $link = "\u{00A0}\u{00A0}\u{00A0}" . $link . ' ';
}
return $link;
// for backwards-compatibility
$key = $this->getDiffBodyCacheKey();
if ( $key === null ) {
- $key = call_user_func_array(
- [ $cache, 'makeKey' ],
- $this->getDiffBodyCacheKeyParams()
- );
+ $key = $cache->makeKey( ...$this->getDiffBodyCacheKeyParams() );
}
// Try cache
/**
* Set the language in which the diff text is written
- * (Defaults to page content language).
- * @param Language|string $lang
+ *
+ * @param Language $lang
* @since 1.19
*/
public function setTextLanguage( $lang ) {
+ if ( !$lang instanceof Language ) {
+ wfDeprecated( __METHOD__ . ' with other type than Language for $lang', '1.32' );
+ }
$this->mDiffLang = wfGetLangObj( $lang );
}