Check-in [2664476fbc]
Not logged in
Overview

SHA1 Hash:2664476fbc2dfd37ebda0a82e6ba19a4a557551b
Date: 2008-11-09 13:22:41
User: drh
Comment:Make sure the tkt_uuid and tkt_datetime TH1 variables are initialized on a ticket display, even if no matching ticket is found.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/tkt.c from [fe34796f85] to [d23217d9bb].

@@ -137,15 +137,21 @@
       free(zRevealed);
     }
   }else{
     db_finalize(&q);
     db_prepare(&q, "PRAGMA table_info(ticket)");
+    if( Th_Fetch("tkt_uuid",&size)==0 ){
+      Th_Store("tkt_uuid",zName);
+    }
     while( db_step(&q)==SQLITE_ROW ){
       const char *zField = db_column_text(&q, 1);
       if( Th_Fetch(zField, &size)==0 ){
         Th_Store(zField, "");
       }
+    }
+    if( Th_Fetch("tkt_datetime",&size)==0 ){
+      Th_Store("tkt_datetime","");
     }
   }
   db_finalize(&q);
 }