From 89face3f5f3d82d9b055e6515ba0f7746a7423a0 Mon Sep 17 00:00:00 2001 From: "Mr. Hyde" Date: Sat, 24 Mar 2012 06:51:56 +0200 Subject: [PATCH 1/2] Fixed missing realpath() in Router locate function --- third_party/HMVC/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/HMVC/Router.php b/third_party/HMVC/Router.php index 255ebfd..47869a3 100644 --- a/third_party/HMVC/Router.php +++ b/third_party/HMVC/Router.php @@ -142,7 +142,7 @@ function locate($segments) { $relative = $location; // Make path relative to controllers directory - $start = rtrim(FCPATH . APPPATH, '/'); + $start = rtrim(realpath(FCPATH . APPPATH), '/'); $parts = explode('/', str_replace('\\', '/', $start)); // Iterate all parts and replace absolute part with relative part From 8fd2108d534d24897a2c8872b9714b6b1815b3c8 Mon Sep 17 00:00:00 2001 From: "Mr.Hyde" Date: Sat, 24 Mar 2012 07:30:00 +0200 Subject: [PATCH 2/2] Replaced confusing controller prefixes to CI_ due there is no such class like MY_Controller --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ae421e7..d3bbbae 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ This is the basic structure of a HMVC module: From within a module you can load its own resources just like you always do. If on the other hand, you want to load resources from another module you can do this by adding the module's name like a directory structure: - class Hello extends MY_Controller { + class Hello extends CI_Controller { public function index() { // load a model from the current module @@ -76,7 +76,7 @@ To load hierarchical controllers you use the `$this->load->controller()` method. For example, this is our main controller where we pass the request to a sub-controller in the same module: - class Specials extends MY_Controller { + class Specials extends CI_Controller { public function index() { $this->load->controller('blogs/random', array('specials')); @@ -86,7 +86,7 @@ For example, this is our main controller where we pass the request to a sub-cont And the sub-controller contains the real method: - class Blogs extends MY_Controller { + class Blogs extends CI_Controller { public function random($type) { ...