Improved sorting function in GalleryAlbum#284
Open
jakub-gawryl wants to merge 98 commits intosplittingred:developfrom
Open
Improved sorting function in GalleryAlbum#284jakub-gawryl wants to merge 98 commits intosplittingred:developfrom
jakub-gawryl wants to merge 98 commits intosplittingred:developfrom
Conversation
Wrong path for documentation
Fixed drag'n'drop resort behaviour
…xing open_basedir issue)
Fix for Gallery and 'Access Denied' messages in the MODX Manager
* origin/pr/77: Update version Add changelog for fix Fix vulnerability related to the one fixed in 2.6.5
…nly_full_group_by) Full error: Expression #13 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'premium.AlbumItems.rank' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
ERROR .../core/components/gallery/processors/mgr/item/ajaxupload.php 75 [Gallery] Album Type: # (number) - fix
Overdue Revisions
This file contains hidden or 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
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.
I had a problem with sorting by 'rank' field in GalleryAlbums. The problem was that, when i had some parent Albums and then few Album-childrens inside, the rank field for childrens in each Album-parent was reset to 0, so sorting function work only for one Parent-Album. When i had many of that sets, sorting function did mess.
The problem was in line 461 in galalbum.class.php:
$c->sortby($sort,$dir);
This simple 'sortby' didn't include parent field.
The solution is replace that mentioned line by
$c->sortby('COALESCE(parent, rank) DESC, rank',$dir);
I hope you can understand what i mean :)
EDIT 23.05: