4 require_once("config.php");
7 $WEB_ROOT_FS = realpath(dirname(__FILE__));
8 $BASE_URL = dirname($_SERVER["PHP_SELF"]);
10 global $WEB_ROOT_FS, $BASE_URL, $repo_base, $data_directory, $db_type, $db_name, $db_username, $db_password;
12 // the index will search for the base library depending on:
13 // if lib_base is set in config.php, it'll go there and nowhere else
14 // if lib_base is not set, it'll look for ../gwvplib, /usr/share/php/gwbplib and /usr/share/gwvp/gwvplib
15 if(isset($lib_base)) {
16 if(file_exists($lib_base."/gwvplib.php")) {
17 $path = realpath($lib_base);
18 set_include_path(get_include_path().PATH_SEPARATOR.$path);
20 echo "Problem: lib_base is set in the config.php file, but I cant find the actual library<br>";
21 echo "I have to bail";
25 if(file_exists("../gwvplib/gwvplib.php")) {
26 $path = realpath("../gwvplib/");
27 set_include_path(get_include_path().PATH_SEPARATOR.$path);
28 } else if(file_exists("/usr/share/php/gwvplib/gwvplib.php")) {
29 $path = realpath("/usr/share/php/gwvplib/");
30 set_include_path(get_include_path().PATH_SEPARATOR.$path);
31 } else if(file_exists("/usr/share/gwvp/gwvplib/gwvplib.php")) {
32 $path = realpath("/usr/share/gwvp/gwvplib/");
33 set_include_path(get_include_path().PATH_SEPARATOR.$path);
35 echo "Problem: lib_base is set in the config.php file, but I cant find the actual library<br>";
36 echo "I have to bail";
41 require_once("gwvplib.php");
43 /* first determine the url, it will be something that does either or the following:
46 * 1. admin functions (create/delete repo)
47 * 2. user functions (patch pushes, pull requests)
48 * 3. gitweb functions (to display git web output)
49 * 4. git-http-backend functions (to interact with command line functions)
57 if(function_exists("gwvp_DebugEnabled")) {