320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
|
rid = name_to_rid(g.argv[2]);
zip_of_baseline(rid, &zip);
blob_write_to_file(&zip, g.argv[3]);
}
/*
** WEBPAGE: zip
**
** Generate a ZIP archive for the baseline specified by g.zExtra
** and return that ZIP archive as the HTTP reply content.
*/
void baseline_zip_page(void){
int rid;
char *zName;
int i;
Blob zip;
login_check_credentials();
if( !g.okRead || !g.okHistory ){ login_needed(); return; }
zName = mprintf("%s", g.zExtra);
i = strlen(zName);
for(i=strlen(zName)-1; i>5; i--){
if( zName[i]=='.' ){
zName[i] = 0;
break;
}
}
|
>
|
|
|
|
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
rid = name_to_rid(g.argv[2]);
zip_of_baseline(rid, &zip);
blob_write_to_file(&zip, g.argv[3]);
}
/*
** WEBPAGE: zip
** URL: /zip/RID.zip
**
** Generate a ZIP archive for the baseline.
** Return that ZIP archive as the HTTP reply content.
*/
void baseline_zip_page(void){
int rid;
char *zName;
int i;
Blob zip;
login_check_credentials();
if( !g.okRead || !g.okHistory ){ login_needed(); return; }
zName = mprintf("%s", PD("name",""));
i = strlen(zName);
for(i=strlen(zName)-1; i>5; i--){
if( zName[i]=='.' ){
zName[i] = 0;
break;
}
}
|