Show
Ignore:
Timestamp:
01/02/06 22:19:42 (6 years ago)
Author:
john
Message:

more bug fixes for scaffolding and added input filtering

Files:
1 modified

Legend:

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

    r106 r107  
    3434        $layouts_path, 
    3535        $url_path, 
    36         $layout_file, 
    3736        $default_layout_file, 
    3837        $helper_file, 
     
    192191 
    193192                # Which layout should we use? 
    194                 $this->layout_file = $this->determine_layout(); 
     193                $layout_file = $this->determine_layout(); 
    195194 
    196195                # Check if there is any defined scaffolding to load 
     
    199198                    if(file_exists(TRAX_LIB_ROOT."/scaffold_controller.php")) { 
    200199                        include_once(TRAX_LIB_ROOT."/scaffold_controller.php"); 
    201                         $GLOBALS['current_controller_object'] = $this->controller_object = new ScaffoldController($scaffold, $this->controller, $this->action); 
     200                        $GLOBALS['current_controller_object'] = $this->controller_object = new ScaffoldController($scaffold); 
    202201                        if($this->action) { 
    203202                            $this->view_file = TRAX_LIB_ROOT . "/templates/scaffolds/".$this->action.".phtml"; 
     
    205204                            $this->view_file = TRAX_LIB_ROOT . "/templates/scaffolds/index.phtml"; 
    206205                        } 
    207                         if(!file_exists($this->layout_file)) { 
     206                        if(!file_exists($layout_file)) { 
    208207                            # the generic scaffold layout 
    209                             $this->layout_file = TRAX_LIB_ROOT . "/templates/scaffolds/layout.phtml"; 
     208                            $layout_file = TRAX_LIB_ROOT . "/templates/scaffolds/layout.phtml"; 
    210209                        } 
    211210                    } 
     
    291290                    ob_end_clean(); 
    292291 
    293                     if(file_exists($this->layout_file) && $render_layout !== false) { 
     292                    if(file_exists($layout_file) && $render_layout !== false) { 
    294293                        # render the layout 
    295                         include($this->layout_file); 
     294                        include($layout_file); 
    296295                    } else { 
    297296                        # Can't find any layout so throw an exception