Fossil SCM

When the "name" parameter for the /artifact webpage (and similar pages) is ambiguous, bring up a page that allows the user to choose between the various options. Ticket [901936cf06df1b9b9a].

drh 2010-04-22 01:02 trunk
Commit d02115bbf0a001d3123c5838215d222acd9253ad
2 files changed +11 -10 +75 -3
+11 -10
--- src/info.c
+++ src/info.c
@@ -269,12 +269,12 @@
269269
int showDiff;
270270
const char *zName;
271271
272272
login_check_credentials();
273273
if( !g.okRead ){ login_needed(); return; }
274
- zName = PD("name","0");
275
- rid = name_to_rid(zName);
274
+ zName = P("name");
275
+ rid = name_to_rid_www("name");
276276
if( rid==0 ){
277277
style_header("Check-in Information Error");
278278
@ No such object: %h(g.argv[2])
279279
style_footer();
280280
return;
@@ -456,11 +456,11 @@
456456
Stmt q;
457457
int rid;
458458
459459
login_check_credentials();
460460
if( !g.okRdWiki ){ login_needed(); return; }
461
- rid = name_to_rid(PD("name","0"));
461
+ rid = name_to_rid_www("name");
462462
if( rid==0 ){
463463
style_header("Wiki Page Information Error");
464464
@ No such object: %h(g.argv[2])
465465
style_footer();
466466
return;
@@ -542,11 +542,11 @@
542542
543543
login_check_credentials();
544544
if( !g.okRead ){ login_needed(); return; }
545545
login_anonymous_available();
546546
547
- rid = name_to_rid(PD("name",""));
547
+ rid = name_to_rid_www("name");
548548
if( rid==0 ){
549549
fossil_redirect_home();
550550
}
551551
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
552552
style_header("Check-in [%.10s]", zUuid);
@@ -610,11 +610,11 @@
610610
**
611611
** * It's artifact ID
612612
** * date of check-in
613613
** * Comment & user
614614
*/
615
-static void object_description(
615
+void object_description(
616616
int rid, /* The artifact ID */
617617
int linkToView, /* Add viewer link if true */
618618
Blob *pDownloadName /* Fill with an appropriate download name */
619619
){
620620
Stmt q;
@@ -735,11 +735,11 @@
735735
}
736736
db_prepare(&q,
737737
"SELECT target, filename, datetime(mtime), user, src"
738738
" FROM attachment"
739739
" WHERE src=(SELECT uuid FROM blob WHERE rid=%d)"
740
- " ORDER BY mtime DESC",
740
+ " ORDER BY mtime DESC /*sort*/",
741741
rid
742742
);
743743
while( db_step(&q)==SQLITE_ROW ){
744744
const char *zTarget = db_column_text(&q, 0);
745745
const char *zFilename = db_column_text(&q, 1);
@@ -797,10 +797,11 @@
797797
int v2 = name_to_rid(P("v2"));
798798
Blob c1, c2, diff;
799799
800800
login_check_credentials();
801801
if( !g.okRead ){ login_needed(); return; }
802
+ if( v1==0 || v2==0 ) fossil_redirect_home();
802803
style_header("Diff");
803804
@ <h2>Differences From:</h2>
804805
@ <blockquote>
805806
object_description(v1, 1, 0);
806807
@ </blockquote>
@@ -832,11 +833,11 @@
832833
void rawartifact_page(void){
833834
int rid;
834835
const char *zMime;
835836
Blob content;
836837
837
- rid = name_to_rid(PD("name","0"));
838
+ rid = name_to_rid_www("name");
838839
zMime = PD("m","application/x-fossil-artifact");
839840
login_check_credentials();
840841
if( !g.okRead ){ login_needed(); return; }
841842
if( rid==0 ) fossil_redirect_home();
842843
content_get(rid, &content);
@@ -906,11 +907,11 @@
906907
int rid;
907908
Blob content;
908909
Blob downloadName;
909910
char *zUuid;
910911
911
- rid = name_to_rid(PD("name","0"));
912
+ rid = name_to_rid_www("name");
912913
login_check_credentials();
913914
if( !g.okRead ){ login_needed(); return; }
914915
if( rid==0 ) fossil_redirect_home();
915916
if( g.okAdmin ){
916917
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -953,11 +954,11 @@
953954
Blob downloadName;
954955
int renderAsWiki = 0;
955956
int renderAsHtml = 0;
956957
const char *zUuid;
957958
958
- rid = name_to_rid(PD("name","0"));
959
+ rid = name_to_rid_www("name");
959960
login_check_credentials();
960961
if( !g.okRead ){ login_needed(); return; }
961962
if( rid==0 ) fossil_redirect_home();
962963
if( g.okAdmin ){
963964
const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -1043,11 +1044,11 @@
10431044
char zTktName[20];
10441045
Manifest m;
10451046
10461047
login_check_credentials();
10471048
if( !g.okRdTkt ){ login_needed(); return; }
1048
- rid = name_to_rid(PD("name","0"));
1049
+ rid = name_to_rid_www("name");
10491050
if( rid==0 ){ fossil_redirect_home(); }
10501051
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
10511052
if( g.okAdmin ){
10521053
if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
10531054
style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
10541055
--- src/info.c
+++ src/info.c
@@ -269,12 +269,12 @@
269 int showDiff;
270 const char *zName;
271
272 login_check_credentials();
273 if( !g.okRead ){ login_needed(); return; }
274 zName = PD("name","0");
275 rid = name_to_rid(zName);
276 if( rid==0 ){
277 style_header("Check-in Information Error");
278 @ No such object: %h(g.argv[2])
279 style_footer();
280 return;
@@ -456,11 +456,11 @@
456 Stmt q;
457 int rid;
458
459 login_check_credentials();
460 if( !g.okRdWiki ){ login_needed(); return; }
461 rid = name_to_rid(PD("name","0"));
462 if( rid==0 ){
463 style_header("Wiki Page Information Error");
464 @ No such object: %h(g.argv[2])
465 style_footer();
466 return;
@@ -542,11 +542,11 @@
542
543 login_check_credentials();
544 if( !g.okRead ){ login_needed(); return; }
545 login_anonymous_available();
546
547 rid = name_to_rid(PD("name",""));
548 if( rid==0 ){
549 fossil_redirect_home();
550 }
551 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
552 style_header("Check-in [%.10s]", zUuid);
@@ -610,11 +610,11 @@
610 **
611 ** * It's artifact ID
612 ** * date of check-in
613 ** * Comment & user
614 */
615 static void object_description(
616 int rid, /* The artifact ID */
617 int linkToView, /* Add viewer link if true */
618 Blob *pDownloadName /* Fill with an appropriate download name */
619 ){
620 Stmt q;
@@ -735,11 +735,11 @@
735 }
736 db_prepare(&q,
737 "SELECT target, filename, datetime(mtime), user, src"
738 " FROM attachment"
739 " WHERE src=(SELECT uuid FROM blob WHERE rid=%d)"
740 " ORDER BY mtime DESC",
741 rid
742 );
743 while( db_step(&q)==SQLITE_ROW ){
744 const char *zTarget = db_column_text(&q, 0);
745 const char *zFilename = db_column_text(&q, 1);
@@ -797,10 +797,11 @@
797 int v2 = name_to_rid(P("v2"));
798 Blob c1, c2, diff;
799
800 login_check_credentials();
801 if( !g.okRead ){ login_needed(); return; }
 
802 style_header("Diff");
803 @ <h2>Differences From:</h2>
804 @ <blockquote>
805 object_description(v1, 1, 0);
806 @ </blockquote>
@@ -832,11 +833,11 @@
832 void rawartifact_page(void){
833 int rid;
834 const char *zMime;
835 Blob content;
836
837 rid = name_to_rid(PD("name","0"));
838 zMime = PD("m","application/x-fossil-artifact");
839 login_check_credentials();
840 if( !g.okRead ){ login_needed(); return; }
841 if( rid==0 ) fossil_redirect_home();
842 content_get(rid, &content);
@@ -906,11 +907,11 @@
906 int rid;
907 Blob content;
908 Blob downloadName;
909 char *zUuid;
910
911 rid = name_to_rid(PD("name","0"));
912 login_check_credentials();
913 if( !g.okRead ){ login_needed(); return; }
914 if( rid==0 ) fossil_redirect_home();
915 if( g.okAdmin ){
916 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -953,11 +954,11 @@
953 Blob downloadName;
954 int renderAsWiki = 0;
955 int renderAsHtml = 0;
956 const char *zUuid;
957
958 rid = name_to_rid(PD("name","0"));
959 login_check_credentials();
960 if( !g.okRead ){ login_needed(); return; }
961 if( rid==0 ) fossil_redirect_home();
962 if( g.okAdmin ){
963 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -1043,11 +1044,11 @@
1043 char zTktName[20];
1044 Manifest m;
1045
1046 login_check_credentials();
1047 if( !g.okRdTkt ){ login_needed(); return; }
1048 rid = name_to_rid(PD("name","0"));
1049 if( rid==0 ){ fossil_redirect_home(); }
1050 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1051 if( g.okAdmin ){
1052 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1053 style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1054
--- src/info.c
+++ src/info.c
@@ -269,12 +269,12 @@
269 int showDiff;
270 const char *zName;
271
272 login_check_credentials();
273 if( !g.okRead ){ login_needed(); return; }
274 zName = P("name");
275 rid = name_to_rid_www("name");
276 if( rid==0 ){
277 style_header("Check-in Information Error");
278 @ No such object: %h(g.argv[2])
279 style_footer();
280 return;
@@ -456,11 +456,11 @@
456 Stmt q;
457 int rid;
458
459 login_check_credentials();
460 if( !g.okRdWiki ){ login_needed(); return; }
461 rid = name_to_rid_www("name");
462 if( rid==0 ){
463 style_header("Wiki Page Information Error");
464 @ No such object: %h(g.argv[2])
465 style_footer();
466 return;
@@ -542,11 +542,11 @@
542
543 login_check_credentials();
544 if( !g.okRead ){ login_needed(); return; }
545 login_anonymous_available();
546
547 rid = name_to_rid_www("name");
548 if( rid==0 ){
549 fossil_redirect_home();
550 }
551 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
552 style_header("Check-in [%.10s]", zUuid);
@@ -610,11 +610,11 @@
610 **
611 ** * It's artifact ID
612 ** * date of check-in
613 ** * Comment & user
614 */
615 void object_description(
616 int rid, /* The artifact ID */
617 int linkToView, /* Add viewer link if true */
618 Blob *pDownloadName /* Fill with an appropriate download name */
619 ){
620 Stmt q;
@@ -735,11 +735,11 @@
735 }
736 db_prepare(&q,
737 "SELECT target, filename, datetime(mtime), user, src"
738 " FROM attachment"
739 " WHERE src=(SELECT uuid FROM blob WHERE rid=%d)"
740 " ORDER BY mtime DESC /*sort*/",
741 rid
742 );
743 while( db_step(&q)==SQLITE_ROW ){
744 const char *zTarget = db_column_text(&q, 0);
745 const char *zFilename = db_column_text(&q, 1);
@@ -797,10 +797,11 @@
797 int v2 = name_to_rid(P("v2"));
798 Blob c1, c2, diff;
799
800 login_check_credentials();
801 if( !g.okRead ){ login_needed(); return; }
802 if( v1==0 || v2==0 ) fossil_redirect_home();
803 style_header("Diff");
804 @ <h2>Differences From:</h2>
805 @ <blockquote>
806 object_description(v1, 1, 0);
807 @ </blockquote>
@@ -832,11 +833,11 @@
833 void rawartifact_page(void){
834 int rid;
835 const char *zMime;
836 Blob content;
837
838 rid = name_to_rid_www("name");
839 zMime = PD("m","application/x-fossil-artifact");
840 login_check_credentials();
841 if( !g.okRead ){ login_needed(); return; }
842 if( rid==0 ) fossil_redirect_home();
843 content_get(rid, &content);
@@ -906,11 +907,11 @@
907 int rid;
908 Blob content;
909 Blob downloadName;
910 char *zUuid;
911
912 rid = name_to_rid_www("name");
913 login_check_credentials();
914 if( !g.okRead ){ login_needed(); return; }
915 if( rid==0 ) fossil_redirect_home();
916 if( g.okAdmin ){
917 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -953,11 +954,11 @@
954 Blob downloadName;
955 int renderAsWiki = 0;
956 int renderAsHtml = 0;
957 const char *zUuid;
958
959 rid = name_to_rid_www("name");
960 login_check_credentials();
961 if( !g.okRead ){ login_needed(); return; }
962 if( rid==0 ) fossil_redirect_home();
963 if( g.okAdmin ){
964 const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
@@ -1043,11 +1044,11 @@
1044 char zTktName[20];
1045 Manifest m;
1046
1047 login_check_credentials();
1048 if( !g.okRdTkt ){ login_needed(); return; }
1049 rid = name_to_rid_www("name");
1050 if( rid==0 ){ fossil_redirect_home(); }
1051 zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
1052 if( g.okAdmin ){
1053 if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
1054 style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
1055
+75 -3
--- src/name.c
+++ src/name.c
@@ -43,11 +43,12 @@
4343
** If the input is not a tag, then try to match it as an ISO-8601 date
4444
** string YYYY-MM-DD HH:MM:SS and pick the nearest check-in to that date.
4545
** If the input is of the form "date:*" or "localtime:*" or "utc:*" then
4646
** always resolve the name as a date.
4747
**
48
-** Return the number of errors.
48
+** Return 0 on success. Return 1 if the name cannot be resolved.
49
+** Return 2 name is ambiguous.
4950
*/
5051
int name_to_uuid(Blob *pName, int iErrPriority){
5152
int rc;
5253
int sz;
5354
sz = blob_size(pName);
@@ -102,11 +103,11 @@
102103
fossil_error(iErrPriority,
103104
"multiple artifacts match"
104105
);
105106
blob_reset(pName);
106107
db_finalize(&q);
107
- return 1;
108
+ return 2;
108109
}
109110
db_finalize(&q);
110111
rc = 0;
111112
}else{
112113
rc = 0;
@@ -273,11 +274,11 @@
273274
** Convert a name to a rid. If the name is a small integer value then
274275
** just use atoi() to do the conversion. If the name contains alphabetic
275276
** characters or is not an existing rid, then use name_to_uuid then
276277
** convert the uuid to a rid.
277278
**
278
-** This routine is used in test routines to resolve command-line inputs
279
+** This routine is used by command-line routines to resolve command-line inputs
279280
** into a rid.
280281
*/
281282
int name_to_rid(const char *zName){
282283
int i;
283284
int rid;
@@ -300,5 +301,76 @@
300301
rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &name);
301302
blob_reset(&name);
302303
}
303304
return rid;
304305
}
306
+
307
+/*
308
+** WEBPAGE: ambiguous
309
+** URL: /ambiguous?name=UUID&src=WEBPAGE
310
+**
311
+** The UUID given by the name paramager is ambiguous. Display a page
312
+** that shows all possible choices and let the user select between them.
313
+*/
314
+void ambiguous_page(void){
315
+ Stmt q;
316
+ const char *zName = P("name");
317
+ const char *zSrc = P("src");
318
+ char *z;
319
+
320
+ if( zName==0 || zName[0]==0 || zSrc==0 || zSrc[0]==0 ){
321
+ fossil_redirect_home();
322
+ }
323
+ style_header("Ambiguous Artifact ID");
324
+ @ <p>The artifact id <b>%h(zName)</b> is ambiguous and might
325
+ @ mean any of the following:
326
+ @ <ol>
327
+ z = mprintf("%s", zName);
328
+ canonical16(z, strlen(z));
329
+ db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
330
+ while( db_step(&q)==SQLITE_ROW ){
331
+ const char *zUuid = db_column_text(&q, 0);
332
+ int rid = db_column_int(&q, 1);
333
+ @ <li><p><a href="%s(g.zBaseURL)/%T(zSrc)/%S(zUuid)">
334
+ @ %S(zUuid)</a> -
335
+ object_description(rid, 0, 0);
336
+ @ </p></li>
337
+ }
338
+ @ </ol>
339
+ style_footer();
340
+}
341
+
342
+/*
343
+** Convert the name in CGI parameter zParamName into a rid and return that
344
+** rid. If the CGI parameter is missing or is not a valid artifact tag,
345
+** return 0. If the CGI parameter is ambiguous, redirect to a page that
346
+** shows all possibilities and do not return.
347
+*/
348
+int name_to_rid_www(const char *zParamName){
349
+ int i, rc;
350
+ int rid;
351
+ const char *zName = P(zParamName);
352
+ Blob name;
353
+
354
+ if( zName==0 || zName[0]==0 ) return 0;
355
+ blob_init(&name, zName, -1);
356
+ rc = name_to_uuid(&name, -1);
357
+ if( rc==1 ){
358
+ blob_reset(&name);
359
+ for(i=0; zName[i] && isdigit(zName[i]); i++){}
360
+ if( zName[i]==0 ){
361
+ rid = atoi(zName);
362
+ if( db_exists("SELECT 1 FROM blob WHERE rid=%d", rid) ){
363
+ return rid;
364
+ }
365
+ }
366
+ return 0;
367
+ }else if( rc==2 ){
368
+ cgi_redirectf("%s/ambiguous/%T?src=%t", g.zTop, zName, g.zPath);
369
+ return 0;
370
+ }else{
371
+ rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &name);
372
+ blob_reset(&name);
373
+ }
374
+ return rid;
375
+}
376
+
305377
--- src/name.c
+++ src/name.c
@@ -43,11 +43,12 @@
43 ** If the input is not a tag, then try to match it as an ISO-8601 date
44 ** string YYYY-MM-DD HH:MM:SS and pick the nearest check-in to that date.
45 ** If the input is of the form "date:*" or "localtime:*" or "utc:*" then
46 ** always resolve the name as a date.
47 **
48 ** Return the number of errors.
 
49 */
50 int name_to_uuid(Blob *pName, int iErrPriority){
51 int rc;
52 int sz;
53 sz = blob_size(pName);
@@ -102,11 +103,11 @@
102 fossil_error(iErrPriority,
103 "multiple artifacts match"
104 );
105 blob_reset(pName);
106 db_finalize(&q);
107 return 1;
108 }
109 db_finalize(&q);
110 rc = 0;
111 }else{
112 rc = 0;
@@ -273,11 +274,11 @@
273 ** Convert a name to a rid. If the name is a small integer value then
274 ** just use atoi() to do the conversion. If the name contains alphabetic
275 ** characters or is not an existing rid, then use name_to_uuid then
276 ** convert the uuid to a rid.
277 **
278 ** This routine is used in test routines to resolve command-line inputs
279 ** into a rid.
280 */
281 int name_to_rid(const char *zName){
282 int i;
283 int rid;
@@ -300,5 +301,76 @@
300 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &name);
301 blob_reset(&name);
302 }
303 return rid;
304 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
305
--- src/name.c
+++ src/name.c
@@ -43,11 +43,12 @@
43 ** If the input is not a tag, then try to match it as an ISO-8601 date
44 ** string YYYY-MM-DD HH:MM:SS and pick the nearest check-in to that date.
45 ** If the input is of the form "date:*" or "localtime:*" or "utc:*" then
46 ** always resolve the name as a date.
47 **
48 ** Return 0 on success. Return 1 if the name cannot be resolved.
49 ** Return 2 name is ambiguous.
50 */
51 int name_to_uuid(Blob *pName, int iErrPriority){
52 int rc;
53 int sz;
54 sz = blob_size(pName);
@@ -102,11 +103,11 @@
103 fossil_error(iErrPriority,
104 "multiple artifacts match"
105 );
106 blob_reset(pName);
107 db_finalize(&q);
108 return 2;
109 }
110 db_finalize(&q);
111 rc = 0;
112 }else{
113 rc = 0;
@@ -273,11 +274,11 @@
274 ** Convert a name to a rid. If the name is a small integer value then
275 ** just use atoi() to do the conversion. If the name contains alphabetic
276 ** characters or is not an existing rid, then use name_to_uuid then
277 ** convert the uuid to a rid.
278 **
279 ** This routine is used by command-line routines to resolve command-line inputs
280 ** into a rid.
281 */
282 int name_to_rid(const char *zName){
283 int i;
284 int rid;
@@ -300,5 +301,76 @@
301 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &name);
302 blob_reset(&name);
303 }
304 return rid;
305 }
306
307 /*
308 ** WEBPAGE: ambiguous
309 ** URL: /ambiguous?name=UUID&src=WEBPAGE
310 **
311 ** The UUID given by the name paramager is ambiguous. Display a page
312 ** that shows all possible choices and let the user select between them.
313 */
314 void ambiguous_page(void){
315 Stmt q;
316 const char *zName = P("name");
317 const char *zSrc = P("src");
318 char *z;
319
320 if( zName==0 || zName[0]==0 || zSrc==0 || zSrc[0]==0 ){
321 fossil_redirect_home();
322 }
323 style_header("Ambiguous Artifact ID");
324 @ <p>The artifact id <b>%h(zName)</b> is ambiguous and might
325 @ mean any of the following:
326 @ <ol>
327 z = mprintf("%s", zName);
328 canonical16(z, strlen(z));
329 db_prepare(&q, "SELECT uuid, rid FROM blob WHERE uuid GLOB '%q*'", z);
330 while( db_step(&q)==SQLITE_ROW ){
331 const char *zUuid = db_column_text(&q, 0);
332 int rid = db_column_int(&q, 1);
333 @ <li><p><a href="%s(g.zBaseURL)/%T(zSrc)/%S(zUuid)">
334 @ %S(zUuid)</a> -
335 object_description(rid, 0, 0);
336 @ </p></li>
337 }
338 @ </ol>
339 style_footer();
340 }
341
342 /*
343 ** Convert the name in CGI parameter zParamName into a rid and return that
344 ** rid. If the CGI parameter is missing or is not a valid artifact tag,
345 ** return 0. If the CGI parameter is ambiguous, redirect to a page that
346 ** shows all possibilities and do not return.
347 */
348 int name_to_rid_www(const char *zParamName){
349 int i, rc;
350 int rid;
351 const char *zName = P(zParamName);
352 Blob name;
353
354 if( zName==0 || zName[0]==0 ) return 0;
355 blob_init(&name, zName, -1);
356 rc = name_to_uuid(&name, -1);
357 if( rc==1 ){
358 blob_reset(&name);
359 for(i=0; zName[i] && isdigit(zName[i]); i++){}
360 if( zName[i]==0 ){
361 rid = atoi(zName);
362 if( db_exists("SELECT 1 FROM blob WHERE rid=%d", rid) ){
363 return rid;
364 }
365 }
366 return 0;
367 }else if( rc==2 ){
368 cgi_redirectf("%s/ambiguous/%T?src=%t", g.zTop, zName, g.zPath);
369 return 0;
370 }else{
371 rid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &name);
372 blob_reset(&name);
373 }
374 return rid;
375 }
376
377

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button