summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorGina Haeussge <osd@foosel.net>2008-10-11 18:43:42 +0200
committerGina Haeussge <osd@foosel.net>2008-10-11 18:43:42 +0200
commit2eccbdaacee808c072a68b7bfd961978025b2bcb (patch)
tree196dea4835e643781c38e75855a568c8a0c657dc /inc
parente6a873d798014993bd19ff6100a5c19e525da023 (diff)
downloadrpg-2eccbdaacee808c072a68b7bfd961978025b2bcb.tar.gz
rpg-2eccbdaacee808c072a68b7bfd961978025b2bcb.tar.bz2
FS#1234: If useheading is enabled, purge the cache of backlinks upon save
darcs-hash:20081011164342-2b4f5-b2e26e17ce970927ddbc0c5b888815063d613b0e.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/common.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php
index 962c05c37..82a5b7086 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -926,6 +926,16 @@ function saveWikiText($id,$text,$summary,$minor=false){
// update the purgefile (timestamp of the last time anything within the wiki was changed)
io_saveFile($conf['cachedir'].'/purgefile',time());
+
+ // if useheading is enabled, purge the cache of all linking pages
+ if($conf['useheading']){
+ require_once(DOKU_INC.'inc/fulltext.php');
+ $pages = ft_backlinks($id);
+ foreach ($pages as $page) {
+ $cache = new cache_renderer($page, wikiFN($page), 'xhtml');
+ $cache->removeCache();
+ }
+ }
}
/**