• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
query strings enabled and controllers into sub-directories


When query strings are enabled, whe can set
$config['directory_trigger'] = 'd';
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';

That allow us to specify directory of a controller, controller we call and method of the controller.

But the directory_trigger were not used, so query-strings were not available for those who used sub-directory to organize controllers.

To solve the problem, I've just added some line in Router.php, function _set_routing()
//Router.php, function router->_set_routing()
    function _set_routing()
        // Are query strings enabled in the config file?
        // If so, we're done since segment based URIs are not used with query strings.
        if ($this->config->item('enable_query_strings') === TRUE AND isset($_GET[$this->config->item('controller_trigger')]))

            //The 3 following lines were missing in the original script
            if (isset($_GET[$this->config->item('directory_trigger')]))
            if (isset($_GET[$this->config->item('function_trigger')]))

        //Here some more code

Note : I've just updated my local CI scripts, nothing else. So, if somewhone could fix it, it would be fine Wink

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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