CVSTrac Legacy Code

Check-in [d3b0aa6518]
Login

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

Overview
Comment:minor fixups to the RSS HTML, cleans up inspections a touch
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d3b0aa65186a8f8371d9fe5da955ca74f12cce4e
User & Date: cpb 2009-12-09 15:42:03
Context
2009-12-23
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
2009-12-06
15:57
(#789) searching on a ticket or checking number in the appropriate format will take the user directly to the appropriate page. Implemented =is_ticket()= and =is_chng()= functions to simplify the process and use them in /cvstrac/format.c as well. check-in: 167d2fdefd user: cpb tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to rss.c.

601
602
603
604
605
606
607
608
609
610
611

612
613
614
615
616
617
618
...
626
627
628
629
630
631
632

633
634
635
636
637
638
639
640
641
642

643
644
645
646
647
648
649

650
651
652
653

654
655
656
657
658
659
660

661
662
663
664
665
666
667
668
669
670
671
672
673
          zWiki = db_short_query("SELECT comment FROM inspect "
                                 "WHERE cn=%d AND inspecttime=%d "
                                 "      AND inspector='%q' AND result='%q' ",
                                 atoi(az[i+5]), thisDate, az[i+2], az[i+6]);
        }
        if( az[i+4][0] ){
          bprintf(zPrefix, sizeof(zPrefix),
                  "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;
................................................................................
      @ <link>%s(g.zBaseURL)/%s(zLink)</link>
    }
    @ <title>%R(zPrefix) %R(zSuffix)</title>

    @ <description>\

    if(zMsg){

      if( rssDetail<9 && output_trim_message(zMsg, MN_CKIN_MSG, MX_CKIN_MSG) ){
        @ %R(zMsg) [...]\
      }else{
        @ %R(zMsg)\
      }
      cgi_printf("%R","<br>");
      /* don't free this */
    }

    if( zWiki ){

      if( rssDetail<9 && output_trim_message(zWiki, MN_CKIN_MSG, MX_CKIN_MSG) ){
        zWiki = format_formatted(zWiki, zPageId);
        @ %R(zWiki) [...]%R("<br>")
      }else{
        zWiki = format_formatted(zWiki, zPageId);
        @ %R(zWiki)%R("<br>")
      }

      free(zWiki);  /* format_formatted(), no longer points to az[?] */
    }
    
    if(zTailMsg){

      if( rssDetail<9
          && output_trim_message(zTailMsg, MN_CKIN_MSG, MX_CKIN_MSG)
      ){
        @ %R(zTailMsg) [...]\
      }else{
        @ %R(zTailMsg)\
      }

      free(zTailMsg);
    }

    if( rssDetail>=5 && zWiki==0 && zMsg==0 && zTailMsg==0 ){
      @ %R(zPrefix) %R(zSuffix)\
    }
    @ </description>

    @ <pubDate>%h(cgi_rfc822_datestamp(thisDate))</pubDate>
    @ </item>
  }
  common_rss_footer();
}







|


|
>







 







>





|




>


|


|

>




>







>













601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
...
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
          zWiki = db_short_query("SELECT comment FROM inspect "
                                 "WHERE cn=%d AND inspecttime=%d "
                                 "      AND inspector='%q' AND result='%q' ",
                                 atoi(az[i+5]), thisDate, az[i+2], az[i+6]);
        }
        if( az[i+4][0] ){
          bprintf(zPrefix, sizeof(zPrefix),
                  "Inspection of [%.20s] on branch %.50s: %.20s ",
                  az[i+5], az[i+4]);
        }else{
          bprintf(zPrefix, sizeof(zPrefix), "Inspection of [%.20s]: %.20s ",
				az[i+5], az[i+6]);
        }
        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;
................................................................................
      @ <link>%s(g.zBaseURL)/%s(zLink)</link>
    }
    @ <title>%R(zPrefix) %R(zSuffix)</title>

    @ <description>\

    if(zMsg){
      cgi_printf("%R","<p>");
      if( rssDetail<9 && output_trim_message(zMsg, MN_CKIN_MSG, MX_CKIN_MSG) ){
        @ %R(zMsg) [...]\
      }else{
        @ %R(zMsg)\
      }
      cgi_printf("%R","</p>");
      /* don't free this */
    }

    if( zWiki ){
      cgi_printf("%R","<p>");
      if( rssDetail<9 && output_trim_message(zWiki, MN_CKIN_MSG, MX_CKIN_MSG) ){
        zWiki = format_formatted(zWiki, zPageId);
        @ %R(zWiki) [...]
      }else{
        zWiki = format_formatted(zWiki, zPageId);
        @ %R(zWiki)
      }
      cgi_printf("%R","</p>");
      free(zWiki);  /* format_formatted(), no longer points to az[?] */
    }
    
    if(zTailMsg){
      cgi_printf("%R","<p>");
      if( rssDetail<9
          && output_trim_message(zTailMsg, MN_CKIN_MSG, MX_CKIN_MSG)
      ){
        @ %R(zTailMsg) [...]\
      }else{
        @ %R(zTailMsg)\
      }
      cgi_printf("%R","</p>");
      free(zTailMsg);
    }

    if( rssDetail>=5 && zWiki==0 && zMsg==0 && zTailMsg==0 ){
      @ %R(zPrefix) %R(zSuffix)\
    }
    @ </description>

    @ <pubDate>%h(cgi_rfc822_datestamp(thisDate))</pubDate>
    @ </item>
  }
  common_rss_footer();
}