Skip to content

Commit

Permalink
поправил сортировку галереи на главной
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Oct 22, 2023
1 parent 80367f4 commit b167628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/ru/org/linux/gallery/ImageDao.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2017 Linux.org.ru
* Copyright 1998-2023 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down Expand Up @@ -61,7 +61,7 @@ public List<GalleryItem> getGalleryItems(int countItems) {
"FROM (SELECT topics.id AS msgid, topics.stat1, topics.title, userid, urlname, topics.commitdate " +
"FROM topics JOIN groups ON topics.groupid = groups.id WHERE topics.moderate AND section="+Section.SECTION_GALLERY+ " " +
"AND NOT topics.deleted AND commitdate IS NOT NULL ORDER BY commitdate DESC LIMIT ?) " +
"as t JOIN images ON t.msgid = images.topic WHERE NOT images.deleted ";
"as t JOIN images ON t.msgid = images.topic WHERE NOT images.deleted ORDER BY commitdate DESC";

return jdbcTemplate.query(sql, new GalleryItemRowMapper(gallery), countItems);
}
Expand Down

0 comments on commit b167628

Please sign in to comment.