• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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