From e897b37e67cf4d5a17c92a3a08db0d277b94a150 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Thu, 29 Dec 2016 21:37:06 +0100 Subject: [PATCH 1/2] Minimal setup for local devlelopment, PHP changes having immediate effect but js requiring script build --- docker-compose.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..76167457 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +# For development at http://svn/, assuming local scripts build and libs install +# Create repo: docker-compose exec svn repocreate test -o daemon +# Install libs: http://svn/repos-web/lib/smarty/install.php +version: '2.1' +services: + svn: + image: solsson/rweb-httpd@sha256:f69fc496a781e6cdcd8156e6a2c14b33377ef6b2b8538cdc6b570e47cb89adc8 + expose: + - "80" + ports: + - "80:80" + environment: + ADMIN_REST_ACCESS: "true" + AUTHN: "anon" + volumes: + - .:/opt/rweb + rweb: + image: solsson/rweb@sha256:4531be10995942642442a4efa73762dd9e11828a8457a98c2a15f673fbfa93d4 + expose: + - "9000" + links: + - svn:svn + volumes: + - .:/opt/rweb From 395317b94d115a964b8da43b1fd88b180baf8657 Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Thu, 29 Dec 2016 21:38:02 +0100 Subject: [PATCH 2/2] Fixes links from details to Add file, Edit properties etc when trailing slash is missing --- repos-web/open/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos-web/open/index.php b/repos-web/open/index.php index b9622e0f..c8056d1c 100644 --- a/repos-web/open/index.php +++ b/repos-web/open/index.php @@ -25,12 +25,12 @@ $file = new SvnOpenFile($target, $rev); // identify folders, even without trailing slash, for example when coming from history $isFoler = $file->isFolder(); +// for old revisions SvnOpenFile detects folder even if trailing slash is missing +if (!strEnds($target, '/')) $target .= '/'; // support redirect directly to real resorce (for services that don't know repository root but have target and base) if (isset($_GET['redirect']) && $_GET['redirect']) { if ($rev) { - // for old revisions SvnOpenFile detects folder even if trailing slash is missing - if (!strEnds($target, '/')) $target .= '/'; // does not use getRepository so "base" must be added manually $b = isset($_REQUEST['base']) ? '&base='.$_REQUEST['base'] : ''; header('Location: '.getWebapp().'open/list/?target='.rawurlencode($target).$b.'&rev='.$rev); @@ -49,7 +49,7 @@ $p = Presentation::getInstance(); $p->assign_by_ref('file', $file); // for links to other operations we use the original parameters -$p->assign('target', getTarget()); +$p->assign('target', $target); if ($fromrev) $p->assign('fromrev', $fromrev); // display a short log for the file on the edit page if (!isset($_REQUEST['history']) || $_REQUEST['history'] != 'false') {