diff options
author | Gina Haeussge <osd@foosel.net> | 2008-10-11 18:43:42 +0200 |
---|---|---|
committer | Gina Haeussge <osd@foosel.net> | 2008-10-11 18:43:42 +0200 |
commit | 2eccbdaacee808c072a68b7bfd961978025b2bcb (patch) | |
tree | 196dea4835e643781c38e75855a568c8a0c657dc /inc/common.php | |
parent | e6a873d798014993bd19ff6100a5c19e525da023 (diff) | |
download | rpg-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/common.php')
-rw-r--r-- | inc/common.php | 10 |
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(); + } + } } /** |