Fossil

Check-in [f44a3f70]
Login

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

Overview
Comment:Fix incorrect redirects to "/home" when there is an ambiguous name on the artifact webpage. Ticket [901936cf06df1b9b]. Still need to add code that will list all possible answers and let the user choose.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f44a3f70beee4be29945788cfc0f4e64cca54af5
User & Date: drh 2010-04-22 00:00:28
Context
2010-04-22
00:12
Remove dead code and fix a comment - issues found while looking for an unrelated problem. check-in: d4125d55 user: drh tags: trunk
00:00
Fix incorrect redirects to "/home" when there is an ambiguous name on the artifact webpage. Ticket [901936cf06df1b9b]. Still need to add code that will list all possible answers and let the user choose. check-in: f44a3f70 user: drh tags: trunk
2010-04-15
23:53
Update to the latest stable check-in of SQLite, as a beta-test for SQLite. check-in: 7c37b46b user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/info.c.

834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
...
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
...
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
  const char *zMime;
  Blob content;

  rid = name_to_rid(PD("name","0"));
  zMime = PD("m","application/x-fossil-artifact");
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  if( rid==0 ){ cgi_redirect("/home"); }
  content_get(rid, &content);
  cgi_set_content_type(zMime);
  cgi_set_content(&content);
}

/*
** Render a hex dump of a file.
................................................................................
  Blob content;
  Blob downloadName;
  char *zUuid;

  rid = name_to_rid(PD("name","0"));
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  if( rid==0 ){ cgi_redirect("/home"); }
  if( g.okAdmin ){
    const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
    if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
      style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
            g.zTop, zUuid);
    }else{
      style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
................................................................................
  int renderAsWiki = 0;
  int renderAsHtml = 0;
  const char *zUuid;

  rid = name_to_rid(PD("name","0"));
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  if( rid==0 ){ cgi_redirect("/home"); }
  if( g.okAdmin ){
    const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
    if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
      style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
            g.zTop, zUuid);
    }else{
      style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",







|







 







|







 







|







834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
...
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
...
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
  const char *zMime;
  Blob content;

  rid = name_to_rid(PD("name","0"));
  zMime = PD("m","application/x-fossil-artifact");
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  if( rid==0 ) fossil_redirect_home();
  content_get(rid, &content);
  cgi_set_content_type(zMime);
  cgi_set_content(&content);
}

/*
** Render a hex dump of a file.
................................................................................
  Blob content;
  Blob downloadName;
  char *zUuid;

  rid = name_to_rid(PD("name","0"));
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  if( rid==0 ) fossil_redirect_home();
  if( g.okAdmin ){
    const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
    if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
      style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
            g.zTop, zUuid);
    }else{
      style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",
................................................................................
  int renderAsWiki = 0;
  int renderAsHtml = 0;
  const char *zUuid;

  rid = name_to_rid(PD("name","0"));
  login_check_credentials();
  if( !g.okRead ){ login_needed(); return; }
  if( rid==0 ) fossil_redirect_home();
  if( g.okAdmin ){
    const char *zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", rid);
    if( db_exists("SELECT 1 FROM shun WHERE uuid='%s'", zUuid) ){
      style_submenu_element("Unshun","Unshun", "%s/shun?uuid=%s&sub=1",
            g.zTop, zUuid);
    }else{
      style_submenu_element("Shun","Shun", "%s/shun?shun=%s#addshun",