mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Search 'all logbooks' only for current top group
SVN revision: 707
This commit is contained in:
parent
2eb26b83d9
commit
6440a8a46c
29
src/elogd.c
29
src/elogd.c
@ -6,6 +6,9 @@
|
|||||||
Contents: Web server program for Electronic Logbook ELOG
|
Contents: Web server program for Electronic Logbook ELOG
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.206 2004/01/22 12:29:48 midas
|
||||||
|
Search 'all logbooks' only for current top group
|
||||||
|
|
||||||
Revision 1.205 2004/01/21 16:25:07 midas
|
Revision 1.205 2004/01/21 16:25:07 midas
|
||||||
Changed 'message' to 'entry' consistently
|
Changed 'message' to 'entry' consistently
|
||||||
|
|
||||||
@ -4296,6 +4299,8 @@ void set_redir(LOGBOOK * lbs, char *redir)
|
|||||||
{
|
{
|
||||||
char str[NAME_LENGTH];
|
char str[NAME_LENGTH];
|
||||||
|
|
||||||
|
str[0] = 0;
|
||||||
|
|
||||||
/* prepare relative path */
|
/* prepare relative path */
|
||||||
if (redir[0])
|
if (redir[0])
|
||||||
strcpy(str, redir);
|
strcpy(str, redir);
|
||||||
@ -10166,6 +10171,9 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n)
|
|||||||
if (!lb_list[n_logbook].name[0])
|
if (!lb_list[n_logbook].name[0])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (lbs->top_group[0] && !equal_ustring(lbs->top_group, lb_list[n_logbook].top_group))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (isparam("unm")
|
if (isparam("unm")
|
||||||
&& !check_login_user(&lb_list[n_logbook], getparam("unm")))
|
&& !check_login_user(&lb_list[n_logbook], getparam("unm")))
|
||||||
continue;
|
continue;
|
||||||
@ -10184,6 +10192,9 @@ void show_elog_list(LOGBOOK * lbs, INT past_n, INT last_n, INT page_n)
|
|||||||
if (search_all)
|
if (search_all)
|
||||||
lbs_cur = &lb_list[i];
|
lbs_cur = &lb_list[i];
|
||||||
|
|
||||||
|
if (lbs->top_group[0] && !equal_ustring(lbs->top_group, lbs_cur->top_group))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (isparam("unm") && !check_login_user(lbs_cur, getparam("unm")))
|
if (isparam("unm") && !check_login_user(lbs_cur, getparam("unm")))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -12927,8 +12938,14 @@ void show_logbook_node(LBLIST plb, LBLIST pparent, int level, int btop)
|
|||||||
el_retrieve(&lb_list[i],
|
el_retrieve(&lb_list[i],
|
||||||
j, date, attr_list, attrib, lb_list[i].n_attr, NULL, 0, NULL,
|
j, date, attr_list, attrib, lb_list[i].n_attr, NULL, 0, NULL,
|
||||||
NULL, NULL, NULL, NULL);
|
NULL, NULL, NULL, NULL);
|
||||||
if (!getcfg(lb_list[i].name, "Last submission", str))
|
if (!getcfg(lb_list[i].name, "Last submission", str)) {
|
||||||
sprintf(str, "$entry date %s $author", loc("by"));
|
sprintf(str, "$entry date");
|
||||||
|
for (i=0 ; i<lb_list[i].n_attr ; i++)
|
||||||
|
if (equal_ustring(attr_list[i], "Author"))
|
||||||
|
break;
|
||||||
|
if (i<lb_list[i].n_attr)
|
||||||
|
sprintf(str+strlen(str), " %s $author", loc("by"));
|
||||||
|
}
|
||||||
j = build_subst_list(&lb_list[i], slist, svalue, attrib);
|
j = build_subst_list(&lb_list[i], slist, svalue, attrib);
|
||||||
strcpy(slist[j], "entry date");
|
strcpy(slist[j], "entry date");
|
||||||
if (!getcfg(lb_list[i].name, "Date format", format))
|
if (!getcfg(lb_list[i].name, "Date format", format))
|
||||||
@ -12983,15 +13000,15 @@ void show_selection_page()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* top group present and no top group in URL -> abort connection */
|
||||||
|
if (exist_top_group() && getcfg_topgroup() == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
/* if selection page protected, check password */
|
/* if selection page protected, check password */
|
||||||
if (getcfg("global", "password file", str))
|
if (getcfg("global", "password file", str))
|
||||||
if (!check_user_password(NULL, getparam("unm"), getparam("upwd"), ""))
|
if (!check_user_password(NULL, getparam("unm"), getparam("upwd"), ""))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* top group present and no top group in URL -> abort connection */
|
|
||||||
if (exist_top_group() && getcfg_topgroup() == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (getcfg("global", "Page Title", str))
|
if (getcfg("global", "Page Title", str))
|
||||||
show_html_header(NULL, TRUE, str);
|
show_html_header(NULL, TRUE, str);
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user