Extension:PurgeParentPage

What can this extension do?
PurgeParentPage is a basic extension used to purge the cache of a parent page whenever a new subpage is added, or an existing subpage is deleted. This would typically be used in conjunction with other extensions in which parent-page content needs to refresh based on subpages (e.g. User:Karora/ListSubPages). Such extensions would otherwise dynamically refresh based on subpages; however, due to the cache - the new version of the parent page is unavailable until purged.

PurgeParentPage currently replicates Article::doPurge.

Usage
Once the extension is installed, it will check every article creation and article delete. If the given article is a subpage, the parent page's cache will be purged.

Download instructions
Please cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php:

User rights
Normal "purge rights" are not followed; e.g. a non-logged-in-user could cause a page to be purged directly without the typical confirmation as described in Manual:Purge.