$this->projects = array();
if(GitConfig::PROJECT_LIST) {
foreach(file(GitConfig::PROJECT_LIST) as $entry) {
- $entry = explode(" ", $entry);
+ $entry = explode(" ", str_replace(array("\r", "\n"), array("", ""), $entry));
if($load_details) {
//check if project really exists
} else
$project['name'] = $entry[0];
- $project['owner'] = $entry[1];
+ if(count($entry) > 1)
+ $project['owner'] = $entry[1];
$this->projects[] = $project;
}
} else {
if(strtolower($p['name']) == strtolower($name)) {
$found = true;
$project['name'] = $p['name'];
- $project['owner'] = $p['owner'];
+ if(isset($p['owner']))
+ $project['owner'] = $p['owner'];
break;
}
}