bjori           Thu Aug  9 15:25:35 2007 UTC

  Modified files:              
    /phd        build.php 
    /phd/themes/php     bightml.php chunkedhtml.php phpweb.php 
  Log:
  Move mkdir(outputdir) and copy(manual, index) to the themes
  
  
http://cvs.php.net/viewvc.cgi/phd/build.php?r1=1.13&r2=1.14&diff_format=u
Index: phd/build.php
diff -u phd/build.php:1.13 phd/build.php:1.14
--- phd/build.php:1.13  Thu Aug  9 15:17:23 2007
+++ phd/build.php       Thu Aug  9 15:25:34 2007
@@ -1,5 +1,5 @@
 <?php
-/*  $Id: build.php,v 1.13 2007/08/09 15:17:23 bjori Exp $ */
+/*  $Id: build.php,v 1.14 2007/08/09 15:25:34 bjori Exp $ */
 
 function err($no, $str, $file, $line) {
        global $notify;
@@ -85,9 +85,6 @@
         }
     }
 
-    if(!file_exists("php") || is_file("php")) mkdir("php") or die("Can't 
create the cache directory");
-    if(!file_exists("html") || is_file("html")) mkdir("html") or die("Can't 
create the cache directory");
-
     $reader = new PhDReader($OPTIONS["xml_root"] . "/.manual.xml");
     while($reader->read()) {
         $nodetype = $reader->nodeType;
@@ -203,8 +200,6 @@
         }
     }
 
-    copy("php/manual.php", "php/index.php");
-    copy("html/manual.html", "html/index.html");
     $reader->close();
 
     if ($err) {
http://cvs.php.net/viewvc.cgi/phd/themes/php/bightml.php?r1=1.1&r2=1.2&diff_format=u
Index: phd/themes/php/bightml.php
diff -u phd/themes/php/bightml.php:1.1 phd/themes/php/bightml.php:1.2
--- phd/themes/php/bightml.php:1.1      Wed Aug  8 23:46:19 2007
+++ phd/themes/php/bightml.php  Thu Aug  9 15:25:35 2007
@@ -1,9 +1,9 @@
 <?php
-/*  $Id: bightml.php,v 1.1 2007/08/08 23:46:19 bjori Exp $ */
+/*  $Id: bightml.php,v 1.2 2007/08/09 15:25:35 bjori Exp $ */
 
 class bightml extends phpdotnet implements PhDTheme {
     public function __construct(array $IDs, array $IDMap, $filename, $ext = 
"html") {
-        parent::__construct($IDs, $IDMap, $filename, $ext, false);
+        phpdotnet::__construct($IDs, $IDMap, $filename, $ext, false);
         $this->stream = fopen("bightml.html", "w");
         self::header();
     }
http://cvs.php.net/viewvc.cgi/phd/themes/php/chunkedhtml.php?r1=1.1&r2=1.2&diff_format=u
Index: phd/themes/php/chunkedhtml.php
diff -u phd/themes/php/chunkedhtml.php:1.1 phd/themes/php/chunkedhtml.php:1.2
--- phd/themes/php/chunkedhtml.php:1.1  Wed Aug  8 23:46:19 2007
+++ phd/themes/php/chunkedhtml.php      Thu Aug  9 15:25:35 2007
@@ -2,6 +2,7 @@
 class chunkedhtml extends phpweb {
     public function __construct(array $IDs, array $IDMap, $filename, $ext = 
"html") {
         parent::__construct($IDs, $IDMap, $filename, $ext, true);
+       if(!file_exists("html") || is_file("html")) mkdir("html") or die("Can't 
create the cache directory");
     }
     public function header($id) {
         return "<html><body>\n";
@@ -9,6 +10,8 @@
     public function footer($id) {
         return "</body></html>\n";
     }
-
+       public function __destruct() {
+               copy("html/manual.html", "html/index.html");
+       }
 }
 
http://cvs.php.net/viewvc.cgi/phd/themes/php/phpweb.php?r1=1.1&r2=1.2&diff_format=u
Index: phd/themes/php/phpweb.php
diff -u phd/themes/php/phpweb.php:1.1 phd/themes/php/phpweb.php:1.2
--- phd/themes/php/phpweb.php:1.1       Wed Aug  8 23:46:19 2007
+++ phd/themes/php/phpweb.php   Thu Aug  9 15:25:35 2007
@@ -1,11 +1,15 @@
 <?php
-/*  $Id: phpweb.php,v 1.1 2007/08/08 23:46:19 bjori Exp $ */
+/*  $Id: phpweb.php,v 1.2 2007/08/09 15:25:35 bjori Exp $ */
 
 class phpweb extends phpdotnet implements PhDTheme {
     protected $streams = array();
     protected $writeit = false;
 
 
+    public function __construct($IDs, $IDMap, $filename, $ext = "php", 
$chunked = true) {
+        parent::__construct($IDs, $IDMap, $filename, $ext, $chunked);
+       if(!file_exists("php") || is_file("php")) mkdir("php") or die("Can't 
create the cache directory");
+    }
     public function writeChunk($id, $stream) {
         rewind($stream);
         file_put_contents($this->ext."/$id.".$this->ext, $this->header($id));
@@ -62,6 +66,9 @@
     public function footer($id) {
         return "<?php manual_footer(); ?>";
     }
+    public function __destruct() {
+        copy("php/manual.php", "php/index.php");
+    }
 }
 
 /*

Reply via email to