История коммитов

simba77
fix(admin): drop leftover Tools constructor params after pagination migration
Four admin controllers (IpBan, HiddenPosts, HiddenTopics, RegistrationModeration) kept a promoted `private Tools $tools` argument after the Legacy\Tools import was removed during the pagination migration, so the type resolved to a non-existent same-namespace `Tools` class and broke DI container compilation. Remove the unused parameters.
simba77
docs: update documentation submodule (pagination migration notes)
simba77
chore(pagination): remove legacy johncms-pagination fork and Tools::displayPagination
All paginated lists are now migrated to Johncms\Http\Pagination. Final cleanup:
- composer remove johncms/johncms-pagination; drop the path repository and delete system/third-party/johncms-pagination
- remove Tools::displayPagination() and its now-unused Render import
- drop the legacy (non-typed) branch from the default/admin system/app/pagination templates
- changelog
simba77
refactor(comments): migrate legacy comments component to new pagination
Replace Tools::displayPagination with Johncms\Http\Pagination in the shared legacy Comments component (resolved via di(PaginationFactory), current page derived from the legacy global $start offset). Remove the now-unused queryBase() helper.
simba77
refactor(admin): migrate to new pagination component
Replace johncms/johncms-pagination (LengthAwarePaginator) and Tools::displayPagination with Johncms\Http\Pagination across user list, bans, IP bans, IP search, registration moderation, ads and hidden forum content:
- 7 repositories: paginate*() -> count*()/get*(limit, offset): Collection (shared query builders for joinSub-based ban/IP-search queries)
- 7 use cases split into count()/getPage(); UserListResultDTO and IpSearchResultDTO now carry a Collection instead of a paginator
- 8 controllers use PaginationFactory + PaginationGuard
simba77
refactor(forum): migrate to new pagination component
Replace johncms/johncms-pagination (LengthAwarePaginator) and Tools::displayPagination with Johncms\Http\Pagination:
- ForumTopicRepository: paginateReadBySectionId -> countReadBySectionId/getReadBySectionId
- ForumMessageRepository: paginateByTopicIdWithUsersAndFiles -> countAllByTopicId/getByTopicIdWithUsersAndFiles
- topic and section use cases compute total + page slice (no rendering); controllers build the Pagination from total+page (no guard, preserving SEO URLs / jump-to-last-message behavior)
- visitor/search/poll/period/unread controllers and ViewForumFilesUseCase: pagination moved into controllers via PaginationFactory
simba77
refactor(downloads): migrate to new pagination component
Replace johncms/johncms-pagination (LengthAwarePaginator) and Tools::displayPagination with Johncms\Http\Pagination:
- DownloadFileRepository: 6 paginate*() -> count*()/get*(limit, offset); top users via distinct count + User hydration
- 6 use cases split into count()/getPage(); result DTOs now carry a Collection instead of a paginator
- use-case controllers (New/Search/TopUsers/UserFiles/Favorites/CommentsReview) and inline-query controllers (Index/DownloadCategory/FilesModeration) use PaginationFactory + PaginationGuard
simba77
refactor(library): migrate to new pagination component
Replace Tools::displayPagination with Johncms\Http\Pagination across Section, NewArticles, Tags, Premod, Search and Article controllers:
- list controllers build Pagination from the total count, use getOffset()/getPerPage(), and PaginationGuard for canonical-page redirects
- ArticleController is a one-text-page-per-page reader: perPage=1 with an explicit (already clamped) current page, no guard
- pagination links keep their query params (tag/search/t) via the component
simba77
refactor(mail): migrate to new pagination component
Replace johncms/johncms-pagination (LengthAwarePaginator) with Johncms\Http\Pagination across conversations, incoming/outgoing lists, attached files and contacts:
- MailMessageRepository: paginate*() -> count*()/get*(limit, offset); grouped conversations use distinct count + hydrateConversationUsers(); remove dead getIncomingGrouped/getOutgoingGrouped
- ContactRepository: paginateContacts() -> countContactList()/getContactList()
- 5 use cases split into count()/getPage()
- controllers: PaginationFactory + PaginationGuard + PageMeta
- drop total/pagination fields from Conversation/ConversationList/FileList/ContactList result DTOs
simba77
refactor(profile): migrate to new pagination component
Replace johncms/johncms-pagination (LengthAwarePaginator) with Johncms\Http\Pagination across activity, bans, IP history and karma:
- repositories: paginate*() -> count*()/get*(limit, offset): Collection (shared query builders)
- use cases: split into count()/getPage() with access checks in both
- controllers: PaginationFactory + PaginationGuard (+ PageMeta where present)
- drop total/pagination fields from BanHistoryDTO, ActivityDTO, IpHistoryDTO, KarmaListDTO
- reuse existing countVotesReceivedAfter() for the new-karma list