CVS update: /cowiki/htdocs/setup/class/task/

[email protected] 9 May 2005 20:44:10 -0000
Newsgroups gmane.comp.php.cowiki.cvs
Message-ID <[email protected]>
User: dgorski 
Date: 2005/05/09 13:44:10

Modified:
   cowiki/htdocs/setup/class/task/class.TaskFinish.php

Log:
 Added storeIncludePathSettings()

File Changes:

Directory: /cowiki/htdocs/setup/class/task/
===========================================

File [changed]: class.TaskFinish.php
Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/setup/class/task/class.TaskFinish.php?r1=1.3&r2=1.4
Delta lines:  +26 -3
--------------------
--- class.TaskFinish.php	6 May 2005 02:14:46 -0000	1.3
+++ class.TaskFinish.php	9 May 2005 20:44:07 -0000	1.4
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.TaskFinish.php,v 1.3 2005/05/06 02:14:46 dgorski Exp $
+ * $Id: class.TaskFinish.php,v 1.4 2005/05/09 20:44:07 dgorski Exp $
  *
  * This file is part of coWiki. coWiki is free software under the terms of
  * the GNU General Public License (GPL). Read the LICENSE file. If you did
@@ -17,7 +17,7 @@
  * @author      Daniel T. Gorski, <[email protected]>
  * @copyright   (C) Daniel T. Gorski, {@link http://www.develnet.org}
  * @license     http://www.gnu.org/licenses/gpl.html
- * @version     $Revision: 1.3 $
+ * @version     $Revision: 1.4 $
  *
  */
 
@@ -68,6 +68,7 @@
         // Store the data we gathered to the configuration file
         try {
             $this->storeConfigSettings();
+            $this->storeIncludePathSettings();
             $this->sealInstallation();
 
             $sStr = '<b>Congratulation, the '.COWIKI_FULL_IDENT.'
@@ -198,6 +199,29 @@
 
     // --------------------------------------------------------------------
 
+    private function storeIncludePathSettings() {
+        $sIncName = $this->State->getHtdocsPath() . '/include.path';
+
+        $sDeli = $this->State->isWindows() ? ';' : ':';
+
+        $sContent = $this->State->getHtdocsPath();
+        $sContent .= $sDeli;
+        $sContent .= $this->State->getIncludesPath();
+        $sContent .= $sDeli;
+        $sContent .= $this->State->getMiscPath();
+
+        try {
+            $Out = new FileOutputStream($sIncName);
+            $Out->write($sContent);
+            $Out->close();
+
+        } catch (IOException $ioe) {
+            throw $ioe; // rethrow
+        }
+    }
+
+    // --------------------------------------------------------------------
+
     private function sealInstallation() {
 
         $sSealName = $this->State->getHtdocsPath() . '/install.seal';
@@ -218,7 +242,6 @@
                 'Could not write configuration file '.basename($sSealName)
             );
         }
-
     }
 
 } // of class