/**
* Constructor and clear the article
* @param Title $title Reference to a Title object.
- * @param int $oldId Revision ID, null to fetch from request, zero for current
+ * @param int|null $oldId Revision ID, null to fetch from request, zero for current
*/
public function __construct( Title $title, $oldId = null ) {
$this->mOldId = $oldId;
);
// DifferenceEngine directly fetched the revision:
- $this->mRevIdFetched = $de->mNewid;
+ $this->mRevIdFetched = $de->getNewid();
$de->showDiffPage( $diffOnly );
// Run view updates for the newer revision being diffed (and shown
* @return array The policy that should be set
* @todo actions other than 'view'
*/
- public function getRobotPolicy( $action, $pOutput = null ) {
+ public function getRobotPolicy( $action, ParserOutput $pOutput = null ) {
global $wgArticleRobotPolicies, $wgNamespaceRobotPolicies, $wgDefaultRobotPolicy;
$ns = $this->getTitle()->getNamespace();
public function showPatrolFooter() {
global $wgUseNPPatrol, $wgUseRCPatrol, $wgUseFilePatrol;
+ // Allow hooks to decide whether to not output this at all
+ if ( !Hooks::run( 'ArticleShowPatrolFooter', [ $this ] ) ) {
+ return false;
+ }
+
$outputPage = $this->getContext()->getOutput();
$user = $this->getContext()->getUser();
$title = $this->getTitle();
* @since 1.16 (r52326) for LiquidThreads
*
* @param int|null $oldid Revision ID or null
- * @param User $user The relevant user
+ * @param User|null $user The relevant user
* @return ParserOutput|bool ParserOutput or false if the given revision ID is not found
*/
public function getParserOutput( $oldid = null, User $user = null ) {
/**
* @param string $reason
* @param bool $suppress
- * @param int $u1 Unused
- * @param bool $u2 Unused
+ * @param int|null $u1 Unused
+ * @param bool|null $u2 Unused
* @param string &$error
* @return bool
*/