cvs: phd(PHD_0_2) /themes/php phpfunctions.php
| From: | Rudy Nappée | Date: | Fri, 25 Jul 2008 14:02:52 +0000 |
| Subject: | cvs: phd(PHD_0_2) /themes/php phpfunctions.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1936@lists.php.net to get a copy of this message | ||
loudi Fri Jul 25 14:02:52 2008 UTC
Modified files: (Branch: PHD_0_2)
/phd/themes/php phpfunctions.php
Log:
* corrected bugs #45626 & #45627 (bad directory name & gzip compression) for manpage
output
http://cvs.php.net/viewvc.cgi/phd/themes/php/phpfunctions.php?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: phd/themes/php/phpfunctions.php
diff -u phd/themes/php/phpfunctions.php:1.1.2.2 phd/themes/php/phpfunctions.php:1.1.2.3
--- phd/themes/php/phpfunctions.php:1.1.2.2 Thu Jul 24 10:21:06 2008
+++ phd/themes/php/phpfunctions.php Fri Jul 25 14:02:52 2008
@@ -61,20 +61,25 @@
$index = 0;
rewind($stream);
- $filename = $this->cchunk["funcname"][$index] . '.3';
+ $filename = $this->cchunk["funcname"][$index] . '.3.gz';
+ $gzfile = gzopen($this->outputdir . $filename, "w9");
- file_put_contents($this->outputdir . $filename, $this->header($index));
- file_put_contents($this->outputdir . $filename, $stream, FILE_APPEND);
+ gzwrite($gzfile, $this->header($index));
+ gzwrite($gzfile, stream_get_contents($stream));
+ gzclose($gzfile);
v("Wrote %s", $this->outputdir . $filename, VERBOSE_CHUNK_WRITING);
while(isset($this->cchunk["funcname"][++$index])) {
- $filename = $this->cchunk["funcname"][$index] . '.3';
+ $filename = $this->cchunk["funcname"][$index] . '.3.gz';
rewind($stream);
// Replace the default function name by the alternative one
$content =
preg_replace('/'.$this->cchunk["funcname"][0].'/',
$this->cchunk["funcname"][$index], stream_get_contents($stream), 1);
- file_put_contents($this->outputdir . $filename, $this->header($index));
- file_put_contents($this->outputdir . $filename, $content, FILE_APPEND);
+
+ $gzfile = gzopen($this->outputdir . $filename, "w9");
+ gzwrite($gzfile, $this->header($index));
+ gzwrite($gzfile, $content);
+ gzclose($gzfile);
v("Wrote %s", $this->outputdir . $filename, VERBOSE_CHUNK_WRITING);
}
}