From 13a4424ab8b1e162d35b666f44832f788ff03ce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Thu, 7 Dec 2017 18:49:38 +0100 Subject: [PATCH] repo.php: select repo to list --- repo.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/repo.php b/repo.php index 570b8106..d970f916 100644 --- a/repo.php +++ b/repo.php @@ -5,8 +5,24 @@ array( + 'path' => $config['categoriesDir'], + ), + ); +} + +if (isset($_REQUEST['repo'])) { + $repo = $_REQUEST['repo']; +} + +if (!array_key_exists($repo, $repositories)) { + Header("HTTP/1.1 404 Repository not found"); + exit(0); +} + +$path = $repositories[$repo]['path']; function newestTimestamp ($path) { $ts = 0;