X-Git-Url: http://git.shiar.nl/minimedit.git/blobdiff_plain/3e188c002a26457a93ec3844bc6c7db3b0b23b10..5adffaba1226d6a75a1937e1ef836f34c991f7fd:/issue/index.php diff --git a/issue/index.php b/issue/index.php index abd9611..835f1f0 100644 --- a/issue/index.php +++ b/issue/index.php @@ -6,23 +6,23 @@ require_once 'database.inc.php'; if ($id) { $Article->title = "Issue #$id"; - $row = $Db->query( + $Issue = $Db->query( 'SELECT * FROM issues WHERE id = ?', [$id] )->fetch(); - if (!$row) throw new Exception('Issuenummer niet gevonden'); + if (!$Issue) throw new Exception('Issuenummer niet gevonden'); - $Article->title .= ': '.htmlspecialchars($row->subject); + $Article->title .= ': '.htmlspecialchars($Issue->subject); print "

{$Article->title}

\n"; - print $row->body; + print $Issue->body; printf('

%s%s %s

'."\n", 'Geplaatst', - $row->author ? " door {$row->author}" : '', - showdate(preg_split('/\D/', $row->created)) + $Issue->author ? " door {$Issue->author}" : '', + showdate(preg_split('/\D/', $Issue->created)) ); - if ($row->closed) { + if ($Issue->closed) { printf('

%s%s %s

'."\n", 'Opgelost', '', - showdate(preg_split('/\D/', $row->closed)) + showdate(preg_split('/\D/', $Issue->closed)) ); } $Args = "/$id"; # minimal reference @@ -33,7 +33,7 @@ if ($id) { if ($_POST) { $html = nl2br(htmlspecialchars($_POST['body'])); $html = empty($html) ? NULL : "

$html

"; - $query = $Db->insert('issues', [ + $query = $Db->set('issues', [ 'page' => $Page, 'subject' => $_POST['subject'], 'body' => $html,