Welcome Guest, Not a member yet? Register   Sign In
remapping controllers' function calls: what about arguments?
#6

[eluser]Michael Ekoka[/eluser]
Quote:$params = array_slice($RTR->rsegments, (($RTR->fetch_directory() == '') ? 2 : 3));

This piece of code will create a bug as is, when your controller is in a subdirectory (e.g. /controllers/admin/users.php). You don't need to check for a sub-folder when using $rsegments, it only has information about the controller, the method and the parameters, never the subdir. You will need to modify your code :

Code:
$params = array_slice($RTR->rsegments, 2);


Messages In This Thread
remapping controllers' function calls: what about arguments? - by El Forum - 11-04-2007, 10:00 AM



Theme © iAndrew 2016 - Forum software by © MyBB