From b23b9c5217eeeefc7668dad6b8b3ea25c3962b5c Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 11 Jul 2002 07:22:42 +0000 Subject: [PATCH] Made 'elog:/' reference work SVN revision: 172 --- elogd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/elogd.c b/elogd.c index d8642501..03471d17 100755 --- a/elogd.c +++ b/elogd.c @@ -6,6 +6,9 @@ Contents: Web server program for Electronic Logbook ELOG $Log$ + Revision 2.42 2002/07/11 07:22:42 midas + Made 'elog:/' reference work + Revision 2.41 2002/07/09 07:37:37 midas Fixed bug that 'last xx entries?mode=threaded' was displayed @@ -2662,7 +2665,11 @@ char *p, link[256]; link[k] = 0; i--; - sprintf(return_buffer+j, "elog:%s", link, link); + /* if link contains '/' (reference to other logbook), add ".." in front */ + if (strchr(link, '/')) + sprintf(return_buffer+j, "elog:%s", link, link); + else + sprintf(return_buffer+j, "elog:%s", link, link); j += strlen(return_buffer+j); } else