Apply patches sent by Harlow Solutions -- for WebCit
authorArt Cancro <ajc@citadel.org>
Tue, 2 May 2023 02:42:14 +0000 (22:42 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 2 May 2023 02:42:14 +0000 (22:42 -0400)
Fix missing parenthesis in Edit Bio and Wiki empty page
Fix multiple pages and code to start/end <div> sections properly.
In the Summary page, add line breaks to the “About this server” widget to make it more readable.
In contact view (msg_display) fix missing address label title (invalid variable used) and use variables for other labels instead of hard coding.
When displaying Contact address, remove blank lines if P.O. Box or street fields are blank.
subst.c: Expand ITEM format X to allow appending text after a non-blank ITEM value.  Used to add line breaks only on non-blank lines, etc.
download.c and static.c: Fix invalid reference to blank gif because the output function added the request line from original image to the link which is invalid.

16 files changed:
citadel/utils/ctdl3264.c
webcit/downloads.c
webcit/static.c
webcit/static/t/aide/display_menu.html
webcit/static/t/aide/global_config.html
webcit/static/t/display_main_menu.html
webcit/static/t/msg_listview.html
webcit/static/t/summary/page.html
webcit/static/t/trailing.html
webcit/static/t/user/edit_bio.html
webcit/static/t/user/show.html
webcit/static/t/vcard/list/item.html
webcit/static/t/vcard/msg_display.html
webcit/static/t/wiki/empty.html
webcit/subst.c
webcit/vcard_edit.c

index 6f412c3421262fb315db1b19fa59538063d44be4..57ddfcc0e7ce1651c9ec7e705acd5bf502ff1f1a 100644 (file)
@@ -30,7 +30,7 @@
 #include "ctdl3264_structs.h"
 
 // Open a database environment
-DB_ENV *open_dbenv(char *src_dir) {
+DB_ENV *open_dbenv(char *dirname) {
 
        DB_ENV *dbenv = NULL;
 
@@ -83,8 +83,8 @@ DB_ENV *open_dbenv(char *src_dir) {
        }
 
        flags = DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_INIT_LOG;
-       printf("db: dbenv open(dir=%s, flags=%d)\n", src_dir, flags);
-       ret = dbenv->open(dbenv, src_dir, flags, 0);
+       printf("db: dbenv open(dir=%s, flags=%d)\n", dirname, flags);
+       ret = dbenv->open(dbenv, dirname, flags, 0);
        if (ret) {
                printf("db: dbenv->open: %s\n", db_strerror(ret));
                dbenv->close(dbenv, 0);
@@ -570,7 +570,7 @@ void convert_table(int which_cdb, DB_ENV *src_dbenv, DB_ENV *dst_dbenv) {
 
        // open the file containing the source table
        snprintf(dbfilename, sizeof dbfilename, "cdb.%02x", which_cdb);
-       printf("\033[33m\033[1mdb: opening %s\033[0m\n", dbfilename);
+       printf("\033[33m\033[1mdb: opening source %s\033[0m\n", dbfilename);
        ret = src_dbp->open(src_dbp, NULL, dbfilename, NULL, DB_BTREE, 0, 0600);
        if (ret) {
                printf("db: db_open: %s\n", db_strerror(ret));
@@ -588,7 +588,7 @@ void convert_table(int which_cdb, DB_ENV *src_dbenv, DB_ENV *dst_dbenv) {
 
        // open the file containing the destination table
        snprintf(dbfilename, sizeof dbfilename, "cdb.%02x", which_cdb);
-       printf("\033[33m\033[1mdb: opening %s\033[0m\n", dbfilename);
+       printf("\033[33m\033[1mdb: opening destination %s\033[0m\n", dbfilename);
        ret = dst_dbp->open(dst_dbp, NULL, dbfilename, NULL, DB_BTREE, (DB_CREATE | DB_TRUNCATE), 0600);
        if (ret) {
                printf("db: db_open: %s\n", db_strerror(ret));
@@ -659,7 +659,6 @@ void convert_table(int which_cdb, DB_ENV *src_dbenv, DB_ENV *dst_dbenv) {
                // write the converted record to the target database
                if (out_key.size > 0) {
 
-
                        // If we compressed the output, write recomp_data instead of out_data
                        if (compressed) {
                                printf("DB: %02x , out_keylen: %-3d , out_datalen: %-10d , dataptr: %012lx \033[31m(compressed)\033[0m\n", which_cdb, (int)out_key.size, (int)recomp_data.size, (long unsigned int)recomp_data.data);
@@ -670,7 +669,6 @@ void convert_table(int which_cdb, DB_ENV *src_dbenv, DB_ENV *dst_dbenv) {
                                ret = dst_dbp->put(dst_dbp, NULL, &out_key, &out_data, 0);
                        }
 
-
                        if (ret) {
                                printf("db: cdb_put(%d): %s", which_cdb, db_strerror(ret));
                                exit(CTDLEXIT_DB);
index 6e6c9b981b5ebf0acf8bc46dc664fc9630956acd..0decb250ad14e0186231f91bcfc70bda28f2c85a 100644 (file)
@@ -414,10 +414,9 @@ void output_image(void)
        
        /*
         * Instead of an ugly 404, send a 1x1 transparent GIF
-        * when there's no such image on the server.
+        * when there's no such image on the server display blank
         */
-       StrBufPrintf (Buf, "%s%s", static_dirs[0], "/webcit_icons/blank.gif");
-       output_static(ChrPtr(Buf));
+       output_static(NULL);
        FreeStrBuf(&Buf);
 }
 
index ccae7d2974b2cff098bd9669684d649d1a9b082d..e729d74796b723122cd49cd7099e53facb411b35 100644 (file)
@@ -45,7 +45,12 @@ void output_static(char *prefix) {
        int len;
        const char *Err;
        char what[SIZ];
-       snprintf(what, sizeof what, "./%s/%s", prefix, (char *)ChrPtr(WC->Hdr->HR.ReqLine));
+       if (prefix==NULL) {
+               // Force blank.gif  Overrides the request line.
+               strcpy(what,"./static/webcit_icons/blank.gif");
+       } else {
+               snprintf(what, sizeof what, "./%s/%s", prefix, (char *)ChrPtr(WC->Hdr->HR.ReqLine));
+       }
 
        syslog(LOG_DEBUG, "output_static(%s)", what);
        len = strlen (what);
index b1a60718b7bfd752601a1ecfbca95cfc07f4683a..6f6d68a9ce25e83a846811a35a5cb61c782e9551 100644 (file)
@@ -8,13 +8,14 @@
 </div>
 <div id="content" class="service">
 <table>
-<tr valign=top><td width=50% valign="top">
+<tr valign="top"><td width="50%" valign="top">
 <??("COND:AIDE", 3)><?DOBOXED("aide_global_config", _("Global Configuration"))><??("X", 3)>
-</td><td width=50% valign="top">
+</td><td width="50%" valign="top">
 <??("COND:AIDE", 4)><?DOBOXED("aide_usermanagement", _("User account management"))><??("X", 4)>
-</td></tr><tr><td width=50% valign="top">
+</td></tr><tr><td width="50%" valign="top">
 <??("COND:AIDE", 5)><?DOBOXED("aide_restart", _("Shutdown Citadel"))><??("X", 5)>
-</td><td width=50% valign="top">
+</td><td width="50%" valign="top">
 <?DOBOXED("aide_floorconfig", _("Rooms and Floors"))>
 </td></tr></table>
+</div>
 <?=("trailing")>
index 80106a1cd8890c5c5a0f04256f670dd671b3d79c..c175a10a9f20673046d340eb5b29a713650b30dc 100644 (file)
@@ -1,6 +1,6 @@
 <ul class="adminitems">
 <li><a href="do_template?template=aide_display_sitewide_config"><?_("Edit site-wide configuration")></a></li>
 <li><a href="do_template?template=aide_display_inetconf"><?_("Domain names and Internet mail configuration")></a></li>
-<li><a href="dotskip?room=__CitadelSMTPspoolout__&view=11"><?_("View the outbound SMTP queue")></a></li>
+<li><a href="dotskip?room=__CitadelSMTPspoolout__&amp;view=11"><?_("View the outbound SMTP queue")></a></li>
 <li><a href="do_template?template=aide_display_aliases"><?_("Global email aliases")></a></li>
 </ul>
index c02ea4dc67cf1ab365b67a0127427cc1bb9c2099..f7de02d64ce5f39c91e8384ea233e9f8d59548ce 100644 (file)
@@ -15,7 +15,4 @@
 </td></tr>
 </table>
 </div>
-
-</div>
-
 <?=("trailing")>
index 3d8f0545cb9f18b37a83e766ff4232353ae398ec..3ef676d8c6451b0f2a41e8cab96122a15ed430c6 100644 (file)
@@ -27,5 +27,4 @@
                <?_("Delete")><br>
                <?_("Print")><br>
        </div>
-</div>
-</div>
+</div><!-- end message_listview -->
index 6daa3be86776060868ee9944f3ccf57b447e4e88..3a5d4fa9a46a33f17917b36b0a5446f0bbc7e075 100644 (file)
@@ -1,6 +1,6 @@
 <div id="room_banner_override">
 <table border=0><tr>
-<td><img src="static/webcit_icons/essen/32x32/summary.png"></td>
+<td><img alt="" src="static/webcit_icons/essen/32x32/summary.png"></td>
 <td><h1><?_("Summary page for ")>
        <??("COND:LOGGEDIN", 1)><?CURRENT_USER("X")><??("X", 1)>
        <?!("COND:LOGGEDIN", 2)><?SERV:HUMANNODE("X")><??("X", 2)>
 * instead of the whole thing.
 ")>
 <div class="service">
-  <table width="98%" cellspacing="3" cellpadding="0">
-    <tr valign=top>
-      <td width="33%">
+       <table width="98%" cellspacing="3" cellpadding="0">
+               <tr valign=top>
+                       <td width="33%">
        <div class="box">       
-         <div class="boxlabel">        
-           <?_("Messages")>
-         </div><div class="boxcontent">        
-           <div id="msg_inner">
-               <img src="static/webcit_icons/throbber.gif">
+               <div class="boxlabel">  
+                       <?_("Messages")>
+               </div><div class="boxcontent">  
+                       <div id="msg_inner">
+               <img alt="" src="static/webcit_icons/throbber.gif">
        </div></div></div>
-      </td>
-      <td width="33%">
+                       </td>
+                       <td width="33%">
        <div class="box">       
-         <div class="boxlabel">        
-           <?_("Tasks")>
-         </div><div class="boxcontent">        
-           <div id="tasks_inner">      
-               <img src="static/webcit_icons/throbber.gif">
+               <div class="boxlabel">  
+                       <?_("Tasks")>
+               </div><div class="boxcontent">  
+                       <div id="tasks_inner">  
+               <img alt="" src="static/webcit_icons/throbber.gif">
        </div></div></div>
-      </td>
-      <td width="33%">
+                       </td>
+                       <td width="33%">
        <div class="box">       
-         <div class="boxlabel">        
-           <?_("Today&nbsp;on&nbsp;your&nbsp;calendar")>
-         </div><div class="boxcontent">        
-           <div id="calendar_inner">
-               <img src="static/webcit_icons/throbber.gif">
+               <div class="boxlabel">  
+                       <?_("Today&nbsp;on&nbsp;your&nbsp;calendar")>
+               </div><div class="boxcontent">  
+                       <div id="calendar_inner">
+               <img alt="" src="static/webcit_icons/throbber.gif">
        </div></div></div>
-      </td>
-      
-    </tr><tr valign=top>
+                       </td>
+                       
+               </tr><tr valign=top>
 
-      <td colspan=2>
+                       <td colspan=2>
        <div class="box">       
-         <div class="boxlabel">        
-           <?_("Who‘s&nbsp;online&nbsp;now")>
-         </div><div class="boxcontent">
-           <div id="who_inner">
-               <img src="static/webcit_icons/throbber.gif">
-           </div></div></div>
-      </td>
-      <td width="33%">
+               <div class="boxlabel">  
+                       <?_("Who‘s&nbsp;online&nbsp;now")>
+               </div><div class="boxcontent">
+                       <div id="who_inner">
+               <img alt="" src="static/webcit_icons/throbber.gif">
+                       </div></div></div>
+                       </td>
+                       <td width="33%">
        <div class="box">       
-         <div class="boxlabel">        
-           <?_("About&nbsp;this&nbsp;server")>
-         </div><div class="boxcontent">        
-           <div id="info_inner">       
-             <?_("You are connected to")> <?SERV:HUMANNODE>,
-             <?_("running")> <?SERV:SOFTWARE> 
-             <?_("with")> <?PACKAGESTRING>, 
-             <?_("server build")> <?SERV:REV_LEVEL>
-             <?_("and located in")> <?SERV:BBS_CITY>.
-             <?_("Your system administrator is")> <?SERV:ADMIN>
+               <div class="boxlabel">  
+                       <?_("About&nbsp;this&nbsp;server")>
+               </div><div class="boxcontent">  
+                       <div id="info_inner">   
+                               <?_("You are connected to")> <?SERV:HUMANNODE><br>
+                               <?_("Running:")> <?SERV:SOFTWARE> <?_("with")> <?PACKAGESTRING><br>
+                               <?_("Server Build:")> <?SERV:REV_LEVEL><br>
+                               <?_("Location:")> <?SERV:BBS_CITY><br>
+                               <?_("System Administrator:")> <?SERV:ADMIN>
        </div></div></div>
-      </td>
-  </tr></table>
-
-</div>
+                       </td>
+       </tr></table>
 
 </div>
 
 <script type="text/javascript">
- new Ajax.PeriodicalUpdater('msg_inner', 'new_messages_html', { method: 'get', frequency: 60 }  );
- new Ajax.PeriodicalUpdater('tasks_inner', 'tasks_inner_html', { method: 'get', frequency: 120 }  );
- new Ajax.PeriodicalUpdater('calendar_inner', 'calendar_inner_html', { method: 'get', frequency: 90 }  );
- new Ajax.PeriodicalUpdater('who_inner', 'do_template?template=who_summary', { method: 'get', frequency: 30 }  );
+ new Ajax.PeriodicalUpdater('msg_inner', 'new_messages_html', { method: 'get', frequency: 60 } );
+ new Ajax.PeriodicalUpdater('tasks_inner', 'tasks_inner_html', { method: 'get', frequency: 120 }       );
+ new Ajax.PeriodicalUpdater('calendar_inner', 'calendar_inner_html', { method: 'get', frequency: 90 }  );
+ new Ajax.PeriodicalUpdater('who_inner', 'do_template?template=who_summary', { method: 'get', frequency: 30 }  );
 </script>
index 5bbd0822fcef19957944b4e8cd21f17483480b5d..c821185a02ce0f7d911e2177e0651a7947b8ac6b 100644 (file)
@@ -1,4 +1,5 @@
 <!-- start trailing.html -->
+</div> <!-- end of 'global' div -->
 <div id="important_message"
 <??("COND:IMPMSG", 1)>
 style="visibility: hidden;"
index 11ca66880d6c2cec26c47c2fcd5b3b7755e3a987..aec5ef9b36801f571155510d2518e92bf5475b62 100644 (file)
@@ -8,7 +8,7 @@
 <?_("Edit Room info")>
 <?=("box_begin_2")>
 
-<?_("Enter your bio below."> <?_("The text is formatted to the reader's browser. A newline is forced by preceding the next line by a blank.")>
+<?_("Enter your bio below.")> <?_("The text is formatted to the reader's browser. A newline is forced by preceding the next line by a blank.")>
 <form method="post" action="editbio">
 <input type="hidden" name="nonce" value="<?NONCE()>">
 <textarea name="msgtext" wrap=soft rows=10 cols=80 width=80><?USER:BIO("", "X")></textarea>
index c9c599f1b4880a0dafa7b45630024a36830f33c3..390aee38a6ff031453f269dcdb8c6c13d86cee39 100644 (file)
@@ -1,27 +1,35 @@
 <?=("head")>
 <div id="banner">
-  <img src="static/webcit_icons/essen/32x32/account.png" alt="">
-  <h1><?_("User profile")></h1>
-  <div id="navbar">
-    <ul><li><a href="display_page?recp=<?BSTR("who", "U")>">
-          <img src="static/webcit_icons/essen/16x16/chat.png" alt="">
-         <span class="navbar_link">
-        <?_("Click here to send an instant message to")> <?BSTR("who", "X")> </span></li></a>
-  </div>
+       <img src="static/webcit_icons/essen/32x32/account.png" alt="">
+       <h1><?_("User profile")></h1>
+       <div id="navbar">
+               <ul>
+                       <li>
+                               <a href="display_page?recp=<?BSTR("who", "U")>">
+                                       <img src="static/webcit_icons/essen/16x16/chat.png" alt="">
+                                       <span class="navbar_link"> <?_("Click here to send an instant message to")> <?BSTR("who", "X")> </span>
+                               </a>
+                       </li>
+               </ul>
+       </div>
 </div>
 <div id="content" class="service bio">
-  <table class="userlist_background">
-    <tr><td>
-       <center>
-         <table>
-           <tr><td>
-               <img src="userpic?user=<?BSTR("who", "U")>" alt="" border=0>
-             </td><td><h1>
-                 <?BSTR("who", "X")>
-       </h1></td></tr>
+       <table class="userlist_background">
+               <tr>
+                       <td>
+                               <center>
+                                       <table>
+                                               <tr>
+                                                       <td><img src="userpic?user=<?BSTR("who", "U")>" alt="" border=0></td>
+                                                       <td>
+                                                               <h1><?BSTR("who", "X")></h1>
+                                                       </td>
+                                               </tr>
+                                       </table>
+                               </center>
+                               <?USER:BIO(B"who", "FJUSTIFY")>
+                       </td>
+               </tr>
        </table>
-       </center>
-       <?USER:BIO(B"who", "FJUSTIFY")>
-  </td></tr>
-  </table>
+</div>
 <?=("trailing")>
index 7f04d0b68af68f47fe8c0374b52a0b6ff9a8446f..0e2cc29caa4a305c7b3d81695b11461729df75ea 100644 (file)
@@ -1,10 +1,10 @@
-<??("COND:ITERATE:FIRSTN", 40)><?!("COND:ITERATE:ISMOD", 45, #"NAMESPERPAGE", 0)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_end")><??("X", 40)><??("X", 45)>
-<?!("COND:ITERATE:ISMOD", 10, #"NAMESPERPAGE", 0)><?=("vcard_list_section_start")><??("X", 10)>
-<?!("COND:ITERATE:ISMOD", 20, 4, 0)> <?=("vcard_list_row_start")><??("X", 20)>
-<td><!--X=<?ITERATE:N()>--><a href='readfwd?startmsg=<?VC:MSGNO()>?is_singlecard=1?maxmsgs=1?is_summary=0?alpha=<?BSTR("alpha")>'><?VC:ITEM(#"VC:.n.last", "X")> <?VC:ITEM(#"VC:.n.first", "X")><?VC:ITEM(#"VC:.n.middle", "X")> <?VC:ITEM(#"VC:.n.prefix", "X")> <?VC:ITEM(#"VC:.n.suffix", "X")></a></td>
+<?!("COND:ITERATE:FIRSTN", 10)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_start")><??("X", 10)>
+<??("COND:ITERATE:FIRSTN", 10)><?!("COND:ITERATE:ISMOD", 15, #"NAMESPERPAGE", 0)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_end")><?=("vcard_list_section_start")><?!("X", 15)><?!("X", 10)>
 
-<??("COND:ITERATE:FIRSTN", 30)><?!("COND:ITERATE:ISMOD", 35, 4, 3)> <?=("vcard_list_row_end")><??("X", 35)><?!("X", 30)>
-<?!("COND:ITERATE:LASTN",  40)><??("COND:ITERATE:ISMOD", 45, 4, 3)> <?=("vcard_list_row_end")><??("X", 45)><?!("X", 40)>
+<?!("COND:ITERATE:ISMOD", 10, 4, 0)><?=("vcard_list_row_start")><?!("X", 10)>
+<td><!--X=<?ITERATE:N()>--><a href='readfwd?startmsg=<?VC:MSGNO()>?is_singlecard=1?maxmsgs=1?is_summary=0?alpha=<?BSTR("alpha")>'><?VC:ITEM(#"VC:.n.last", "X ")><?VC:ITEM(#"VC:.n.suffix", "X")>, <?VC:ITEM(#"VC:.n.prefix", "X ")><?VC:ITEM(#"VC:.n.first", "X ")><?VC:ITEM(#"VC:.n.middle", "X")></a></td>
 
+<??("COND:ITERATE:LASTN",  10)><?!("COND:ITERATE:ISMOD", 15, 4, 3)><?=("vcard_list_row_end")><?!("X", 15)><??("X", 10)>
+<?!("COND:ITERATE:LASTN",  10)><?=("vcard_list_row_end")><?!("X", 10)>
 
-<?!("COND:ITERATE:LASTN",  40)><??("COND:ITERATE:ISMOD", 45, #"NAMESPERPAGE", 0)><!--z=<?ITERATE:N()>--><?=("vcard_list_section_end")><??("X", 45)><?!("X", 40)>
+<?!("COND:ITERATE:LASTN", 10)><!--y=<?ITERATE:N()>--><?=("vcard_list_section_end")><?!("X", 10)>
index a55b03dca10d6ce79d9f6524519b7b8504f15766..4a7c57db02aefba60f1a3a349da930e671711837 100644 (file)
@@ -1,44 +1,44 @@
-<div class="message_content"><div>
+<!-- start msg_display.html -->
+<div class="message_content">
 <div align="center">
 <table bgcolor="#aaaaaa" width="50%">
 <tr bgcolor="#aaaaaa">
   <td colspan=2 bgcolor="#ffffff">
-  <img align="center" src="static/webcit_icons/essen/32x32/contact.png">
-  <font size="+1"><b><?VC:ITEM(#"VC:.fn", "X")></b></font>
-  <div align="right>"<?VC:ITEM(#"VC:.title", "X")></div>
-  <div align="right"><?VC:ITEM(#"VC:.org", "X")></div>
-</td>
+    <img style="vertical-align:middle" alt="" src="static/webcit_icons/essen/32x32/contact.png">
+    <font size="+1"><b><?VC:ITEM(#"VC:.fn", "X")></b></font>
+    <div align="right"><?VC:ITEM(#"VC:.title", "X")></div>
+    <div align="right"><?VC:ITEM(#"VC:.org", "X")></div>
+  </td>
 </tr>
 
 <?!("VC:HAVE:TYPE", 10, #"PhoneNumber")>
 <tr>
- <td>Telephone:</td>
- <td>
-<?ITERATE("VC:TYPE", ="vcard_msg_display_phone", 0, 0, -1, #"PhoneNumber")>
- </td>
+  <td style="vertical-align:top"><?VC:NAME(#"VC:.tel")></td>
+  <td><?ITERATE("VC:TYPE", ="vcard_msg_display_phone", 0, 0, -1, #"PhoneNumber")></td>
 </tr>
 <??("X", 10)>
 
 <?!("VC:HAVE:TYPE", 20, #"EmailAddr")>
 <tr>
- <td>E-mail:</td>
- <td>
-<?ITERATE("VC:TYPE", ="vcard_msg_display_email", 0, 0, -1, #"EmailAddr")>
- </td>
+  <td style="vertical-align:top"><?VC:NAME(#"VC:.email")></td>
+  <td><?ITERATE("VC:TYPE", ="vcard_msg_display_email", 0, 0, -1, #"EmailAddr")></td>
 </tr>
 <?!("X", 20)>
 
-
-<?!("VC:HAVE:TYPE", 30, #"VC:.adr.address")>
+<?!("VC:HAVE:TYPE", 30, #"Address")>
 <tr>
- <td><?VC:NAME(#"Address")>:</td>
- <td>
-<?VC:ITEM(#"VC:.adr.POBox", "X")><br>
-<?VC:ITEM(#"VC:.adr.extadr", "X")><br>
-<?VC:ITEM(#"VC:.adr.street", "X")><br>
-<?VC:ITEM(#"VC:.adr.city", "X")> <?VC:ITEM(#"VC:.adr.state", "X")> <?VC:ITEM(#"VC:.adr.zip", "X")> <?VC:ITEM(#"VC:.adr.country", "X")>
- </td>
+  <td style="vertical-align:top"><?VC:NAME(#"VC:.adr")></td>
+  <td>
+    <?VC:ITEM(#"VC:.adr.POBox", "X<br>")>
+    <?VC:ITEM(#"VC:.adr.extadr", "X<br>")>
+    <?VC:ITEM(#"VC:.adr.street", "X<br>")>
+    <?VC:ITEM(#"VC:.adr.city", "X, ")><?VC:ITEM(#"VC:.adr.state", "X ")><?VC:ITEM(#"VC:.adr.zip", "X")><br>
+    <?VC:ITEM(#"VC:.adr.country", "X")>
+  </td>
 </tr>
 <?!("X", 30)>
-</table></div>
 
+</table>
+</div>
+</div>
+<!-- end msg_display.html -->
index 742b42da6098f600941f018c1a6020600b780f1e..facc973cd4cfd70d64889e14dbb223bf9c83531f 100644 (file)
@@ -2,7 +2,7 @@
 <div align="center">
   <table border="0" bgcolor="#ffffff" cellpadding="10">
     <tr><td align="center">
-       <br><b> <?_("There is no page called '"><?BSTR("pagename", "x")><?_("'here")>.
+       <br><b> <?_("There is no page called '")><?BSTR("pagename", "x")><?_("'here")>.
        </b><br><br>
        <?_("Select the 'Edit this page' link in the room banner if you would like to create this page.")>
        <br><br>
index 0cd7615f26b1b5746b8c4871be568aa9b2090e56..baaa5460c831c33584ca45802d738fe0c2647b08 100644 (file)
@@ -639,7 +639,12 @@ void StrBufAppendTemplate(StrBuf *Target,
                StrEscAppend(Target, Source, NULL, 0, 2);
                break;
        case 'X':
-               StrEscAppend(Target, Source, NULL, 0, 0);
+               if (!IsEmptyStr(ChrPtr(Source))) {
+                       StrEscAppend(Target, Source, NULL, 0, 0);
+                       if (pFmt[1]) {
+                               StrBufAppendBufPlain(Target, pFmt, -1, 1);
+                       }
+               }
                break;
        case 'J':
                StrECMAEscAppend(Target, Source, NULL);
index d1a16d383a62ab3c83da8c935d60f9d2e4f6bad8..8bd4a7841d880b78b845baaf00ab5d4c020141aa 100644 (file)
@@ -1027,7 +1027,6 @@ void do_addrbook_view(vcardview_struct* VS) {
        UnStackContext(&SubTP);
        DeleteHash(&headlines);
        free(tablabels);
-       StrBufAppendBufPlain(WC->WBuf, HKEY("</div>"), 0);/* closes: id=global */
 }