caudium-commits AT caudium.net
Caudium CVS Commits list

CVS: caudium/server/modules/tags rxmltags.pike,1.120,1.120.2.1


chronological Thread 
  • From: Bill Welliver <hww3 AT cvs.caudiumforge.net>
  • To: caudium-commits AT caudium.net
  • Subject: CVS: caudium/server/modules/tags rxmltags.pike,1.120,1.120.2.1
  • Date: Sun, 31 Oct 2004 20:48:12 +0100

Update of /cvs/caudium/caudium/server/modules/tags
In directory cvs.caudiumforge.net:/tmp/cvs-serv69616

Modified Files:
      Tag: stable_1_4
        rxmltags.pike 
Log Message:
fix a nasty bug in <if> that caused non-existent variables,cookies,etc to 
evaluate as true.

this should fix a number of goofy rxml problems, and make the if tag doc 
compliant.


Index: rxmltags.pike
===================================================================
RCS file: /cvs/caudium/caudium/server/modules/tags/rxmltags.pike,v
retrieving revision 1.120
retrieving revision 1.120.2.1
diff -u -r1.120 -r1.120.2.1
--- rxmltags.pike       24 Aug 2004 09:51:26 -0000      1.120
+++ rxmltags.pike       31 Oct 2004 19:48:10 -0000      1.120.2.1
@@ -18,7 +18,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 /*
- * $Id: rxmltags.pike,v 1.120 2004/08/24 09:51:26 jnt Exp $
+ * $Id: rxmltags.pike,v 1.120.2.1 2004/10/31 19:48:10 hww3 Exp $
  */
 
 //! module: Core RXML Tags
@@ -28,7 +28,7 @@
 //!  when the chosen RXML parser is loaded.
 //! type: MODULE_PARSER | MODULE_PROVIDER
 //! provides: rxml:tags
-//! cvs_version: $Id: rxmltags.pike,v 1.120 2004/08/24 09:51:26 jnt Exp $";
+//! cvs_version: $Id: rxmltags.pike,v 1.120.2.1 2004/10/31 19:48:10 hww3 Exp 
$";
 
 #include <config.h>
 #include <module.h>
@@ -44,7 +44,7 @@
                          "that were previously in the Main RXML Parser.";
 constant module_unique = 1;
 constant thread_safe   = 1;
-constant cvs_version   = "$Id: rxmltags.pike,v 1.120 2004/08/24 09:51:26 jnt 
Exp $";
+constant cvs_version   = "$Id: rxmltags.pike,v 1.120.2.1 2004/10/31 19:48:10 
hww3 Exp $";
 
 #define CALL_USER_TAG id->conf->parse_module->call_user_tag
 #define CALL_USER_CONTAINER id->conf->parse_module->call_user_container
@@ -1492,7 +1492,10 @@
   {                                                    \
     string a, b;                                       \
     if(sscanf(m->X, "%s is %s", a, b)==2)              \
-      TEST(Caudium._match(Y[a], b/","));                       \
+    { \
+      if(!Y[a] && zero_type(Y[a])==1) return "<false>"; \
+      TEST(Caudium._match(Y[a], b/","));               \
+    } \
     else                                               \
       TEST(Y[m->X]);                                   \
   }                                                    \
@@ -1551,8 +1554,11 @@
     }
   }
 
-  if(m->cookie) NOCACHE();
+  if(m->cookie)
+    NOCACHE();
+
   IS_TEST(cookie, id->cookies);
+
   IS_TEST(defined, defines);
 
   if (m->successful) TEST (_ok);



  • CVS: caudium/server/modules/tags rxmltags.pike,1.120,1.120.2.1, Bill Welliver

Archive powered by MhonArc 2.6.10.

§