Sfoglia il codice sorgente

Fixed app prefix adding leading /

tags/v1.1
Teknikode 5 anni fa
parent
commit
88f3a6dbce
3 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 1
    1
      git/index.php
  2. 1
    1
      git/src/GitList/Application.php
  3. 1
    1
      git/views/tree.twig

+ 1
- 1
git/index.php Vedi File

@@ -45,7 +45,7 @@ if ($_GET['user'])
$_SERVER['HTTP_X_ORIGINAL_URL'] = str_replace("/u/".$_GET['user'], "", $_SERVER['HTTP_X_ORIGINAL_URL']);
$config->set('git', 'repositories', array('G:\\Repositories\\u\\'.$_GET['user']));
$config->set('git', 'hidden', array(''));
$config->set('app', 'path_prefix', 'u/'.$_GET['user']);
$config->set('app', 'path_prefix', '/u/'.$_GET['user']);
$config->set('app', 'clone_url', 'ssh://git@teknik.io:u/'.$_GET['user'].'/');
$app = require 'boot.php';
$app->run();

+ 1
- 1
git/src/GitList/Application.php Vedi File

@@ -32,7 +32,7 @@ class Application extends SilexApplication
$this['debug'] = $config->get('app', 'debug');
$this['filetypes'] = $config->getSection('filetypes');
$this['cache.archives'] = $this->getCachePath() . 'archives';
$this['path_prefix'] = '/'.$config->get('app', 'path_prefix');
$this['path_prefix'] = $config->get('app', 'path_prefix');
$this['clone_url'] = $config->get('app', 'clone_url');

// Register services

+ 1
- 1
git/views/tree.twig Vedi File

@@ -7,7 +7,7 @@
{% block extra %}
<div class="pull-right">
<div class="btn-group download-buttons">
<a href="{{ app.clone_url }}{{ repo }}" class="btn btn-default btn-xs" title="Clone '{{ repo }}'"><span class="fa fa-cloud-download"></span> Clone</a>
<a href="{{ app.clone_url }}{{ repo }}" class="btn btn-default btn-xs" title="Clone {{ repo }}"><span class="fa fa-cloud-download"></span> Clone</a>
<a href="{{ app.path_prefix }}{{ path('archive', {repo: repo, branch: branch, format: 'zip'}) }}" class="btn btn-default btn-xs" title="Download '{{ branch }}' as a ZIP archive">ZIP</a>
<a href="{{ app.path_prefix }}{{ path('archive', {repo: repo, branch: branch, format: 'tar'}) }}" class="btn btn-default btn-xs" title="Download '{{ branch }}' as a TAR archive">TAR</a>
</div>

Loading…
Annulla
Salva