Browse Source

Modified hard coded repo dir to use Config value

pull/24/head
Teknikode 5 years ago
parent
commit
13fbd920c8
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      git/index.php

+ 2
- 2
git/index.php View File

@@ -37,10 +37,10 @@ if ($_GET['user'])
{
if ($userTools->checkUsernameExists($_GET['user']))
{
if (is_dir("G:\\Repositories\\u\\".$_GET['user']) && !is_dir_empty("G:\\Repositories\\u\\".$_GET['user']))
if (is_dir($CONF['git_repo_path'][0]."\\u\\".$_GET['user']) && !is_dir_empty($CONF['git_repo_path'][0]."\\u\\".$_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', 'repositories', array($CONF['git_repo_path'][0].'\\u\\'.$_GET['user']));
$config->set('git', 'hidden', array(''));
$config->set('app', 'path_prefix', '/u/'.$_GET['user']);
$config->set('app', 'clone_url', 'git://teknik.io/u/'.$_GET['user'].'/');

Loading…
Cancel
Save