/* begin everythingamundo table */
HdrToken = NewStrBuf();
- while ((StrBuf_ServGetln(Buf)>=0) && !Done) {
+ while (!Done && StrBuf_ServGetln(Buf)>=0) {
if ( (StrLength(Buf)==3) &&
!strcmp(ChrPtr(Buf), "000"))
{
/*
* command loop for reading messages
*
- * Set oper to "readnew" or "readold" or "readfwd" or "headers" or "readgt"
+ * Set oper to "readnew" or "readold" or "readfwd" or "headers" or "readgt" or "do_search"
*/
void readloop(long oper)
{
SharedMessageStatus Stat;
void *ViewSpecific;
- if (havebstr("is_summary") && (1 == (ibstr("is_summary"))))
+ if (havebstr("is_summary") && (1 == (ibstr("is_summary")))) {
WCC->wc_view = VIEW_MAILBOX;
+ }
+
+ if ((oper == do_search) && (WCC->wc_view == VIEW_WIKI)) {
+ display_wiki_pagelist();
+ return;
+ }
memset(&Stat, 0, sizeof(SharedMessageStatus));
Stat.maxload = 10000;
WCC->wc_view = VIEW_BBS;
GetHash(ReadLoopHandler, IKEY(WCC->wc_view), &vViewMsg);
}
- if (vViewMsg == NULL)
- return;///TODO: print message
+ if (vViewMsg == NULL) {
+ return; // TODO: print message
+ }
ViewMsg = (RoomRenderer*) vViewMsg;
if (!WCC->is_ajax) {
if (Stat.sortit) {
CompareFunc SortIt;
memset(&SubTP, 0, sizeof(WCTemplputParams));
- SubTP.Filter.ContextType = CTX_NONE;
+ SubTP.Filter.ContextType = CTX_MAILSUM;
SubTP.Context = NULL;
SortIt = RetrieveSort(&SubTP, NULL, 0,
HKEY("date"), Stat.defaultsortorder);