Welcome Guest, Not a member yet? Register   Sign In
Please consider querystring support in 2.x
#21

[eluser]pbreit[/eluser]
WanWizard, thanks, I will give that a try! If this works reliably and performance-wise, it would be a great enhancement for all CodeIgniter developers to be able to safely and easily use querystrings where it make sense.
#22

[eluser]Dan Horrigan[/eluser]
A while back i submitted a pull request to EllisLab on BitBucket for v2.0. Here is the commit: http://bitbucket.org/dhorrigan/codeignit...4d17281982

Probably won't get into the core, but hey...it was worth a try.

Dan
#23

[eluser]pbreit[/eluser]
Does anyone here have good relations with EllisLabs to see if they would consider this?
#24

[eluser]pbreit[/eluser]
Does this look right for 2.0?
#25

[eluser]WanWizard[/eluser]
Looks ok.

The changes for 2.0 are exactly the same as for 1.7.2.
#26

[eluser]coldclimate[/eluser]
[quote author="Phil Sturgeon" date="1277913614"][quote author="Crimp" date="1277913451"]Why segments are better?
CI is designed to work with segments, great. We just need a way to easily throw in some ?foo=bar for Twitter, oAuth support, Facebook Connect, etc without recoding our apps or hacking it with hooks like mentioned above.
Let's put our heads together and come up with a solution. "Go team!"[/quote]

I can't agree more.
If building your site from the ground up and the lack of query strings is rarely a problem (or hasn't been for me ever). Once you have to deal with other people's code (especially my current nemesis Facebook) and you do have to hack about a bit. Using Elliot Haughin's new facebook library we've had a lot of success, but it's still very much feels like hacking about, not clean coding.

My ideal solution would mean that segments worked via routes for pointing to controllers, methods and passing in data, but that tagging a query string on the end would then make these variables available to that controller/method and not end up in 404's or routing problems. We've nearly got this by using a combination of $config['uri_protocol'] = "PATH_INFO"; and modifying $config['permitted_uri_chars']
#27

[eluser]WanWizard[/eluser]
That might work in your case, but I prefer not to fiddle with config values, that might have side-effects elsewhere.

On one of my servers p.e., PATH_INFO doesn't work, no segments can be loaded and the application fails miserably...
#28

[eluser]pbreit[/eluser]
Wan, your solution works with no side effects?
#29

[eluser]Unknown[/eluser]
[quote author="pbreit" date="1279056494"]Wan, your solution works with no side effects?[/quote]

Looks ok.
#30

[eluser]WanWizard[/eluser]
[quote author="pbreit" date="1279056494"]Wan, your solution works with no side effects?[/quote]
Never say never, but until now I haven't seen any.

If you come across them (I can't test every possible situation), let me know, and I'll fix it.




Theme © iAndrew 2016 - Forum software by © MyBB