* remove sv* in messages.c
authorWilfried Göesgens <willi@citadel.org>
Sun, 29 Aug 2010 16:56:48 +0000 (16:56 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 29 Aug 2010 16:56:48 +0000 (16:56 +0000)
webcit/messages.c
webcit/static/t/edit_message.html
webcit/static/t/mailsummary_json.html

index dd739fc5650092de222e312959b4527d2427f3fa..0d5b6214d7f549e2d88e9d4f76710d2a85f1a407 100644 (file)
@@ -811,8 +811,15 @@ void readloop(long oper, eCustomRoomRenderer ForceRenderer)
        WCC->num_displayed = 0;
 
        /* Put some helpful data in vars for mailsummary_json */
-       svputlong("READLOOP:TOTALMSGS", Stat.nummsgs);
-       svputlong("READLOOP:STARTMSG", Stat.startmsg);
+       {
+               StrBuf *Foo;
+               
+               Foo = NewStrBuf ();
+               StrBufPrintf(Foo, "%ld", Stat.nummsgs);
+               PutBstr(HKEY("__READLOOP:TOTALMSGS"), NewStrBufDup(Foo));
+               StrBufPrintf(Foo, "%ld", Stat.startmsg);
+               PutBstr(HKEY("__READLOOP:STARTMSG"), Foo);
+       }
 
        /*
         * iterate over each message. if we need to load an attachment, do it here. 
@@ -1385,8 +1392,10 @@ void display_enter(void)
                        return;
                }
        }
-       svputlong("RCPTREQUIRED", recipient_required);
-       svputlong("SUBJREQUIRED", recipient_required || subject_required);
+       if (recipient_required)
+               PutBstr(HKEY("__RCPTREQUIRED"), NewStrBufPlain(HKEY("1")));
+       if (recipient_required || subject_required)
+               PutBstr(HKEY("__SUBJREQUIRED"), NewStrBufPlain(HKEY("1")));
 
        begin_burst();
        output_headers(1, 0, 0, 0, 1, 0);
index 6c973f0805d356e797ff9bf7c1f2a9780e23230f..600dd676ae7a9e10a7671b06a4594183b2783787 100644 (file)
@@ -11,8 +11,8 @@
 <input type="hidden" name="page" value="<?BSTR("page")>">
 
 <p class="send_edit_msg">
-<?!("COND:SUBST", 1, "RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Send message")>"><?!("X", 1)>
-<??("COND:SUBST", 2, "RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Post message")>"><?!("X", 2)>
+<?!("COND:BSTR", 1, "__RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Send message")>"><?!("X", 1)>
+<??("COND:BSTR", 2, "__RCPTREQUIRED")><input type="submit" name="send_button" value="<?_("Post message")>"><?!("X", 2)>
 &nbsp;
 <!-- temporarily disabled for 7.60
   <input type="submit" name="save_button" value="<?_("Save to Drafts")>">
@@ -24,7 +24,7 @@
 <table width="100%" class="edit_msg_table">
 <tr><th><label for="from_id" >  <i><?_("from")></i> </label></th><td colspan="2">
 
-<??("COND:SUBST", 4, "RCPTREQUIRED")>
+<??("COND:BSTR", 4, "__RCPTREQUIRED")>
 <select name="display_name" size=1 id="from_id">
 <?ITERATE("PREF:VALID:EMAIL:NAME", ="prefs_section_msg_handle_select")>
 <?!("COND:THISROOM:FLAG:QR", 3, #"QR_ANONOPT")>
@@ -33,7 +33,7 @@
 </select>
 <??("X", 4)>
 
-<?!("COND:SUBST", 5, "RCPTREQUIRED")>
+<?!("COND:BSTR", 5, "__RCPTREQUIRED")>
 <select name="display_name" size=1 id="from_id">
 <?ITERATE("PREF:VALID:EMAIL:NAME", ="prefs_section_msg_sender_name_select")>
 <?!("COND:THISROOM:FLAG:QR", 3, #"QR_ANONOPT")>
@@ -48,7 +48,7 @@
 
  <i><?_("in")></i> <?ROOMNAME></td></tr>
 
-<?!("COND:SUBST", 5, "RCPTREQUIRED")>
+<?!("COND:BSTR", 5, "__RCPTREQUIRED")>
 <tr>
   <th><label for="recp_id"> <?_("To:")></label></th>
   <td><input autocomplete="off" type="text" name="recp" id="recp_id" value="<?BSTR("recp", "H")>" size=45 maxlength=1000 />
@@ -75,8 +75,7 @@
 <??("X", 5)>           
 <tr>
   <th><label for="subject_id" > 
-      <?!("COND:SUBST", 6, "SUBJREQUIRED")><?_("Subject:")><?!("X", 6)>
-      <??("COND:SUBST", 7, "SUBJREQUIRED")><?_("Subject (optional):")><??("X", 7)>
+      <?%("COND:BSTR", 6, "__SUBJREQUIRED", 0, _("Subject:"), _("Subject (optional):")>
   </label></th>
   <td colspan="2">
     <input type="text" name="subject" id="subject_id" value="<?BSTR("subject", "H")>" size=45 maxlength=70>
index 8df37aed540f08a76b25632d4b591a3fd22359f1..9bf68eb4da06bdcfcec6d94ae18b872946e7d09e 100644 (file)
@@ -1,5 +1,5 @@
-{ "nummsgs": <?READLOOP:TOTALMSGS>,
-"startmsg": <?READLOOP:STARTMSG>,
+{ "nummsgs": <?BSTR("__READLOOP:TOTALMSGS")>,
+"startmsg": <?BSTR("READLOOP:STARTMSG")>,
 "roomname": "<?ROOMNAME>",
 "msgs": [ <?ITERATE("MAIL:SUMM:MSGS", ="mailsummary_json_section",
 B("startmsg"), 0, B("stopmsg"))> ]