• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HMVC and Cjax

#17
[eluser]salvomil[/eluser]
I got something to work, but it does not seem a good thing....

I modified the system file CodeIgniter.php as follow:


// Load the local application controller
// Note: The Router class automatically validates the controller path using the router->_validate_request().
// If this include fails it means that the default controller in the Routes.php file is not resolving to something valid.
if ( $RTR->fetch_class()=='AjaxController' ) {
$path = APPPATH.'controllers/'.$RTR->fetch_class().'.php';
}else{
$path = APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php';
}

if ( ! $path )
{
show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
}
//include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php'); // Original
include( $path );

this because $RTR->fetch_directory() appends ../modules/module/controller .....

and it seem to go but I have not tested all the application....


Messages In This Thread
HMVC and Cjax - by El Forum - 01-29-2014, 05:11 AM
HMVC and Cjax - by El Forum - 01-31-2014, 06:44 AM
HMVC and Cjax - by El Forum - 02-02-2014, 07:30 AM
HMVC and Cjax - by El Forum - 02-07-2014, 07:53 AM
HMVC and Cjax - by El Forum - 02-10-2014, 09:46 AM
HMVC and Cjax - by El Forum - 02-10-2014, 10:23 AM
HMVC and Cjax - by El Forum - 02-10-2014, 10:58 AM
HMVC and Cjax - by El Forum - 02-10-2014, 12:54 PM
HMVC and Cjax - by El Forum - 02-10-2014, 01:45 PM
HMVC and Cjax - by El Forum - 06-08-2014, 02:05 PM
HMVC and Cjax - by El Forum - 06-12-2014, 10:34 AM
HMVC and Cjax - by El Forum - 06-12-2014, 05:38 PM
HMVC and Cjax - by El Forum - 06-13-2014, 06:39 AM
HMVC and Cjax - by El Forum - 06-13-2014, 02:10 PM
HMVC and Cjax - by El Forum - 06-14-2014, 03:52 PM
HMVC and Cjax - by El Forum - 10-29-2014, 01:25 AM
HMVC and Cjax - by El Forum - 10-29-2014, 03:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.