Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why don't you use CI Input class to get query string? #544

Closed
kenjis opened this issue Aug 31, 2015 · 5 comments
Closed

Why don't you use CI Input class to get query string? #544

kenjis opened this issue Aug 31, 2015 · 5 comments

Comments

@kenjis
Copy link
Contributor

kenjis commented Aug 31, 2015

@softwarespot
Copy link
Contributor

Good point. I just took the old code and didn't think about refactoring it. Though the function is still needed if using the likes of a POST request with query params.

@kenjis
Copy link
Contributor Author

kenjis commented Sep 1, 2015

If you POST (or PUT or DELETE or anything else) request with query string, PHP parses query string and sets $_GET.
So you don't have to parse REQUEST_URI by yourself.

It seems we can refactor the function like below:

    protected function _parse_query()
    {
        $this->_query_args = $this->input->get();
    }

@softwarespot
Copy link
Contributor

I understood. It's a good change 👍 I was only pointing out that _parse_query() is still needed.

@kenjis
Copy link
Contributor Author

kenjis commented Sep 1, 2015

I sent PR.

I wrote functional tests: kenjis/ci-app-for-ci-phpunit-test@fda2365
And okay with 2.7.2.

@chriskacerguis
Copy link
Owner

Merged PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants