35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
*/
/*
** Implementation of the /json/status page.
**
*/
cson_value * json_page_status(){
char const * zSql = NULL;
Stmt q = empty_Stmt;
cson_object * oPay;
/*cson_object * files;*/
int vid, nErr = 0;
cson_object * tmpO;
char * zTmp;
i64 iMtime;
|
<
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
*/
/*
** Implementation of the /json/status page.
**
*/
cson_value * json_page_status(){
Stmt q = empty_Stmt;
cson_object * oPay;
/*cson_object * files;*/
int vid, nErr = 0;
cson_object * tmpO;
char * zTmp;
i64 iMtime;
|
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
"SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
" FROM vfile "
" WHERE is_selected(id)"
" AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1"
);
while( db_step(&q)==SQLITE_ROW ){
const char *zPathname = db_column_text(&q,0);
const char *zDisplayName = zPathname;
int isDeleted = db_column_int(&q, 1);
int isChnged = db_column_int(&q,2);
int isNew = db_column_int(&q,3)==0;
int isRenamed = db_column_int(&q,4);
cson_object * oFile;
char const * zStatus = "???";
char * zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
|
<
|
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
"SELECT pathname, deleted, chnged, rid, coalesce(origname!=pathname,0)"
" FROM vfile "
" WHERE is_selected(id)"
" AND (chnged OR deleted OR rid=0 OR pathname!=origname) ORDER BY 1"
);
while( db_step(&q)==SQLITE_ROW ){
const char *zPathname = db_column_text(&q,0);
int isDeleted = db_column_int(&q, 1);
int isChnged = db_column_int(&q,2);
int isNew = db_column_int(&q,3)==0;
int isRenamed = db_column_int(&q,4);
cson_object * oFile;
char const * zStatus = "???";
char * zFullName = mprintf("%s%s", g.zLocalRoot, zPathname);
|