mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed bug with importing CSV files containing text body
SVN revision: 2360
This commit is contained in:
parent
c65d0a9d2c
commit
f64de0dc8b
42
src/elogd.c
42
src/elogd.c
@ -14375,6 +14375,16 @@ void csv_import(LOGBOOK * lbs, const char *csv, const char *csvfile)
|
|||||||
show_error(str);
|
show_error(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check if text column is present */
|
||||||
|
if (first && isparam("filltext") && atoi(getparam("filltext"))) {
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
if (strieq(list + i * NAME_LENGTH, loc("text"))) {
|
||||||
|
filltext = TRUE;
|
||||||
|
textcol = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ignore first line */
|
/* ignore first line */
|
||||||
if (first && !isparam("notignore")) {
|
if (first && !isparam("notignore")) {
|
||||||
first = FALSE;
|
first = FALSE;
|
||||||
@ -14405,16 +14415,6 @@ void csv_import(LOGBOOK * lbs, const char *csv, const char *csvfile)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check if text column is present */
|
|
||||||
if (first && isparam("filltext") && atoi(getparam("filltext"))) {
|
|
||||||
for (i = 0; i < n; i++)
|
|
||||||
if (strieq(list + i * NAME_LENGTH, loc("text"))) {
|
|
||||||
filltext = TRUE;
|
|
||||||
textcol = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* derive attributes from first line */
|
/* derive attributes from first line */
|
||||||
if (first && isparam("head")) {
|
if (first && isparam("head")) {
|
||||||
|
|
||||||
@ -26410,28 +26410,6 @@ void interprete(char *lbook, char *path)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* authorize via negotiation */
|
|
||||||
/*
|
|
||||||
rsprintf("HTTP/1.1 401 Authorization Required\r\n");
|
|
||||||
rsprintf("Server: ELOG HTTP %s-%d\r\n", VERSION, atoi(svn_revision + 13));
|
|
||||||
rsprintf("WWW-Authenticate: NegotiateBasic realm=\"%s\"\r\n", lbs->name);
|
|
||||||
//rsprintf("WWW-Authenticate: Negotiate\r\n");
|
|
||||||
rsprintf("Connection: close\r\n");
|
|
||||||
rsprintf("Content-Type: text/html\r\n\r\n");
|
|
||||||
rsprintf("<HTML><HEAD>\r\n");
|
|
||||||
rsprintf("<TITLE>401 Authorization Required</TITLE>\r\n");
|
|
||||||
rsprintf("</HEAD><BODY>\r\n");
|
|
||||||
rsprintf("<H1>Authorization Required</H1>\r\n");
|
|
||||||
rsprintf("This server could not verify that you\r\n");
|
|
||||||
rsprintf("are authorized to access the document\r\n");
|
|
||||||
rsprintf("requested. Either you supplied the wrong\r\n");
|
|
||||||
rsprintf("credentials (e.g., bad password), or your\r\n");
|
|
||||||
rsprintf("browser doesn't understand how to supply\r\n");
|
|
||||||
rsprintf("the credentials required.<P>\r\n");
|
|
||||||
rsprintf("</BODY></HTML>\r\n");
|
|
||||||
return;
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* check for correct session ID */
|
/* check for correct session ID */
|
||||||
if (!check_login(lbs, getparam("sid")))
|
if (!check_login(lbs, getparam("sid")))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user