jenkins-bot has submitted this change and it was merged.

Change subject: TitleSquidURLs hook for changing the URLs to purge
......................................................................


TitleSquidURLs hook for changing the URLs to purge

This allows extensions to purge derivative resources that need
updating when a wiki page is changed.

Change-Id: Ic28ce7f57f29376b041627288979981fcb218a44
---
M RELEASE-NOTES-1.22
M docs/hooks.txt
M includes/Title.php
3 files changed, 7 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 168f2f7..6b13e01 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -79,6 +79,8 @@
   which can be cascading (previously 'sysop' was hard-coded as the only one).
 * XHTML5 support has been improved. If you set $wgMimeType = 
'application/xhtml+xml'
   MediaWiki will try outputting markup acording to XHTML5 rules.
+* New hook 'TitleSquidURLs' for manipulating the list of URLs to be purged from
+  HTTP caches when a page is changed.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail is false. Previously one
diff --git a/docs/hooks.txt b/docs/hooks.txt
index a292997..f94a1b0 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2379,6 +2379,10 @@
 $user: Current user object
 &$whitelisted: Boolean value of whether this title is whitelisted
 
+'TitleSquidURLs': Called to determine which URLs to purge from HTTP caches.
+$this: Title object to purge
+&$urls: An array of URLs to purge from the caches, to be manipulated.
+
 'UndeleteForm::showHistory': Called in UndeleteForm::showHistory, after a
 PageArchive object has been created but before any further processing is done.
 &$archive: PageArchive object
diff --git a/includes/Title.php b/includes/Title.php
index 14915e5..8a37f68 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -3448,6 +3448,7 @@
                        }
                }
 
+               wfRunHooks( 'TitleSquidURLs', array( $this, &$urls ) );
                return $urls;
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic28ce7f57f29376b041627288979981fcb218a44
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to