From f46aef698ebb234578e04dc6c9ed2572b8dec3b1 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Tue, 22 Apr 2008 16:20:45 +0000 Subject: [PATCH] Post rc skirmishes. - Update docs - Update source code comments in generated files - release1-update.php now flushes after it finishes - Make InterchangeBuilder alphabetize git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1676 48356398-32a2-884e-a903-53898d9a118a --- NEWS | 4 ++++ TODO | 3 --- docs/dev-config-schema.html | 2 +- docs/enduser-youtube.html | 4 +--- library/HTMLPurifier.includes.php | 2 +- .../HTMLPurifier/ConfigSchema/InterchangeBuilder.php | 10 ++++++++-- release1-update.php | 2 ++ 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index a49cded7..e83b3cd0 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ NEWS ( CHANGELOG and HISTORY ) HTMLPurifier . Internal change ========================== +3.1.0, unknown release date +- InterchangeBuilder now alphabetizes its lists +. Out-of-date documentation revised + 3.1.0rc1, released 2008-04-22 # Autoload support added. Internal require_once's removed in favor of an explicit require list or autoloading. To use HTML Purifier, diff --git a/TODO b/TODO index 11c4ad58..94a3a4ab 100644 --- a/TODO +++ b/TODO @@ -15,9 +15,6 @@ afraid to cast your vote for the next feature to be implemented! UPCOMING RELEASE ---------------- -IMPORTANT - - Release candidate, because of the major changes - DOCUMENTATION - Update French translation of README diff --git a/docs/dev-config-schema.html b/docs/dev-config-schema.html index 41448d75..52e5528e 100644 --- a/docs/dev-config-schema.html +++ b/docs/dev-config-schema.html @@ -367,7 +367,7 @@ Test.Example For example, HTMLPurifier_ConfigSchema_Builder_ConfigSchema generates a runtime HTMLPurifier_ConfigSchema object, which HTMLPurifier_Config uses to validate its incoming - data. There is also a planned documentation builder. + data. There is also an XML serializer, which is used to build documentation.

$Id$
diff --git a/docs/enduser-youtube.html b/docs/enduser-youtube.html index 2437b488..ca47da0b 100644 --- a/docs/enduser-youtube.html +++ b/docs/enduser-youtube.html @@ -75,9 +75,7 @@ passes through HTML Purifier unharmed.

And the corresponding usage:

<?php
-    // assuming $purifier is an instance of HTMLPurifier
-    require_once 'HTMLPurifier/Filter/YouTube.php';
-    $purifier->addFilter(new HTMLPurifier_Filter_YouTube());
+    $config->set('Filter', 'YouTube', true);
 ?>

There is a bit going in the two code snippets, so let's explain.

diff --git a/library/HTMLPurifier.includes.php b/library/HTMLPurifier.includes.php index 0679711f..bf4ac9fb 100644 --- a/library/HTMLPurifier.includes.php +++ b/library/HTMLPurifier.includes.php @@ -7,7 +7,7 @@ * primary concern and you are using an opcode cache. PLEASE DO NOT EDIT THIS * FILE, changes will be overwritten the next time the script is run. * - * @version 3.0.0 + * @version 3.1.0rc1 * * @warning * You must *not* include any other HTML Purifier files before this file, diff --git a/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php b/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php index 1f09d291..3bc1d409 100644 --- a/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php +++ b/library/HTMLPurifier/ConfigSchema/InterchangeBuilder.php @@ -17,21 +17,27 @@ class HTMLPurifier_ConfigSchema_InterchangeBuilder $builder = new HTMLPurifier_ConfigSchema_InterchangeBuilder(); $interchange = new HTMLPurifier_ConfigSchema_Interchange(); - if (!$dir) $dir = realpath(dirname(__FILE__) . '/schema/'); + if (!$dir) $dir = dirname(__FILE__) . '/schema/'; $info = parse_ini_file($dir . 'info.ini'); $interchange->name = $info['name']; + $files = array(); $dh = opendir($dir); while (false !== ($file = readdir($dh))) { if (!$file || $file[0] == '.' || strrchr($file, '.') !== '.txt') { continue; } + $files[] = $file; + } + closedir($dh); + + sort($files); + foreach ($files as $file) { $builder->build( $interchange, new HTMLPurifier_StringHash( $parser->parseFile($dir . $file) ) ); } - closedir($dh); return $interchange; } diff --git a/release1-update.php b/release1-update.php index 5e6d354d..c611b324 100644 --- a/release1-update.php +++ b/release1-update.php @@ -90,5 +90,7 @@ if (!$c) { } file_put_contents('library/HTMLPurifier/Config.php', $config_c); +passthru('php maintenance/flush.php'); + echo "Review changes, write something in WHATSNEW, and then SVN commit with log 'Release $version.'" . PHP_EOL;