🐛 Fix file download issues
Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit is contained in:
@@ -76,10 +76,10 @@
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_single_file($db, $file) {
|
function get_single_file($db, $fileid) {
|
||||||
$stmt = "SELECT * FROM ticket_uploads WHERE id=:fileid";
|
$stmt = "SELECT * FROM ticket_uploads WHERE id=:fileid";
|
||||||
$sql = $db->prepare($stmt);
|
$sql = $db->prepare($stmt);
|
||||||
$sql->bindParam(':fileid', $file['id']);
|
$sql->bindParam(':fileid', $fileid);
|
||||||
$sql->execute();
|
$sql->execute();
|
||||||
$sql->setFetchMode(PDO::FETCH_ASSOC);
|
$sql->setFetchMode(PDO::FETCH_ASSOC);
|
||||||
$result = $sql->fetchAll();
|
$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>
|
<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>
|
||||||
<div class="row">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user