let res = Uwobo_profiles.get_params pid ?password () in
respond_html
("<html><body><ul>" ^
- String.concat "" (List.map (fun k,v -> "<li>" ^ k ^ " = " ^ v ^ "</li>") res) ^
+ String.concat "" (List.map (fun k,v -> "<li><key>" ^ k ^ "</key> = <value>" ^ v ^ "</value></li>") res) ^
"</ul></body></html>") outchan
| "/getparam" ->
let pid = req#param "id" in
match forwhat with
Some forwhat ->
let value = Uwobo_profiles.get_permission pid ?password forwhat in
- respond_html ("<html><body>" ^ (if value then "true" else "false") ^ "</body></html>") outchan
+ respond_html ("<html><body>" ^ (if value then "public" else "private") ^ "</body></html>") outchan
| None -> Http_daemon.respond_error ~code:(`Status (`Client_error `Bad_request)) outchan ;
end
| "/apply" ->
| "write" -> `Write
| "admin" -> `Admin
| _ -> assert false
- and bool_of_string s = ("public" = s) || ("true" = s)
+ and bool_of_string s = "public" = s
in
let pid, password, forwhat, value =
match Pcre.split ~pat:"," (Pcre.replace ~rex:setpermission_cmd_RE line) with