Show
Ignore:
Timestamp:
11/03/06 22:25:22 (2 years ago)
Author:
scorfield
Message:

Fixes #160 by pushing generation of condition down into true/false. Added test case.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • framework/trunk/verbs/if.cfm

    r185 r257  
    6868                 
    6969                // compile <if> 
    70                 fb_appendLine("<cfif #fb_.verbInfo.attributes.condition#>"); 
    71         } 
    72  
    73         // compile </if> 
    74         if (fb_.verbInfo.executionMode is "end") { 
    75                 fb_appendLine("</cfif>"); 
     70                // <true> and <false> can occur in either order so we defer the conditional 
     71                // to the child tags... 
     72                fb_.verbInfo.condition = fb_.verbInfo.attributes.condition; 
     73                fb_.verbInfo.ifUsed = false; 
     74        } else { 
     75                // compile </if> 
     76                if (fb_.verbInfo.ifUsed) { 
     77                        fb_appendLine("</cfif>"); 
     78                } 
    7679        } 
    7780</cfscript>