cvs: phd / package.xml /themes/php phpweb.php
| From: | Hannes Magnusson | Date: | Fri, 11 Apr 2008 21:28:46 +0000 |
| Subject: | cvs: phd / package.xml /themes/php phpweb.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-1477@lists.php.net to get a copy of this message | ||
bjori Fri Apr 11 21:28:46 2008 UTC
Modified files:
/phd package.xml
/phd/themes/php phpweb.php
Log:
- Fixed bug#44690 (Please restore manual main page). (Hannes)
http://cvs.php.net/viewvc.cgi/phd/package.xml?r1=1.61&r2=1.62&diff_format=u
Index: phd/package.xml
diff -u phd/package.xml:1.61 phd/package.xml:1.62
--- phd/package.xml:1.61 Mon Apr 7 05:41:44 2008
+++ phd/package.xml Fri Apr 11 21:28:46 2008
@@ -40,6 +40,7 @@
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD
Style</license>
<notes>
+ - Fixed bug#44690 (Please restore manual main page). (Hannes)
- Added French support (for autogenerated texts). (Yannick)
</notes>
http://cvs.php.net/viewvc.cgi/phd/themes/php/phpweb.php?r1=1.23&r2=1.24&diff_format=u
Index: phd/themes/php/phpweb.php
diff -u phd/themes/php/phpweb.php:1.23 phd/themes/php/phpweb.php:1.24
--- phd/themes/php/phpweb.php:1.23 Wed Feb 27 21:23:13 2008
+++ phd/themes/php/phpweb.php Fri Apr 11 21:28:46 2008
@@ -1,5 +1,5 @@
<?php
-/* $Id: phpweb.php,v 1.23 2008/02/27 21:23:13 bjori Exp $ */
+/* $Id: phpweb.php,v 1.24 2008/04/11 21:28:46 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");
}
}