CVSTrac Legacy Code

Check-in [79dd28a1ad]
Login

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

Overview
Comment:oops... make sure it's a valid ticket number
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:79dd28a1ad0afa835633f7d96f128732921242fe
User & Date: cpb 2009-12-23 14:03:25
Context
2009-12-23
14:03
check for valid ticket and cn before trying to output anything check-in: 7b0e1f76c7 user: cpb tags: trunk
14:03
oops... make sure it's a valid ticket number check-in: 79dd28a1ad user: cpb tags: trunk
2009-12-09
15:42
minor fixups to the RSS HTML, cleans up inspections a touch check-in: d3b0aa6518 user: cpb tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to format.c.

814
815
816
817
818
819
820
821
822
823

824
825

826
827
828
829
830
831
832
void output_ticket(int tn, int rn){
  @ <span class="ticket">\
  if( g.okRead ){
    const char *zClass = NULL;
    const char *zTitle = NULL;
    char *zLink = (rn>0) ? format_link("tktview?tn=%d,%d",tn,rn)
                         : format_link("tktview?tn=%d",tn);
    if( g.okTicketLink ) {
      char **az = db_query(
        "SELECT title,status FROM ticket WHERE tn=%d", tn);

      zTitle = az[0];
      zClass = az[1];

    }

    @ <a href="%z(zLink)" \
    if( zClass && zClass[0] ){
      @ class="%h(zClass)"
    }
    if( zTitle && zTitle[0] ){







|


>
|
|
>







814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
void output_ticket(int tn, int rn){
  @ <span class="ticket">\
  if( g.okRead ){
    const char *zClass = NULL;
    const char *zTitle = NULL;
    char *zLink = (rn>0) ? format_link("tktview?tn=%d,%d",tn,rn)
                         : format_link("tktview?tn=%d",tn);
    if( g.okTicketLink && tn>0 ) {
      char **az = db_query(
        "SELECT title,status FROM ticket WHERE tn=%d", tn);
		if( az && az[0] ){
			zTitle = az[0];
			zClass = az[1];
		}
    }

    @ <a href="%z(zLink)" \
    if( zClass && zClass[0] ){
      @ class="%h(zClass)"
    }
    if( zTitle && zTitle[0] ){