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

Fixed issue #11574: Search box in main survey list is case sensitive #535

Merged

Conversation

Aestu
Copy link
Collaborator

@Aestu Aestu commented Sep 10, 2016

Dev: Also fixing the same problem in tokens list

Dev: Also fixing the same problem in tokens list
@Aestu
Copy link
Collaborator Author

Aestu commented Sep 10, 2016

@c-schmitz : This is my suggestion for bug #11574

@Shnoulle
Copy link
Collaborator

We must , then , add a different function : one case sensitive , one insensitive. No ?

@Aestu
Copy link
Collaborator Author

Aestu commented Sep 11, 2016

I'm not sure about another function. With postgres, you can declare the object as "CDbCriteria" and you would get case sensitive comparisons. Of course, you can't use case sensitive and insensitive comparisons in the same query but, do you think we really need it?

@Shnoulle
Copy link
Collaborator

Shnoulle commented Sep 11, 2016

Clearly

  1. we must have same system on any DB
  2. In search : we must use case insensitive criteria (and more accent-insensitive)
  3. There are some request where we need sensitive (+ accent) criteria : token (when user put a token in input to enter a survey for example)

Then , i'm not sure for the solution, but 2 way to do it (i think)

  • In the LSDbCriteria->compare : add a $sensitive param
  • In the LSDbCriteria : add 2 function compareInsensitive compareSensitive.

Maybe :)

PS: if we use LSDbCriteria->compare : think the sensitive must be the 3rd parameters
PS2: don't seems Yii2 have a insensitive system too : http://www.yiiframework.com/doc-2.0/guide-tutorial-core-validators.html#compare

@LouisGac
Copy link
Contributor

I think it's a good PR, cause little by little, we're filling the models with exceptions for pgsql and mssql.
Also: may be you could do a PR to the Yii core?

@Aestu
Copy link
Collaborator Author

Aestu commented Sep 13, 2016

IMHO this PR is a clear improvement on current behaviour.

@c_schmitz: My opinion about your points.

  1. Having different systems for different DB is much better than filters behaving differently for different DB.
  2. I agree but we don't have to develop it all now
  3. Token verification doesn't use CDbCriteria. If it did, token verification would be case insensitive for mysql.

I can't find any use of a compareSensitive function of LSDbCriteria. If I'm wrong, could you please give me a specific example? if this function is needed, why doesn't it already exist for mysql?

By the way, sorry for not attending dev meetings. Very busy at work these last few months. I tried to make it today and I will try again next week.

@Shnoulle
Copy link
Collaborator

Sorry : yes : i think it's a good PR :).

For token : i'm sure we have bug report and fix somewhere about : enter with TokenValue with tokenvalue : this send a "The token is not the same before ... etc ...." error. Think it's fixed now.

@c-schmitz c-schmitz merged commit 771c502 into LimeSurvey:master Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants