From ca06ed7d36315922f5bc690e9fa456ecfe2faa9e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 15 Apr 2011 14:06:27 +0400 Subject: [PATCH] move HTMLPurifier cache inside CACHE_DIR/htmlpurifier --- .gitignore | 1 + cache/htmlpurifier/.empty | 0 functions.php | 1 + sanity_check.php | 2 +- 4 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 cache/htmlpurifier/.empty diff --git a/.gitignore b/.gitignore index 4c76f15e..148d206a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ icons/* cache/*/* lock/* tags +cache/htmlpurifier/*/*ser lib/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer/*/*ser diff --git a/cache/htmlpurifier/.empty b/cache/htmlpurifier/.empty new file mode 100644 index 00000000..e69de29b diff --git a/functions.php b/functions.php index 0a2345ff..4abca26c 100644 --- a/functions.php +++ b/functions.php @@ -120,6 +120,7 @@ @$config->set('HTML', 'Allowed', $allowed); $config->set('Output.FlashCompat', true); $config->set('Attr.EnableID', true); + $config->set('Cache', 'SerializerPath', CACHE_DIR . "/htmlpurifier"); $purifier = new HTMLPurifier($config); diff --git a/sanity_check.php b/sanity_check.php index e518a8c2..ce755f40 100644 --- a/sanity_check.php +++ b/sanity_check.php @@ -17,7 +17,7 @@ $err_msg = "config: your config file version is incorrect. See config.php-dist.\n"; } - $purifier_cache_dir = "lib/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer"; + $purifier_cache_dir = CACHE_DIR . "/htmlpurifier"; if (!is_writable($purifier_cache_dir)) { $err_msg = "config: HTMLPurifier cache directory should be writable by anyone (chmod -R 777 $purifier_cache_dir)"; -- 2.39.5