From: <var...@us...> - 2014-10-03 16:06:34
|
Revision: 9187 http://sourceforge.net/p/phpwiki/code/9187 Author: vargenau Date: 2014-10-03 16:06:26 +0000 (Fri, 03 Oct 2014) Log Message: ----------- Remove unused functions gzip_compress and gzip_uncompress Modified Paths: -------------- trunk/lib/ziplib.php Modified: trunk/lib/ziplib.php =================================================================== --- trunk/lib/ziplib.php 2014-10-03 15:26:18 UTC (rev 9186) +++ trunk/lib/ziplib.php 2014-10-03 16:06:26 UTC (rev 9187) @@ -10,72 +10,7 @@ * checksum, and since not all PHP's have gzcompress(), we'll just * stick with gzopen(). */ -function gzip_cleanup() -{ - global $gzip_tmpfile; - if ($gzip_tmpfile) - @unlink($gzip_tmpfile); -} - -function gzip_tempnam() -{ - global $gzip_tmpfile; - - if (!$gzip_tmpfile) { - //FIXME: does this work on non-unix machines? - if (is_writable("/tmp")) - $gzip_tmpfile = tempnam("/tmp", "wkzip"); - else - $gzip_tmpfile = tempnam(TEMP_DIR, "wkzip"); - register_shutdown_function("gzip_cleanup"); - } - return $gzip_tmpfile; -} - -function gzip_compress($data) -{ - $filename = gzip_tempnam(); - if (!($fp = gzopen($filename, "wb"))) - trigger_error(sprintf("%s failed", 'gzopen'), E_USER_ERROR); - gzwrite($fp, $data, strlen($data)); - if (!gzclose($fp)) { - trigger_error(sprintf("%s failed", 'gzclose'), E_USER_ERROR); - } - $z = NULL; - if (!($fp = fopen($filename, "rb"))) { - trigger_error(sprintf("%s failed", 'fopen'), E_USER_ERROR); - } - while (!feof($fp)) { - $z .= fread($fp, 1024); - } - if (!fclose($fp)) - trigger_error(sprintf("%s failed", 'fclose'), E_USER_ERROR); - unlink($filename); - return $z; -} - -function gzip_uncompress($data) -{ - $filename = gzip_tempnam(); - if (!($fp = fopen($filename, "wb"))) - trigger_error(sprintf("%s failed", 'fopen'), E_USER_ERROR); - fwrite($fp, $data, strlen($data)); - if (!fclose($fp)) - trigger_error(sprintf("%s failed", 'fclose'), E_USER_ERROR); - - if (!($fp = gzopen($filename, "rb"))) - trigger_error(sprintf("%s failed", 'gzopen'), E_USER_ERROR); - $unz = ''; - while ($buf = gzread($fp, 4096)) - $unz .= $buf; - if (!gzclose($fp)) - trigger_error(sprintf("%s failed", 'gzclose'), E_USER_ERROR); - - unlink($filename); - return $unz; -} - /** * CRC32 computation. Hacked from Info-zip's zip-2.3 source code. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-01-29 17:40:57
|
Revision: 9501 http://sourceforge.net/p/phpwiki/code/9501 Author: vargenau Date: 2015-01-29 17:40:50 +0000 (Thu, 29 Jan 2015) Log Message: ----------- We may need a lot of memory and time for the dump Modified Paths: -------------- trunk/lib/ziplib.php Modified: trunk/lib/ziplib.php =================================================================== --- trunk/lib/ziplib.php 2015-01-28 16:49:18 UTC (rev 9500) +++ trunk/lib/ziplib.php 2015-01-29 17:40:50 UTC (rev 9501) @@ -699,6 +699,10 @@ // references. function ParseMimeifiedPages($data) { + // We may need a lot of memory and time for the dump + ini_set("memory_limit", -1); + ini_set('max_execution_time', 0); + if (!($headers = ParseRFC822Headers($data)) || empty($headers['content-type']) ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2015-01-30 15:19:00
|
Revision: 9503 http://sourceforge.net/p/phpwiki/code/9503 Author: vargenau Date: 2015-01-30 15:18:59 +0000 (Fri, 30 Jan 2015) Log Message: ----------- PHP Doc Modified Paths: -------------- trunk/lib/ziplib.php Modified: trunk/lib/ziplib.php =================================================================== --- trunk/lib/ziplib.php 2015-01-30 10:05:37 UTC (rev 9502) +++ trunk/lib/ziplib.php 2015-01-30 15:18:59 UTC (rev 9503) @@ -502,6 +502,13 @@ * automatically convert encodings to a safe type if they receive * mail encoded in '8bit' and/or 'binary' encodings. */ + +/** + * @param WikiDB_Page $page + * @param WikiDB_PageRevision $revision + * @return string + */ + function MimeifyPageRevision(&$page, &$revision) { // $wikidb =& $revision->_wikidb; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |