From 3cea6cad9e2602a626c5b386eeae0740dbe38f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Tue, 4 Dec 2018 09:15:08 +0100 Subject: [PATCH] Repository: change repo/branch seperator to '~' --- repo.php | 2 +- src/addCategories.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repo.php b/repo.php index bcbe0be4..9dc044d4 100644 --- a/repo.php +++ b/repo.php @@ -34,7 +34,7 @@ if (!isset($_REQUEST['repo'])) { } $repoId = $_REQUEST['repo']; -list($repoId, $branchId) = explode('/', $repoId); +list($repoId, $branchId) = explode('~', $repoId); if (!array_key_exists($repoId, $allRepositories)) { Header("HTTP/1.1 404 Repository not found"); diff --git a/src/addCategories.js b/src/addCategories.js index 06c083bf..ec03eab5 100644 --- a/src/addCategories.js +++ b/src/addCategories.js @@ -12,7 +12,7 @@ function addCategoriesShow (repo) { let branchId if (repo) { - [ repoId, branchId ] = repo.split(/\//) + [ repoId, branchId ] = repo.split(/~/) } if (!content) { @@ -91,7 +91,7 @@ function addCategoriesShow (repo) { branchSelector.onchange = () => { let branch = branchSelector.value - addCategoriesShow(repoId + '/' + branch) + addCategoriesShow(repoId + '~' + branch) } Object.keys(repoData.branches).forEach(