Show
Ignore:
Timestamp:
05/23/06 03:30:12 (6 years ago)
Author:
john
Message:

ActionMailer? rewrite to add mailer views/models

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_controller.php

    r199 r200  
    10491049                unset($tmp_key); 
    10501050                unset($tmp_value); 
    1051             }         
     1051            }      
    10521052            include($path); 
    10531053            $this->render_performed = true;   
     
    11021102            $file_with_path = $this->views_path."/_".$file.".".$this->views_file_extention; 
    11031103        } 
    1104  
     1104         
    11051105        if(file_exists($file_with_path)) { 
    11061106             
     
    11211121 
    11221122            $locals = array_key_exists("locals", $options) ? $options['locals'] : array(); 
    1123             if(array_key_exists("collection", $options)) { 
     1123            if(array_key_exists("collection", $options) && is_array($options['collection'])) { 
    11241124                foreach($options['collection'] as $tmp_value) { 
    11251125                    ${$file."_counter"}++; 
     
    11631163                   && $this->layout != '') 
    11641164            ? $this->layout : $this->controller; 
    1165          
     1165     
    11661166        # Check if a method has been defined to determine the layout at runtime 
    11671167        if(method_exists($this, $layout)) { 
     
    11811181                $path = substr($layout, 0, strripos($layout, "/")); 
    11821182                $layout = $layouts_base_path."/".$path."/".$file.".".$this->views_file_extention; 
    1183             } elseif( isset($this->layout) && ($this->layout != '') ) { 
    1184                 # Is there a layout for the current controller 
    1185                 $layout = $layouts_base_path."/".$this->layout.".".$this->views_file_extention;                     
    11861183            } else { 
    11871184                # Is there a layout for the current controller