* @ingroup DifferenceEngine
*/
-// Deprecated, use class constant instead
+/** @deprecated use class constant instead */
define( 'MW_DIFF_VERSION', '1.11a' );
/**
*
* @param int $id Revision ID
*
- * @return mixed URL or false
+ * @return string|bool Link HTML or false
*/
public function deletedLink( $id ) {
if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
[
'action' => 'markpatrolled',
'rcid' => $linkInfo['rcid'],
- 'token' => $linkInfo['token'],
]
) . ']</span>';
// Allow extensions to change the markpatrolled link
Hooks::run( 'DifferenceEngineMarkPatrolledLink', [ $this,
- &$this->mMarkPatrolledLink, $linkInfo['rcid'], $linkInfo['token'] ] );
+ &$this->mMarkPatrolledLink, $linkInfo['rcid'] ] );
}
}
return $this->mMarkPatrolledLink;
* Returns an array of meta data needed to build a "mark as patrolled" link and
* adds the mediawiki.page.patrol.ajax to the output.
*
- * @return array|false An array of meta data for a patrol link (rcid & token)
+ * @return array|false An array of meta data for a patrol link (rcid only)
* or false if no link is needed
*/
protected function getMarkPatrolledLinkInfo() {
$this->getOutput()->addModules( 'mediawiki.page.patrol.ajax' );
}
- $token = $user->getEditToken( $rcid );
return [
'rcid' => $rcid,
- 'token' => $token,
];
}
}
// This needs to be synchronised with Article::showCssOrJsPage(), which sucks
// Give hooks a chance to customise the output
// @todo standardize this crap into one function
- if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
+ if ( ContentHandler::runLegacyHooks( 'ShowRawCssJs', [ $this->mNewContent, $this->mNewPage, $out ], '1.24' ) ) {
// NOTE: deprecated hook, B/C only
// use the content object's own rendering
$cnt = $this->mNewRev->getContent();
}
} elseif ( !Hooks::run( 'ArticleContentViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
// Handled by extension
- } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom', [ $this->mNewContent, $this->mNewPage, $out ] ) ) {
+ } elseif ( !ContentHandler::runLegacyHooks(
+ 'ArticleViewCustom',
+ [ $this->mNewContent, $this->mNewPage, $out ],
+ '1.21'
+ ) ) {
// NOTE: deprecated hook, B/C only
// Handled by extension
} else {
}
/**
- * Add style sheets and supporting JS for diff display.
+ * Add style sheets for diff display.
*/
public function showDiffStyle() {
- $this->getOutput()->addModuleStyles( 'mediawiki.action.history.diff' );
+ $this->getOutput()->addModuleStyles( 'mediawiki.diff.styles' );
}
/**
return $result;
};
+ /**
+ * @param Status $status
+ * @throws FatalError
+ */
$error = function( $status ) {
throw new FatalError( $status->getWikiText() );
};