From 45ba7e120ee5eb37eb2b6dcb20f813df251bbadb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sat, 27 Feb 2010 12:19:27 +0000 Subject: [PATCH] * ups. don't need the switch anymore --- webcit/roomops.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/webcit/roomops.c b/webcit/roomops.c index 761b43956..25bb94e9b 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -3195,34 +3195,11 @@ int ConditionalHaveRoomeditRights(StrBuf *Target, WCTemplputParams *TP) int ConditionalIsRoomtype(StrBuf *Target, WCTemplputParams *TP) { wcsession *WCC = WC; - int whichtype; if ((WCC == NULL) || (TP->Tokens->nParameters < 3)) return 0; - whichtype = GetTemplateTokenNumber(Target, TP, 2, VIEW_BBS); - switch(WCC->CurRoom.view) { - case VIEW_BBS: - return whichtype == VIEW_BBS; - case VIEW_MAILBOX: - return whichtype == VIEW_MAILBOX; - case VIEW_ADDRESSBOOK: - return whichtype == VIEW_ADDRESSBOOK; - case VIEW_TASKS: - return whichtype == VIEW_TASKS; - case VIEW_NOTES: - return whichtype == VIEW_NOTES; - case VIEW_WIKI: - return whichtype == VIEW_WIKI; - case VIEW_JOURNAL: - return whichtype == VIEW_JOURNAL; - case VIEW_CALENDAR: - return whichtype == VIEW_CALENDAR; - case VIEW_CALBRIEF: - return whichtype == VIEW_CALBRIEF; - default: - return 0; - } + return WCC->CurRoom.view == GetTemplateTokenNumber(Target, TP, 2, VIEW_BBS); } void -- 2.39.2