Fossil SCM

Improvements to activity reports.

drh 2015-12-23 01:36 trunk merge
Commit c94dc804c4b6c893ad4397e86707e6306928eda4
1 file changed +1 -5
+1 -5
--- src/statrep.c
+++ src/statrep.c
@@ -668,11 +668,10 @@
668668
**
669669
** y=YYYY The year to report (default is the server's
670670
** current year).
671671
*/
672672
void stats_report_page(){
673
- HQuery url; /* URL for various branch links */
674673
const char *zView = P("view"); /* Which view/report to show. */
675674
int eType = RPT_NONE; /* Numeric code for view/report to show */
676675
int i; /* Loop counter */
677676
const char *zUserName; /* Name of user */
678677
const char *azView[16]; /* Drop-down menu of view types */
@@ -710,12 +709,10 @@
710709
if( fossil_strcmp(zView, aViewType[i].zVal)==0 ){
711710
eType = aViewType[i].eType;
712711
break;
713712
}
714713
}
715
- url_initialize(&url, "reports");
716
- cgi_query_parameters_to_url(&url);
717714
if( eType!=RPT_NONE ){
718715
int nView = 0; /* Slots used in azView[] */
719716
for(i=0; i<ArraySize(aViewType); i++){
720717
azView[nView++] = aViewType[i].zVal;
721718
azView[nView++] = aViewType[i].zName;
@@ -723,21 +720,20 @@
723720
if( eType!=RPT_BYFILE ){
724721
style_submenu_multichoice("type", ArraySize(azType)/2, azType, 0);
725722
}
726723
style_submenu_multichoice("view", nView/2, azView, 0);
727724
if( eType!=RPT_BYUSER ){
728
- style_submenu_sql("u","User:",
725
+ style_submenu_sql("user","User:",
729726
"SELECT '', 'All Users' UNION ALL "
730727
"SELECT x, x FROM ("
731728
" SELECT DISTINCT trim(coalesce(euser,user)) AS x FROM event %s"
732729
" ORDER BY 1 COLLATE nocase) WHERE x!=''",
733730
eType==RPT_BYFILE ? "WHERE type='ci'" : ""
734731
);
735732
}
736733
}
737734
style_submenu_element("Stats", "Stats", "%R/stat");
738
- url_reset(&url);
739735
style_header("Activity Reports");
740736
switch( eType ){
741737
case RPT_BYYEAR:
742738
stats_report_by_month_year(0, 0, zUserName);
743739
break;
744740
--- 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

Keyboard Shortcuts

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