cvs: phd(rsync) /themes/php phpweb.php

From: Date: Thu, 17 Apr 2008 20:18:23 +0000
Subject: cvs: phd(rsync) /themes/php phpweb.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1517@lists.php.net to get a copy of this message
bjori Thu Apr 17 20:18:23 2008 UTC Modified files: (Branch: rsync) /phd/themes/php phpweb.php Log: MFH: Fixed bug#44690 (Please restore manual main page) http://cvs.php.net/viewvc.cgi/phd/themes/php/phpweb.php?r1=1.18.2.2&r2=1.18.2.3&diff_format=u Index: phd/themes/php/phpweb.php diff -u phd/themes/php/phpweb.php:1.18.2.2 phd/themes/php/phpweb.php:1.18.2.3 --- phd/themes/php/phpweb.php:1.18.2.2 Tue Apr 1 17:22:15 2008 +++ phd/themes/php/phpweb.php Thu Apr 17 20:18:23 2008 @@ -1,5 +1,5 @@ <?php -/* $Id: phpweb.php,v 1.18.2.2 2008/04/01 17:22:15 bjori Exp $ */ +/* $Id: phpweb.php,v 1.18.2.3 2008/04/17 20:18:23 bjori Exp $ */ require_once $ROOT . '/themes/php/phpdotnet.php'; class phpweb extends phpdotnet { @@ -11,8 +11,16 @@ public function __construct($IDs, $filename, $ext = "php", $chunked = true) { parent::__construct($IDs, $filename, $ext, $chunked); $this->outputdir = $GLOBALS['OPTIONS']['output_dir'] . $this->ext . DIRECTORY_SEPARATOR; - if (!file_exists($this->outputdir) || is_file($this->outputdir)) mkdir($this->outputdir) or die("Can't create the cache directory"); - if (!file_exists($this->outputdir . "toc") || is_file($this->outputdir . "toc")) mkdir($this->outputdir . "toc") or die("Can't create the toc directory"); + if (!file_exists($this->outputdir) || is_file($this->outputdir)) { + mkdir($this->outputdir) or die("Can't create the cache directory"); + } else { + if (file_exists($this->outputdir . "index.php")) { + unlink($this->outputdir . "index.php"); + } + } + if (!file_exists($this->outputdir . "toc") || is_file($this->outputdir . "toc")) { + mkdir($this->outputdir . "toc") or die("Can't create the toc directory"); + } } public function writeChunk($id, $stream) { rewind($stream); @@ -203,7 +211,7 @@ return $next; } public function __destruct() { - if (file_exists($this->outputdir . "manual.php")) { + if (file_exists($this->outputdir . "manual.php") && !file_exists($this->outputdir . "index.php")) { copy($this->outputdir . "manual.php", $this->outputdir . "index.php"); } }

« previous php.doc.cvs (#1517) next »