0) { system_failure('Interner Fehler!'); // FIXME: Hier sollte auf jeden Fall ein Logging angeworfen werden! } } function refresh_gitolite() { check_env(); git_wrapper('pull'); } function read_config() { global $gitolite_conf; $customerno = (int) $_SESSION['customerinfo']['customerno']; $groups = array(); $data = parse_ini_file($gitolite_conf, TRUE); DEBUG($data); } function list_repos() { global $config_file, $config_dir; $username = $_SESSION['userinfo']['username']; $userconfig = $config_dir . '/' . $username . '.conf'; DEBUG("using config file ".$userconfig); if (! is_file($userconfig)) { DEBUG("user-config does not exist"); return array(); } $repos = array(); $lines = file($userconfig); $current_repo = NULL; foreach ($lines as $line) { $m = array(); if (preg_match('_^[ \t]*repo ([^]]+)_', $line, $m) != 0) { DEBUG("found repo ".$m[1]); $repos[] = $m[1]; } } DEBUG($repos); return $repos; } function add_key($pubkey, $handle) { }