From e3541086a30f31a241cc8b2d854978cc29f26dac Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 25 Mar 2007 22:53:07 +0000 Subject: [PATCH] Give dependencies a unique file extension. git-svn-id: http://htmlpurifier.org/svnroot@901 48356398-32a2-884e-a903-53898d9a118a --- XHTMLCompiler/Page.php | 2 +- update.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/XHTMLCompiler/Page.php b/XHTMLCompiler/Page.php index 08b6908..a9e07f9 100644 --- a/XHTMLCompiler/Page.php +++ b/XHTMLCompiler/Page.php @@ -18,7 +18,7 @@ class XHTMLCompiler_Page /** File extension of cache/served files */ protected $cacheExt = 'html'; /** File extension of dependency files */ - protected $depsExt = 'deps'; + protected $depsExt = 'xc-deps'; /** Instance of XHTMLCompiler_File for source file */ protected $source; diff --git a/update.php b/update.php index 4b9395d..30e25b3 100644 --- a/update.php +++ b/update.php @@ -26,7 +26,7 @@ if ($type == 'help') { . normal : update existing files, remove orphans (default) . all : normal + create files without cached output . force : regenerate all files - . clean : remove all cache files'; + . clean : remove all cache and dependency files'; exit; } @@ -38,7 +38,11 @@ if ($type == 'clean') { unlink($file); } } - exit('Removed all cache files.'); + $files = scan_dirs_for_pages('.xc-deps', $xc->getConf('allowed_dirs')); + foreach ($files as $file) { + unlink($file); + } + exit('Removed all cache and dependency files.'); } // regular processing -- 2.11.4.GIT