git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
issue: closed at bottom, option ?open to exclude
[minimedit.git]
/
issue
/
index.php
diff --git
a/issue/index.php
b/issue/index.php
index 6b1c3dc53b7fe5aad589b91afb27820be36864b8..abd96119bee1e5c02fbb548e062218c0036c0d9c 100644
(file)
--- a/
issue/index.php
+++ b/
issue/index.php
@@
-45,7
+45,12
@@
if ($_POST) {
$_POST = [];
}
$_POST = [];
}
-$query = $Db->query('SELECT * FROM issues ORDER BY updated DESC');
+$sql = 'SELECT * FROM issues';
+if (isset($_GET['open'])) {
+ $sql .= ' WHERE closed IS NULL';
+}
+$sql .= ' ORDER BY closed IS NOT NULL, updated DESC';
+$query = $Db->query($sql);
ob_start();
print '<ul>';
ob_start();
print '<ul>';