mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 22:26:31 +02:00
Some maintenance script cleanup
- Create super-script flush.php - Rename old scripts with old- prefix. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1574 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -15,11 +15,6 @@ assertCli();
|
||||
$target = '../library/HTMLPurifier/ConfigSchema/schema.ser';
|
||||
$FS = new FSTools();
|
||||
|
||||
if (file_exists($target)) {
|
||||
echo "Delete HTMLPurifier/ConfigSchema/schema.ser before running this script.";
|
||||
exit;
|
||||
}
|
||||
|
||||
$files = $FS->globr('../library/HTMLPurifier/ConfigSchema', '*.txt');
|
||||
|
||||
$namespaces = array();
|
||||
@@ -42,4 +37,6 @@ $schema = new HTMLPurifier_ConfigSchema();
|
||||
foreach ($namespaces as $hash) $adapter->adapt($hash, $schema);
|
||||
foreach ($directives as $hash) $adapter->adapt($hash, $schema);
|
||||
|
||||
echo "Saving schema... ";
|
||||
file_put_contents($target, serialize($schema));
|
||||
echo "done!\n";
|
||||
|
Reference in New Issue
Block a user