X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FStorage%2FDerivedPageDataUpdater.php;h=b2c003ab4c2ab6e0ec1e87a3c9fae2ea418034b6;hb=cfd56e52d96e7c65215a4d9d2f10962794c67f88;hp=5d847b6a8328bd6d3a921cebd93e4184577c814d;hpb=34bd6f0b6bd0f0af03b448deddb85cdea358e0fb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Storage/DerivedPageDataUpdater.php b/includes/Storage/DerivedPageDataUpdater.php index 5d847b6a83..b2c003ab4c 100644 --- a/includes/Storage/DerivedPageDataUpdater.php +++ b/includes/Storage/DerivedPageDataUpdater.php @@ -659,7 +659,7 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface { $hasLinks = (bool)count( $this->getCanonicalParserOutput()->getLinks() ); } - foreach ( $this->getModifiedSlotRoles() as $role ) { + foreach ( $this->getSlots()->getSlotRoles() as $role ) { $roleHandler = $this->slotRoleRegistry->getRoleHandler( $role ); if ( $roleHandler->supportsArticleCount() ) { $content = $this->getRawContent( $role ); @@ -1208,7 +1208,8 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface { } // "created" is forced here - $this->options['created'] = ( $this->pageState['oldId'] === 0 ); + $this->options['created'] = ( $this->options['created'] || + ( $this->pageState['oldId'] === 0 ) ); $this->revision = $revision; @@ -1484,7 +1485,6 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface { $id = $this->getPageId(); $title = $this->getTitle(); - $dbKey = $title->getPrefixedDBkey(); $shortTitle = $title->getDBkey(); if ( !$title->exists() ) { @@ -1522,7 +1522,7 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface { // TODO: make search infrastructure aware of slots! $mainSlot = $this->revision->getSlot( SlotRecord::MAIN ); if ( !$mainSlot->isInherited() && !$this->isContentDeleted() ) { - DeferredUpdates::addUpdate( new SearchUpdate( $id, $dbKey, $mainSlot->getContent() ) ); + DeferredUpdates::addUpdate( new SearchUpdate( $id, $title, $mainSlot->getContent() ) ); } // If this is another user's talk page, update newtalk. @@ -1531,7 +1531,9 @@ class DerivedPageDataUpdater implements IDBAccessObject, LoggerAwareInterface { if ( $this->options['changed'] && $title->getNamespace() == NS_USER_TALK && $shortTitle != $legacyUser->getTitleKey() - && !( $this->revision->isMinor() && $legacyUser->isAllowed( 'nominornewtalk' ) ) + && !( $this->revision->isMinor() && MediaWikiServices::getInstance() + ->getPermissionManager() + ->userHasRight( $legacyUser, 'nominornewtalk' ) ) ) { $recipient = User::newFromName( $shortTitle, false ); if ( !$recipient ) {