X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=6fb8bafb43814103dba002f8bc4034e6c22040ab;hb=5ff52be939c2a41fcb0296df76e34a477c3a2576;hp=25943084df58bada7bf7e1ec34992c600a1c3959;hpb=41cf95bf582427abf8210f53def2258e23db7f83;p=citadel.git diff --git a/webcit/roomops.c b/webcit/roomops.c index 25943084d..6fb8bafb4 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -1,19 +1,17 @@ /* * $Id$ + * Lots of different room-related operations. */ -/** - * \defgroup RoomOps Lots of different room-related operations. - * \ingroup CitadelCommunitacion - */ -/*@{*/ -#include "webcit.h" -char floorlist[128][SIZ]; /**< list of our floor names */ +#include "webcit.h" +#include "webserver.h" +#define MAX_FLOORS 128 +char floorlist[MAX_FLOORS][SIZ]; /**< list of our floor names */ -char *viewdefs[8]; /**< the different kinds of available views */ +char *viewdefs[9]; /**< the different kinds of available views */ -/** - * \brief initialize the viewdefs with localized strings +/* + * Initialize the viewdefs with localized strings */ void initialize_viewdefs(void) { viewdefs[0] = _("Bulletin Board"); @@ -24,12 +22,11 @@ void initialize_viewdefs(void) { viewdefs[5] = _("Notes List"); viewdefs[6] = _("Wiki"); viewdefs[7] = _("Calendar List"); + viewdefs[8] = _("Journal"); } -/** - * \brief Determine which views are allowed as the default for creating a new room. - * - * \param which_view The view ID being queried. +/* + * Determine which views are allowed as the default for creating a new room. */ int is_view_allowed_as_default(int which_view) { @@ -40,22 +37,29 @@ int is_view_allowed_as_default(int which_view) case VIEW_CALENDAR: return(1); case VIEW_TASKS: return(1); case VIEW_NOTES: return(1); - case VIEW_WIKI: return(0); /**< because it isn't finished yet */ + +#ifdef TECH_PREVIEW + case VIEW_WIKI: return(1); +#else /* TECH_PREVIEW */ + case VIEW_WIKI: return(0); /* because it isn't finished yet */ +#endif /* TECH_PREVIEW */ + case VIEW_CALBRIEF: return(0); - default: return(0); /**< should never get here */ + case VIEW_JOURNAL: return(0); + default: return(0); /* should never get here */ } } -/** - * \brief load the list of floors +/* + * load the list of floors */ void load_floorlist(void) { int a; char buf[SIZ]; - for (a = 0; a < 128; ++a) + for (a = 0; a < MAX_FLOORS; ++a) floorlist[a][0] = 0; serv_puts("LFLR"); @@ -70,10 +74,8 @@ void load_floorlist(void) } -/** - * \brief Free a session's march list - * - * \param wcf Pointer to session being cleared +/* + * Free a session's march list */ void free_march_list(struct wcsession *wcf) { @@ -89,8 +91,8 @@ void free_march_list(struct wcsession *wcf) -/** - * \brief remove a room from the march list +/* + * remove a room from the march list */ void remove_march(char *aaa) { @@ -120,9 +122,8 @@ void remove_march(char *aaa) -/** - * \brief display rooms in tree structure??? - * \param rp the roomlist to build a tree from +/* + * display rooms in tree structure */ void room_tree_list(struct roomlisting *rp) { @@ -151,7 +152,7 @@ void room_tree_list(struct roomlisting *rp) wprintf(")"); else wprintf(">"); - wprintf(" \n"); + wprintf(" \n"); room_tree_list(rp->rnext); free(rp); @@ -253,9 +254,9 @@ void listrms(char *variety) */ void zapped_list(void) { - output_headers(1, 1, 0, 0, 0, 0); + output_headers(1, 1, 1, 0, 0, 0); - svprintf("BOXTITLE", WCS_STRING, _("Zapped (forgotten) rooms")); + svput("BOXTITLE", WCS_STRING, _("Zapped (forgotten) rooms")); do_template("beginbox"); listrms("LZRM -1"); @@ -325,44 +326,44 @@ void embed_room_graphic(void) { serv_puts("OIMG _roompic_"); serv_getln(buf, sizeof buf); if (buf[0] == '2') { - wprintf("wc_roomname); wprintf("\">"); serv_puts("CLOS"); serv_getln(buf, sizeof buf); } else if (WC->wc_view == VIEW_ADDRESSBOOK) { - wprintf("\"\"" ); } else if ( (WC->wc_view == VIEW_CALENDAR) || (WC->wc_view == VIEW_CALBRIEF) ) { - wprintf("\"\"" ); } else if (WC->wc_view == VIEW_TASKS) { - wprintf("\"\"" ); } else if (WC->wc_view == VIEW_NOTES) { - wprintf("\"\"" ); } else if (WC->wc_view == VIEW_MAILBOX) { - wprintf("\"\"" ); } else { - wprintf("\"\"" ); @@ -378,8 +379,9 @@ void embed_room_graphic(void) { void embed_view_o_matic(void) { int i; - wprintf("
\n" - "