Author: sevein
Date: Sat Jul 23 01:27:32 2011
New Revision: 9370
Log:
Small hack to make sure that the right objet is saved before the QubitRelation
is inserted
Modified:
trunk/apps/qubit/modules/right/actions/editComponent.class.php
Modified: trunk/apps/qubit/modules/right/actions/editComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/right/actions/editComponent.class.php Sat Jul
23 01:26:01 2011 (r9369)
+++ trunk/apps/qubit/modules/right/actions/editComponent.class.php Sat Jul
23 01:27:32 2011 (r9370)
@@ -121,11 +121,7 @@
}
else
{
- $this->relation = new QubitRelation;
- $this->relation->subject = $this->right = new QubitRights;
- $this->relation->typeId = QubitTerm::RIGHT_ID;
-
- $this->resource->relationsRelatedByobjectId[] = $this->relation;
+ $this->right = new QubitRights;
}
foreach ($this->form as $field)
@@ -135,6 +131,17 @@
$this->processField($field);
}
}
+
+ $this->right->save();
+
+ if (!isset($item['id']))
+ {
+ $this->relation = new QubitRelation;
+ $this->relation->object = $this->right;
+ $this->relation->typeId = QubitTerm::RIGHT_ID;
+
+ $this->resource->relationsRelatedBysubjectId[] = $this->relation;
+ }
}
}
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.