diff options
author | Malf Furious <m@lfurio.us> | 2018-11-05 04:58:23 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-11-05 04:58:23 -0500 |
commit | 0e3e65d1ba0ecbc4f819fed3eb9c03e212e400c1 (patch) | |
tree | e932b4f82d86aaf7135fef8d3f42941e615fbfc4 /app/class/pad.class.php | |
parent | fead9f76a6f620642e0051d0065e689580af7d90 (diff) | |
parent | daa4f7a34e23d18e23d34d4becca752635b2ea38 (diff) | |
download | scrott-0e3e65d1ba0ecbc4f819fed3eb9c03e212e400c1.tar.gz scrott-0e3e65d1ba0ecbc4f819fed3eb9c03e212e400c1.zip |
Merge branch 'feature/view-closed-issues' into dev
Diffstat (limited to 'app/class/pad.class.php')
-rw-r--r-- | app/class/pad.class.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/class/pad.class.php b/app/class/pad.class.php index dcf2b32..0c69385 100644 --- a/app/class/pad.class.php +++ b/app/class/pad.class.php @@ -108,6 +108,24 @@ class pad extends obj $stage->saveObj(); $this->saveObj(); } + + /* + * Get an array of all closed issues under this pad. Ordered by + * datetime closed. + */ + public function getClosedIssues_ordByClosed() : array + { + $query = "SELECT o.guid FROM objects o JOIN issues i ON o.guid = i.guid " . + "WHERE o.parent = '" . database::esc($this->guid) . "' ORDER BY i.closed DESC"; + $res = database::query($query); + + $issues = array(); + + foreach ($res as $i) + $issues[] = new issue($i['guid']); + + return $issues; + } } ?> |