CVS update: /cowiki/includes/cowiki/class/dao/

[email protected] 12 May 2005 18:42:01 -0000
Newsgroups gmane.comp.php.cowiki.cvs
Message-ID <[email protected]>
User: dgorski 
Date: 2005/05/12 11:42:01

Modified:
   cowiki/includes/cowiki/class/dao/class.StorageFactory.php

Log:
 Do not store connections in a pool for re-retrieval, its a clutter

File Changes:

Directory: /cowiki/includes/cowiki/class/dao/
=============================================

File [changed]: class.StorageFactory.php
Url: http://cowiki.tigris.org/source/browse/cowiki/includes/cowiki/class/dao/class.StorageFactory.php?r1=1.21&r2=1.22
Delta lines:  +3 -21
--------------------
--- class.StorageFactory.php	12 May 2005 17:03:55 -0000	1.21
+++ class.StorageFactory.php	12 May 2005 18:41:59 -0000	1.22
@@ -2,7 +2,7 @@
 
 /**
  *
- * $Id: class.StorageFactory.php,v 1.21 2005/05/12 17:03:55 dgorski Exp $
+ * $Id: class.StorageFactory.php,v 1.22 2005/05/12 18:41:59 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.21 $
+ * @version     $Revision: 1.22 $
  *
  */
 
@@ -36,8 +36,7 @@
 class StorageFactory extends Object {
 
     protected static
-        $Instance = null,
-        $aPool    = null;
+        $Instance = null;
 
     // --------------------------------------------------------------------
 
@@ -95,11 +94,6 @@
      * @throws  StorageException
      */
     public function createDocumentStorage($sResource) {
-        // Do we already have a handle?
-        if (isset($this->aPool[$sResource])) {
-            return $this->aPool[$sResource];
-        }
-
         $UriInfo = new UriInfo($sResource);
 
         // This method does not select (use) the database ...
@@ -108,9 +102,6 @@
         // ... we need to 'use database' here
         $Storage->useDatabase($UriInfo->get('basepath'));
 
-        // Remember for future re-retrieval
-        $this->aPool[$sResource] = $Storage;
-
         return $Storage;
     }
 
@@ -134,12 +125,6 @@
      * @throws  StorageException
      */
     public function createUserStorage($sResource) {
-
-        // Do we already have a handle?
-        if (isset($this->aPool[$sResource])) {
-            return $this->aPool[$sResource];
-        }
-
         $UriInfo = new UriInfo($sResource);
 
         // This method does not select (use) the database ...
@@ -147,9 +132,6 @@
 
         // ... we need to 'use database' here
         $Storage->useDatabase($UriInfo->get('basepath'));
-
-        // Remember for future re-retrieval
-        $this->aPool[$sResource] = $Storage;
 
         return $Storage;
     }