CVSTrac Legacy Code

Check-in [3b02e5ca7d]
Login

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

Overview
Comment:(#783) direct inspections to the appropriate positions in chngview from both the timeline, RSS, as well as after sumitting them.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3b02e5ca7dd6d828b9c5a1e6fd9be94d28e9f6ed
User & Date: cpb 2009-03-13 02:22:05
Context
2009-03-14
02:07
(#791) fine tune the report RSS output. This makes it reasonably functional, although I'm not entirely happy with how dates are(n't) managed. check-in: 340df5c3bf user: cpb tags: trunk
2009-03-13
02:22
(#783) direct inspections to the appropriate positions in chngview from both the timeline, RSS, as well as after sumitting them. check-in: 3b02e5ca7d user: cpb tags: trunk
02:00
(#783) when we append to a ticket we get bounced back to the ticket view. Might as well get bounced back to the anchor we just added. check-in: fb194a19a2 user: cpb tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to rss.c.

608
609
610
611
612
613
614
615

616
617
618
619
620
621
622
                  "Inspection of [%.20s] on branch %.50s: ",
                  az[i+5], az[i+4]);
        }else{
          bprintf(zPrefix, sizeof(zPrefix), "Inspection of [%.20s]: ", az[i+5]);
        }
        bprintf(zSuffix, sizeof(zSuffix), " (By %.30s)", az[i+2]);
        if( g.okRead ){
          bprintf(zLink,sizeof(zLink),"chngview?cn=%.20s",az[i+5]);

        }
        break;
      }
      default:
        /* Cannot happen */
        break;
    }







|
>







608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
                  "Inspection of [%.20s] on branch %.50s: ",
                  az[i+5], az[i+4]);
        }else{
          bprintf(zPrefix, sizeof(zPrefix), "Inspection of [%.20s]: ", az[i+5]);
        }
        bprintf(zSuffix, sizeof(zSuffix), " (By %.30s)", az[i+2]);
        if( g.okRead ){
          bprintf(zLink,sizeof(zLink),"chngview?cn=%.20s#inspect%d",
            az[i+5], (int)thisDate);
        }
        break;
      }
      default:
        /* Cannot happen */
        break;
    }

Changes to timeline.c.

657
658
659
660
661
662
663

664
665

666
667
668


669
670
671
672
673
674
675
....
1108
1109
1110
1111
1112
1113
1114

1115

1116
1117
1118
1119
1120
1121
1122
....
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
        break;
      }
      case 8: { /* An inspection */
        zMsg = az[i+6];
        zIcon = "inspect";
        if( az[i+4][0] ){
          bprintf(zPrefix, sizeof(zPrefix),

                  "Inspection of [%.20s] on branch %.50s: ",
                  az[i+5], az[i+4]);

          if( showC==2 ) zContentClass="branch";
        }else{
          bprintf(zPrefix, sizeof(zPrefix), "Inspection of [%.20s]: ", az[i+5]);


        }
        bprintf(zSuffix, sizeof(zSuffix), " (By %z)", format_user(az[i+2]));
        break;
      }
      default:
        /* Cannot happen */
        break;
................................................................................
    @ </table></td></tr>
  }
  @ <tr><td align="right" valign="top">Inspections:</td><td colspan=2>
  for(i=0; azInspect[i]; i+=4){
    tx = (time_t)atoi(azInspect[i]);
    pTm = gmtime(&tx);
    strftime(zDate, sizeof(zDate), "%Y-%b-%d %H:%M:%S (UTC)", pTm);

    @ <div>%s(zDate) by %h(azInspect[i+1]): %h(azInspect[i+2])</div>

    if(azInspect[i+3] && azInspect[i+3][0]){
      @ <div class="wiki">
      output_formatted(azInspect[i+3], 0);
      @ </div>
    }
  }
  @ </td></tr>
................................................................................
  if( zResult && P("ok") ){
    time_t now;
    time(&now);
    login_check_csrf_token();
    db_execute("INSERT INTO inspect(cn,inspecttime,inspector,result,comment) "
       "VALUES(%d,%d,'%q','%q','%q')",
       cn, now, g.zUser, zResult, zComment);
    cgi_redirect(zCancel);
    return;
  }
  common_add_help_item("CvstracInspection");
  common_header("Inspection Report");

  @ <form action="inspect" method="POST">
  login_output_csrf_token();







>
|
<
>


|
>
>







 







>
|
>







 







|







657
658
659
660
661
662
663
664
665

666
667
668
669
670
671
672
673
674
675
676
677
678
....
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
....
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
        break;
      }
      case 8: { /* An inspection */
        zMsg = az[i+6];
        zIcon = "inspect";
        if( az[i+4][0] ){
          bprintf(zPrefix, sizeof(zPrefix),
                  "{link:chngview?cn=%.20s#inspect%d Inspection}"
                  " of [%.20s] on branch %.50s: ",

                  az[i+5], (int)thisDate, az[i+5], az[i+4]);
          if( showC==2 ) zContentClass="branch";
        }else{
          bprintf(zPrefix, sizeof(zPrefix),
            "{link:chngview?cn=%.20s#inspect%d Inspection} of [%.20s]: ",
             az[i+5], (int)thisDate, az[i+5]);
        }
        bprintf(zSuffix, sizeof(zSuffix), " (By %z)", format_user(az[i+2]));
        break;
      }
      default:
        /* Cannot happen */
        break;
................................................................................
    @ </table></td></tr>
  }
  @ <tr><td align="right" valign="top">Inspections:</td><td colspan=2>
  for(i=0; azInspect[i]; i+=4){
    tx = (time_t)atoi(azInspect[i]);
    pTm = gmtime(&tx);
    strftime(zDate, sizeof(zDate), "%Y-%b-%d %H:%M:%S (UTC)", pTm);
    @ <div><a name="inspect%d((int)tx)">
    @   %s(zDate) by %h(azInspect[i+1]): %h(azInspect[i+2])
    @ </div>
    if(azInspect[i+3] && azInspect[i+3][0]){
      @ <div class="wiki">
      output_formatted(azInspect[i+3], 0);
      @ </div>
    }
  }
  @ </td></tr>
................................................................................
  if( zResult && P("ok") ){
    time_t now;
    time(&now);
    login_check_csrf_token();
    db_execute("INSERT INTO inspect(cn,inspecttime,inspector,result,comment) "
       "VALUES(%d,%d,'%q','%q','%q')",
       cn, now, g.zUser, zResult, zComment);
    cgi_redirect(mprintf("chngview?cn=%d#inspect%d", cn, (int)now));
    return;
  }
  common_add_help_item("CvstracInspection");
  common_header("Inspection Report");

  @ <form action="inspect" method="POST">
  login_output_csrf_token();