Show
Ignore:
Timestamp:
02/05/06 23:31:53 (6 years ago)
Author:
john
Message:

bug fixes for views

Files:
1 modified

Legend:

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

    r120 r128  
    187187                    $GLOBALS['current_controller_path'] = "$this->added_path/$this->controller"; 
    188188                    $GLOBALS['current_controller_name'] = $this->controller; 
     189                    $GLOBALS['current_action_name'] = $this->action; 
    189190                    $GLOBALS['current_controller_object'] =& $this->controller_object; 
    190191                } 
     
    340341 
    341342    function execute_before_filters() { 
    342         if(count($this->before_filters) > 0) { 
    343             foreach($this->before_filters as $filter_function) { 
     343        if(count($this->controller_object->before_filters) > 0) {  
     344            foreach($this->controller_object->before_filters as $filter_function) { 
    344345                if(method_exists($this->controller_object, $filter_function)) { 
    345346                    $this->controller_object->$filter_function(); 
     
    364365 
    365366    function execute_after_filters() { 
    366         if(count($this->after_filters) > 0) { 
    367             foreach($this->after_filters as $filter_function) { 
     367        if(count($this->controller_object->after_filters) > 0) { 
     368            foreach($this->controller_object->after_filters as $filter_function) { 
    368369                if(method_exists($this->controller_object, $filter_function)) { 
    369370                    $this->controller_object->$filter_function(); 
     
    375376    function add_after_filter($filter_function_name) { 
    376377        if(is_string($filter_function_name) && !empty($filter_function_name)) { 
    377             if(!in_array($filter_function_name, $this->after_filters)) { 
    378                 $this->after_filters[] = $filter_function_name; 
     378            if(!in_array($filter_function_name, $this->controller_object->after_filters)) { 
     379                $this->controller_object->after_filters[] = $filter_function_name; 
    379380            } 
    380381        } elseif(is_array($filter_function_name)) { 
    381             if(count($this->after_filters) > 0) { 
    382                 $this->after_filters = array_merge($this->after_filters, $filter_function_name); 
     382            if(count($this->controller_object->after_filters) > 0) { 
     383                $this->controller_object->after_filters = array_merge($this->controller_object->after_filters, $filter_function_name); 
    383384            } else { 
    384                 $this->after_filters = $filter_function_name; 
     385                $this->controller_object->after_filters = $filter_function_name; 
    385386            } 
    386387        } 
     
    388389 
    389390    function add_helper($helper_name) { 
    390         if(!in_array($helper_name, $this->helpers)) { 
    391             $this->helpers[] = $helper_name; 
     391        if(!in_array($helper_name, $this->controller_object->helpers)) { 
     392            $this->controller_object->helpers[] = $helper_name; 
    392393        } 
    393394    }