jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/366805 )

Change subject: Fix for "Edit with form" tab not showing up immediately
......................................................................


Fix for "Edit with form" tab not showing up immediately

Since commit [1] the 'categorylinks' table is not updated directly when a
page gets saved. Therefore the "Edit with form" tab of
"Extension:PageForms" may mot be shown directly after page save.
This hook handler updates the 'categorylinks' table.

[1] 
https://github.com/wikimedia/mediawiki/commit/072e3666d3fcd1738d4742930bbe3acd5e7519b2#diff-a0f7feeaae57e9d2c735c8919c16ad15R2198

Change-Id: Id3956cbf38cf5bc3a76c3ecff286447c1093ae85
---
M extension.json
M includes/BSSMWConnectorHooks.php
2 files changed, 33 insertions(+), 1 deletion(-)

Approvals:
  ItSpiderman: Looks good to me, approved
  jenkins-bot: Verified

Objections:
  Robert Vogel: There's a problem with this change, please improve



diff --git a/extension.json b/extension.json
index 11b7f52..2e336c4 100644
--- a/extension.json
+++ b/extension.json
@@ -31,7 +31,8 @@
                "BSApiNamespaceStoreMakeData": 
"BSSMWCNamespaceManager::onGetNamespaceData",
                "NamespaceManager::editNamespace": 
"BSSMWCNamespaceManager::onEditNamespace",
                "NamespaceManager::writeNamespaceConfiguration": 
"BSSMWCNamespaceManager::onWriteNamespaceConfiguration",
-               "BSPageTemplatesBeforeRender": 
"BSSMWCPageTemplates::onBSPageTemplatesBeforeRender"
+               "BSPageTemplatesBeforeRender": 
"BSSMWCPageTemplates::onBSPageTemplatesBeforeRender",
+               "PageContentSaveComplete": 
"BSSMWConnectorHooks::onPageContentSaveComplete"
        },
        "ResourceFileModulePaths": {
                "localBasePath": "resources",
diff --git a/includes/BSSMWConnectorHooks.php b/includes/BSSMWConnectorHooks.php
index 2ffaa8c..8c5c4e0 100644
--- a/includes/BSSMWConnectorHooks.php
+++ b/includes/BSSMWConnectorHooks.php
@@ -184,4 +184,35 @@
 
                return true;
        }
+
+       /**
+        * Since commit [1] the 'categorylinks' table is not updated directly 
when a
+        * page gets saved. Therefore the "Edit with form" tab of
+        * "Extension:PageForms" may mot be shown directly after page save.
+        * This hook handler updates the 'categorylinks' table.
+        *
+        * [1] 
https://github.com/wikimedia/mediawiki/commit/072e3666d3fcd1738d4742930bbe3acd5e7519b2#diff-a0f7feeaae57e9d2c735c8919c16ad15R2198
+        *
+        * @param WikiPage $article
+        * @param User $user
+        * @param Content $content
+        * @param string $summary
+        * @param boolean $isMinor
+        * @param boolean $isWatch
+        * @param int $section
+        * @param int $flags
+        * @param int $revision
+        * @param Status $status
+        * @param int $baseRevId
+        * @return boolean Always true to keep hook running
+        */
+       public static function onPageContentSaveComplete( $article, $user, 
$content,
+                       $summary, $isMinor, $isWatch, $section, $flags, 
$revision, $status,
+                       $baseRevId ) {
+
+               DataUpdate::runUpdates(
+                       $content->getSecondaryDataUpdates( $article->getTitle() 
)
+               );
+               return true;
+       }
 }
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/366805
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3956cbf38cf5bc3a76c3ecff286447c1093ae85
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceSMWConnector
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>
Gerrit-Reviewer: ItSpiderman <[email protected]>
Gerrit-Reviewer: Ljonka <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to