From cab6281ea6f616c18b155187c5acc7bd557d8114 Mon Sep 17 00:00:00 2001 From: rurban Date: Tue, 24 Feb 2004 17:09:24 +0000 Subject: [PATCH] fixed \r\r\n with dumping on windows git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@3042 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/loadsave.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/loadsave.php b/lib/loadsave.php index 0024d2780..f2eb8cb46 100644 --- a/lib/loadsave.php +++ b/lib/loadsave.php @@ -1,5 +1,5 @@ getAllPages(); while ($page = $pages->next()) { - @set_time_limit(30); // Reset watchdog. + if (! $request->getArg('start_debug')) + @set_time_limit(30); // Reset watchdog. $filename = FilenameForPage($page->getName()); @@ -206,7 +207,7 @@ function DumpToDir (&$request) else $data = MailifyPage($page); - if ( !($fd = fopen("$directory/$filename", "w")) ) { + if ( !($fd = fopen("$directory/$filename", "wb")) ) { $msg->pushContent(HTML::strong(fmt("couldn't open file '%s' for writing", "$directory/$filename"))); $request->finish($msg); @@ -275,7 +276,7 @@ function DumpHtmlToDir (&$request) $data = GeneratePageasXML($template, $pagename); - if ( !($fd = fopen("$directory/$filename", "w")) ) { + if ( !($fd = fopen("$directory/$filename", "wb")) ) { $msg->pushContent(HTML::strong(fmt("couldn't open file '%s' for writing", "$directory/$filename"))); $request->finish($msg); -- 2.45.0