Use stashed ParserOutput during saving.
[lhc/web/wiklou.git] / includes / Title.php
index de551b4..997063b 100644 (file)
@@ -2687,9 +2687,9 @@ class Title implements LinkTarget {
                        $errors[] = [ 'confirmedittext' ];
                }
 
-               $useSlave = ( $rigor !== 'secure' );
+               $useReplica = ( $rigor !== 'secure' );
                if ( ( $action == 'edit' || $action == 'create' )
-                       && !$user->isBlockedFrom( $this, $useSlave )
+                       && !$user->isBlockedFrom( $this, $useReplica )
                ) {
                        // Don't block the user from editing their own talk page unless they've been
                        // explicitly blocked from that too.
@@ -4438,7 +4438,7 @@ class Title implements LinkTarget {
         * Get the oldest revision timestamp of this page
         *
         * @param int $flags Title::GAID_FOR_UPDATE
-        * @return string MW timestamp
+        * @return string|null MW timestamp
         */
        public function getEarliestRevTime( $flags = 0 ) {
                $rev = $this->getFirstRevision( $flags );
@@ -4846,8 +4846,9 @@ class Title implements LinkTarget {
 
                $dbw = wfGetDB( DB_MASTER );
                $dbw->onTransactionPreCommitOrIdle(
-                       function () {
-                               ResourceLoaderWikiModule::invalidateModuleCache( $this, null, null, wfWikiID() );
+                       function () use ( $dbw ) {
+                               ResourceLoaderWikiModule::invalidateModuleCache(
+                                       $this, null, null, $dbw->getDomainId() );
                        },
                        __METHOD__
                );