mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-22 13:42:53 +02:00
Release 2.0.0, merged in 1026 to HEAD.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/branches/strict@1179 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
24
maintenance/flush-htmldefinition-cache.php
Normal file
24
maintenance/flush-htmldefinition-cache.php
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Flushes the default HTMLDefinition serial cache
|
||||
*/
|
||||
|
||||
if (php_sapi_name() != 'cli') {
|
||||
echo 'Script cannot be called from web-browser.';
|
||||
exit;
|
||||
}
|
||||
|
||||
echo 'Flushing cache... ';
|
||||
|
||||
require_once(dirname(__FILE__) . '/../library/HTMLPurifier.auto.php');
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
|
||||
$cache = new HTMLPurifier_DefinitionCache_Serializer('HTML');
|
||||
$cache->flush($config);
|
||||
|
||||
echo 'Cache flushed successfully.';
|
||||
|
||||
?>
|
Reference in New Issue
Block a user