CVSTrac Legacy Code

Check-in [7b0e1f76c7]
Login

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

Overview
Comment:check for valid ticket and cn before trying to output anything
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7b0e1f76c7e2075c92b34ff2eeb19a2ce6b7a041
User & Date: cpb 2009-12-23 14:03:53
Context
2010-11-26
15:55
(#822) add a secondary sort by date as default. Adding a "Sort by date"/"Sort by Relevance" toggle should be trivial from here. check-in: d339dba99a user: cpb tags: trunk
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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to view.c.

   726    726     const char *zWkey = wiki_key();
   727    727     const char *zTkey = tkt_key();
   728    728     const char *zCkey = chng_key();
   729    729   
   730    730     if( !strncmp(zData,zWkey,strlen(zWkey)) ){
   731    731       output_formatted(&zData[strlen(zWkey)],0);
   732    732     }else if( !strncmp(zData,zTkey,strlen(zTkey)) ){
   733         -    output_ticket(atoi(&zData[strlen(zTkey)]),rn);
          733  +    int tn = atoi(&zData[strlen(zTkey)]);
          734  +	 if( tn>0 ){
          735  +      output_ticket(tn,rn);
          736  +	 }
   734    737     }else if( !strncmp(zData,zCkey,strlen(zCkey)) ){
   735         -    output_chng(atoi(&zData[strlen(zCkey)]));
          738  +	 int cn = atoi(&zData[strlen(zCkey)]);
          739  +	 if( cn>0 ){
          740  +      output_chng(cn);
          741  +	 }
   736    742     }else{
   737    743       @ %h(zData)
   738    744     }
   739    745   }
   740    746   
   741    747   static void column_header(int rn,const char *zCol, int nCol, int nSorted,
   742    748       const char *zDirection, const char *zExtra