aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/index.php b/index.php
index f63f3af..02ad53a 100644
--- a/index.php
+++ b/index.php
@@ -39,11 +39,11 @@ foreach ($bugs_r as $row) {
<?php
if(session_set()) {
- echo "<p><a href='{$config['urls']['base']}/reports/edit.php'>Create</a></p>\n";
+ echo "<p><a href='{$config['urls']['base']}/report/edit.php'>Create</a></p>\n";
}
# reports query
-$reports_q = 'SELECT title, description, author FROM reports WHERE bug IS NULL';
+$reports_q = 'SELECT reports.id AS id, title, description, users.username AS user FROM reports JOIN users ON reports.author=users.id WHERE bug IS NULL ORDER BY id';
$reports_r = $conn->query($reports_q);
if($reports_r->rowCount() > 0) {
@@ -53,7 +53,7 @@ if($reports_r->rowCount() > 0) {
<tr><th>Title</th><th>Description</th><th>Submitted by</th></tr>
<?php
foreach ($reports_r as $row) {
- echo "<tr><td><a href=view.php?id=$row[id]>$row[title]</a></td> <td>" . truncate($row['description']) . "</td> <td>$row[submitter]</td></tr>\n";
+ echo "<tr><td><a href=report/view.php?id=$row[id]>$row[title]</a></td> <td>" . truncate($row['description']) . "</td> <td>$row[user]</td></tr>\n";
}
?>
</table>