Daniel Kinzler has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/64290


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

TitleSquidURLs hook for changing the URLs to purge

This allows extensions to purge derivative ressources 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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/64290/1

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: newchange
Gerrit-Change-Id: Ic28ce7f57f29376b041627288979981fcb218a44
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>

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

Reply via email to