Esempio n. 1
0
     break;
 case "commitdiff_plain":
     require_once 'include/display.git_commitdiff_plain.php';
     git_commitdiff_plain($gitphp_conf['projectroot'], $project, $_GET['h'], isset($_GET['hp']) ? $_GET['hp'] : NULL);
     break;
 case "heads":
     require_once 'include/display.git_heads.php';
     git_heads($gitphp_conf['projectroot'], $project);
     break;
 case "tags":
     require_once 'include/display.git_tags.php';
     git_tags($gitphp_conf['projectroot'], $project);
     break;
 case "rss":
     require_once 'include/display.git_rss.php';
     git_rss($gitphp_conf['projectroot'], $project);
     break;
 case "blob":
     require_once 'include/display.git_blob.php';
     git_blob($gitphp_conf['projectroot'], $project, isset($_GET['h']) ? $_GET['h'] : NULL, isset($_GET['f']) ? $_GET['f'] : NULL, isset($_GET['hb']) ? $_GET['hb'] : NULL);
     break;
 case "blob_plain":
     require_once 'include/display.git_blob_plain.php';
     git_blob_plain($gitphp_conf['projectroot'], $project, $_GET['h'], isset($_GET['f']) ? $_GET['f'] : NULL);
     break;
 case "blobdiff":
     require_once 'include/display.git_blobdiff.php';
     git_blobdiff($gitphp_conf['projectroot'], $project, $_GET['h'], $_GET['hb'], $_GET['hp'], isset($_GET['f']) ? $_GET['f'] : NULL);
     break;
 case "blobdiff_plain":
     require_once 'include/display.git_blobdiff_plain.php';
Esempio n. 2
0
function process_site($site_arr)
{
    global $lang;
    $arr = array();
    foreach ($site_arr as $type => $links) {
        foreach ($links as $key => $link) {
            $xml = @simplexml_load_file($link);
            if (!$xml) {
                continue;
            }
            switch ($type) {
                case 'git':
                    $nodes = git_rss($xml, $link, $key);
                    $nodes['empty'] = $lang['nochanges'];
                    $nodes['title'] = sprintf($lang['git_title'], $link, $key);
                    break;
                case 'teambox':
                    $nodes = teambox_rss($xml, $link);
                    $nodes['empty'] = $lang['nonews'];
                    $nodes['title'] = $lang['teambox_title'];
                    break;
                case 'site':
                    $nodes = site_rss($xml, $link);
                    $nodes['empty'] = $lang['nonews'];
                    $nodes['title'] = sprintf($lang['site_title'], $link, $key);
                    break;
                case 'atom':
                    $nodes = git_rss($xml, $link);
                    $nodes['title'] = $lang['atom_title'];
                    break;
            }
            $arr[$type][] = $nodes;
        }
    }
    return $arr;
}