Ticket #105: protect_filters.diff
| File protect_filters.diff, 1.3 kB (added by zynode@zhuoqe.org, 2 years ago) |
|---|
-
trax/vendor/trax/action_controller.php
old new 650 650 # Call the controller method based on the URL 651 651 if($this->controller_object->execute_before_filters()) { 652 652 653 if(method_exists($this->controller_object, $this->action) ) {653 if(method_exists($this->controller_object, $this->action) && !$this->controller_object->my_is_filter($this->action)) { 654 654 //error_log('method '.$this->action.' exists, calling it'); 655 655 $action = $this->action; 656 656 //error_log('calling action routine ' … … 784 784 } 785 785 } 786 786 787 787 788 /** 789 * Check if specific method is a filter 790 * @uses $before_filters 791 * @uses $after_filters 792 */ 793 function my_is_filter($method) { 794 $before = array_search($method, $this->before_filters); 795 $after = array_search($method, $this->after_filters); 796 return ($before === false && $after === false) ? false : true ; 797 } 798 799 /** 788 800 * Execute the before filters 789 801 * @uses $before_filters 790 802 */

