I've quickly checked: there are a couple more commands in the source code that are not language encoded. I guess some of them needs correction.
> egrep -n "cmd=[A-Za-z]" elogd.c
10293: rsprintf(" r.open('GET', '?jcmd=Unlock&edit_id=%d', true);\n", message_id);
11784: ("<label for=\"ELCode\"><a target=\"_blank\" href=\"?cmd=HelpELCode\">ELCode</a> </label>\n");
13663: "\r\n%s URL : %s?cmd=Config&cfg_user=%s&unm=%s\r\n", loc("Logbook"),
14562: redirect(lbs, "?cmd=Config");
14625: sprintf(str, "../%s/?cmd=Config", getparam("lbname"));
14678: sprintf(str, "../%s/?cmd=Config", lbn);
15703: combine_url(lbs, host, "?cmd=GetMD5", url, sizeof(url), &ssl);
16378: strcat(str, "?cmd=GetConfig"); // request complete config file
16380: strcat(str, "?cmd=Download"); // request config section of logbook
16570: strcat(str, "?cmd=GetPwdFile"); // request password file
17575: rsprintf("<br><b><a href=\"../%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
17577: rsprintf("<br><b><a href=\"%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
17579: rsprintf("<br><b><a href=\"../%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
18959: if (strstr(ref, "cmd=Search&"))
18960: strlcpy(strstr(ref, "cmd=Search&"), strstr(ref, "cmd=Search&") + 11, sizeof(str));
26728: rsprintf("<a href=\"?cmd=Synchronize\">%s</a></td>\n", loc("Synchronize all logbooks"));
Andreas Luedeke wrote: |
Hi Stefan,
when one creates a new entry, and a draft entry exists for the logbook, then a menu appears (see attachment).
If one select "Neuen Eintrag anlegen" then it should ignore the draft and create a new entry.
This feat is done by adding a "&ignore=1" to the "new" command: "<URL>/?cmd=New&ignore=1".
The problem is, that it should not be "cmd=New&..." but "cmd=Neu", since the commands are part of the translation.
Due to this, no new entry can be created as long as a draft exists; at least not in any language other than english.
This problem apparently existed since the beginning of drafts, but it only created problems at our site recently.
Kind Regards
Andreas
PS: Here's a patch that works:
diff elogd.c elogd.c-orig
9575,9576c9575,9576
< rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='?cmd=%s&ignore=1';\">\n", loc("Create new entry"),
< loc("New"));
---
> rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%s';\">\n", loc("Create new entry"),
> "?cmd=New&ignore=1");
|
|