Foreign keys, bugfixes and output sanitation
This commit is contained in:
+7
-1
@@ -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";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user