long msgnum = (-1L);
char buf[256];
- str_wiki_index(pagename);
-
if (WC->CurRoom.view != VIEW_WIKI) {
wc_printf(_("'%s' is not a Wiki room."), ChrPtr(WC->CurRoom.name) );
return;
strcpy(pagename, "home");
}
- /* Found it! Now read it. */
+ str_wiki_index(pagename); /* convert index name to lowercase and numeric only */
if ((rev != NULL) && (strlen(rev) > 0)) {
/* read an older revision */
}
}
else {
- /* read the current revision? */
+ /* read the current revision */
msgnum = locate_message_by_uid(pagename);
}
wc_printf("</td>");
if (row == 0) {
- wc_printf("<td><a href=\"wiki?page=%s\">%s</a></td>",
- bstr("page"),
- _("(show)")
- );
+ wc_printf("<td><a href=\"wiki?page=%s", bstr("page"));
+ wc_printf("?go="); urlescputs(ChrPtr(WC->CurRoom.name));
+ wc_printf("\">%s</a></td>", _("(show)"));
wc_printf("<td>(%s)</td>", _("Current version"));
}
else {
- wc_printf("<td><a href=\"wiki?page=%s?rev=%s\">%s</a></td>",
+ wc_printf("<td><a href=\"wiki?page=%s?rev=%s",
bstr("page"),
- ChrPtr(rev_uuid),
- _("(show)")
+ ChrPtr(rev_uuid)
);
+ wc_printf("?go="); urlescputs(ChrPtr(WC->CurRoom.name));
+ wc_printf("\">%s</a></td>", _("(show)"));
wc_printf("<td><a href=\"javascript:GetLoggedInFirst(encodeURIComponent('wiki?page=%s?rev=%s?revert=1'))\">%s</a></td>",
bstr("page"),
ChrPtr(rev_uuid),