WikiPage::doUpdateRestrictions checks DB_MASTER
authorElliott Eggleston <ejegg@ejegg.com>
Thu, 20 Dec 2018 16:39:49 +0000 (11:39 -0500)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 7 Jan 2019 20:13:56 +0000 (20:13 +0000)
This would prevent double entries in logs when the same protection
is applied twice within a few minutes. Trying out usage of the
parent patch's new functionality.

Bug: T210983
Change-Id: Ibd6e481db2faa5955f52f36d5d7368adc8747c9c

includes/page/WikiPage.php

index c7c7069..b1bf7bd 100644 (file)
@@ -2147,6 +2147,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                $this->loadPageData( 'fromdbmaster' );
+               $this->mTitle->loadRestrictions( null, Title::READ_LATEST );
                $restrictionTypes = $this->mTitle->getRestrictionTypes();
                $id = $this->getId();