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: database insert method to keep array values
[minimedit.git]
/
widget
/
reply.php
diff --git
a/widget/reply.php
b/widget/reply.php
index 6fc1fa569e88354becdac1d1093ce703518509d2..abb364cc1354876b078a0c0a698fc91647b098df 100644
(file)
--- a/
widget/reply.php
+++ b/
widget/reply.php
@@
-1,5
+1,5
@@
<?php
<?php
-global $User;
+global $User
, $Db
;
require_once 'database.inc.php';
print '<h3>Reacties</h3>'."\n";
require_once 'database.inc.php';
print '<h3>Reacties</h3>'."\n";
@@
-16,10
+16,16
@@
if ($_POST) {
if (!$query->rowCount()) {
throw new Exception('Fout bij opslaan');
}
if (!$query->rowCount()) {
throw new Exception('Fout bij opslaan');
}
+ if (@list ($cat, $issue) = explode('/', $Page) and ctype_digit($issue)) {
+ $Db->query(
+ 'UPDATE issues SET updated = now() WHERE page = ? AND id = ?',
+ [$cat, $issue]
+ );
+ }
$_POST['reply'] = NULL;
}
catch (Exception $e) {
$_POST['reply'] = NULL;
}
catch (Exception $e) {
- print
'<p class=warn>Antwoord niet opgeslagen.</p>'."
\n\n";
+ print
"<p class=warn>Antwoord niet opgeslagen: {$e->getMessage()}.</p>
\n\n";
}
}
}
}