Author: sb
Date: Sun Jan 20 09:43:56 2008
New Revision: 7192

Log:
- Only construct one ezcWorkflowDatabaseDefinitionStorage object.

Modified:
    trunk/WorkflowDatabaseTiein/ChangeLog
    trunk/WorkflowDatabaseTiein/src/execution.php

Modified: trunk/WorkflowDatabaseTiein/ChangeLog
==============================================================================
--- trunk/WorkflowDatabaseTiein/ChangeLog [iso-8859-1] (original)
+++ trunk/WorkflowDatabaseTiein/ChangeLog [iso-8859-1] Sun Jan 20 09:43:56 2008
@@ -1,3 +1,6 @@
+- Fixed issue #12403: Multiple construction of
+  ezcWorkflowDatabaseDefinitionStorage.
+
 1.1 - Monday 17 December 2007
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 

Modified: trunk/WorkflowDatabaseTiein/src/execution.php
==============================================================================
--- trunk/WorkflowDatabaseTiein/src/execution.php [iso-8859-1] (original)
+++ trunk/WorkflowDatabaseTiein/src/execution.php [iso-8859-1] Sun Jan 20 
09:43:56 2008
@@ -43,13 +43,12 @@
     public function __construct ( ezcDbHandler $db, $executionId = null )
     {
         $this->db = $db;
+        $this->properties['definitionStorage'] = new 
ezcWorkflowDatabaseDefinitionStorage( $db );
 
         if ( is_int( $executionId ) )
         {
             $this->loadExecution( $executionId );
         }
-
-        $this->properties['definitionStorage'] = new 
ezcWorkflowDatabaseDefinitionStorage( $db );
     }
 
     /**
@@ -203,10 +202,8 @@
         $this->variables = ezcWorkflowDatabaseUtil::unserialize( 
$result[0]['execution_variables'] );
         $this->waitingFor = ezcWorkflowDatabaseUtil::unserialize( 
$result[0]['execution_waiting_for'] );
 
-        $definition = new ezcWorkflowDatabaseDefinitionStorage( $this->db );
-
         $workflowId     = $result[0]['workflow_id'];
-        $this->workflow = $definition->loadById( $workflowId );
+        $this->workflow = $this->properties['definitionStorage']->loadById( 
$workflowId );
 
         $query = $this->db->createSelectQuery();
 


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to