mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Merge "Add database replication delay handling to Echo"
This commit is contained in:
commit
9d2637ec44
|
@ -15,7 +15,19 @@ abstract class EchoDiscussionParser {
|
|||
static function generateEventsForRevision( $revision ) {
|
||||
$interpretation = self::getChangeInterpretationForRevision( $revision );
|
||||
$createdEvents = false;
|
||||
|
||||
// use slave database if there is a previous revision
|
||||
if ( $revision->getPrevious() ) {
|
||||
$title = Title::newFromID( $revision->getPage() );
|
||||
// use master database for new page
|
||||
} else {
|
||||
$title = Title::newFromID( $revision->getPage(), Title::GAID_FOR_UPDATE );
|
||||
}
|
||||
|
||||
// not a valid title
|
||||
if ( !$title ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$userID = $revision->getUser();
|
||||
$userName = $revision->getUserText();
|
||||
|
|
Loading…
Reference in a new issue