Edward Z. Yang wrote: > I am about to embark on an attempt to get PhD working for me. I will > report back with results.
setup/setup.php appears to be irreparably fudged, so I will procede on by directly editing Hannes' template. Some notes: - It appears we are missing includes for PhD_Output.class.php and PhD_Options.class.php. Those can be easily added to setup.php, or an autoload setup to handle them automatically - PhD_Output appears to reference a non-existent PhD_Prompts for constants. - Some funky reflection appears to have gone wrong: on line 103 PhD_Interface calls PhD_Output::paramString, using 'Prompt' as the class name: however, there is no such PhD_Prompts class. On an unrelated note, attached is an updated phd_nowdoc.php script with documentation and smarter file writing (won't write to a file if there was no change). It appears the only file that uses nowdoc is Option_Metadata.inc.php. -- Edward Z. Yang GnuPG: 0x869C48DA HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]"\\'", "\\" => "\\\\")) . "'" . PHP_EOL; } function nowdoc_glob($dir) { foreach (glob("$dir/*.php") as $filename) { $file = file_get_contents($filename); $file = preg_replace_callback("/<<<~[ \t]*(.*)\n(.*)\n\\1\\s*/sU", 'nowdoc_remove', $file, -1, $count); if (!$count) continue; // don't touch file if not necessary echo $filename . PHP_EOL; file_put_contents($filename, $file); } foreach (glob("$dir/*", GLOB_ONLYDIR) as $dir) { nowdoc_glob($dir); } } nowdoc_glob("phd");
signature.asc
Description: OpenPGP digital signature