summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-04-07 21:01:47 -0400
committerMalf Furious <m@lfurio.us>2017-04-07 21:01:47 -0400
commit681861d9a85b9defc561d46af3f07b86efcaafdc (patch)
tree84ed86c73cf9a677b696b84c48982901f4a7778a /app
parent9668df9d17f343bf8a130bd8b50a977485a926c8 (diff)
downloadscrott-681861d9a85b9defc561d46af3f07b86efcaafdc.tar.gz
scrott-681861d9a85b9defc561d46af3f07b86efcaafdc.zip
Update function getParent()
Now returns the correct type of object based on the original object's parent.
Diffstat (limited to '')
-rw-r--r--app/class/object.class.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/class/object.class.php b/app/class/object.class.php
index 1fbe923..dc988ae 100644
--- a/app/class/object.class.php
+++ b/app/class/object.class.php
@@ -91,7 +91,8 @@ class object extends table
if (!isset($this->parent) || $this->parent == "")
return NULL;
- return new object($this->parent);
+ $parent = new object($this->parent);
+ return new $parent->objtype($parent->guid);
}
/*