-
Notifications
You must be signed in to change notification settings - Fork 241
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
Additional sort option for eZPersistentObject::fetchObjectList() #1
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…zsystems/master Conflicts: lib/ezi18n/classes/eztranslationcache.php
Hi Jérôme, Thanks for sharing ! Cheers,
|
Added comment on commit, basically order by field seems to be mysql specifc, so think we should close this (the other commits have been manually merged if I remember correctly) |
andrerom
added a commit
that referenced
this pull request
Sep 19, 2012
Fixed #19022: ezformtoken error if logging in frontend with DebugRedirection
lolautruche
added a commit
that referenced
this pull request
May 21, 2014
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
* php8 fix: An unexpected error has occurred. Please contact the webmaster. method_exists(): Argument ezsystems#1 ($object_or_class) must be of type object|string, array given in lib/eztemplate/classes/eztemplate.php on line 1432 * php8 fix: removing comments --------- Co-authored-by: felix <[email protected]>
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- An unexpected error has occurred. Please contact the webmaster. count(): Argument ezsystems#1 ($value) must be of type Countable|array, null given in kernel/classes/datatypes/ezenum/ezenumtype.php on line 155
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- An unexpected error has occurred. Please contact the webmaster. DOMDocument::loadXML(): Argument ezsystems#1 ($source) must not be empty in kernel/classes/datatypes/ezxmltext/ezxmltexttype.php on line 174
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- Deprecated: strlen(): Passing null to parameter ezsystems#1 ($string) of type string is deprecated in /kernel/classes/ezpersistentobject.php on line 403 => patch update
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- An unexpected error has occurred. Please contact the webmaster. array_chunk(): Argument ezsystems#1 ($array) must be of type array, null given in /kernel/classes/ezsection.php on line 264 - in backend change section of node without childs
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- Deprecated: mb_strlen(): Passing null to parameter ezsystems#1 ($string) of type string is deprecated in /lib/ezdb/classes/ezdbinterface.php on line 1561
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- Deprecated: trim(): Passing null to parameter ezsystems#1 ($string) of type string is deprecated in /lib/eztemplate/classes/eztemplatestringoperator.php on line 641 - Deprecated: htmlspecialchars(): Passing null to parameter ezsystems#1 ($string) of type string is deprecated in /lib/eztemplate/classes/eztemplatestringoperator.php on line 386 - Deprecated: mb_strlen(): Passing null to parameter ezsystems#1 ($string) of type string is deprecated in /mnt/data/htdocs/fi1903-kundenportal/htdocs/lib/eztemplate/classes/eztemplatestringoperator.php on line 544 - Undefined variable '$type'
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- An unexpected error has occurred. Please contact the webmaster. count(): Argument ezsystems#1 ($var) must be of type Countable|array, null given in /kernel/content/removeobject.php on line 35
brookinsconsulting
pushed a commit
to brookinsconsulting/ezpublish-legacy
that referenced
this pull request
Mar 3, 2023
- count(): Argument ezsystems#1 ($value) must be of type Countable|array, bool given in kernel/role/edit.php on line 407
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings!
Currently eZPersistendObject::fetchObjectList() allows only to sort by a key ascending or descending. In a current project, I had the need to sort the list by a custom order, determined by a precedent select, so that I would have a query like:
SELECT ... FROM ... ORDER BY FIELD(id, 1, 4, 3, 5, 2)
That's why I added another else if to check if the $sorts parameter is an array, and if it is, create the sort query accordingly.
I hope you find that useful - for the time being, I will have to create a new class that inherits vom eZContentObject to get this behaviour.
Best
PS: Sorry for the added newline in eztranslationcache.php - I don't know how it got there :).