/*
- * $Id: $
+ * $Id$
*/
/**
*
* \defgroup Wiki Wiki; Functions pertaining to rooms with a wiki view
- *
+ * \ingroup WebcitDisplayItems
*/
/*@{*/
#include "webcit.h"
+#include "groupdav.h"
safestrncpy(pagename, bstr("page"), sizeof pagename);
str_wiki_index(pagename);
- /* If we're not in the correct room, try going there. */
- if (strcasecmp(roomname, WC->wc_roomname)) {
- gotoroom(roomname);
- }
+ if (!IsEmptyStr(roomname)) {
+
+ /* If we're not in the correct room, try going there. */
+ if (strcasecmp(roomname, WC->wc_roomname)) {
+ gotoroom(roomname);
+ }
+
+ /* If we're still not in the correct room, it doesn't exist. */
+ if (strcasecmp(roomname, WC->wc_roomname)) {
+ snprintf(errmsg, sizeof errmsg,
+ _("There is no room called '%s'."),
+ roomname);
+ convenience_page("FF0000", _("Error"), errmsg);
+ return;
+ }
- /* If we're still not in the correct room, it doesn't exist. */
- if (strcasecmp(roomname, WC->wc_roomname)) {
- snprintf(errmsg, sizeof errmsg,
- _("There is no room called '%s'."),
- roomname);
- convenience_page("FF0000", _("Error"), errmsg);
- return;
}
if (WC->wc_view != VIEW_WIKI) {
return;
}
- if (strlen(pagename) == 0) {
+ if (IsEmptyStr(pagename)) {
strcpy(pagename, "home");
}
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);