mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-27 02:57:22 +00:00
Merge branch 'master' into pam
This commit is contained in:
commit
3c57d7838a
1
Makefile
1
Makefile
@ -77,6 +77,7 @@ BINOWNER = root
|
|||||||
BINGROUP = admin
|
BINGROUP = admin
|
||||||
NEED_STRLCPY =
|
NEED_STRLCPY =
|
||||||
CFLAGS += -I/opt/local/include
|
CFLAGS += -I/opt/local/include
|
||||||
|
LIBS += -L/opt/local/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OSTYPE),FreeBSD)
|
ifeq ($(OSTYPE),FreeBSD)
|
||||||
|
|||||||
34
src/elogd.c
34
src/elogd.c
@ -7658,12 +7658,12 @@ void show_html_header(LOGBOOK * lbs, BOOL expires, char *title, BOOL close_head,
|
|||||||
else if (lbs == NULL && getcfg("global", "CSS", str, sizeof(str)))
|
else if (lbs == NULL && getcfg("global", "CSS", str, sizeof(str)))
|
||||||
strlcpy(css, str, sizeof(css));
|
strlcpy(css, str, sizeof(css));
|
||||||
|
|
||||||
strlcpy(file_name, resource_dir, sizeof(str));
|
strlcpy(file_name, resource_dir, sizeof(file_name));
|
||||||
strlcat(file_name, "themes", sizeof(str));
|
strlcat(file_name, "themes", sizeof(file_name));
|
||||||
strlcat(file_name, DIR_SEPARATOR_STR, sizeof(str));
|
strlcat(file_name, DIR_SEPARATOR_STR, sizeof(file_name));
|
||||||
strlcat(file_name, theme_name, sizeof(str));
|
strlcat(file_name, theme_name, sizeof(file_name));
|
||||||
strlcat(file_name, DIR_SEPARATOR_STR, sizeof(str));
|
strlcat(file_name, DIR_SEPARATOR_STR, sizeof(file_name));
|
||||||
strlcat(file_name, css, sizeof(str));
|
strlcat(file_name, css, sizeof(file_name));
|
||||||
|
|
||||||
FILE *f = fopen(file_name, "rb");
|
FILE *f = fopen(file_name, "rb");
|
||||||
if (f != NULL) {
|
if (f != NULL) {
|
||||||
@ -10103,7 +10103,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
rsprintf("var last_key = 0;\n\n");
|
rsprintf("var last_key = 0;\n\n");
|
||||||
rsprintf("var in_asend = false;\n\n");
|
rsprintf("var in_asend = false;\n\n");
|
||||||
|
|
||||||
rsprintf("function chkform()\n");
|
rsprintf("function chkform(button)\n");
|
||||||
rsprintf("{\n");
|
rsprintf("{\n");
|
||||||
|
|
||||||
rsprintf(" if (last_key == 13) {\n");
|
rsprintf(" if (last_key == 13) {\n");
|
||||||
@ -10266,7 +10266,11 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
|
|
||||||
rsprintf(" if (autoSaveTimer != null)\n");
|
rsprintf(" if (autoSaveTimer != null)\n");
|
||||||
rsprintf(" clearTimeout(autoSaveTimer);\n");
|
rsprintf(" clearTimeout(autoSaveTimer);\n");
|
||||||
|
rsprintf(" button.disabled = true;\n");
|
||||||
|
rsprintf(" button.value = \"%s...\";\n", loc("Please wait"));
|
||||||
rsprintf(" submitted = true;\n");
|
rsprintf(" submitted = true;\n");
|
||||||
|
rsprintf(" document.getElementById(\"form1\").elements['cmd'][0].value = \"%s\";\n", loc("Submit"));
|
||||||
|
rsprintf(" document.getElementById(\"form1\").submit();\n");
|
||||||
rsprintf(" return true;\n");
|
rsprintf(" return true;\n");
|
||||||
rsprintf("}\n\n");
|
rsprintf("}\n\n");
|
||||||
|
|
||||||
@ -10575,7 +10579,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
rsprintf(">\n");
|
rsprintf(">\n");
|
||||||
|
|
||||||
show_top_text(lbs);
|
show_top_text(lbs);
|
||||||
rsprintf("<form name=form1 method=\"POST\" action=\"./\" ");
|
rsprintf("<form name=\"form1\" id=\"form1\" method=\"POST\" action=\"./\" ");
|
||||||
rsprintf("enctype=\"multipart/form-data\">\n");
|
rsprintf("enctype=\"multipart/form-data\">\n");
|
||||||
|
|
||||||
/*---- add password in case cookie expires during edit ----*/
|
/*---- add password in case cookie expires during edit ----*/
|
||||||
@ -10613,7 +10617,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
/* default cmd */
|
/* default cmd */
|
||||||
rsprintf("<input type=hidden name=cmd value=\"%s\">\n", loc("Update"));
|
rsprintf("<input type=hidden name=cmd value=\"%s\">\n", loc("Update"));
|
||||||
|
|
||||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return chkform();\">\n",
|
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return chkform(this);\">\n",
|
||||||
loc("Submit"));
|
loc("Submit"));
|
||||||
|
|
||||||
if (!getcfg(lbs->name, "Save drafts", str, sizeof(str)) || atoi(str) == 1)
|
if (!getcfg(lbs->name, "Save drafts", str, sizeof(str)) || atoi(str) == 1)
|
||||||
@ -12148,7 +12152,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
/*---- menu buttons again ----*/
|
/*---- menu buttons again ----*/
|
||||||
|
|
||||||
rsprintf("<tr><td class=\"menuframe\"><span class=\"menu1\">\n");
|
rsprintf("<tr><td class=\"menuframe\"><span class=\"menu1\">\n");
|
||||||
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return chkform();\">\n",
|
rsprintf("<input type=\"submit\" name=\"cmd\" value=\"%s\" onClick=\"return chkform(this);\">\n",
|
||||||
loc("Submit"));
|
loc("Submit"));
|
||||||
|
|
||||||
if (!getcfg(lbs->name, "Save drafts", str, sizeof(str)) || atoi(str) == 1)
|
if (!getcfg(lbs->name, "Save drafts", str, sizeof(str)) || atoi(str) == 1)
|
||||||
@ -14029,7 +14033,6 @@ void show_config_page(LOGBOOK * lbs)
|
|||||||
rsprintf("<td>\n");
|
rsprintf("<td>\n");
|
||||||
|
|
||||||
for (j = i = 0; lb_list[i].name[0]; i++) {
|
for (j = i = 0; lb_list[i].name[0]; i++) {
|
||||||
if (j==0) rsprintf("<table><tr>");
|
|
||||||
|
|
||||||
if (!getcfg_topgroup() || strieq(getcfg_topgroup(), lb_list[i].top_group)) {
|
if (!getcfg_topgroup() || strieq(getcfg_topgroup(), lb_list[i].top_group)) {
|
||||||
|
|
||||||
@ -14038,6 +14041,7 @@ void show_config_page(LOGBOOK * lbs)
|
|||||||
|
|
||||||
/* check if emails are enabled for this logbook */
|
/* check if emails are enabled for this logbook */
|
||||||
if (!getcfg(lb_list[i].name, "Suppress email to users", str, sizeof(str)) || atoi(str) == 0) {
|
if (!getcfg(lb_list[i].name, "Suppress email to users", str, sizeof(str)) || atoi(str) == 0) {
|
||||||
|
if (j==0) rsprintf("<table><tr>");
|
||||||
if (email_notify[i])
|
if (email_notify[i])
|
||||||
rsprintf("<td><input type=checkbox checked id=\"lb%d\" name=\"sub_lb%d\" value=\"1\">\n", i,
|
rsprintf("<td><input type=checkbox checked id=\"lb%d\" name=\"sub_lb%d\" value=\"1\">\n", i,
|
||||||
i);
|
i);
|
||||||
@ -14363,7 +14367,7 @@ void show_new_user_page(LOGBOOK * lbs, char *user)
|
|||||||
show_html_header(lbs, TRUE, loc("ELOG new user"), TRUE, FALSE, NULL, FALSE, 0);
|
show_html_header(lbs, TRUE, loc("ELOG new user"), TRUE, FALSE, NULL, FALSE, 0);
|
||||||
rsprintf("<body><center><br><br>\n");
|
rsprintf("<body><center><br><br>\n");
|
||||||
show_top_text(lbs);
|
show_top_text(lbs);
|
||||||
rsprintf("<form name=form1 method=\"GET\" action=\".\">\n\n");
|
rsprintf("<form name=\"form1\" id=\"form1\" method=\"GET\" action=\".\">\n\n");
|
||||||
|
|
||||||
/*---- title ----*/
|
/*---- title ----*/
|
||||||
|
|
||||||
@ -26369,7 +26373,7 @@ void show_login_page(LOGBOOK * lbs, char *redir, int fail)
|
|||||||
/* set focus on name field */
|
/* set focus on name field */
|
||||||
rsprintf("<body OnLoad=\"document.form1.uname.focus();\">\n");
|
rsprintf("<body OnLoad=\"document.form1.uname.focus();\">\n");
|
||||||
|
|
||||||
rsprintf("<form name=form1 method=\"POST\" action=\"./\" enctype=\"multipart/form-data\">\n\n");
|
rsprintf("<form name=\"form1\" id=\"form1\" method=\"POST\" action=\"./\" enctype=\"multipart/form-data\">\n\n");
|
||||||
|
|
||||||
/* define hidden fields for current destination */
|
/* define hidden fields for current destination */
|
||||||
strlcpy(str, redir, sizeof(str));
|
strlcpy(str, redir, sizeof(str));
|
||||||
@ -27031,7 +27035,7 @@ void show_calendar(LOGBOOK * lbs)
|
|||||||
strcpy(index, "1");
|
strcpy(index, "1");
|
||||||
|
|
||||||
show_html_header(lbs, FALSE, loc("Calendar"), TRUE, FALSE, NULL, FALSE, 0);
|
show_html_header(lbs, FALSE, loc("Calendar"), TRUE, FALSE, NULL, FALSE, 0);
|
||||||
rsprintf("<body class=\"calwindow\"><form name=form1 method=\"GET\" action=\"cal.html\">\n");
|
rsprintf("<body class=\"calwindow\"><form name=\"form1\" method=\"GET\" action=\"cal.html\">\n");
|
||||||
rsprintf("<input type=hidden name=\"i\" value=\"%s\">\n", index);
|
rsprintf("<input type=hidden name=\"i\" value=\"%s\">\n", index);
|
||||||
rsprintf("<input type=hidden name=\"y\" value=\"%d\">\n", cur_year);
|
rsprintf("<input type=hidden name=\"y\" value=\"%d\">\n", cur_year);
|
||||||
|
|
||||||
@ -27134,7 +27138,7 @@ void show_uploader(LOGBOOK * lbs)
|
|||||||
char str[256];
|
char str[256];
|
||||||
|
|
||||||
show_html_header(lbs, FALSE, loc("Upload image"), TRUE, FALSE, NULL, FALSE, 0);
|
show_html_header(lbs, FALSE, loc("Upload image"), TRUE, FALSE, NULL, FALSE, 0);
|
||||||
rsprintf("<body class=\"uploadwindow\"><form name=form1 method=\"POST\" action=\".\" ");
|
rsprintf("<body class=\"uploadwindow\"><form name=\"form1\" method=\"POST\" action=\".\" ");
|
||||||
rsprintf("enctype=\"multipart/form-data\">\n");
|
rsprintf("enctype=\"multipart/form-data\">\n");
|
||||||
rsprintf("<input type=hidden name=\"jcmd\" value=\"JUpload\">\n");
|
rsprintf("<input type=hidden name=\"jcmd\" value=\"JUpload\">\n");
|
||||||
|
|
||||||
|
|||||||
@ -155,15 +155,16 @@
|
|||||||
D52BA2F113999DB0000458E3 /* Project object */ = {
|
D52BA2F113999DB0000458E3 /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 0930;
|
LastUpgradeCheck = 1020;
|
||||||
ORGANIZATIONNAME = PSI;
|
ORGANIZATIONNAME = PSI;
|
||||||
};
|
};
|
||||||
buildConfigurationList = D52BA2F413999DB0000458E3 /* Build configuration list for PBXProject "elogd" */;
|
buildConfigurationList = D52BA2F413999DB0000458E3 /* Build configuration list for PBXProject "elogd" */;
|
||||||
compatibilityVersion = "Xcode 3.2";
|
compatibilityVersion = "Xcode 3.2";
|
||||||
developmentRegion = English;
|
developmentRegion = en;
|
||||||
hasScannedForEncodings = 0;
|
hasScannedForEncodings = 0;
|
||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
|
Base,
|
||||||
);
|
);
|
||||||
mainGroup = D52BA2EF13999DB0000458E3;
|
mainGroup = D52BA2EF13999DB0000458E3;
|
||||||
productRefGroup = D52BA2FB13999DB0000458E3 /* Products */;
|
productRefGroup = D52BA2FB13999DB0000458E3 /* Products */;
|
||||||
@ -212,6 +213,7 @@
|
|||||||
D52BA30113999DB0000458E3 /* Debug */ = {
|
D52BA30113999DB0000458E3 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
@ -253,6 +255,7 @@
|
|||||||
D52BA30213999DB0000458E3 /* Release */ = {
|
D52BA30213999DB0000458E3 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||||
CLANG_WARN_COMMA = YES;
|
CLANG_WARN_COMMA = YES;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user