Changeset 359

Show
Ignore:
Timestamp:
09/14/07 17:03:43 (1 year ago)
Author:
bermiferrer
Message:

Fixing issue #60 by bobchin. Now public/index.php will not hold a definition to AK_FRAMEWORK_DIR. It will be added to the setup script and from there to the config/config.php file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/framework_setup_controller.php

    r357 r359  
    1717defined('AK_BASE_DIR') ? null : define('AK_BASE_DIR', str_replace(DS.'app'.DS.'controllers'.DS.'framework_setup_controller.php','',__FILE__)); 
    1818defined('AK_CONFIG_DIR') ? null : define('AK_CONFIG_DIR', AK_BASE_DIR.DS.'config'); 
    19  
     19// defined('AK_FRAMEWORK_DIR') ? null : define('AK_FRAMEWORK_DIR', '/path/to/the/framework');  
     20         
    2021define('AK_AUTOMATICALLY_UPDATE_LANGUAGE_FILES', true); 
    2122define('AK_AUTOMATIC_CONFIG_VARS_ENCRYPTION', false); 
     
    209210} 
    210211 
    211 $ActionController = new AkActionController(); 
    212 $ActionController->handleRequest(); 
     212require_once(AK_LIB_DIR.DS.'AkDispatcher.php'); 
     213$Dispatcher =& new AkDispatcher(); 
     214$Dispatcher->dispatch(); 
    213215 
    214216?> 
  • trunk/lib/AkActionController.php

    r357 r359  
    144144        $this->Request =& $Request; 
    145145        $this->Response =& $Response; 
    146         $this->params =& $this->Request->getParams(); 
     146        $this->params = $this->Request->getParams(); 
    147147        $this->_action_name = $this->Request->getAction(); 
    148148         
     
    158158         
    159159        if($this->_high_load_mode !== true){ 
    160          
    161             // Before filters 
     160            if(!empty($this->_auto_instantiate_models)){ 
     161                $this->instantiateIncludedModelClasses(); 
     162            } 
    162163            if(!empty($this->helpers)){ 
    163                 $this->beforeFilter('instantiateHelpers'); 
     164                $this->instantiateHelpers(); 
    164165            } 
    165166            if(!empty($this->_enable_plugins)){ 
    166                 $this->beforeFilter('loadPlugins'); 
    167             } 
    168             if(!empty($this->_auto_instantiate_models)){ 
    169                 $this->beforeFilter('instantiateIncludedModelClasses'); 
     167                $this->loadPlugins(); 
    170168            } 
    171169        }else{ 
     
    173171        } 
    174172        
    175         $this->beforeFilter('_ensureProperProtocol'); 
     173        $this->_ensureProperProtocol(); 
    176174         
    177175        // After filters 
  • trunk/public/index.php

    r358 r359  
    1414 * @license GNU Lesser General Public License <http://www.gnu.org/copyleft/lesser.html> 
    1515 */ 
    16  
    17 // defined('AK_FRAMEWORK_DIR') ? null : define('AK_FRAMEWORK_DIR', '/path/to/the/framework'); 
    1816 
    1917/** 
  • trunk/script/setup

    r334 r359  
    136136        foreach (array( 
    137137        'config'.DS.'DEFAULT-config.php', 
    138         'public'.DS.'index.php') as $file){ 
     138        'app'.DS.'controllers'.DS.'framework_setup_controller.php') as $file){ 
    139139            if(file_exists($this->options['directory'].DS.$file)){ 
    140140                $file_contents = str_replace("// defined('AK_FRAMEWORK_DIR') ? null : define('AK_FRAMEWORK_DIR', '/path/to/the/framework');",