Hoo man has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/110694

Change subject: Prevent WikiPage::doEditContent from adding to the ParserCache
......................................................................

Prevent WikiPage::doEditContent from adding to the ParserCache

This is needed as we can't inject our options into it,
thus is breaks our caching by user lang.
If anybody sees a better solution, please let me know.

Bug: 60715
Change-Id: I2541d384fe424190db2514295bfe751961adfa95
---
M repo/includes/content/EntityContent.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/94/110694/1

diff --git a/repo/includes/content/EntityContent.php 
b/repo/includes/content/EntityContent.php
index 979941b..177991e 100644
--- a/repo/includes/content/EntityContent.php
+++ b/repo/includes/content/EntityContent.php
@@ -175,8 +175,6 @@
         * @return EntityView
         */
        public function getEntityView( IContextSource $context = null, 
ParserOptions $options = null, LanguageFallbackChain $languageFallbackChain = 
null ) {
-               $lang = null;
-
                //TODO: cache last used entity view
 
                if ( $context === null ) {
@@ -628,6 +626,10 @@
                $page->clear();
                $page->clearPreparedEdit();
 
+               global $wgEnableParserCache;
+               $enableParserCache = $wgEnableParserCache;
+               $wgEnableParserCache = false;
+
                $status = $page->doEditContent(
                        $this,
                        $summary,
@@ -635,6 +637,7 @@
                        $baseRevId,
                        $user
                );
+               $wgEnableParserCache = $enableParserCache;
 
                if( $status->isGood() && isset ( $status->value['new'] ) && 
$status->value['new'] ) {
                        
StoreFactory::getStore()->newEntityPerPage()->addEntityContent( $this );

-- 
To view, visit https://gerrit.wikimedia.org/r/110694
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2541d384fe424190db2514295bfe751961adfa95
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to