Drop deprecated EnableAPI and EnableWriteAPI settings
[lhc/web/wiklou.git] / includes / diff / DifferenceEngine.php
index fa30d68..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' );
                                }
 
@@ -1294,7 +1292,7 @@ class DifferenceEngine extends ContextSource {
 
                if ( !$diff && !$otitle ) {
                        $header .= "
-                       <tr style=\"vertical-align: top;\" lang=\"{$userLang}\">
+                       <tr class=\"diff-title\" lang=\"{$userLang}\">
                        <td class=\"diff-ntitle\">{$ntitle}</td>
                        </tr>";
                        $multiColspan = 1;
@@ -1313,7 +1311,7 @@ class DifferenceEngine extends ContextSource {
                        }
                        if ( $otitle || $ntitle ) {
                                $header .= "
-                               <tr style=\"vertical-align: top;\" lang=\"{$userLang}\">
+                               <tr class=\"diff-title\" lang=\"{$userLang}\">
                                <td colspan=\"$colspan\" class=\"diff-otitle\">{$otitle}</td>
                                <td colspan=\"$colspan\" class=\"diff-ntitle\">{$ntitle}</td>
                                </tr>";
@@ -1321,12 +1319,12 @@ class DifferenceEngine extends ContextSource {
                }
 
                if ( $multi != '' ) {
-                       $header .= "<tr><td colspan=\"{$multiColspan}\" style=\"text-align: center;\" " .
+                       $header .= "<tr><td colspan=\"{$multiColspan}\" " .
                                "class=\"diff-multi\" lang=\"{$userLang}\">{$multi}</td></tr>";
                }
                if ( $notice != '' ) {
-                       $header .= "<tr><td colspan=\"{$multiColspan}\" style=\"text-align: center;\" " .
-                               "lang=\"{$userLang}\">{$notice}</td></tr>";
+                       $header .= "<tr><td colspan=\"{$multiColspan}\" " .
+                               "class=\"diff-notice\" lang=\"{$userLang}\">{$notice}</td></tr>";
                }
 
                return $header . $diff . "</table>";