Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Adds file name to URL

AuthorDave Jarvis <email>
Date2026-02-14 14:16:33 GMT-0800
Commit544e3d70f4a9680235ecceb0a9a18e2f1d075ffb
Parentb80a728
pages/FilePage.php
private function renderDownloadState($hash, $reason) {
- $url = '?action=raw&hash=' . $hash . '&repo=' . urlencode($this->currentRepo['safe_name']);
+ $filename = $_GET['name'] ?? '';
+ $url = '?action=raw&hash=' . $hash . '&repo=' . urlencode($this->currentRepo['safe_name']) . '&name=' . urlencode($filename);
echo '<div class="empty-state download-state">';
Delta2 lines added, 1 line removed, 1-line increase