summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-06-13 22:03:24 -0400
committerMalf Furious <m@lfurio.us>2017-06-19 23:57:39 -0400
commitd840a3d9b464ac424d210aeffc01cea0a774377b (patch)
tree1e0733f1a94a38c0c9c27b3834ce23f7cc3d3b8a /app
parentfa929cbd64d662126b8734e476bdbbf3562333d4 (diff)
downloadscrott-d840a3d9b464ac424d210aeffc01cea0a774377b.tar.gz
scrott-d840a3d9b464ac424d210aeffc01cea0a774377b.zip
Add issue function getPad()
Diffstat (limited to 'app')
-rw-r--r--app/class/issue.class.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/class/issue.class.php b/app/class/issue.class.php
index c3381a7..b61a6e3 100644
--- a/app/class/issue.class.php
+++ b/app/class/issue.class.php
@@ -84,6 +84,19 @@ class issue extends object
}
/*
+ * Get the pad this issue exists under
+ */
+ public function getPad() : pad
+ {
+ $parent = $this->getParent();
+
+ if ($parent->objtype == "pad")
+ return $parent;
+
+ return $parent->getParent();
+ }
+
+ /*
* Advance this issue in the pipeline, closing it if already in the
* last stage.
*/