🐛 Fix file download issues
Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit is contained in:
@@ -76,10 +76,10 @@
|
||||
return $result;
|
||||
}
|
||||
|
||||
function get_single_file($db, $file) {
|
||||
function get_single_file($db, $fileid) {
|
||||
$stmt = "SELECT * FROM ticket_uploads WHERE id=:fileid";
|
||||
$sql = $db->prepare($stmt);
|
||||
$sql->bindParam(':fileid', $file['id']);
|
||||
$sql->bindParam(':fileid', $fileid);
|
||||
$sql->execute();
|
||||
$sql->setFetchMode(PDO::FETCH_ASSOC);
|
||||
$result = $sql->fetchAll();
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
<span style="display: inline;"><b><?php echo(get_user_name($db, $file['user'])); ?></b></span><span class="text-muted"><i> <?php echo(" " . $file['created']); ?></i></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<a target="_blank" href="<?php echo('/actions/download?file=' . $file['id']); ?>"><span><?php echo($file['path']); ?></span></a>
|
||||
<a target="_blank" href="<?php echo('/actions/download?file=' . $file['id']); ?>"><span><?php echo($file['filename']); ?></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user