Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 19 Jul 2012 10:18:41 +0000 (12:18 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 19 Jul 2012 10:18:41 +0000 (12:18 +0200)
24 files changed:
libcitadel/lib/libcitadel.h
webcit/messages.c
webcit/messages.h
webcit/msg_renderers.c
webcit/roomops.c
webcit/roomviews.c
webcit/static/styles/blog.css [new file with mode: 0644]
webcit/static/styles/webcit.css
webcit/static/t/dav/propfind_groupdav_roomlist_oneroom.xml
webcit/static/t/edit_message.html
webcit/static/t/files.html
webcit/static/t/files/graphicsupload.html
webcit/static/t/files/picview.js
webcit/static/t/navbar.html
webcit/static/t/room/view_picture.html
webcit/static/t/room/zap_this.html
webcit/static/t/rss_head.html [deleted file]
webcit/static/t/rss_item.html [deleted file]
webcit/static/t/rss_item_end.html [deleted file]
webcit/static/t/sieve/add.html
webcit/static/t/view_blog/comment_box.html
webcit/static/t/view_blog/post.html [changed mode: 0644->0755]
webcit/subst.c
webcit/webcit.h

index 46b103e41a7a7cdd2330e6fccf54607ff45fa543..9b58553b10a3650c8a8988a5f4187a597bd5d6e8 100644 (file)
@@ -754,6 +754,8 @@ extern "C" {
 #define UA_ADMINALLOWED                64      /* Aide or Room Aide rights exist here */
 #define UA_DELETEALLOWED       128     /* User is allowed to delete messages from this room */
 #define UA_REPLYALLOWED                256     /* User is allowed to reply to existing messages here */
+/* runtime flag extracted from goto reply; not db persistant, should be moved if new flags added */
+#define UA_ISTRASH              512    /* Only available in room view... */
 
 #ifdef __cplusplus
 }
index c362b2f6369cca696c1b44dfb3d5aa239138b255..88404111839f02762a9c6c85536aac0eb097d604 100644 (file)
@@ -1318,14 +1318,28 @@ long l_msgn;
 long l_from;
 long l_rcpt;
 long l_cccc;
+long l_replyto;
 long l_node;
 long l_rfca;
 
+const char *ReplyToModeStrings [3] = {
+       "reply",
+       "replyalle",
+       "forward"
+};
+typedef enum _eReplyToNodes {
+       eReply,
+       eReplyAll,
+       eForward
+}eReplyToNodes;
+       
 /*
  * display the message entry screen
  */
 void display_enter(void)
 {
+       const char *ReplyingModeStr;
+       eReplyToNodes ReplyMode = eReply;
        StrBuf *Line;
        long Result;
        int rc;
@@ -1402,6 +1416,15 @@ void display_enter(void)
        }
 
 
+       ReplyingModeStr = bstr("replying_mode");
+       if (ReplyingModeStr != NULL) for (i = 0; i < 3; i++) {
+                       if (strcmp(ReplyingModeStr, ReplyToModeStrings[i]) == 0) {
+                               ReplyMode = (eReplyToNodes) i;
+                               break;
+                       }
+               }
+               
+
        /*
         * If the "replying_to" variable is set, it refers to a message
         * number from which we must extract some header fields...
@@ -1416,6 +1439,7 @@ void display_enter(void)
                StrBuf *rfca = NULL;
                StrBuf *rcpt = NULL;
                StrBuf *cccc = NULL;
+               StrBuf *replyto = NULL;
                serv_printf("MSG0 %ld|1", replying_to); 
 
                StrBuf_ServGetln(Line);
@@ -1435,7 +1459,7 @@ void display_enter(void)
                                        StrBuf *subj = NewStrBuf();
                                        StrBuf *FlatSubject;
 
-                                       if (!strcasecmp(bstr("replying_mode"), "forward")) {
+                                       if (ReplyMode == eForward) {
                                                if (strncasecmp(ChrPtr(Line) + 5, "Fw:", 3)) {
                                                        StrBufAppendBufPlain(subj, HKEY("Fw: "), 0);
                                                }
@@ -1499,7 +1523,9 @@ void display_enter(void)
                                else if (which == l_node) {
                                        node = NewStrBufPlain(ChrPtr(Line) + 5, StrLength(Line) - 5);
                                }
-                               
+                               else if (which == l_replyto) {
+                                       replyto = NewStrBufPlain(ChrPtr(Line) + 5, StrLength(Line) - 5);
+                               }                               
                                else if (which == l_rfca) {
                                        StrBuf *FlatRFCA;
                                        rfca = NewStrBufPlain(ChrPtr(Line) + 5, StrLength(Line) - 5);
@@ -1530,11 +1556,14 @@ void display_enter(void)
                /*
                 * If this is a Reply or a ReplyAll, copy the sender's email into the To: field
                 */
-               if (    (!strcasecmp(bstr("replying_mode"), "reply"))
-                       || (!strcasecmp(bstr("replying_mode"), "replyall"))
-               ) {
+               if ((ReplyMode == eReply) || (ReplyMode == eReplyAll))
+               {
                        StrBuf *to_rcpt;
-                       if (StrLength(rfca) > 0) {
+                       if ((StrLength(replyto) > 0) && (ReplyMode == eReplyAll)) {
+                               to_rcpt = NewStrBuf();
+                               StrBufAppendBuf(to_rcpt, replyto, 0);
+                       }
+                       else if (StrLength(rfca) > 0) {
                                to_rcpt = NewStrBuf();
                                StrBufAppendBuf(to_rcpt, from, 0);
                                StrBufAppendBufPlain(to_rcpt, HKEY(" <"), 0);
@@ -1557,11 +1586,12 @@ void display_enter(void)
                /*
                 * Only if this is a ReplyAll, copy all recipients into the Cc: field
                 */
-               if (    (!strcasecmp(bstr("replying_mode"), "replyall"))
-               {
+               if (ReplyMode == eReplyAll)
+               {
                        StrBuf *cc_rcpt = rcpt;
                        rcpt = NULL;
-                       if (StrLength(cccc) > 0) {
+                       if ((StrLength(cccc) > 0) && (StrLength(replyto) == 0))
+                       {
                                if (cc_rcpt != NULL)  {
                                        StrBufAppendPrintf(cc_rcpt, ", ");
                                        StrBufAppendBuf(cc_rcpt, cccc, 0);
@@ -2024,6 +2054,7 @@ InitModule_MSG
        l_from = FourHash("from", 4);
        l_rcpt = FourHash("rcpt", 4);
        l_cccc = FourHash("cccc", 4);
+       l_replyto = FourHash("rep2", 4);
        l_node = FourHash("node", 4);
        l_rfca = FourHash("rfca", 4);
 
index a063170e046c0d96ae688b75555f1e36bed785a8..21ae4746782909142e936b19f54e4e4f5a7548a0 100644 (file)
@@ -40,6 +40,7 @@ typedef struct _message_summary {
        StrBuf *subj;           /* the title / subject */
        StrBuf *reply_inreplyto;
        StrBuf *reply_references;
+       StrBuf *ReplyTo;
        StrBuf *cccc;
        StrBuf *hnod;
        StrBuf *AllRcpt;
index 8e215262fd2f28af15a40b2c2aa9c5b47b475b43..3e5c29fcef4d1c93ee0e575c381161bbe0c10cba 100644 (file)
@@ -45,6 +45,7 @@ void DestroyMessageSummary(void *vMsg)
        FreeStrBuf(&Msg->reply_inreplyto);
        FreeStrBuf(&Msg->reply_references);
        FreeStrBuf(&Msg->cccc);
+       FreeStrBuf(&Msg->ReplyTo);
        FreeStrBuf(&Msg->hnod);
        FreeStrBuf(&Msg->AllRcpt);
        FreeStrBuf(&Msg->Room);
@@ -365,6 +366,31 @@ void tmplput_MAIL_SUMM_REFIDS(StrBuf *Target, WCTemplputParams *TP)
        StrBufAppendTemplate(Target, TP, Msg->reply_references, 0);
 }
 
+void examine_replyto(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundCharset)
+{
+       wcsession *WCC = WC;
+
+       CheckConvertBufs(WCC);
+       FreeStrBuf(&Msg->ReplyTo);
+       Msg->ReplyTo = NewStrBufPlain(NULL, StrLength(HdrLine));
+       StrBuf_RFC822_2_Utf8(Msg->ReplyTo, 
+                            HdrLine, 
+                            WCC->DefaultCharset, 
+                            FoundCharset,
+                            WCC->ConvertBuf1,
+                            WCC->ConvertBuf2);
+       if (Msg->AllRcpt == NULL)
+               Msg->AllRcpt = NewStrBufPlain(NULL, StrLength(HdrLine));
+       if (StrLength(Msg->AllRcpt) > 0) {
+               StrBufAppendBufPlain(Msg->AllRcpt, HKEY(", "), 0);
+       }
+       StrBufAppendBuf(Msg->AllRcpt, Msg->ReplyTo, 0);
+}
+void tmplput_MAIL_SUMM_REPLYTO(StrBuf *Target, WCTemplputParams *TP)
+{
+       message_summary *Msg = (message_summary*) CTX(CTX_MAILSUM);
+       StrBufAppendTemplate(Target, TP, Msg->ReplyTo, 0);
+}
 
 void examine_cccc(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundCharset)
 {
@@ -428,6 +454,11 @@ int Conditional_MAIL_SUMM_CCCC(StrBuf *Target, WCTemplputParams *TP)
        message_summary *Msg = (message_summary*) CTX(CTX_MAILSUM);
        return StrLength(Msg->cccc) > 0;
 }
+int Conditional_MAIL_SUMM_REPLYTO(StrBuf *Target, WCTemplputParams *TP)
+{
+       message_summary *Msg = (message_summary*) CTX(CTX_MAILSUM);
+       return StrLength(Msg->ReplyTo) > 0;
+}
 
 void examine_node(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundCharset)
 {
@@ -1505,6 +1536,7 @@ InitModule_MSGRENDERERS
        RegisterNamespace("MAIL:SUMM:SUBJECT", 0, 4, tmplput_MAIL_SUMM_SUBJECT,  NULL, CTX_MAILSUM);
        RegisterNamespace("MAIL:SUMM:NTATACH", 0, 0, tmplput_MAIL_SUMM_NATTACH,  NULL, CTX_MAILSUM);
        RegisterNamespace("MAIL:SUMM:CCCC", 0, 2, tmplput_MAIL_SUMM_CCCC, NULL, CTX_MAILSUM);
+       RegisterNamespace("MAIL:SUMM:REPLYTO", 0, 2, tmplput_MAIL_SUMM_REPLYTO, NULL, CTX_MAILSUM);
        RegisterNamespace("MAIL:SUMM:H_NODE", 0, 2, tmplput_MAIL_SUMM_H_NODE,  NULL, CTX_MAILSUM);
        RegisterNamespace("MAIL:SUMM:ALLRCPT", 0, 2, tmplput_MAIL_SUMM_ALLRCPT,  NULL, CTX_MAILSUM);
        RegisterNamespace("MAIL:SUMM:ORGROOM", 0, 2, tmplput_MAIL_SUMM_ORGROOM,  NULL, CTX_MAILSUM);
@@ -1518,6 +1550,7 @@ InitModule_MSGRENDERERS
        RegisterNamespace("MAIL:EDITWIKI", 1, 2, tmplput_EDIT_WIKI_BODY,  NULL, CTX_NONE);
        RegisterConditional(HKEY("COND:MAIL:SUMM:RFCA"), 0, Conditional_MAIL_SUMM_RFCA,  CTX_MAILSUM);
        RegisterConditional(HKEY("COND:MAIL:SUMM:CCCC"), 0, Conditional_MAIL_SUMM_CCCC,  CTX_MAILSUM);
+       RegisterConditional(HKEY("COND:MAIL:SUMM:REPLYTO"), 0, Conditional_MAIL_SUMM_REPLYTO,  CTX_MAILSUM);
        RegisterConditional(HKEY("COND:MAIL:SUMM:UNREAD"), 0, Conditional_MAIL_SUMM_UNREAD, CTX_MAILSUM);
        RegisterConditional(HKEY("COND:MAIL:SUMM:H_NODE"), 0, Conditional_MAIL_SUMM_H_NODE, CTX_MAILSUM);
        RegisterConditional(HKEY("COND:MAIL:SUMM:OTHERNODE"), 0, Conditional_MAIL_SUMM_OTHERNODE, CTX_MAILSUM);
@@ -1580,6 +1613,7 @@ InitModule_MSGRENDERERS
        RegisterMsgHdr(HKEY("msgn"), examine_msgn, 0);
        RegisterMsgHdr(HKEY("wefw"), examine_wefw, 0);
        RegisterMsgHdr(HKEY("cccc"), examine_cccc, 0);
+       RegisterMsgHdr(HKEY("rep2"), examine_replyto, 0);
        RegisterMsgHdr(HKEY("hnod"), examine_hnod, 0);
        RegisterMsgHdr(HKEY("room"), examine_room, 0);
        RegisterMsgHdr(HKEY("rfca"), examine_rfca, 0);
index 6325a10df7ce149f98e1ed61ecf62f3e44e66935..0c3eaa21d1867131f99fd479a896d00dc290d130 100644 (file)
@@ -1369,6 +1369,7 @@ InitModule_ROOMOPS
        REGISTERTokenParamDefine(UA_POSTALLOWED);
        REGISTERTokenParamDefine(UA_ADMINALLOWED);
        REGISTERTokenParamDefine(UA_DELETEALLOWED);
+       REGISTERTokenParamDefine(UA_REPLYALLOWED);
        REGISTERTokenParamDefine(UA_ISTRASH);
 
        REGISTERTokenParamDefine(US_NEEDVALID);
index eacc55cf5e705273deeec3a2c05e0fe5508d9abb..7cdbac4b24bdcce72844a1d0b34be3b8870b2a4c 100644 (file)
@@ -262,7 +262,7 @@ InitModule_ROOMVIEWS
        RegisterConditional(HKEY("COND:ROOM:TYPE_IS"), 0, ConditionalIsRoomtype, CTX_NONE);
 
        RegisterConditional(HKEY("COND:THISROOM:HAVE_VIEW"), 0, ConditionalThisRoomHaveView, CTX_NONE);
-       RegisterConditional(HKEY("COND:ROOM:dav_CONTENT"), 0, ConditionalRoomHasGroupdavContent, CTX_ROOMS);
+       RegisterConditional(HKEY("COND:ROOM:DAV_CONTENT"), 0, ConditionalRoomHasGroupdavContent, CTX_ROOMS);
 
        RegisterConditional(HKEY("COND:THISROOM:CURR_VIEW"), 0, ConditionalThisRoomCurrView, CTX_NONE);
        RegisterNamespace("ROOM:INFO:VIEW", 0, 1, tmplput_ROOM_VIEW, NULL, CTX_ROOMS);
diff --git a/webcit/static/styles/blog.css b/webcit/static/styles/blog.css
new file mode 100644 (file)
index 0000000..e0d85dd
--- /dev/null
@@ -0,0 +1,33 @@
+.blog_post {
+       padding-top: 0.5em;
+        margin: 0.5em;
+        width: 38em;
+       border-top: 1px solid #5C646B;
+}
+
+
+.blog_post_title a {
+       font-size: large;
+       color: #5C646B;
+}
+       
+.blog_post_header a, .blog_comment_header a { 
+       font-style: italic;
+       color: #000;
+ }
+
+.blog_post_header, .blog_comment_header {
+       margin: 0.3em 0.5em;
+       font-size: smaller;
+}
+
+.blog_post_content {
+       font-family: serif;
+       font-size: small;
+}
+
+.blog_comment {
+        margin: 0.5em;
+        width: 30em;
+}
+
index c34aa6f22c03689f1935ca45f489285b63469c6b..cd723a6b76795d5727695b84e1de5d4df63c1244 100644 (file)
@@ -15,6 +15,7 @@
 @import url("message.css");
 @import url("modal.css");
 @import url("service.css");
+@import url("blog.css")
 
 @media print {
        input#toggler, .toolbar { display: none }
index a5311a879a7e3aba8d62d71344c0e45280bdbce7..82bbae51124202df85a46ef7b1a37987766c436c 100644 (file)
@@ -1,9 +1,9 @@
-<??("COND:ROOM:GROUPDAV_CONTENT", 1)><??("COND:ROOM:REST:ISSUBROOM", 2)><response>
-<href><?DAV:HOSTNAME>/groupdav/<?ROOM:INFO:FLOOR:NAME("X")>/<?ROOM:INFO:NAME("X")>/</href>
+<??("COND:ROOM:DAV_CONTENT", 1)><??("COND:ROOM:REST:ISSUBROOM", 2)><response>
+<href><?DAV:HOSTNAME>/groupdav/<?ROOM:INFO:FLOOR:NAME("X")>/<?THISROOM:NAME("X")>/</href>
 <propstat>
 <status>HTTP/1.1 200 OK</status>
 <prop>
-<displayname><?ROOM:INFO:PRINT_NAME></displayname>
+<displayname><?THISROOM:NAME></displayname>
 <resourcetype><collection/><G:vtodo<?ROOM:INFO:COLLECTIONTYPE>-collection /></resourcetype>
 <getlastmodified><?ROOM:INFO:LASTCHANGE></getlastmodified>
 </prop>
index c5cfbda9162df212981922a06e1289b710966a31..116d1c3768f77402efb4b9647a73e3f354583c06 100644 (file)
@@ -14,7 +14,7 @@
 <input type="hidden" name="postseq" value="<?DATE:NOW:NO>">
 <input type="hidden" name="return_to" value="<?BSTR("return_to")>">
 <input type="hidden" name="nonce" value="<?NONCE>">
-<input type="hidden" name="force_room" value="<?ROOMNAME("X")>">
+<input type="hidden" name="force_room" value="<?THISROOM:NAME("X")>">
 <input type="hidden" name="references" value="<?BSTR("references")>">
 <input type="hidden" name="page" value="<?BSTR("page")>">
 <input type="hidden" name="submit_action" value="">
@@ -44,7 +44,7 @@
 </select>
 <?!("X", 4)>
 
- <i><?_("in")></i> <?ROOMNAME></td></tr>
+ <i><?_("in")></i> <?THISROOM:NAME></td></tr>
 
 <?!("COND:BSTR", 5, "__RCPTREQUIRED")>
 <tr>
index 2999d64e9bf138923bd104ccb54a0c173ae3a280..7037edc54520f5ca9e1b655ed379803e2aab8acf 100644 (file)
@@ -1,7 +1,7 @@
 <?=("head")>
 <?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
 <div id="banner">
-       <h1><?_("Files available for download in")>&nbsp;<?ROOMNAME></h1>
+       <h1><?_("Files available for download in")>&nbsp;<?THISROOM:NAME></h1>
        <?!("COND:THISROOM:FLAG:QR", 2, #"QR_UPLOAD")>
                <br>
                <form enctype="multipart/form-data" method="POST" accept-charset="UTF-8" action="upload_file" name="upload_file_form">
index 8caaef57644f0fd4548261461d4016e594ffb3f5..2e02e81e71b109df4a223ce74a2a9f3c134ee2f0 100644 (file)
@@ -3,7 +3,7 @@
 <form enctype="multipart/form-data" action='<?BSTR("__UPLURL")>' method="post" name="graphicsupload">
 
 <input type="hidden" name="nonce" value="<?NONCE>">
-<input type="hidden" name="which_room" value="<?ROOMNAME("U")>"><?_("You can upload an image directly from your computer")>
+<input type="hidden" name="which_room" value="<?THISROOM:NAME("U")>"><?_("You can upload an image directly from your computer")>
 <br><br>
 <?_("Please select a file to upload:")>
 <input type="file" name="filename" size="35">
index da5242aa1cb58e60f6d046c0a79697add10badfc..05d524f6f801c28f11c4c7078b61865c4c67d85c 100644 (file)
@@ -2,7 +2,7 @@
 <?=("head")>
 <?%("COND:LOGGEDIN", 1, 1, 1, "", ="paging")>
 
-<div id="banner"><h1><?_("Pictures in")> <?ROOM:NAME></h1></div>
+<div id="banner"><h1><?_("Pictures in")> <?THISROOM:NAME></h1></div>
 <div id="content" class="service">
        <table class="downloads_background">
        <tr><td>
index ca672c98d9f8732e58ad76ed6dfc807130389ef8..05e3e3b35d180db5eff904aef8e71468297096f4 100644 (file)
 <?!("COND:THISROOM:CURR_VIEW", 80, #"VIEW_WIKI")>
         <??("COND:WIKI:PAGE", 81, "home")>
        <li class="readallmess">
-               <a href="wiki?page=home?go=<?ROOM:INFO:PRINT_NAME("U")>">
+               <a href="wiki?page=home?go=<?THISROOM:NAME("U")>">
                        <img src="static/webcit_icons/essen/16x16/readallmsg.png" alt="" width="16" height="16">
                        <span class="navbar_link"><?_("Wiki home")></span>
                </a>
index 42ce877fca74c960b6744a2cc4fafb97c5e6988c..319e21c4ed5900bd8e0d5d24f1e3a2280015417e 100644 (file)
@@ -1,5 +1,5 @@
 <?!("COND:THISROOM:HAVE_PIC", 1)>
-<img height="64px" alt="<?_("Room Logo")>" src="image?name=_roompic_?room=<?ROOMNAME("U")>">
+<img height="64px" alt="<?_("Room Logo")>" src="image?name=_roompic_?room=<?THISROOM:NAME("U")>">
 <?!("X", 1)><??("COND:THISROOM:HAVE_PIC", 2)>
        <?!("COND:ROOM:TYPE_IS", 3, #"VIEW_ADDRESSBOOK")>
                <img class="roompic" alt="" src="static/webcit_icons/essen/32x32/contact.png">
index d74dada01b76b7e3e564345757d50eae5ce72b64..c35bd658f976b12a47d47f0d2da2354d6ed8630e 100644 (file)
@@ -4,7 +4,7 @@
 </div>
 <div id="content" class="service">
 <?_("If you select this option,")>
-<em><?ROOM:INFO:PRINT_NAME("X")></em>
+<em><?THISROOM:NAME("X")></em>
 <?_("will disappear from your room list.  Is this what you wish to do?")>
 <br>
 
@@ -13,4 +13,4 @@
 <input type="submit" NAME="ok_button" VALUE="<?_("Zap this room")>">&nbsp;
 <input type="submit" NAME="cancel_button" VALUE="<?_("Cancel")>">
 </form>
-<?=("trailing")>
\ No newline at end of file
+<?=("trailing")>
diff --git a/webcit/static/t/rss_head.html b/webcit/static/t/rss_head.html
deleted file mode 100644 (file)
index 2707d5b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<?XML_HEAD>
-<?XML_STYLE>
-<rss version="2.0">
-       <channel>
-               <title><?ROOM> - <?NODE></title>
-               <link><?ROOM_LINK></link>
-               <description><?ROOM_DESCRIPTION></description>
-               <pubDate><?822_PUB_DATE></pubDate>
-               <generator><?GENERATOR></generator>
-               <docs>http://blogs.law.harvard.edu/tech/rss</docs>
-               <ttl>30</ttl>
-   
-
diff --git a/webcit/static/t/rss_item.html b/webcit/static/t/rss_item.html
deleted file mode 100644 (file)
index 8214554..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<item>
-<title><?SUBJ> <?IN_ROOM> <?NODE></title>
-<pubDate><?822_PUB_DATE></pubDate>
-<guid isPermaLink="false"><?GUID></guid>
-<description><![CDATA[
-
diff --git a/webcit/static/t/rss_item_end.html b/webcit/static/t/rss_item_end.html
deleted file mode 100644 (file)
index aad5a48..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-]]></description>
-</item>
index 3da5fa245c60b78ee21854cca954cb2dbedcce1d..5d724eeb9a8754d73f98653fad59b9ff545e47e6 100644 (file)
@@ -3,8 +3,6 @@
        <h1><?_("Add or delete scripts")></h1>
 </div>
 <div id="content" class="service">
-       <?SIEVE:MESSAGE>
-
        <table border=0 cellspacing=10><tr valign=top><td>
                <?=("box_begin_1")><?_("Add a new script")><?=("box_begin_2")>
                        <?_("To create a new script, enter the desired script name in the box below and click 'Create'.")>
index b5fd223fe72f864b0adae25fa8cd38dc5d7d2ece..6b8292c49e9295073aab7a1d059ec68f1345e1d1 100644 (file)
@@ -10,7 +10,7 @@ function submit_comment() {
  method="POST" action="post" onSubmit="submit_comment();">
 <input type="hidden" name="postseq" value="<?DATE:NOW:NO>">
 <input type="hidden" name="nonce" value="<?NONCE>">
-<input type="hidden" name="force_room" value="<?ROOMNAME("X")>">
+<input type="hidden" name="force_room" value="<?THISROOM:NAME("X")>">
 <input type="hidden" name="references" id="comment_form_references" /><br>
 <textarea name="msgtext" id="comment_form_msgtext" cols=80 rows=10 style="width:98%"
        <?!("COND:LOGGEDIN",1)>
old mode 100644 (file)
new mode 100755 (executable)
index 868909a..0dfee3d
@@ -1,28 +1,38 @@
 <div class="blog_post">
-<div class="blog_post_title">
-<?!("COND:MAIL:SUBJ", 7)><a href="<?BLOG:PERMALINK>"><?MAIL:SUMM:SUBJECT("X")></a><??("X", 7)>
+       <div class="blog_post_title">
+               <?!("COND:MAIL:SUBJ", 7)><a href="<?BLOG:PERMALINK>"><?MAIL:SUMM:SUBJECT("X")></a><??("X", 7)>
+       </div>
+       <div class="blog_post_header">
+               <span><??("COND:MAIL:ANON",1)>
+                       <?!("COND:MAIL:SUMM:RFCA", 2)>
+                       <a href="showuser?who=<?MAIL:SUMM:FROM("Q")>">
+                               "<?MAIL:SUMM:FROM("X")>" &lt;<?MAIL:SUMM:RFCA>&gt;
+                       </a>
+                       <?!("X", 2)>
+                       <??("COND:MAIL:SUMM:RFCA", 3)>
+                       <a href="showuser?who=<?MAIL:SUMM:FROM("Q")>">
+                               <?MAIL:SUMM:FROM("X")>
+                       </a> 
+                       <??("X", 3)>
+                       <?!("COND:MAIL:SUMM:OTHERNODE",4)> @ <?MAIL:SUMM:H_NODE><??("X",4)>
+               <??("X", 1)></span>
+               <span><?MAIL:SUMM:DATEFULL></span>
+               <?!("COND:ROOM:EDITACCESS", 16)>
+                       <a href="delete_msg?msgid=<?MAIL:SUMM:N>" onclick="return confirm('<?_("Delete this message?")>');">
+                               <span>[</span><?_("Delete")><span>]</span>
+                       </a> 
+               <??("X", 16)>
+       </div>
+       <div class="blog_post_content">
+               <div>
+                       <?MAIL:BODY>
+                       <?!("COND:MAIL:MIME:ATTACH:SUBMESSAGES", 10)>
+                               <?ITERATE("MAIL:MIME:ATTACH:SUBMESSAGES", ="view_message_inline_attach")>
+                       <?!("X", 10)>
+                       <?!("COND:MAIL:MIME:ATTACH:LINKS", 11)>
+                               <?ITERATE("MAIL:MIME:ATTACH:LINKS", ="view_message_list_attach")>
+                       <?!("X", 11)>
+               </div>
+       </div>
+       <div id="comment_replyto" style="display:none"><?MAIL:SUMM:INREPLYTO("X")></div>
 </div>
-<div class="blog_post_header">
-<span>
- <??("COND:MAIL:ANON",1)>
-   <?!("COND:MAIL:SUMM:RFCA", 2)><a href="do_template?temlpate=user_show?who=<?MAIL:SUMM:FROM("Q")>">"<?MAIL:SUMM:FROM("X")>" &lt;<?MAIL:SUMM:RFCA>&gt;</a><?!("X", 2)>
-   <??("COND:MAIL:SUMM:RFCA", 3)><a href="do_template?temlpate=user_show?who=<?MAIL:SUMM:FROM("Q")>"><?MAIL:SUMM:FROM("X")></a> 
-      <??("X", 3)><?!("COND:MAIL:SUMM:OTHERNODE",4)> @ <?MAIL:SUMM:H_NODE><??("X",4)>
- <??("X", 1)>
-</span>
- <span><?MAIL:SUMM:DATEFULL></span>
-<?!("COND:ROOM:EDITACCESS", 16)>
-   <a href="delete_msg?msgid=<?MAIL:SUMM:N>" onclick="return confirm('<?_("Delete this message?")>');"><span>[</span><?_("Delete")><span>]</span> </a> 
-<??("X", 16)>
-</div>
-<div class="blog_post_content"><div>
-<?MAIL:BODY>
-<?!("COND:MAIL:MIME:ATTACH:SUBMESSAGES", 10)>
-<?ITERATE("MAIL:MIME:ATTACH:SUBMESSAGES", ="view_message_inline_attach")>
-<?!("X", 10)>
-<?!("COND:MAIL:MIME:ATTACH:LINKS", 11)>
-<?ITERATE("MAIL:MIME:ATTACH:LINKS", ="view_message_list_attach")>
-<?!("X", 11)>
-</div>
-</div>
-<div id="comment_replyto" style="display:none"><?MAIL:SUMM:INREPLYTO("X")></div>
index aa8d6665a863a9ef6417f71297cd8a81af9d86cd..83f780875a068ba6024a2c5fda088f42033aea41 100644 (file)
@@ -1074,6 +1074,11 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf,
                                if (Handler->PreEvalFunc != NULL)
                                        Handler->PreEvalFunc(NewToken);
                        }
+               } else {
+                       LogTemplateError(
+                               NULL, "Token ", ERR_NAME, &TP,
+                               " isn't known to us.", 
+                               NULL);
                }
                break;
        case SV_GETTEXT:
index d3ef2977202e2c008f3d4e8f91aa21c8f2023832..b3440092078d57d12e5c37f94735645fa82b536d 100644 (file)
@@ -149,70 +149,6 @@ extern char *ssl_cipher_list;
 #endif
 
 
-/*
- * Room flags (from Citadel)
- *
- * bucket one...
- */
-#define QR_PERMANENT   1               /* Room does not purge                  */
-#define QR_INUSE       2               /* Set if in use, clear if avail        */
-#define QR_PRIVATE     4               /* Set for any type of private room     */
-#define QR_PASSWORDED  8               /* Set if there's a password too        */
-#define QR_GUESSNAME   16              /* Set if it's a guessname room         */
-#define QR_DIRECTORY   32              /* Directory room                       */
-#define QR_UPLOAD      64              /* Allowed to upload                    */
-#define QR_DOWNLOAD    128             /* Allowed to download                  */
-#define QR_VISDIR      256             /* Visible directory                    */
-#define QR_ANONONLY    512             /* Anonymous-Only room                  */
-#define QR_ANONOPT     1024            /* Anonymous-Option room                */
-#define QR_NETWORK     2048            /* Shared network room                  */
-#define QR_PREFONLY    4096            /* Preferred status needed to enter     */
-#define QR_READONLY    8192            /* Aide status required to post         */
-#define QR_MAILBOX     16384           /* Set if this is a private mailbox     */
-
-/*
- * bucket two...
- */
-#define QR2_SYSTEM     1               /* System room; hide by default         */
-#define QR2_SELFLIST   2               /* Self-service mailing list mgmt       */
-#define QR2_COLLABDEL  4               /* Anyone who can post can also delete  */
-#define QR2_SUBJECTREQ  8               /* Subject strongly recommended                */
-#define QR2_SMTP_PUBLIC 16              /* smtp public postable room           */
-#define QR2_MODERATED  32              /* Listservice aide has to permit posts */
-
-/*
- * user/room access
- */
-#define UA_KNOWN               2
-#define UA_GOTOALLOWED         4
-#define UA_HASNEWMSGS          8
-#define UA_ZAPPED              16
-#define UA_POSTALLOWED          32
-#define UA_ADMINALLOWED         64
-#define UA_DELETEALLOWED        128
-#define UA_ISTRASH              256    /* Only available in room view... */
-
-
-/*
- * User flags (from Citadel)
- */
-#define US_NEEDVALID   1               /* User needs to be validated           */
-#define US_PERM                4               /* Permanent user                       */
-#define US_LASTOLD     16              /* Print last old message with new      */
-#define US_EXPERT      32              /* Experienced user                     */
-#define US_UNLISTED    64              /* Unlisted userlog entry               */
-#define US_NOPROMPT    128             /* Don't prompt after each message      */
-#define US_PROMPTCTL   256             /* <N>ext & <S>top work at prompt       */
-#define US_DISAPPEAR   512             /* Use "disappearing msg prompts"       */
-#define US_REGIS       1024            /* Registered user                      */
-#define US_PAGINATOR   2048            /* Pause after each screen of text      */
-#define US_INTERNET    4096            /* Internet mail privileges             */
-#define US_FLOORS      8192            /* User wants to see floors             */
-#define US_COLOR       16384           /* User wants ANSI color support        */
-#define US_USER_SET    (US_LASTOLD | US_EXPERT | US_UNLISTED | \
-                       US_NOPROMPT | US_DISAPPEAR | US_PAGINATOR | \
-                       US_FLOORS | US_COLOR | US_PROMPTCTL )
-
 
 
 #define SRV_STATUS_MSG(ServerLineBuf) (ChrPtr(ServerLineBuf) + 4), (StrLength(ServerLineBuf) - 4)