Announcement

#16 2020-11-14 02:42:12

erAck
Only trying to help
2015-09-06
2029

Re: Sql Errors

Aest wrote:

Opinions?

Rather than adding yet more overhead to the query processing that slows things down I'd rather see all plugins fixed that use unquoted rank and groups fields for which these workarounds were introduced first hand.


Running Piwigo at https://erack.net/gallery/

Offline

 

#17 2020-11-14 21:29:51

Aest
Member
2020-11-12
6

Re: Sql Errors

erAck wrote:

Aest wrote:

Opinions?

Rather than adding yet more overhead to the query processing that slows things down I'd rather see all plugins fixed that use unquoted rank and groups fields for which these workarounds were introduced first hand.

Exactly!
The workaround i've posted doesn't do what i need. I tried some other hacks with no luck. So i strongly agree with you.
Even more. Now, just 2 "dangerous" keywords are hardcoded in the pwg_query function.
I think, this is totally wrong way. 4 instance, in the next version of mysql a new keyword would be added and again, same keyword used in piwigo's tables structure, so we'll need again add another one 'crutch' in the code. What if mariadb would add some keyword, and mysql another?
So, now, i've being studying a code and changing field names

Last edited by Aest (2020-11-14 21:31:03)

Offline

 

#18 2020-11-14 22:47:35

erAck
Only trying to help
2015-09-06
2029

Re: Sql Errors

Fwiw, there are these still open pull requests one can apply to a local installation of the plugins (append .patch to the URL to download the diff and pipe it through patch -p1 in the plugins' directories).

https://github.com/Piwigo/PWG_Stuffs/pull/12
https://github.com/Piwigo/GrumPluginClasses/pull/3
https://github.com/Piwigo/AMenuManager/pull/7

I don't know why plg hasn't merged them and instead there was the ugly groups replacement workaround added to pwg_query() similar to the ugly rank workaround. I lost interest in chasing those unless I run into an error with my installation.


Running Piwigo at https://erack.net/gallery/

Offline

 

#19 2020-11-15 20:53:00

Aest
Member
2020-11-12
6

Re: Sql Errors

@erAck, thanks a million for your help!

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact