Skip to content
Snippets Groups Projects
Commit 799afb80 authored by rswindell's avatar rswindell
Browse files

Now always creates the "link" property again (as in v3.10j).

parent aa8c38a1
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,9 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if(areaobj==NULL)
return(NULL);
if(html_index_file==NULL)
html_index_file="";
#ifdef _DEBUG
js_DescribeObject(cx,areaobj,"File Transfer Areas");
#endif
......@@ -117,12 +120,10 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, libobj, "description", &val))
return(NULL);
if(html_index_file!=NULL) {
sprintf(vpath,"/%s/%s",cfg->lib[l]->sname,html_index_file);
val=STRING_TO_JSVAL(JS_NewStringCopyZ(cx, vpath));
if(!JS_SetProperty(cx, libobj, "link", &val))
return(NULL);
}
sprintf(vpath,"/%s/%s",cfg->lib[l]->sname,html_index_file);
val=STRING_TO_JSVAL(JS_NewStringCopyZ(cx, vpath));
if(!JS_SetProperty(cx, libobj, "link", &val))
return(NULL);
#ifdef _DEBUG
js_DescribeObject(cx,libobj,"File Transfer Libraries");
......@@ -205,15 +206,13 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_
if(!JS_SetProperty(cx, dirobj, "download_credit_pct", &val))
return(NULL);
if(html_index_file!=NULL) {
sprintf(vpath,"/%s/%s/%s"
,cfg->lib[l]->sname
,cfg->dir[d]->code
,html_index_file);
val=STRING_TO_JSVAL(JS_NewStringCopyZ(cx, vpath));
if(!JS_SetProperty(cx, dirobj, "link", &val))
return(NULL);
}
sprintf(vpath,"/%s/%s/%s"
,cfg->lib[l]->sname
,cfg->dir[d]->code
,html_index_file);
val=STRING_TO_JSVAL(JS_NewStringCopyZ(cx, vpath));
if(!JS_SetProperty(cx, dirobj, "link", &val))
return(NULL);
if(user==NULL || chk_ar(cfg,cfg->dir[d]->ul_ar,user))
val=BOOLEAN_TO_JSVAL(JS_TRUE);
......
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