Foreign keys, bugfixes and output sanitation

This commit is contained in:
2026-08-28 10:22:05 +02:00
parent 9e35a1c099
commit 6896a00f31
26 changed files with 524 additions and 409 deletions
+7 -1
View File
@@ -130,7 +130,7 @@ echo '<h2>', _('Add Note'), "</h2>\n";
$notetype = gpc_get_enum($_REQUEST, 't', $opt_notetype);
// get task info for reference
// get object info for reference
if ($notetype == 'task') {
$sql = "SELECT taskname FROM task WHERE taskid=?";
$sth = $pdo->prepare($sql);
@@ -143,6 +143,12 @@ if ($notetype == 'task') {
$sth->execute([$id]);
$activities = $sth->fetchColumn();
echo '<h3>', sprintf(_('Maintenance: %s'), $activities), "</h3>\n";
} elseif ($notetype == 'equip') {
$sql = "SELECT ename FROM equipment WHERE eid=?";
$sth = $pdo->prepare($sql);
$sth->execute([$id]);
$ename = $sth->fetchColumn();
echo '<h3>', sprintf(_('Equipment: %s'), $ename), "</h3>\n";
}
?>