TitleSquidURLs hook for changing the URLs to purge
authordaniel <daniel.kinzler@wikimedia.de>
Fri, 17 May 2013 13:18:48 +0000 (15:18 +0200)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 21 May 2013 20:01:55 +0000 (20:01 +0000)
This allows extensions to purge derivative resources that need
updating when a wiki page is changed.

Change-Id: Ic28ce7f57f29376b041627288979981fcb218a44

RELEASE-NOTES-1.22
docs/hooks.txt
includes/Title.php

index 168f2f7..6b13e01 100644 (file)
@@ -79,6 +79,8 @@ production.
   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
index a292997..f94a1b0 100644 (file)
@@ -2379,6 +2379,10 @@ $title: Title object being checked against
 $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
index 14915e5..8a37f68 100644 (file)
@@ -3448,6 +3448,7 @@ class Title {
                        }
                }
 
+               wfRunHooks( 'TitleSquidURLs', array( $this, &$urls ) );
                return $urls;
        }