]> code.citadel.org Git - citadel.git/blobdiff - webcit/wiki.c
* Created IsEmptyStr define to be used rather then using some weird strlen constructs
[citadel.git] / webcit / wiki.c
index 852650cb643a0b2dbca81ffce929aa8c9d7fe14f..40fe296fbbe0548c1d7aadb34f904e2d5fd6b295 100644 (file)
@@ -1,14 +1,15 @@
 /*
- * $Id:  $
+ * $Id$
  */
 /**
  *
  * \defgroup Wiki Wiki; Functions pertaining to rooms with a wiki view
- *
+ * \ingroup WebcitDisplayItems
  */
 
 /*@{*/
 #include "webcit.h"
+#include "groupdav.h"
 
 
 
@@ -50,7 +51,7 @@ void display_wiki_page(void)
        safestrncpy(pagename, bstr("page"), sizeof pagename);
        str_wiki_index(pagename);
 
-       if (strlen(roomname) > 0) {
+       if (!IsEmptyStr(roomname)) {
 
                /* If we're not in the correct room, try going there. */
                if (strcasecmp(roomname, WC->wc_roomname)) {
@@ -76,7 +77,7 @@ void display_wiki_page(void)
                return;
        }
 
-       if (strlen(pagename) == 0) {
+       if (IsEmptyStr(pagename)) {
                strcpy(pagename, "home");
        }
 
@@ -98,9 +99,8 @@ void display_wiki_page(void)
        wprintf("<br><b>");
        wprintf(_("There is no page called '%s' here."), pagename);
        wprintf("</b><br><br>");
-       wprintf("<a href=\"display_enter?wikipage=%s\">", pagename);
-       wprintf(_("Click here if you would like to create this page."));
-       wprintf("</a>");
+       wprintf(_("Select the 'Edit this page' link in the room banner "
+               "if you would like to create this page."));
        wprintf("<br><br>");
        wprintf("</td></tr></table></div>\n");
        wDumpContent(1);