You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

32 lines
619 B

<?php
function getRepositories () {
global $repositories;
$result = array();
if (isset($repositories)) {
$result = $repositories;
}
else {
$result = array(
'default' => array(
'path' => $config['categoriesDir'],
),
);
}
call_hooks("get-repositories", $result);
return $result;
}
function getRepo ($repoId, $repoData) {
switch (array_key_exists('type', $repoData) ? $repoData['type'] : 'dir') {
case 'git':
$repo = new RepositoryGit($repoId, $repoData);
break;
default:
$repo = new RepositoryDir($repoId, $repoData);
}
return $repo;
}