Author: david
Date: 2008-11-11 14:01:00 -0800 (Tue, 11 Nov 2008)
New Revision: 1572
Modified:
trunk/qubit/lib/model/QubitInformationObject.php
Log:
Fix QubitInformationObject::addProperty() method - was referencing non-existent
QubitProperty::addProperty() method.
Modified: trunk/qubit/lib/model/QubitInformationObject.php
===================================================================
--- trunk/qubit/lib/model/QubitInformationObject.php 2008-11-11 21:59:19 UTC
(rev 1571)
+++ trunk/qubit/lib/model/QubitInformationObject.php 2008-11-11 22:01:00 UTC
(rev 1572)
@@ -417,8 +417,22 @@
*/
public function addProperty($name, $value, $options = array())
{
- $property = QubitProperty::addProperty($this->getId(), $name, $value,
$options);
+ // Only add if an existing property does not exist
+ if (!QubitProperty::isExistent($this->getId(), $name, $value, $options))
+ {
+ $property = new QubitProperty;
+ $property->setObjectId($this->getId());
+ $property->setName($name);
+ $property->setValue($value, $options);
+ if (isset($options['scope']))
+ {
+ $property->setScope($options['scope']);
+ }
+
+ $property->save();
+ }
+
return $this;
}
--~--~---------~--~----~------------~-------~--~----~
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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---