1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-30 19:00:10 +02:00

[3.1.0] Add HTMLPurifier.safe-includes.php loader stub.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1645 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-04-04 17:44:42 +00:00
parent 9676e8580e
commit 08bdeb2ac2
5 changed files with 237 additions and 3 deletions

View File

@@ -124,6 +124,8 @@ $files = dep_sort($files);
// Build the actual include stub:
$version = trim(file_get_contents('../VERSION'));
// stub
$php = "<?php
/**
@@ -150,6 +152,30 @@ foreach ($files as $file) {
$php .= "require '$file';" . PHP_EOL;
}
echo "Writing file... ";
echo "Writing HTMLPurifier.includes.php... ";
file_put_contents('HTMLPurifier.includes.php', $php);
echo "done!\n";
$php = "<?php
/**
* @file
* This file was auto-generated by generate-includes.php and includes all of
* the core files required by HTML Purifier. This is a convenience stub that
* includes all files using dirname(__FILE__) and require_once. PLEASE DO NOT
* EDIT THIS FILE, changes will be overwritten the next time the script is run.
*
* Changes to include_path are not necessary.
*/
$__dir = dirname(__FILE__);
";
foreach ($files as $file) {
$php .= "require_once \$__dir . '$file';" . PHP_EOL;
}
echo "Writing HTMLPurifier.safe-includes.php... ";
file_put_contents('HTMLPurifier.safe-includes.php', $php);
echo "done!\n";