Changeset 2679

Show
Ignore:
Timestamp:
08/19/08 16:37:43 (5 months ago)
Author:
david
Message:

Allow skipping of template auto-assigns, closes #605

Location:
branches/1.0
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/CHANGELOG

    r2668 r2679  
    441.0.0 beta 2 (August ??, 2008) 
    55------------------------------ 
     6 
     7ADD: Allow skipping of template auto-assigns (#605) (David) 
    68 
    79FIX: Some config handlers use PHP-5.3-reserved-word "NAMESPACE" as constant (#810) (David, Benjamin Börngen-Schmidt) 
  • branches/1.0/src/renderer/AgaviEzctemplateRenderer.class.php

    r2259 r2679  
    162162      if(isset($this->moreAssignNames[$key])) { 
    163163        $key = $this->moreAssignNames[$key]; 
     164      } elseif(array_key_exists($key, $this->moreAssignNames)) { 
     165        // the name is null, which means this one should not be assigned 
     166        continue; 
    164167      } 
    165168      $engine->send->{$key} = $value; 
  • branches/1.0/src/renderer/AgaviPhpRenderer.class.php

    r2363 r2679  
    8383      if(isset($this->moreAssignNames[$moreAssignName])) { 
    8484        $moreAssignName = $this->moreAssignNames[$moreAssignName]; 
     85      } elseif(array_key_exists($moreAssignName, $this->moreAssignNames)) { 
     86        // the name is null, which means this one should not be assigned 
     87        continue; 
    8588      } 
    8689      $this->moreAssigns[$moreAssignName] =& $moreAssign; 
  • branches/1.0/src/renderer/AgaviPhptalRenderer.class.php

    r2259 r2679  
    130130      if(isset($this->moreAssignNames[$key])) { 
    131131        $key = $this->moreAssignNames[$key]; 
     132      } elseif(array_key_exists($key, $this->moreAssignNames)) { 
     133        // the name is null, which means this one should not be assigned 
     134        continue; 
    132135      } 
    133136      $engine->set($key, $value); 
  • branches/1.0/src/renderer/AgaviRenderer.class.php

    r2259 r2679  
    124124      $getter = 'get' . str_replace('_', '', $item); 
    125125      if(method_exists($this->context, $getter)) { 
     126        if($var === null) { 
     127          // the name is null, which means this one should not be assigned 
     128          // we do this in here, not for the moreAssignNames, since those are checked later in the renderer 
     129          continue; 
     130        } 
    126131        $this->assigns[$var] = $getter; 
    127132      } else { 
  • branches/1.0/src/renderer/AgaviSmartyRenderer.class.php

    r2259 r2679  
    158158      if(isset($this->moreAssignNames[$key])) { 
    159159        $key = $this->moreAssignNames[$key]; 
     160      } elseif(array_key_exists($key, $this->moreAssignNames)) { 
     161        // the name is null, which means this one should not be assigned 
     162        continue; 
    160163      } 
    161164      $engine->assign_by_ref($key, $value);