4chdir(dirname(__FILE__));
5require_once
'common.php';
8echo
"Please do not run this script. It is here for historical purposes only.";
16chdir(dirname(__FILE__) .
'/../library/');
21 if (substr_count(basename(
$file),
'.') > 1)
continue;
22 $old_code = file_get_contents(
$file);
23 $new_code = preg_replace(
"#^HTMLPurifier_ConfigSchema::.+?\);[\n\r]*#ms",
'', $old_code);
24 if ($old_code !== $new_code) {
25 file_put_contents(
$file, $new_code);
27 if (preg_match(
'#^\s+HTMLPurifier_ConfigSchema::#m', $new_code)) {
28 echo
"Indented ConfigSchema call in $file\n";
An exception for terminatinating execution or to throw for unit testing.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file