mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-09 23:57:03 +02:00
[2.1.0] Standalone file now can be generated using maintenance/merge-library.php. Also:
- HTMLPURIFIER_PREFIX constant added, and relevant files transitioned over - Custom ChildDef added to default include list - Tester accepts ?standalone parameter git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1316 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -17,8 +17,7 @@ class HTMLPurifier_DefinitionCache_SerializerTest extends HTMLPurifier_Definitio
|
||||
$config_md5 = '1.0.0-serial-2';
|
||||
|
||||
$file = realpath(
|
||||
$rel_file = dirname(__FILE__) .
|
||||
'/../../../library/HTMLPurifier/DefinitionCache/Serializer/Test/' .
|
||||
$rel_file = HTMLPURIFIER_PREFIX . '/HTMLPurifier/DefinitionCache/Serializer/Test/' .
|
||||
$config_md5 . '.ser'
|
||||
);
|
||||
if($file && file_exists($file)) unlink($file); // prevent previous failures from causing problems
|
||||
|
@@ -38,7 +38,13 @@ if ( is_string($GLOBALS['HTMLPurifierTest']['PEAR']) ) {
|
||||
}
|
||||
|
||||
// initialize and load HTML Purifier
|
||||
require_once '../library/HTMLPurifier.auto.php';
|
||||
// use ?standalone to load the alterative standalone stub
|
||||
if (isset($_GET['standalone']) || (isset($argv[1]) && $argv[1] == 'standalone')) {
|
||||
set_include_path(realpath('blanks') . PATH_SEPARATOR . get_include_path());
|
||||
require_once '../library/HTMLPurifier.standalone.php';
|
||||
} else {
|
||||
require_once '../library/HTMLPurifier.auto.php';
|
||||
}
|
||||
|
||||
// setup special DefinitionCacheFactory decorator
|
||||
$factory =& HTMLPurifier_DefinitionCacheFactory::instance();
|
||||
|
Reference in New Issue
Block a user