Author: sevein
Date: Wed Aug 22 09:51:41 2012
New Revision: 12162
Log:
Lookup sourceStandard in higher levels if necessary, fixes issue 2176
Modified:
trunk/lib/model/QubitInformationObject.php
Modified: trunk/lib/model/QubitInformationObject.php
==============================================================================
--- trunk/lib/model/QubitInformationObject.php Wed Aug 22 08:24:14 2012
(r12161)
+++ trunk/lib/model/QubitInformationObject.php Wed Aug 22 09:51:41 2012
(r12162)
@@ -155,6 +155,26 @@
return $this->identifier;
+ // It may happen that the sourceStandard column is undefined, in that
case
+ // look up for the value in higher levels
+ case 'sourceStandard':
+
+ foreach ($this->ancestors->andSelf()->orderBy('rgt') as $item)
+ {
+ if (isset($item->sourceStandard))
+ {
+ return call_user_func_array(array($item, 'QubitObject::__get'),
$args);
+ }
+
+ // Stop iteration before the root object is reached
+ if (QubitInformationObject::ROOT_ID == $item->parentId)
+ {
+ break;
+ }
+ }
+
+ break;
+
default:
return call_user_func_array(array($this,
'BaseInformationObject::__get'), $args);
--
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.