summaryrefslogtreecommitdiffabout
authorDanijel TaĊĦov <dt@korn.shell.la>2009-11-02 21:10:04 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-11-07 14:29:54 (UTC)
commite34a3b5adc00255f8acb7d674e5fdadef2ac80f7 (patch) (side-by-side diff)
tree801fc9c229bfbb84f4d49ac8c1ec6d423a7d3ef0
parent9735835c0e9f2c4a0caf5a431fc455d5855472aa (diff)
downloadcgit-e34a3b5adc00255f8acb7d674e5fdadef2ac80f7.zip
cgit-e34a3b5adc00255f8acb7d674e5fdadef2ac80f7.tar.gz
cgit-e34a3b5adc00255f8acb7d674e5fdadef2ac80f7.tar.bz2
Nov is the correct abbreviation
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 07d5dd4..4049a2b 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -1,71 +1,71 @@
/* ui-shared.c: common web output functions
*
* Copyright (C) 2006 Lars Hjemli
*
* Licensed under GNU General Public License v2
* (see COPYING for full license text)
*/
#include "cgit.h"
#include "cmd.h"
#include "html.h"
const char cgit_doctype[] =
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n"
" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
static char *http_date(time_t t)
{
static char day[][4] =
{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
static char month[][4] =
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Now", "Dec"};
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
struct tm *tm = gmtime(&t);
return fmt("%s, %02d %s %04d %02d:%02d:%02d GMT", day[tm->tm_wday],
tm->tm_mday, month[tm->tm_mon], 1900+tm->tm_year,
tm->tm_hour, tm->tm_min, tm->tm_sec);
}
void cgit_print_error(char *msg)
{
html("<div class='error'>");
html_txt(msg);
html("</div>\n");
}
char *cgit_httpscheme()
{
if (ctx.env.https && !strcmp(ctx.env.https, "on"))
return "https://";
else
return "http://";
}
char *cgit_hosturl()
{
if (ctx.env.http_host)
return ctx.env.http_host;
if (!ctx.env.server_name)
return NULL;
if (!ctx.env.server_port || atoi(ctx.env.server_port) == 80)
return ctx.env.server_name;
return xstrdup(fmt("%s:%s", ctx.env.server_name, ctx.env.server_port));
}
char *cgit_rooturl()
{
if (ctx.cfg.virtual_root)
return fmt("%s/", ctx.cfg.virtual_root);
else
return ctx.cfg.script_name;
}
char *cgit_repourl(const char *reponame)
{
if (ctx.cfg.virtual_root) {
return fmt("%s/%s/", ctx.cfg.virtual_root, reponame);
} else {
return fmt("?r=%s", reponame);
}
}