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

[email protected] 6 May 2005 02:10:49 -0000
Newsgroups gmane.comp.php.cowiki.cvs
Message-ID <[email protected]>
User: dgorski 
Date: 2005/05/05 19:10:49

Modified:
   cowiki/htdocs/setup/class/task/class.AbstractTask.php
   cowiki/htdocs/setup/class/task/class.StateHolder.php

Log:
 Code relocation

File Changes:

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

File [changed]: class.AbstractTask.php
Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/setup/class/task/class.AbstractTask.php?r1=1.4&r2=1.5
Delta lines:  +2 -42
--------------------
--- class.AbstractTask.php	3 May 2005 01:19:31 -0000	1.4
+++ class.AbstractTask.php	6 May 2005 02:10:47 -0000	1.5
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.AbstractTask.php,v 1.4 2005/05/03 01:19:31 dgorski Exp $
+ * $Id: class.AbstractTask.php,v 1.5 2005/05/06 02:10:47 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.4 $
+ * @version     $Revision: 1.5 $
  *
  */
 
@@ -273,46 +273,6 @@
         }
 
         return new Config($this->State->getIncludesPath() . $sConf);
-    }
-
-    // --------------------------------------------------------------------
-
-    // Assemble DSN path
-    private function assembleDSN($sScheme, $sUser, $sPass, $sHost,
-                                 $sPort, $sDatabase) {
-        
-        $sStr = $sScheme . '://' . $sUser . ':' . $sPass;
-        $sStr .= '@' . $sHost;
-        if (trim($sPort) != '') { $sStr .= ':' . $sPort; }
-        $sStr .=  '/' . $sDatabase;
-
-        return $sStr;
-    }
-
-    // --------------------------------------------------------------------
-
-    protected function getDocumentStorageDSN() {
-        return $this->assembleDSN(
-            $this->State->getDocStorageScheme(),
-            $this->State->getDocStorageConnectorUser(),
-            $this->State->getDocStorageConnectorPassword(),
-            $this->State->getDocHost(),
-            $this->State->getDocHostPort(),
-            $this->State->getDocDatabaseName()
-        );
-    }
-
-    // --------------------------------------------------------------------
-
-    protected function getDocumentStorageRootDSN() {
-        return $this->assembleDSN(
-            $this->State->getDocStorageScheme(),
-            $this->State->getDocStorageAdminUser(),
-            $this->State->getDocStorageAdminPassword(),
-            $this->State->getDocHost(),
-            $this->State->getDocHostPort(),
-            $this->State->getDocDatabaseName()
-        );
     }
 
     // --------------------------------------------------------------------

File [changed]: class.StateHolder.php
Url: http://cowiki.tigris.org/source/browse/cowiki/htdocs/setup/class/task/class.StateHolder.php?r1=1.3&r2=1.4
Delta lines:  +42 -2
--------------------
--- class.StateHolder.php	29 Apr 2005 00:44:15 -0000	1.3
+++ class.StateHolder.php	6 May 2005 02:10:47 -0000	1.4
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.StateHolder.php,v 1.3 2005/04/29 00:44:15 dgorski Exp $
+ * $Id: class.StateHolder.php,v 1.4 2005/05/06 02:10:47 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 $
  *
  */
 
@@ -136,6 +136,46 @@
             $this->setIsInitialSetup(true);
             return; // leave constructor
         }
+    }
+
+    // --------------------------------------------------------------------
+
+    // Assemble DSN path
+    public function assembleDSN($sScheme, $sUser, $sPass, $sHost,
+                                $sPort, $sDatabase) {
+        
+        $sStr = $sScheme . '://' . $sUser . ':' . $sPass;
+        $sStr .= '@' . $sHost;
+        if (trim($sPort) != '') { $sStr .= ':' . $sPort; }
+        $sStr .=  '/' . $sDatabase;
+
+        return $sStr;
+    }
+
+    // --------------------------------------------------------------------
+
+    public function getDocumentStorageDSN() {
+        return $this->assembleDSN(
+            $this->getDocStorageScheme(),
+            $this->getDocStorageConnectorUser(),
+            $this->getDocStorageConnectorPassword(),
+            $this->getDocHost(),
+            $this->getDocHostPort(),
+            $this->getDocDatabaseName()
+        );
+    }
+
+    // --------------------------------------------------------------------
+
+    public function getDocumentStorageRootDSN() {
+        return $this->assembleDSN(
+            $this->getDocStorageScheme(),
+            $this->getDocStorageAdminUser(),
+            $this->getDocStorageAdminPassword(),
+            $this->getDocHost(),
+            $this->getDocHostPort(),
+            $this->getDocDatabaseName()
+        );
     }
 
     // --------------------------------------------------------------------