function viewcvs_execute($repos_name, $repos_type) {
$request_uri = getStringFromServer('REQUEST_URI');
$query_string = getStringFromServer('QUERY_STRING');
- $viewcvs_path = forge_get_config('url_root').'/scm/viewvc';
// this is very important ...
$path = getStringFromServer('PATH_INFO');
'REPOSITORY_TYPE="'.$repos_type.'" '.
'REPOSITORY_NAME="'.make_arg_cmd_safe($repos_name).'" '.
'HTTP_HOST="'.make_arg_cmd_safe(getStringFromServer('HTTP_HOST')).'" '.
- 'DOCROOT="/themes/'.forge_get_config('default_theme').'/viewvc" '.
- $viewcvs_path.'/bin/cgi/viewvc.cgi 2>&1';
+ 'DOCROOT="/scm/viewvc/docroot" '.
+ dirname(__FILE__).'/../viewvc/viewvc.cgi 2>&1';
ob_start();
passthru($command);