Skip to content

Commit

Permalink
Fixed issue #1076
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgdf committed Feb 24, 2012
1 parent db60665 commit 0e2c4df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions system/core/CodeIgniter.php
Expand Up @@ -170,13 +170,14 @@
* ------------------------------------------------------
*/
$RTR =& load_class('Router', 'core');
$RTR->_set_routing();


// Set any routing overrides that may exist in the main index file
if (isset($routing))
{
$RTR->_set_overrides($routing);
}

$RTR->_set_routing();

/*
* ------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions system/core/Router.php
Expand Up @@ -269,16 +269,16 @@ function _validate_request($segments)
}

// Does the requested controller exist in the root folder?
if (file_exists(APPPATH.'controllers/'.$segments[0].'.php'))
if (file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].'.php'))
{
return $segments;
}

// Is the controller in a sub-folder?
if (is_dir(APPPATH.'controllers/'.$segments[0]))
if (is_dir(APPPATH.'controllers/'.$this->fetch_directory().$segments[0]))
{
// Set the directory and remove it from the segment array
$this->set_directory($segments[0]);
$this->set_directory($this->fetch_directory().$segments[0]);
$segments = array_slice($segments, 1);

if (count($segments) > 0)
Expand Down
1 change: 1 addition & 0 deletions user_guide/changelog.html
Expand Up @@ -79,6 +79,7 @@ <h3>Bug fixes for 2.1.1</h3>
<li>Fixed a bug - form_open() compared $action against site_url() instead of base_url()</li>
<li>Fixed a bug - CI_Upload::_file_mime_type() could've failed if mime_content_type() is used for the detection and returns FALSE.</li>
<li>Fixed a bug (#538) - Windows paths were ignored when using the <a href="libraries/image_lib.html">Image Manipulation Class</a> to create a new file.</li>
<li>Fixed a bug (#1076) - $routing['directory'] wasn't being recognized by CodeIgniter in some cases.</li>
</ul>


Expand Down

0 comments on commit 0e2c4df

Please sign in to comment.