Fossil

Check-in [96fe10ab]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:/json/wiki/get argument handling cleanup so that it works with the newer command=... approach.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | json-multitag-test | json
Files: files | file ages | folders
SHA1:96fe10ab545495d115a8e7ee96d85f95f4434c22
User & Date: stephan 2011-10-04 09:06:48
Context
2011-10-04
19:17
fixed a c99ism. check-in: cd67b945 user: stephan tags: json-multitag-test, json
09:06
/json/wiki/get argument handling cleanup so that it works with the newer command=... approach. check-in: 96fe10ab user: stephan tags: json-multitag-test, json
2011-10-02
23:59
Minor error handling cleanups (nicer resultText strings). Removed a call to sqlite3_config() from the JSON bootstrap code which _seems_ to be the cause of an SQLITE_MISUSE warning. check-in: af72cc75 user: stephan tags: json-multitag-test, json
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/json_wiki.c.

63
64
65
66
67
68
69
70
71
72






73
74
75
76
77
78
79
  char * zUuid = NULL;
  Stmt q;
  if( !g.perm.RdWiki && !g.perm.Read ){
    json_set_err(FSL_JSON_E_DENIED,
                 "Requires 'o' or 'j' access.");
    return NULL;
  }
  zPageName = g.isHTTP
    ? json_getenv_cstr("page")
    : find_option("page","p",1);






  if(!zPageName||!*zPageName){
    json_set_err(FSL_JSON_E_MISSING_ARGS,
                 "'page' argument is missing.");
    return NULL;
  }

  zFormat = g.isHTTP







|


>
>
>
>
>
>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
  char * zUuid = NULL;
  Stmt q;
  if( !g.perm.RdWiki && !g.perm.Read ){
    json_set_err(FSL_JSON_E_DENIED,
                 "Requires 'o' or 'j' access.");
    return NULL;
  }
  zPageName = (g.isHTTP || g.json.post.o)
    ? json_getenv_cstr("page")
    : find_option("page","p",1);
  if( !zPageName && cson_value_is_string(g.json.reqPayload.v) ){
      zPageName = cson_string_cstr(cson_value_get_string(g.json.reqPayload.v));
  }
  if(!zPageName){
    zPageName = json_command_arg(g.json.dispatchDepth+1);
  }
  if(!zPageName||!*zPageName){
    json_set_err(FSL_JSON_E_MISSING_ARGS,
                 "'page' argument is missing.");
    return NULL;
  }

  zFormat = g.isHTTP