Skip to content
Snippets Groups Projects
Commit 0fbdf31c authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Make argument to bbs.batch_clear() optional (clear downlaod queue by default)

... as appears to have been the intent
parent 8fc08f0d
Branches
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6538 passed
...@@ -2232,10 +2232,7 @@ js_batchclear(JSContext *cx, uintN argc, jsval *arglist) ...@@ -2232,10 +2232,7 @@ js_batchclear(JSContext *cx, uintN argc, jsval *arglist)
if((sbbs=js_GetPrivate(cx, JS_THIS_OBJECT(cx, arglist)))==NULL) if((sbbs=js_GetPrivate(cx, JS_THIS_OBJECT(cx, arglist)))==NULL)
return(JS_FALSE); return(JS_FALSE);
if(!js_argc(cx, argc, 1)) if(argc > 0 && argv[0] == JSVAL_TRUE)
return(JS_FALSE);
if(JSVAL_TO_BOOLEAN(argv[0]))
xfer_type = XFER_BATCH_UPLOAD; xfer_type = XFER_BATCH_UPLOAD;
rc=JS_SUSPENDREQUEST(cx); rc=JS_SUSPENDREQUEST(cx);
...@@ -4530,8 +4527,8 @@ static jsSyncMethodSpec js_bbs_functions[] = { ...@@ -4530,8 +4527,8 @@ static jsSyncMethodSpec js_bbs_functions[] = {
,JSDOCSTR("Add file list to batch download queue") ,JSDOCSTR("Add file list to batch download queue")
,310 ,310
}, },
{"batch_clear", js_batchclear, 1, JSTYPE_BOOLEAN, JSDOCSTR("upload=false") {"batch_clear", js_batchclear, 1, JSTYPE_BOOLEAN, JSDOCSTR("[upload_queue=false]")
,JSDOCSTR("Clear batch download (or upload) queue") ,JSDOCSTR("Clear the batch download or batch upload queue")
,320 ,320
}, },
{"view_file", js_viewfile, 1, JSTYPE_BOOLEAN, JSDOCSTR("filename") {"view_file", js_viewfile, 1, JSTYPE_BOOLEAN, JSDOCSTR("filename")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment