Merge "[search] Remove more dead code"
[lhc/web/wiklou.git] / includes / page / Article.php
index 548e533..9a2a8e2 100644 (file)
@@ -706,6 +706,10 @@ class Article implements Page {
                        }
                }
 
+               # Use adaptive TTLs for CDN so delayed/failed purges are noticed less often.
+               # This could use getTouched(), but that could be scary for major template edits.
+               $outputPage->adaptCdnTTL( $this->mPage->getTimestamp(), IExpiringStore::TTL_DAY );
+
                # Check for any __NOINDEX__ tags on the page using $pOutput
                $policy = $this->getRobotPolicy( 'view', $pOutput );
                $outputPage->setIndexPolicy( $policy['index'] );
@@ -715,7 +719,6 @@ class Article implements Page {
                $this->mPage->doViewUpdates( $user, $oldid );
 
                $outputPage->addModules( 'mediawiki.action.view.postEdit' );
-
        }
 
        /**
@@ -1181,10 +1184,6 @@ class Article implements Page {
                        return false;
                }
 
-               $rcid = $rc->getAttribute( 'rc_id' );
-
-               $token = $user->getEditToken( $rcid );
-
                $outputPage->preventClickjacking();
                if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 'writeapi' ) ) {
                        $outputPage->addModules( 'mediawiki.page.patrol.ajax' );
@@ -1196,8 +1195,7 @@ class Article implements Page {
                        [],
                        [
                                'action' => 'markpatrolled',
-                               'rcid' => $rcid,
-                               'token' => $token,
+                               'rcid' => $rc->getAttribute( 'rc_id' ),
                        ]
                );