Welcome Guest, Not a member yet? Register   Sign In
enable_query_strings Acts differently?
#1

[eluser]BradEstey[/eluser]
With the addition of $config['allow_get_array'] to the config file, we can retrieve the value of query strings using $_GET without having to set $config['enable_query_strings'] to true. So does that mean the only reason to turn on $config['enable_query_strings'] now, would be if we wanted to call the controller & function using c= & f=?

I just wanted to note that, when migrating from 1.7.3, I left $config['enable_query_strings'] on (because it had to be on in 1.7.3 to get query strings, and initially I was just blindly copying over all my settings.) and noticed that the URI Helper redirect() function automatically places a "?" in front of whatever is passed in the first parameter. So, for example, if you have $config['enable_query_strings'] turned on and run the following:

Code:
redirect('blog/', 'location', 301);

Rather than take you to http://www.site.com/blog/ it will instead force you to go to http://www.site.com/?blog/ .. which in my case just brought up the homepage. I thought this was a little strange. What if I wanted to redirect to another directory?
#2

[eluser]Eric Barnes[/eluser]
I didn't personally add this feature but I am pretty confident when you enable_query_strings it then expects you are going to be using the controller=&method;= like you describe. Because of this internal functions then expect you are going to be doing this.

If you are just wanting query strings added to the end of your urls: mysite.com/controller/method?id=1 then you would disable the above and enable "enable_query_strings".

So from the way I am reading your post I feel that is an expected behavior.
#3

[eluser]BradEstey[/eluser]
It makes sense up to a point. I'm not personally going to be using it. But, I wonder if someone is using ?controller=&method;= for whatever reason, would then never be able to do a redirect to a page in another directory outside the framework using the redirect() function.

Regardless though, I'm really happy to see these two things are now split apart.




Theme © iAndrew 2016 - Forum software by © MyBB