Fossil

Check-in [5fa4d0125c]
Login

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

Overview
Comment:Fix the display of /reports?view=byweek with an invalid user.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | andygoth-user-reports
Files: files | file ages | folders
SHA1: 5fa4d0125cbd7bf86b9c4c32c0a37de27dc0f383
User & Date: drh 2015-05-18 20:00:58.499
Context
2015-05-18
22:05
Use drop-down menus to select the user on the /reports pages. ... (check-in: 675274612d user: drh tags: andygoth-user-reports)
20:00
Fix the display of /reports?view=byweek with an invalid user. ... (check-in: 5fa4d0125c user: drh tags: andygoth-user-reports)
19:19
Move the "Activity Report" controls into drop-down menus. ... (check-in: 4d60469f15 user: drh tags: andygoth-user-reports)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/statrep.c.
588
589
590
591
592
593
594
595






596
597
598
599
600
601
602
    azYear = fossil_realloc(azYear, sizeof(char*)*(n+2));
    azYear[n] = fossil_strdup(db_column_text(&q,0));
    azYear[n+1] = azYear[n];
    if( !isValidYear && fossil_strcmp(zYear,azYear[n])==0 ) isValidYear = 1;
    n += 2;
  }
  db_finalize(&q);
  if( !isValidYear ) zYear = azYear[0];






  style_submenu_multichoice("y", n/2, (const char**)azYear, 0);
  cgi_printf("<br/>");
  db_prepare(&q,
             "SELECT DISTINCT strftime('%%W',mtime) AS wk, "
             "       count(*) AS n "
             "  FROM v_reports "
             " WHERE %Q=substr(date(mtime),1,4) "







|
>
>
>
>
>
>







588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
    azYear = fossil_realloc(azYear, sizeof(char*)*(n+2));
    azYear[n] = fossil_strdup(db_column_text(&q,0));
    azYear[n+1] = azYear[n];
    if( !isValidYear && fossil_strcmp(zYear,azYear[n])==0 ) isValidYear = 1;
    n += 2;
  }
  db_finalize(&q);
  if( !isValidYear ){
    if( n ){
      zYear = azYear[0];
    }else{
      zYear = db_text("1970","SELECT substr(date('now'),1,4);");
    }
  }
  style_submenu_multichoice("y", n/2, (const char**)azYear, 0);
  cgi_printf("<br/>");
  db_prepare(&q,
             "SELECT DISTINCT strftime('%%W',mtime) AS wk, "
             "       count(*) AS n "
             "  FROM v_reports "
             " WHERE %Q=substr(date(mtime),1,4) "