Skip to content
Snippets Groups Projects
Commit 4836e19d authored by rswindell's avatar rswindell
Browse files

Added can_post and can_read Boolean sub-board properties.

parent 3261f802
No related branches found
No related tags found
No related merge requests found
...@@ -139,6 +139,20 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t ...@@ -139,6 +139,20 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t
if(!JS_SetProperty(cx, subobj, "newsgroup", &val)) if(!JS_SetProperty(cx, subobj, "newsgroup", &val))
return(NULL); return(NULL);
if(user==NULL || chk_ar(cfg,cfg->sub[d]->read_ar,user))
val=BOOLEAN_TO_JSVAL(JS_TRUE);
else
val=BOOLEAN_TO_JSVAL(JS_FALSE);
if(!JS_SetProperty(cx, subobj, "can_read", &val))
return(NULL);
if(user==NULL || chk_ar(cfg,cfg->sub[d]->post_ar,user))
val=BOOLEAN_TO_JSVAL(JS_TRUE);
else
val=BOOLEAN_TO_JSVAL(JS_FALSE);
if(!JS_SetProperty(cx, subobj, "can_post", &val))
return(NULL);
if(!JS_GetArrayLength(cx, sub_list, &index)) if(!JS_GetArrayLength(cx, sub_list, &index))
return(NULL); return(NULL);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment