Merged revisions 52398 via svnmerge from

http://svn.silverstripe.com/open/modules/sapphire/branches/2.2.2

........
  r52398 | sminnee | 2008-04-09 18:19:30 +1200 (Wed, 09 Apr 2008) | 1 line
  
  Fix to ManifestBuilder when running site on windows in a directory containing \r or \t or \n
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@53514 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-04-26 06:51:18 +00:00
parent bd19050f5c
commit b9b4a1e2b2

View File

@ -87,6 +87,7 @@ class ManifestBuilder {
// Config manifest // Config manifest
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']) . "/.."; $baseDir = dirname($_SERVER['SCRIPT_FILENAME']) . "/..";
$baseDir = ereg_replace("/[^/]+/\\.\\.", "", $baseDir); $baseDir = ereg_replace("/[^/]+/\\.\\.", "", $baseDir);
$baseDir = preg_replace("/\\\\/", "/", $baseDir);
$manifest = self::generate_php_file(self::get_manifest_info($baseDir)); $manifest = self::generate_php_file(self::get_manifest_info($baseDir));
@ -557,6 +558,7 @@ class ManifestBuilder {
// Config manifest // Config manifest
$baseDir = dirname($_SERVER['SCRIPT_FILENAME']) . "/.."; $baseDir = dirname($_SERVER['SCRIPT_FILENAME']) . "/..";
$baseDir = ereg_replace("/[^/]+/\\.\\.","",$baseDir); $baseDir = ereg_replace("/[^/]+/\\.\\.","",$baseDir);
$baseDir = preg_replace("/\\\\/", "/", $baseDir);
$topLevel = scandir($baseDir); $topLevel = scandir($baseDir);
foreach($topLevel as $filename) { foreach($topLevel as $filename) {