Welcome Guest, Not a member yet? Register   Sign In
$this->_remap('home') sends index instead of home.
#1

[eluser]Bramme[/eluser]
Hi all


In my frontend controller, I use a _remap function that checks if pages are created in a database or if they're existing methods, else, I show a 404 error.

This has worked fine before, but all of a sudden, I noticed a bug.

here's my index function:

Code:
function index() {
    $this->_remap('home');
}

function _remap($method) {
// some more code
}

My remap functions handles all the rest, however, suddenly I noticed mysite.com/ was empty, but mysite.com/home works perfectly fine.

I examined the variables and noticed that when visiting mysite.com/ $method isn't 'home' (like I was trying to send with my index function) but just 'index'.

Is this some new behaviour, a bug or does it simply mean i have to put
Code:
if($method == 'index') $method = 'home'
in my remap function?


Messages In This Thread
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 10:34 AM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 11:04 AM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 11:09 AM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 11:18 AM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 11:26 AM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 11:45 AM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 11:58 AM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 12:09 PM
$this->_remap('home') sends index instead of home. - by El Forum - 04-29-2009, 01:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB