Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | If the "info" webpage references an ambiguous artifact ID, show all of the possible results. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
2c8ea5ff2cc7b1175796353243f6115f |
| User & Date: | drh 2011-03-23 12:32:05.174 |
Context
|
2011-03-23
| ||
| 13:30 | Add the "redirect:" option to CGI, to scan multiple repositories and redirect to the one that contains the requested artifact ID. ... (check-in: ef6e364866 user: drh tags: trunk) | |
| 12:32 | If the "info" webpage references an ambiguous artifact ID, show all of the possible results. ... (check-in: 2c8ea5ff2c user: drh tags: trunk) | |
| 11:25 | fix [1ee813d6] -- do not autocommit on wiki commit from cmdline ... (check-in: e1d91b9477 user: ron tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 |
**
** Figure out what the artifact ID is and jump to it.
*/
void info_page(void){
const char *zName;
Blob uuid;
int rid;
zName = P("name");
if( zName==0 ) fossil_redirect_home();
if( validate16(zName, strlen(zName)) ){
if( db_exists("SELECT 1 FROM ticket WHERE tkt_uuid GLOB '%q*'", zName) ){
tktview_page();
return;
}
if( db_exists("SELECT 1 FROM tag WHERE tagname GLOB 'event-%q*'", zName) ){
event_page();
return;
}
}
blob_set(&uuid, zName);
| > | > > > > > > > | > | 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 |
**
** Figure out what the artifact ID is and jump to it.
*/
void info_page(void){
const char *zName;
Blob uuid;
int rid;
int rc;
zName = P("name");
if( zName==0 ) fossil_redirect_home();
if( validate16(zName, strlen(zName)) ){
if( db_exists("SELECT 1 FROM ticket WHERE tkt_uuid GLOB '%q*'", zName) ){
tktview_page();
return;
}
if( db_exists("SELECT 1 FROM tag WHERE tagname GLOB 'event-%q*'", zName) ){
event_page();
return;
}
}
blob_set(&uuid, zName);
rc = name_to_uuid(&uuid, -1);
if( rc==1 ){
style_header("No Such Object");
@ <p>No such object: %h(zName)</p>
style_footer();
return;
}else if( rc==2 ){
cgi_set_parameter("src","info");
ambiguous_page();
return;
}
zName = blob_str(&uuid);
rid = db_int(0, "SELECT rid FROM blob WHERE uuid='%s'", zName);
if( rid==0 ){
style_header("Broken Link");
@ <p>No such object: %h(zName)</p>
style_footer();
|
| ︙ | ︙ |