if ( $link ) {
return "[$link $id]";
} else {
- return $id;
+ return (string)$id;
}
}
Hooks::run( 'DifferenceEngineShowDiffPage', [ $out ] );
if ( !$this->loadRevisionData() ) {
- $this->showMissingRevision();
-
+ if ( Hooks::run( 'DifferenceEngineShowDiffPageMaybeShowMissingRevision', [ $this ] ) ) {
+ $this->showMissingRevision();
+ }
return;
}
*
* @return string HTML or empty string
*/
- protected function markPatrolledLink() {
+ public function markPatrolledLink() {
if ( $this->mMarkPatrolledLink === null ) {
$linkInfo = $this->getMarkPatrolledLinkInfo();
// If false, there is no patrol link needed/allowed
*
* @return string HTML fragment
*/
- protected function getRevisionHeader( Revision $rev, $complete = '' ) {
+ public function getRevisionHeader( Revision $rev, $complete = '' ) {
$lang = $this->getLanguage();
$user = $this->getUser();
$revtimestamp = $rev->getTimestamp();
if ( $this->mNewRev ) {
$this->mNewContent = $this->mNewRev->getContent( Revision::FOR_THIS_USER, $this->getUser() );
+ Hooks::run( 'DifferenceEngineLoadTextAfterNewContentIsLoaded', [ $this ] );
if ( $this->mNewContent === null ) {
return false;
}
$this->mNewContent = $this->mNewRev->getContent( Revision::FOR_THIS_USER, $this->getUser() );
+ Hooks::run( 'DifferenceEngineAfterLoadNewText', [ $this ] );
+
return true;
}