Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/239882
Change subject: Fix FlowFixLinks to use ref_src_wiki and require migration be
complete
......................................................................
Fix FlowFixLinks to use ref_src_wiki and require migration be complete
Bug: T110326
Change-Id: I69cb5bfb50c9c69c9b86466e92d7ac2b1c336099
---
M maintenance/FlowFixLinks.php
1 file changed, 10 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/82/239882/1
diff --git a/maintenance/FlowFixLinks.php b/maintenance/FlowFixLinks.php
index c66954a..2f5542a 100644
--- a/maintenance/FlowFixLinks.php
+++ b/maintenance/FlowFixLinks.php
@@ -33,7 +33,12 @@
protected function doDBUpdates() {
// disable Echo notifications for this script
- global $wgEchoNotifications;
+ global $wgEchoNotifications, $wgFlowMigrateReferenceWiki;
+
+ if ( $wgFlowMigrateReferenceWiki ) {
+ $this->error( '$wgFlowMigrateReferenceWiki must be
false to ensure links from the wrong wiki are not loaded.', 1 );
+ }
+
$wgEchoNotifications = array();
$this->removeVirtualPages();
@@ -47,7 +52,10 @@
protected function removeVirtualPages() {
/** @var \Flow\Data\ObjectManager $storage */
$storage = Container::get( 'storage.wiki_reference' );
- $links = $storage->find( array( 'ref_target_namespace' =>
array( -1, -2 ) ) );
+ $links = $storage->find( array(
+ 'ref_src_wiki' => wfWikiId(),
+ 'ref_target_namespace' => array( -1, -2 ),
+ ) );
if ( $links ) {
$storage->multiRemove( $links, array() );
}
--
To view, visit https://gerrit.wikimedia.org/r/239882
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I69cb5bfb50c9c69c9b86466e92d7ac2b1c336099
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits