Permalink
Browse files

Small bugfixes to work with sqlite

  • Loading branch information...
1 parent 8e184ee commit 7bcfe6413183b37a6b8099473bf04706c1be0f2a @lorenzo committed Oct 29, 2009
Showing with 3 additions and 3 deletions.
  1. +2 −2 models/workflow_workflow.php
  2. +1 −1 tests/fixtures/workflow_execution_state_fixture.php
@@ -40,7 +40,7 @@ function save(ezcWorkflow $workflow) {
foreach ($nodes as $node) {
$data['Node'] = array(
'class' => get_class($node),
- 'configuration' => serialize($node->getConfiguration()),
+ 'configuration' => addslashes(serialize($node->getConfiguration())),
'workflow_id' => $this->id
);
$this->Node->create();
@@ -104,7 +104,7 @@ public function load($id) {
$mappedNodes = array();
foreach ($workflow['Node'] as $i => $node) {
- $configuration = unserialize($node['configuration']);
+ $configuration = unserialize(stripslashes($node['configuration']));
if (is_null($configuration)) {
$configuration = ezcWorkflowUtil::getDefaultConfiguration($node['class']);
@@ -8,7 +8,7 @@ class WorkflowExecutionStateFixture extends CakeTestFixture {
'execution_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false),
'state' => array('type'=>'string', 'type' => 'string'),
'activated_from' => array('type'=>'string', 'type' => 'string'),
- 'thread_id' => array('type'=>'integer', 'type' => 'integer', 'null' => false),
+ 'thread_id' => array('type'=>'integer', 'type' => 'integer', 'null' => true, 'default' => NULL),
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1))
);
}

0 comments on commit 7bcfe64

Please sign in to comment.