diff --git a/doc/config.html b/doc/config.html
index 1105de2f..5f44a3c8 100755
--- a/doc/config.html
+++ b/doc/config.html
@@ -2684,6 +2684,14 @@ Options Location = Main Building{a}, New Building{b}, Old Building{c}
automatically converted into small "smiley" images. If this behavior is not
wanted, it can be turned off with this option. The default for this setting is 1.
+
+ Refresh = <seconds>
+ The elog listing page can be refreshed periodically with this option. If it is
+ given, the page automatically reloads after <seconds>. This can be useful
+ for logbooks where other people often post entries or where some entries
+ are posted automatically (via the elog utility) and one wants to keep an eye on
+ what's new. The default for this setting is 0 meaning no refresh.
+
diff --git a/src/elogd.c b/src/elogd.c
index 1db4633f..aa38e96b 100755
--- a/src/elogd.c
+++ b/src/elogd.c
@@ -7223,7 +7223,7 @@ void show_plain_header(int size, char *file_name)
}
void show_html_header(LOGBOOK * lbs, BOOL expires, char *title, BOOL close_head, BOOL rss_feed, char *cookie,
- int absolute_link)
+ int absolute_link, int refresh)
{
int i, n;
char css[1000], str[1000], media[1000];
@@ -7241,7 +7241,9 @@ void show_html_header(LOGBOOK * lbs, BOOL expires, char *title, BOOL close_head,
/* page title */
rsprintf("
\n");
- rsprintf("\n");
+ rsprintf("\n");
+ if (refresh)
+ rsprintf("\n", refresh);
rsprintf("%s\n", title);
/* Cascading Style Sheet */
@@ -7299,10 +7301,10 @@ void show_browser(char *browser)
}
void show_standard_header(LOGBOOK * lbs, BOOL expires, char *title, char *path, BOOL rss_feed, char *cookie,
- char *script)
+ char *script, int refresh)
{
if (script) {
- show_html_header(lbs, expires, title, FALSE, rss_feed, cookie, FALSE);
+ show_html_header(lbs, expires, title, FALSE, rss_feed, cookie, FALSE, refresh);
rsprintf("\n\n");
rsprintf("\n");
} else
- show_html_header(lbs, expires, title, TRUE, rss_feed, cookie, FALSE);
+ show_html_header(lbs, expires, title, TRUE, rss_feed, cookie, FALSE, refresh);
if (script)
rsprintf("\n", script);
@@ -7335,7 +7337,7 @@ void show_upgrade_page(LOGBOOK * lbs)
{
char str[1000];
- show_html_header(lbs, FALSE, "ELOG Upgrade Information", TRUE, FALSE, NULL, FALSE);
+ show_html_header(lbs, FALSE, "ELOG Upgrade Information", TRUE, FALSE, NULL, FALSE, 0);
rsprintf("\n");
@@ -7982,7 +7984,7 @@ void show_error(char *error)
void show_query(LOGBOOK * lbs, char *title, char *query_string, char *button1, char *button1_url,
char *button2, char *button2_url)
{
- show_standard_header(lbs, TRUE, "ELog query", title, FALSE, NULL, NULL);
+ show_standard_header(lbs, TRUE, "ELog query", title, FALSE, NULL, NULL, 0);
rsprintf("");
@@ -8163,7 +8165,7 @@ void send_file_direct(char *file_name)
close(fh);
} else {
char encodedname[256];
- show_html_header(NULL, FALSE, "404 Not Found", TRUE, FALSE, NULL, FALSE);
+ show_html_header(NULL, FALSE, "404 Not Found", TRUE, FALSE, NULL, FALSE, 0);
rsprintf("Not Found
\r\n");
rsprintf("The requested file ");
@@ -8590,7 +8592,7 @@ void show_change_pwd_page(LOGBOOK * lbs)
}
}
- show_standard_header(lbs, TRUE, loc("ELOG change password"), NULL, FALSE, NULL, NULL);
+ show_standard_header(lbs, TRUE, loc("ELOG change password"), NULL, FALSE, NULL, NULL, 0);
rsprintf("");
@@ -9528,7 +9530,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
} else
sprintf(str, "ELOG %s", lbs->name);
- show_html_header(lbs, FALSE, str, FALSE, FALSE, cookie, FALSE);
+ show_html_header(lbs, FALSE, str, FALSE, FALSE, cookie, FALSE, 0);
/* java script for checking required attributes and to check for cancelled edits */
rsprintf("\n\n");