Fix UploadBase::checkXMLEncodingMissmatch() on PHP 7.1+
[lhc/web/wiklou.git] / includes / diff / DifferenceEngine.php
index 037a80f..b1ca435 100644 (file)
@@ -524,7 +524,7 @@ class DifferenceEngine extends ContextSource {
         *  or false if no link is needed
         */
        protected function getMarkPatrolledLinkInfo() {
-               global $wgUseRCPatrol, $wgEnableAPI, $wgEnableWriteAPI;
+               global $wgUseRCPatrol;
 
                $user = $this->getUser();
 
@@ -542,7 +542,7 @@ class DifferenceEngine extends ContextSource {
                                [
                                        'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ),
                                        'rc_this_oldid' => $this->mNewid,
-                                       'rc_patrolled' => 0
+                                       'rc_patrolled' => RecentChange::PRC_UNPATROLLED
                                ],
                                __METHOD__
                        );
@@ -564,9 +564,7 @@ class DifferenceEngine extends ContextSource {
                        // Build the link
                        if ( $rcid ) {
                                $this->getOutput()->preventClickjacking();
-                               if ( $wgEnableAPI && $wgEnableWriteAPI
-                                       && $user->isAllowed( 'writeapi' )
-                               ) {
+                               if ( $user->isAllowed( 'writeapi' ) ) {
                                        $this->getOutput()->addModules( 'mediawiki.page.patrol.ajax' );
                                }