Example #1
0
File: cmd.c Project: p00ya/cgit
static void about_fn(struct cgit_context *ctx)
{
	if (ctx->repo)
		cgit_print_repo_readme(ctx->qry.path);
	else
		cgit_print_site_readme();
}
Example #2
0
static void about_fn(void)
{
	if (ctx.repo) {
		if (!ctx.qry.path &&
		    ctx.qry.url[strlen(ctx.qry.url) - 1] != '/' &&
		    ctx.env.path_info[strlen(ctx.env.path_info) - 1] != '/')
			cgit_redirect(fmtalloc("%s/", cgit_currenturl()), true);
		else
			cgit_print_repo_readme(ctx.qry.path);
	} else
		cgit_print_site_readme();
}