diff options
author | Malf Furious <m@lfurio.us> | 2018-11-10 23:21:39 -0500 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-11-10 23:21:39 -0500 |
commit | f3165d28fff6468fca44ff2ec3b6cfb3fb82ee90 (patch) | |
tree | a8edb746f0a21d9e7ad134ba79be8278ecce147e /app/class/pad.class.php | |
parent | 0421aa1b60f4fe6bf140888159c58059c1013588 (diff) | |
parent | 295ba9fce85a959b04db4ac74b4ee378b42e6153 (diff) | |
download | scrott-f3165d28fff6468fca44ff2ec3b6cfb3fb82ee90.tar.gz scrott-f3165d28fff6468fca44ff2ec3b6cfb3fb82ee90.zip |
Merge branch 'rel/v0.2'v0.2
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; + } } ?> |