[Phpmyadmin-devel] URL parameter separator and Jquery - #3733

Marc Delisle marc at infomarc.info
Fri Apr 18 14:18:17 CEST 2014


Le 2014-04-18 08:00, Hugues Peccatte a écrit :
> 2014-04-18 12:41 GMT+02:00 Marc Delisle <marc at infomarc.info
> <mailto:marc at infomarc.info>>:
> 
>     Le 2014-04-18 05:34, Hugues Peccatte a écrit :
>     > 2014-04-17 23:38 GMT+02:00 Marc Delisle <marc at infomarc.info
>     <mailto:marc at infomarc.info>
>     > <mailto:marc at infomarc.info <mailto:marc at infomarc.info>>>:
>     >
>     >     Le 2014-04-17 13:43, Hugues Peccatte a écrit :
>     >     > 2014-04-17 14:07 GMT+02:00 Marc Delisle <marc at infomarc.info
>     <mailto:marc at infomarc.info>
>     >     <mailto:marc at infomarc.info <mailto:marc at infomarc.info>>
>     >     > <mailto:marc at infomarc.info <mailto:marc at infomarc.info>
>     <mailto:marc at infomarc.info <mailto:marc at infomarc.info>>>>:
>     >     >
>     >     >     Hugues Peccatte a écrit :
>     >     >     > 2014-04-17 11:59 GMT+02:00 Hugues Peccatte
>     >     >     <hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com> <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>>
>     >     <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com> <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>>>>:
>     >     >     >
>     >     >     >> 2014-04-16 22:16 GMT+02:00 Hugues Peccatte
>     >     >     <hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com> <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>>
>     >     <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com> <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>>>>:
>     >     >     >>
>     >     >     >>  2014-04-14 13:20 GMT+02:00 Michal Čihař
>     <michal at cihar.com <mailto:michal at cihar.com>
>     >     <mailto:michal at cihar.com <mailto:michal at cihar.com>>
>     >     >     <mailto:michal at cihar.com <mailto:michal at cihar.com>
>     <mailto:michal at cihar.com <mailto:michal at cihar.com>>>>:
>     >     >     >>> Hi
>     >     >     >>>> Dne Mon, 14 Apr 2014 09:53:52 +0200
>     >     >     >>>> Hugues Peccatte <hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>
>     >     <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>>
>     >     >     <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>
>     >     <mailto:hugues.peccatte at gmail.com
>     <mailto:hugues.peccatte at gmail.com>>>> napsal(a):
>     >     >     >>>>
>     >     >     >>>>> I was looking for something more implicit, so we
>     >     wouldn't have to
>     >     >     >>>> change
>     >     >     >>>>> the calls to $.get. But that seems to be
>     difficult, so your
>     >     >     solution
>     >     >     >>>> might
>     >     >     >>>>> be the best.
>     >     >     >>>> Well we can also override jQuery.get to do what we want
>     >     (basically
>     >     >     >>>> just wrapper around original code to do compose the URL
>     >     >     correctly. That
>     >     >     >>>> might be cleaner approach.
>     >     >     >>>>
>     >     >     >>> Thanks for this very interesting feedback !
>     >     >     >>> I found this :
>     >     >     >>>
>     >     >
>     >    
>     http://www.bennadel.com/blog/1624-ask-ben-overriding-core-jquery-methods.htm
>     >     >     >>>
>     >     >     >>> I'll try to override the $.get method by this way.
>     >     >     >>>
>     >     >     >> It's done… I overwrote $.get… But there is many
>     Jquery methods
>     >     >     which use
>     >     >     >> the "&" as an URL parameter separator… I would have
>     love that
>     >     >     they have a
>     >     >     >> $.getArgSeparator, like pMA, so we could overwrite
>     this method
>     >     >     only! :)
>     >     >     >> We can overwrite all methods which use "&". But when
>     we'll want
>     >     >     to change
>     >     >     >> the Jquery version, it will be a mess.
>     >     >     >>
>     >     >     >> Shall we continue to search a way to use another
>     separator
>     >     than "&"?
>     >     >     >> Do you want we to push my work on my repository, so
>     you can see
>     >     >     what I've
>     >     >     >> done?
>     >     >     >>
>     >     >     >>
>     >     >     > I didn't wait for an answer. If you want to check:
>     >     >     > https://github.com/Tithugues/phpmyadmin/tree/b3733
>     >     >     >
>     >     >     > Hugues.
>     >     >
>     >     >     Hi Hugues,
>     >     >     I have started to review the code; so far it looks fine.
>     >     >
>     >     >     In js/messages.php, maybe it would be more consistent to
>     call
>     >     >     PMA_URL_getArgSeparator() ?
>     >     >
>     >     >
>     >     > You're right. It's done.
>     >     >
>     >     > Hugues.
>     >
>     >     Ok. Feel free to merge to master; I'll release -beta1 afterwards.
>     >
>     >
>     > I really can't… There is still issues with Jquery methods which
>     use the
>     > "&".
>     > That why I asked:
>     > Shall we continue to search a way to use another separator than "&"?
>     > Override all methods? I don't think this is a good thing…
>     >
>     > Thanks for your feedback and code review.
>     >
>     > Hugues.
> 
>     Well, it depends: have you tested the behavior of the other jQuery
>     methods that use the "&", when PHP is configured to use ";" as the
>     argument separator?
> 
> 
> Yes, I still have issues with "&" which is used to concat the URL GET
> parameters.
> The "&" is used in 4 Jquery methods. All methods could be overwriten…
> But what about changing Jquery version ?
> We'll have to update the code. That's not infeasable, but we have to
> think remember it. And also to check the other methods of Jquery, to
> check than another one is not using "&".
> 
> Hugues.

It's not a good idea to change jQuery itself. I'll release -beta1
without this patch, let's continue the discussion afterwards.


-- 
Marc Delisle




More information about the Developers mailing list