dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add SearchIndexField::getEngineHints()"
[lhc/web/wiklou.git]
/
includes
/
page
/
WikiPage.php
diff --git
a/includes/page/WikiPage.php
b/includes/page/WikiPage.php
index
7489f44
..
5c7c7fe
100644
(file)
--- a/
includes/page/WikiPage.php
+++ b/
includes/page/WikiPage.php
@@
-1055,6
+1055,13
@@
class WikiPage implements Page, IDBAccessObject {
) {
$useParserCache =
( !$forceParse ) && $this->shouldCheckParserCache( $parserOptions, $oldid );
) {
$useParserCache =
( !$forceParse ) && $this->shouldCheckParserCache( $parserOptions, $oldid );
+
+ if ( $useParserCache && !$parserOptions->isSafeToCache() ) {
+ throw new InvalidArgumentException(
+ 'The supplied ParserOptions are not safe to cache. Fix the options or set $forceParse = true.'
+ );
+ }
+
wfDebug( __METHOD__ .
': using parser cache: ' . ( $useParserCache ? 'yes' : 'no' ) . "\n" );
if ( $parserOptions->getStubThreshold() ) {
wfDebug( __METHOD__ .
': using parser cache: ' . ( $useParserCache ? 'yes' : 'no' ) . "\n" );
if ( $parserOptions->getStubThreshold() ) {
@@
-3327,7
+3334,7
@@
class WikiPage implements Page, IDBAccessObject {
HTMLFileCache::clearFileCache( $title );
$revid = $revision ? $revision->getId() : null;
HTMLFileCache::clearFileCache( $title );
$revid = $revision ? $revision->getId() : null;
- DeferredUpdates::addCallableUpdate( function() use ( $title, $revid ) {
+ DeferredUpdates::addCallableUpdate( function
() use ( $title, $revid ) {
InfoAction::invalidateCache( $title, $revid );
} );
}
InfoAction::invalidateCache( $title, $revid );
} );
}
@@
-3496,7
+3503,10
@@
class WikiPage implements Page, IDBAccessObject {
);
foreach ( $rows as $row ) {
$cat = Category::newFromRow( $row );
);
foreach ( $rows as $row ) {
$cat = Category::newFromRow( $row );
- $cat->refreshCounts();
+ // T166757: do the update after this DB commit
+ DeferredUpdates::addCallableUpdate( function () use ( $cat ) {
+ $cat->refreshCounts();
+ } );
}
}
}
}
}
}