From: Carsten K. <car...@us...> - 2002-01-09 02:50:16
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv21811 Modified Files: ziplib.php Log Message: Added a dirty hack to allow saving binary text files. $cte = "quoted-printable"; //$cte = "binary"; See note about latin vs. quoted-printable at PhpWiki:WikiPageMailBoxFormat Index: ziplib.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/ziplib.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** ziplib.php 2001/12/28 09:53:34 1.13 --- ziplib.php 2002/01/09 02:50:14 1.14 *************** *** 492,495 **** --- 492,498 ---- function MimeifyPageRevision ($revision) { + // This is a dirty hack to allow saving binary text files. See below. + $cte = "quoted-printable"; + //$cte = "binary"; $page = $revision->getPage(); // FIXME: add 'hits' to $params *************** *** 508,516 **** $out = MimeContentTypeHeader('application', 'x-phpwiki', $params); ! $out .= "Content-Transfer-Encoding: quoted-printable\r\n"; $out .= "\r\n"; foreach ($revision->getContent() as $line) { ! $out .= QuotedPrintableEncode(chop($line)) . "\r\n"; } return $out; --- 511,521 ---- $out = MimeContentTypeHeader('application', 'x-phpwiki', $params); ! $out .= "Content-Transfer-Encoding: " .$cte ."\r\n"; $out .= "\r\n"; foreach ($revision->getContent() as $line) { ! // This is a dirty hack to allow saving binary text files. See above. ! $out .= ($cte == "quoted-printable") ? QuotedPrintableEncode(chop($line)) : chop($line); ! $out .= "\r\n"; } return $out; |