Fossil

Check-in [3e35068260]
Login

Check-in [3e35068260]

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

Overview
Comment:In the submenu of the /rptview page: 1) add "Reports" that links to /reportlist page (see [forum:/forumpost/612170e31007|forumpost 612170e3]); 2) fix a "Raw" link, that was incorrect for the case when /rptview is accessed through an alias. The later was addressed in [bed4b0f7fc58], but the bugfix was incomplete. Both of these amendments used to live on 'rptview-submenu-paralink' branch - this check-in places them on trunk.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 3e350682607068a76405dd8ee67306686e9ce0bdabca9d50baf73e818483b2e4
User & Date: george 2021-05-22 12:40:20.229
Context
2021-05-25
20:58
In db_database_slow(), make sure the prepared statement gets finalized even if the db_prepare_ignore_error() call fails. See [forum:/forumpost/89b5aad9aa|forum post 89b5aad9aa] for a description of the problem that this fixes. ... (check-in: eddfa8dfbe user: drh tags: trunk)
2021-05-22
12:40
In the submenu of the /rptview page: 1) add "Reports" that links to /reportlist page (see [forum:/forumpost/612170e31007|forumpost 612170e3]); 2) fix a "Raw" link, that was incorrect for the case when /rptview is accessed through an alias. The later was addressed in [bed4b0f7fc58], but the bugfix was incomplete. Both of these amendments used to live on 'rptview-submenu-paralink' branch - this check-in places them on trunk. ... (check-in: 3e35068260 user: george tags: trunk)
2021-05-21
17:58
Do not allow a merge into a closed leaf unless the --force option is used. ... (check-in: 2cc7031dde user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/report.c.
1031
1032
1033
1034
1035
1036
1037

1038
1039
1040





1041


1042
1043
1044
1045
1046
1047
1048
      zSql = mprintf("SELECT * FROM (%s) ORDER BY %d %s", zSql, nField, zDir);
    }
  }

  count = 0;
  if( !tabs ){
    struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };


    db_multi_exec("PRAGMA empty_result_callbacks=ON");
    style_set_current_feature("report");





    style_submenu_element("Raw", "rptview?tablist=1&rn=%d&%h", rn, PD("QUERY_STRING","") );


    if( g.perm.Admin
       || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){
      style_submenu_element("Edit", "rptedit?rn=%d", rn);
    }
    if( g.perm.TktFmt ){
      style_submenu_element("SQL", "rptsql?rn=%d",rn);
    }







>



>
>
>
>
>
|
>
>







1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
      zSql = mprintf("SELECT * FROM (%s) ORDER BY %d %s", zSql, nField, zDir);
    }
  }

  count = 0;
  if( !tabs ){
    struct GenerateHTML sState = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
    const char *zQS = PD("QUERY_STRING","");

    db_multi_exec("PRAGMA empty_result_callbacks=ON");
    style_set_current_feature("report");
    /* style_finish_page() should provide escaping via %h formatting */
    if( zQS[0] ){
      style_submenu_element("Raw","%R/%s?tablist=1&%s",g.zPath,zQS);
      style_submenu_element("Reports","%R/reportlist?%s",zQS);
    } else {
      style_submenu_element("Raw","%R/%s?tablist=1",g.zPath);
      style_submenu_element("Reports","%R/reportlist");
    }
    if( g.perm.Admin
       || (g.perm.TktFmt && g.zLogin && fossil_strcmp(g.zLogin,zOwner)==0) ){
      style_submenu_element("Edit", "rptedit?rn=%d", rn);
    }
    if( g.perm.TktFmt ){
      style_submenu_element("SQL", "rptsql?rn=%d",rn);
    }
Changes to src/style.c.
903
904
905
906
907
908
909




910
911
912
913
914
915
916
      cgi_tag_query_parameter("udc");
    }
    @ <div class="submenu">
    if( nSubmenu>0 ){
      qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare);
      for(i=0; i<nSubmenu; i++){
        struct Submenu *p = &aSubmenu[i];




        if( p->zLink==0 ){
          @ <span class="label">%h(p->zLabel)</span>
        }else{
          @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a>
        }
      }
    }







>
>
>
>







903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
      cgi_tag_query_parameter("udc");
    }
    @ <div class="submenu">
    if( nSubmenu>0 ){
      qsort(aSubmenu, nSubmenu, sizeof(aSubmenu[0]), submenuCompare);
      for(i=0; i<nSubmenu; i++){
        struct Submenu *p = &aSubmenu[i];
        /* switching away from the %h formatting below might be dangerous
        ** because some places use %s to compose zLabel and zLink;
        ** e.g. /rptview page
        */
        if( p->zLink==0 ){
          @ <span class="label">%h(p->zLabel)</span>
        }else{
          @ <a class="label" href="%h(p->zLink)">%h(p->zLabel)</a>
        }
      }
    }