X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FWikiPage.php;h=048dd6887b86ea3156bea445d5648100c689d723;hb=634f48b9d09648ec38781d222d186513e96b9ab7;hp=bfa9956e0cfe06c74d49ce396f827712a5ecb82d;hpb=34981172de480cab30d120be9945d3da0384d42e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WikiPage.php b/includes/WikiPage.php index bfa9956e0c..048dd6887b 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -2347,6 +2347,14 @@ class WikiPage implements Page, IDBAccessObject { } } + // Clear out legacy restriction fields + $dbw->update( + 'page', + array( 'page_restrictions' => '' ), + array( 'page_id' => $id ), + __METHOD__ + ); + wfRunHooks( 'NewRevisionFromEditComplete', array( $this, $nullRevision, $latest, $user ) ); wfRunHooks( 'ArticleProtectComplete', array( &$this, &$user, $limit, $reason ) ); } else { // Protection of non-existing page (also known as "title protection") @@ -3510,6 +3518,9 @@ class PoolWorkArticleView extends PoolCounterWork { return false; } + // Reduce effects of race conditions for slow parses (bug 46014) + $cacheTime = wfTimestampNow(); + $time = - microtime( true ); $this->parserOutput = $content->getParserOutput( $this->page->getTitle(), $this->revid, $this->parserOptions ); $time += microtime( true ); @@ -3521,7 +3532,8 @@ class PoolWorkArticleView extends PoolCounterWork { } if ( $this->cacheable && $this->parserOutput->isCacheable() ) { - ParserCache::singleton()->save( $this->parserOutput, $this->page, $this->parserOptions ); + ParserCache::singleton()->save( + $this->parserOutput, $this->page, $this->parserOptions, $cacheTime ); } // Make sure file cache is not used on uncacheable content.