projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcae896
)
* ConditionalUserAccess (): don't access the token directly use the access function.
author
Wilfried Göesgens
<willi@citadel.org>
Thu, 17 Jun 2010 20:38:03 +0000
(20:38 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Thu, 17 Jun 2010 20:38:03 +0000
(20:38 +0000)
webcit/useredit.c
patch
|
blob
|
history
diff --git
a/webcit/useredit.c
b/webcit/useredit.c
index 5eccfdb76ae52e21d16e0647fb71a52f24360676..85e55f43a988491d94886e2bc5b757d2703358a2 100644
(file)
--- a/
webcit/useredit.c
+++ b/
webcit/useredit.c
@@
-391,11
+391,16
@@
int ConditionalFlagINetEmail(StrBuf *Target, WCTemplputParams *TP)
int ConditionalUserAccess(StrBuf *Target, WCTemplputParams *TP)
{
UserListEntry *ul = (UserListEntry*) CTX;
-
- if (TP->Tokens->Params[3]->Type == TYPE_LONG)
- return (TP->Tokens->Params[3]->lvalue == ul->AccessLevel);
- else
+
+ if (ul == NULL)
return 0;
+
+ return GetTemplateTokenNumber(Target,
+ TP,
+ 3,
+ AxNewU)
+ ==
+ ul->AccessLevel;
}
/*