]> code.citadel.org Git - citadel.git/commitdiff
* conditionals mustn't have 0 as id; fix the ones who have and add another errormessage.
authorWilfried Göesgens <willi@citadel.org>
Tue, 25 Nov 2008 19:40:35 +0000 (19:40 +0000)
committerWilfried Göesgens <willi@citadel.org>
Tue, 25 Nov 2008 19:40:35 +0000 (19:40 +0000)
webcit/static/t/section_mailsummary.html
webcit/static/t/section_mailsummary_m.html
webcit/static/t/whosimplesection.html
webcit/subst.c

index 048561665831ec75b096184979aa32a6cf6ee008..15e0fef879014044a63a7cfcc82752eee2476741 100644 (file)
@@ -1,4 +1,4 @@
-<tr id="m<?MAIL:SUMM:N>" style="font-weight:<?%("COND:MAIL:SUMM:UNREAD", 0, 0, 0, "bold", "normal")>" onMouseDown="CtdlMoveMsgMouseDown(event,<?MAIL:SUMM:N>)">
+<tr id="m<?MAIL:SUMM:N>" style="font-weight:<?%("COND:MAIL:SUMM:UNREAD", 1, 0, 0, "bold", "normal")>" onMouseDown="CtdlMoveMsgMouseDown(event,<?MAIL:SUMM:N>)">
 <td width=50%><?MAIL:SUMM:SUBJECT("X")></td>
 <td width=30%><?MAIL:SUMM:FROM("X")></td>
 <td width=20%><?MAIL:SUMM:DATESTR></td>
index 761508f4f503c2cdccd67e024e74f0c74c148da9..8b96757ce98d55abea62dd7ea525c1e0b5da5a75 100644 (file)
@@ -1,4 +1,4 @@
-<div><div id="m<?MAIL:SUMM:N>" style="font-weight:<?%("COND:MAIL:SUMM:UNREAD", 0, 0, 0, "bold", "normal")>;" onClick="CtdlLoadMsgMouseDown(event,<?MAIL:SUMM:N>)">
+<div><div id="m<?MAIL:SUMM:N>" style="font-weight:<?%("COND:MAIL:SUMM:UNREAD", 1, 0, 0, "bold", "normal")>;" onClick="CtdlLoadMsgMouseDown(event,<?MAIL:SUMM:N>)">
 <span class="from"><?MAIL:SUMM:FROM("X")></span>
 <span style="float: right;"><?MAIL:SUMM:DATESTR></span><br/>
 <span class="subject"><?MAIL:SUMM:SUBJECT("X")></span>
index 387546821fdb03e5f19a643a7d996df0a6e1d3a4..8161f4d1c4ca1901ba5d63d2bad17e262577336f 100644 (file)
@@ -1 +1 @@
-<li class="<??("WHO:IDLE", 4)>activeuser<?!("X", 4)><?!("COND:SUBST", 5, "WHO:IDLE")>inactiveuser<?!("X", 5)>"><a href='showuser?who=<?WHO:NAME("U")>'><?WHO:NAME("U")></a></li>
+<li class="<??("WHO:IDLE", 4)>activeuser<?!("X", 4)><?!("COND:SUBST", 5, "WHO:IDLE")>inactiveuser<?!("X", 5)>"><a href='showuser?who=<?WHO:NAME("U")>'><?WHO:NAME("U")></a></li>
index 05f03c6b925d0bf658915418d88a16ef26cbe57b..ca532a469566e6cd0fc1ecea299b729098c212cf 100644 (file)
@@ -934,6 +934,15 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf,
        case SV_CUST_STR_CONDITIONAL:
        case SV_CONDITIONAL:
        case SV_NEG_CONDITIONAL:
+               if (NewToken->Params[1]->lvalue == 0) {
+                       lprintf(1, "Conditional (in '%s' line %ld); "
+                               "Conditional ID mustn't be 0! [%s]\n", 
+                               ChrPtr(pTmpl->FileName),
+                               NewToken->Line,
+                               ChrPtr(NewToken->FlatToken));
+                       NewToken->Flags = 0;
+                       break;
+               }
                if (NewToken->nParameters <2) {
                        lprintf(1, "Conditional (in '%s' line %ld); "
                                "require at least 2 parameters, you gave %ld params [%s]\n",