Fossil SCM
Improvements to activity reports.
Commit
c94dc804c4b6c893ad4397e86707e6306928eda4
Parent
604862508bc9f30…
1 file changed
+1
-5
+1
-5
| --- src/statrep.c | ||
| +++ src/statrep.c | ||
| @@ -668,11 +668,10 @@ | ||
| 668 | 668 | ** |
| 669 | 669 | ** y=YYYY The year to report (default is the server's |
| 670 | 670 | ** current year). |
| 671 | 671 | */ |
| 672 | 672 | void stats_report_page(){ |
| 673 | - HQuery url; /* URL for various branch links */ | |
| 674 | 673 | const char *zView = P("view"); /* Which view/report to show. */ |
| 675 | 674 | int eType = RPT_NONE; /* Numeric code for view/report to show */ |
| 676 | 675 | int i; /* Loop counter */ |
| 677 | 676 | const char *zUserName; /* Name of user */ |
| 678 | 677 | const char *azView[16]; /* Drop-down menu of view types */ |
| @@ -710,12 +709,10 @@ | ||
| 710 | 709 | if( fossil_strcmp(zView, aViewType[i].zVal)==0 ){ |
| 711 | 710 | eType = aViewType[i].eType; |
| 712 | 711 | break; |
| 713 | 712 | } |
| 714 | 713 | } |
| 715 | - url_initialize(&url, "reports"); | |
| 716 | - cgi_query_parameters_to_url(&url); | |
| 717 | 714 | if( eType!=RPT_NONE ){ |
| 718 | 715 | int nView = 0; /* Slots used in azView[] */ |
| 719 | 716 | for(i=0; i<ArraySize(aViewType); i++){ |
| 720 | 717 | azView[nView++] = aViewType[i].zVal; |
| 721 | 718 | azView[nView++] = aViewType[i].zName; |
| @@ -723,21 +720,20 @@ | ||
| 723 | 720 | if( eType!=RPT_BYFILE ){ |
| 724 | 721 | style_submenu_multichoice("type", ArraySize(azType)/2, azType, 0); |
| 725 | 722 | } |
| 726 | 723 | style_submenu_multichoice("view", nView/2, azView, 0); |
| 727 | 724 | if( eType!=RPT_BYUSER ){ |
| 728 | - style_submenu_sql("u","User:", | |
| 725 | + style_submenu_sql("user","User:", | |
| 729 | 726 | "SELECT '', 'All Users' UNION ALL " |
| 730 | 727 | "SELECT x, x FROM (" |
| 731 | 728 | " SELECT DISTINCT trim(coalesce(euser,user)) AS x FROM event %s" |
| 732 | 729 | " ORDER BY 1 COLLATE nocase) WHERE x!=''", |
| 733 | 730 | eType==RPT_BYFILE ? "WHERE type='ci'" : "" |
| 734 | 731 | ); |
| 735 | 732 | } |
| 736 | 733 | } |
| 737 | 734 | style_submenu_element("Stats", "Stats", "%R/stat"); |
| 738 | - url_reset(&url); | |
| 739 | 735 | style_header("Activity Reports"); |
| 740 | 736 | switch( eType ){ |
| 741 | 737 | case RPT_BYYEAR: |
| 742 | 738 | stats_report_by_month_year(0, 0, zUserName); |
| 743 | 739 | break; |
| 744 | 740 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -668,11 +668,10 @@ | |
| 668 | ** |
| 669 | ** y=YYYY The year to report (default is the server's |
| 670 | ** current year). |
| 671 | */ |
| 672 | void stats_report_page(){ |
| 673 | HQuery url; /* URL for various branch links */ |
| 674 | const char *zView = P("view"); /* Which view/report to show. */ |
| 675 | int eType = RPT_NONE; /* Numeric code for view/report to show */ |
| 676 | int i; /* Loop counter */ |
| 677 | const char *zUserName; /* Name of user */ |
| 678 | const char *azView[16]; /* Drop-down menu of view types */ |
| @@ -710,12 +709,10 @@ | |
| 710 | if( fossil_strcmp(zView, aViewType[i].zVal)==0 ){ |
| 711 | eType = aViewType[i].eType; |
| 712 | break; |
| 713 | } |
| 714 | } |
| 715 | url_initialize(&url, "reports"); |
| 716 | cgi_query_parameters_to_url(&url); |
| 717 | if( eType!=RPT_NONE ){ |
| 718 | int nView = 0; /* Slots used in azView[] */ |
| 719 | for(i=0; i<ArraySize(aViewType); i++){ |
| 720 | azView[nView++] = aViewType[i].zVal; |
| 721 | azView[nView++] = aViewType[i].zName; |
| @@ -723,21 +720,20 @@ | |
| 723 | if( eType!=RPT_BYFILE ){ |
| 724 | style_submenu_multichoice("type", ArraySize(azType)/2, azType, 0); |
| 725 | } |
| 726 | style_submenu_multichoice("view", nView/2, azView, 0); |
| 727 | if( eType!=RPT_BYUSER ){ |
| 728 | style_submenu_sql("u","User:", |
| 729 | "SELECT '', 'All Users' UNION ALL " |
| 730 | "SELECT x, x FROM (" |
| 731 | " SELECT DISTINCT trim(coalesce(euser,user)) AS x FROM event %s" |
| 732 | " ORDER BY 1 COLLATE nocase) WHERE x!=''", |
| 733 | eType==RPT_BYFILE ? "WHERE type='ci'" : "" |
| 734 | ); |
| 735 | } |
| 736 | } |
| 737 | style_submenu_element("Stats", "Stats", "%R/stat"); |
| 738 | url_reset(&url); |
| 739 | style_header("Activity Reports"); |
| 740 | switch( eType ){ |
| 741 | case RPT_BYYEAR: |
| 742 | stats_report_by_month_year(0, 0, zUserName); |
| 743 | break; |
| 744 |
| --- src/statrep.c | |
| +++ src/statrep.c | |
| @@ -668,11 +668,10 @@ | |
| 668 | ** |
| 669 | ** y=YYYY The year to report (default is the server's |
| 670 | ** current year). |
| 671 | */ |
| 672 | void stats_report_page(){ |
| 673 | const char *zView = P("view"); /* Which view/report to show. */ |
| 674 | int eType = RPT_NONE; /* Numeric code for view/report to show */ |
| 675 | int i; /* Loop counter */ |
| 676 | const char *zUserName; /* Name of user */ |
| 677 | const char *azView[16]; /* Drop-down menu of view types */ |
| @@ -710,12 +709,10 @@ | |
| 709 | if( fossil_strcmp(zView, aViewType[i].zVal)==0 ){ |
| 710 | eType = aViewType[i].eType; |
| 711 | break; |
| 712 | } |
| 713 | } |
| 714 | if( eType!=RPT_NONE ){ |
| 715 | int nView = 0; /* Slots used in azView[] */ |
| 716 | for(i=0; i<ArraySize(aViewType); i++){ |
| 717 | azView[nView++] = aViewType[i].zVal; |
| 718 | azView[nView++] = aViewType[i].zName; |
| @@ -723,21 +720,20 @@ | |
| 720 | if( eType!=RPT_BYFILE ){ |
| 721 | style_submenu_multichoice("type", ArraySize(azType)/2, azType, 0); |
| 722 | } |
| 723 | style_submenu_multichoice("view", nView/2, azView, 0); |
| 724 | if( eType!=RPT_BYUSER ){ |
| 725 | style_submenu_sql("user","User:", |
| 726 | "SELECT '', 'All Users' UNION ALL " |
| 727 | "SELECT x, x FROM (" |
| 728 | " SELECT DISTINCT trim(coalesce(euser,user)) AS x FROM event %s" |
| 729 | " ORDER BY 1 COLLATE nocase) WHERE x!=''", |
| 730 | eType==RPT_BYFILE ? "WHERE type='ci'" : "" |
| 731 | ); |
| 732 | } |
| 733 | } |
| 734 | style_submenu_element("Stats", "Stats", "%R/stat"); |
| 735 | style_header("Activity Reports"); |
| 736 | switch( eType ){ |
| 737 | case RPT_BYYEAR: |
| 738 | stats_report_by_month_year(0, 0, zUserName); |
| 739 | break; |
| 740 |