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 ability to filter based on rc_title in API"
[lhc/web/wiklou.git]
/
includes
/
content
/
ContentHandler.php
diff --git
a/includes/content/ContentHandler.php
b/includes/content/ContentHandler.php
index
edfc81c
..
3cfac8f
100644
(file)
--- a/
includes/content/ContentHandler.php
+++ b/
includes/content/ContentHandler.php
@@
-332,6
+332,13
@@
abstract class ContentHandler {
return self::$handlers[$modelId];
}
return self::$handlers[$modelId];
}
+ /**
+ * Clean up handlers cache.
+ */
+ public static function cleanupHandlersCache() {
+ self::$handlers = [];
+ }
+
/**
* Returns the localized name for a given content model.
*
/**
* Returns the localized name for a given content model.
*
@@
-986,13
+993,17
@@
abstract class ContentHandler {
// Find out if there was only one contributor
// Only scan the last 20 revisions
// Find out if there was only one contributor
// Only scan the last 20 revisions
- $res = $dbr->select( 'revision', 'rev_user_text',
+ $revQuery = Revision::getQueryInfo();
+ $res = $dbr->select(
+ $revQuery['tables'],
+ [ 'rev_user_text' => $revQuery['fields']['rev_user_text'] ],
[
'rev_page' => $title->getArticleID(),
$dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0'
],
__METHOD__,
[
'rev_page' => $title->getArticleID(),
$dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0'
],
__METHOD__,
- [ 'LIMIT' => 20 ]
+ [ 'LIMIT' => 20 ],
+ $revQuery['joins']
);
if ( $res === false ) {
);
if ( $res === false ) {