Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351888 )

Change subject: Added updating of pageData, fileData tables on page move
......................................................................

Added updating of pageData, fileData tables on page move

Change-Id: Ie65e597e1a6d74ee663c97c1f54c8515a09b5942
---
M Cargo.hooks.php
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/88/351888/2

diff --git a/Cargo.hooks.php b/Cargo.hooks.php
index 7f83fd4..ae95890 100755
--- a/Cargo.hooks.php
+++ b/Cargo.hooks.php
@@ -288,6 +288,21 @@
                                array( '_pageID' => $oldid )
                        );
                }
+          
+               // Update the page title in the "general data" tables.
+               $generalTables = array( '_pageData', '_fileData' );
+               foreach ( $generalTables as $generalTable ) {
+                       if ( $cdb->tableExists( $generalTable ) ) {
+                               $cdb->update( $generalTable,
+                                       array(
+                                               '_pageName' => $newPageName,
+                                               '_pageTitle' => $newPageTitle,
+                                               '_pageNamespace' => 
$newPageNamespace
+                                       ),
+                                       array( '_pageID' => $oldid )
+                               );
+                       }
+               }
 
                // This call is needed to get the update to occur.
                $cdb->close();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie65e597e1a6d74ee663c97c1f54c8515a09b5942
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to