Fossil

Check-in [faaf7387]
Login

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

Overview
Comment:Removed an unnecessary strcmp(). Removed some debuggering code which corrupted the output of /json/tag/find in raw mode.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | json-multitag-test | json-add-tag-test | json
Files: files | file ages | folders
SHA1: faaf7387d90f126ec84f46459b7204238fa2c6ab
User & Date: stephan 2011-10-07 03:24:33
Context
2011-10-07
03:51
fixed how many path parts are generated for the "command" response property. check-in: 3d6cc1df user: stephan tags: json-multitag-test, json
03:24
Removed an unnecessary strcmp(). Removed some debuggering code which corrupted the output of /json/tag/find in raw mode. check-in: faaf7387 user: stephan tags: json-multitag-test, json-add-tag-test, json
03:09
fixed whoami requests in demo apps to notice when the user has been logged out (and logs him in with the new auth token). check-in: ccc90734 user: stephan tags: json-multitag-test, json
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/json_tag.c.

258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
...
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
               " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
               "   AND tagxref.tagtype>0"
               "   AND blob.rid=tagxref.rid"
               "%s LIMIT %d",
               zName,
               (limit>0)?"":"--", limit
               );
    printf("SQL=%s\n", blob_buffer(&q.sql));
    while( db_step(&q)==SQLITE_ROW ){
      if(!listV){
        listV = cson_value_new_array();
        list = cson_value_get_array(listV);
      }
      cson_array_append(list, cson_sqlite3_column_to_value(q.pStmt,0));
    }
................................................................................
      const char *zName = db_column_text(&q, 0);
      if(NULL==arV){
        arV = cson_value_new_array();
        ar = cson_value_get_array(arV);
        cson_object_set(pay, "tags", arV);
        tagsVal = arV;
      }
      if(!fTicket && (0==strncmp(zName, "tkt-", 4))) continue;
      else if( !fRaw && (0==strncmp(zName, "sym-", 4))){
        zName += 4;
        assert( *zName );
      }
      cson_array_append(ar, json_new_string(zName));
    }
    db_finalize(&q);







<







 







<







258
259
260
261
262
263
264

265
266
267
268
269
270
271
...
445
446
447
448
449
450
451

452
453
454
455
456
457
458
               " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q)"
               "   AND tagxref.tagtype>0"
               "   AND blob.rid=tagxref.rid"
               "%s LIMIT %d",
               zName,
               (limit>0)?"":"--", limit
               );

    while( db_step(&q)==SQLITE_ROW ){
      if(!listV){
        listV = cson_value_new_array();
        list = cson_value_get_array(listV);
      }
      cson_array_append(list, cson_sqlite3_column_to_value(q.pStmt,0));
    }
................................................................................
      const char *zName = db_column_text(&q, 0);
      if(NULL==arV){
        arV = cson_value_new_array();
        ar = cson_value_get_array(arV);
        cson_object_set(pay, "tags", arV);
        tagsVal = arV;
      }

      else if( !fRaw && (0==strncmp(zName, "sym-", 4))){
        zName += 4;
        assert( *zName );
      }
      cson_array_append(ar, json_new_string(zName));
    }
    db_finalize(&q);