Diff
Not logged in

Differences From:

File src/tkt.c part of check-in [fde1d82372] - Cut over all code to use TH1 instead of subscript. Completely remove the subscript interpreter from the source tree. by drh on 2008-02-13 22:31:59. [view]

To:

File src/tkt.c part of check-in [3122fc4c7e] - Continuing work on tickets (still not working right.) Improvements to the web pages. by drh on 2008-02-14 02:49:41. Also file src/tkt.c part of check-in [588bb7cd73] - Merged to ed26056bb5. by aku on 2008-02-24 18:50:35. [view]

@@ -253,9 +253,9 @@
   char *zConfig;
   Th_FossilInit();
   zConfig = db_text((char*)zDefaultTicketConfig,
              "SELECT value FROM config WHERE name='ticket-configuration'");
-  Th_Eval(g.interp, 0, zConfig, -1);
+  Th_Eval(g.interp, 0, (const uchar*)zConfig, -1);
 }
 
 /*
 ** Recreate the ticket table.
@@ -320,10 +320,8 @@
   Th_Render(zScript);
   style_footer();
 }
 
-
-
 /*
 ** TH command:   append_field FIELD STRING
 **
 ** FIELD is the name of a database column to which we might want
@@ -343,9 +341,9 @@
   if( argc!=3 ){
     return Th_WrongNumArgs(interp, "append_field FIELD STRING");
   }
   for(idx=0; idx<nField; idx++){
-    if( strncmp(azField[idx], argv[1], argl[1])==0
+    if( strncmp(azField[idx], (const char*)argv[1], argl[1])==0
         && azField[idx][argl[1]]==0 ){
       break;
     }
   }
@@ -450,8 +448,9 @@
   if( !g.okNewTkt ){ login_needed(); return; }
   style_header("New Ticket");
   ticket_init();
   getAllTicketFields();
+  initializeVariablesFromDb();
   initializeVariablesFromCGI();
   @ <form method="POST" action="%s(g.zBaseURL)/%s(g.zPath)">
   zScript = (char*)Th_Fetch("tktnew_template", &nScript);
   zScript = mprintf("%.*s", nScript, zScript);
@@ -546,11 +545,11 @@
      "tktedit_template",
   };
 
   Th_FossilInit();
-  rc = Th_Eval(g.interp, 0, zConfig, strlen(zConfig));
+  rc = Th_Eval(g.interp, 0, (const uchar*)zConfig, strlen(zConfig));
   if( rc!=TH_OK ){
-    zErr = Th_TakeResult(g.interp, 0);
+    zErr = (char*)Th_TakeResult(g.interp, 0);
     return zErr;
   }
   for(i=0; i<sizeof(azRequired)/sizeof(azRequired[0]); i++){
     z = Th_Fetch(azRequired[i], &n);