81 Commits
Author SHA1 Message Date
Dan Brown 97fe7cca9d View Blocks: Added base implementation class
Also removed unused imports from app/ classes.
2026-09-21 13:03:18 +01:00
Dan Brown 4a871811e9 API: Added changelog support to page create/update API
Also changed the UI based forms to submit as changelog instead of
summary to align with more sensible name used on the API.
Added testing to cover.

For #6162
2026-08-28 10:48:04 +01:00
Dan Brown b4894ee23e Merge pull request 'Maintenance: PHPStan Level 5' (#6143) from phpstan_june26 into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6143
2026-08-25 14:11:51 +02:00
Dan Brown ff21f6b97c Merge pull request 'Configurable block layouts' (#6179) from sidebar_management into development
Reviewed-on: https://codeberg.org/bookstack/bookstack/pulls/6179
2026-08-25 14:11:14 +02:00
Dan Brown 0365dcc0b1 Page Drafts: Applied draft owner check to more endpoints
As a follow-up to e3068369a2, this applies
the draft ownership check to various other draft endpoints.

Thanks again to SVO for reporting.
2026-08-23 18:08:46 +01:00
Dan Brown b462c67e2f Views: Extracted sidebar blocks for main entity pages 2026-08-07 12:54:38 +01:00
Dan Brown dead0bfb5f Views: Extracted books index/show sidebar sections 2026-08-07 08:32:27 +01:00
Dan Brown 26a3cb8b7e Views: Started implementation of new sidebar back-end 2026-08-06 15:32:17 +01:00
Dan Brown 03c9ddd14f Maintenance: Further PHPStan level 5 type fixes 2026-05-31 11:12:23 +01:00
Dan Brown ec0b0384a2 Permissions: Tweaks/fixed during review of revision-view-all changes 2026-04-19 16:06:31 +01:00
Dan Brown befa3a8fbb Permissions: Started addition of revision-view permission 2026-04-19 12:41:11 +01:00
Dan Brown 083fb1a600 Maintenance: Updated $request->get instance to use input 2026-04-18 20:43:27 +01:00
Dan Brown 49df47836e Merge pull request #6057 from BookStackApp/v25-12
V25.12 changes v3
2026-03-15 12:51:02 +00:00
Dan Brown 6d64262a61 Revision Diffs: Added filtering post-diff render 2026-03-10 15:03:43 +00:00
Dan Brown 9a12e3a8b7 Book API: Added shelves list to show endpoint
For #6006
Added test to cover.
2026-02-24 10:25:17 +00:00
Dan Brown 1077a4efd0 Merge branch 'v25-12' into development 2026-02-21 13:59:29 +00:00
Dan Brown 8e99fc6783 Books: On delete, redirect to shelf if in context
For #6029
Added tests to cover
2026-02-20 11:23:26 +00:00
Dan Brown 826b36c985 Editors: Added HTML filtering in certain loading conditions
When loaded via ajax for draft revert live in editor, or when loaded
into the editor by a different user.
2026-02-16 15:50:54 +00:00
Dan Brown 10f5ceee35 List page settings: Review of #5606
Updated setting display to show mulitple number inputs under one heading
group.
Updated settings to use general number field form view template.
Updated translations to match display changes, and to advise on counts.
Added page count control for search results.
Added setting service method, to get settings as integers, with
min/max/default control.
Updating sorting group to be names "Lists & Sorting".
Added tests to cover.
2025-12-06 23:10:54 +00:00
Dan Brown 9886bbd3a0 Merge branch 'feature/pagination_settings' of github.com:Xenoamor/BookStack into Xenoamor-feature/pagination_settings 2025-12-06 21:47:13 +00:00
Dan Brown c90816987c Slugs: Rolled out history lookup to other types
Added testing to cover.
Also added batch recording of child slug pairs on book slug changes.
2025-11-24 19:49:34 +00:00
Dan Brown dd393691b1 Slugs: Added lookup system using history
Switched page lookup to use this.
2025-11-24 13:55:11 +00:00
Dan Brown 4627dfd4f7 API: Added comment tree to pages-read endpoint
Includes tests to cover
2025-10-24 10:18:52 +01:00
Dan Brown 3ad1e31fcc API: Added comment-read endpoint, added api docs section descriptions 2025-10-22 18:44:49 +01:00
Dan Brown 4c7d6420ee DB: Aligned entity structure to a common table
As per PR #5800

* DB: Planned out new entity table format via migrations

* DB: Created entity migration logic

Made some other tweaks/fixes while testing.

* DB: Added change of entity relation columns to suit new entities table

* DB: Got most view queries working for new structure

* Entities: Started logic change to new structure

Updated base entity class, and worked through BaseRepo.
Need to go through other repos next.

Removed a couple of redundant interfaces as part of this since we can
move the logic onto the shared ContainerData model as needed.

* Entities: Been through repos to update for new format

* Entities: Updated repos to act on refreshed clones

Changes to core entity models are now done on clones to ensure clean
state before save, and those clones are returned back if changes are
needed after that action.

* Entities: Updated model classes & relations for changes

* Entities: Changed from *Data to a common "contents" system

Added smart loading from builder instances which should hydrate with
"contents()" loaded via join, while keeping the core model original.

* Entities: Moved entity description/covers to own non-model classes

Added back some interfaces.

* Entities: Removed use of contents system for data access

* Entities: Got most queries back to working order

* Entities: Reverted back to data from contents, fixed various issues

* Entities: Started addressing issues from tests

* Entities: Addressed further tests/issues

* Entities: Been through tests to get all passing in dev

Fixed issues and needed test changes along the way.

* Entities: Addressed phpstan errors

* Entities: Reviewed TODO notes

* Entities: Ensured book/shelf relation data removed on destroy

* Entities: Been through API responses & adjusted field visibility

* Entities: Added type index to massively improve query speed
2025-10-18 13:14:30 +01:00
Dan Brown a70c733f27 Permissions: Cleanup after review of enum implementation PR 2025-09-10 11:36:54 +01:00
Dan Brown 419dbadcfd Permissions: Updated use of helpers to use enums
Also added middlware method to Permission enum to allow easier usage
with controller middleware.
2025-09-09 09:48:19 +01:00
Dan Brown 33a0237f87 Permissions: Updated usage of controller methods to use enum 2025-09-08 18:14:38 +01:00
Dan Brown 7d1c316202 Maintenance: Updated larastan target level, fixed issues from tests 2025-09-03 15:42:50 +01:00
Dan Brown e05ec7da36 Maintenance: Addressed a range of phpstan level 3 issues 2025-09-03 10:47:45 +01:00
Dan Brown cee23de6c5 Maintenance: Reached PHPstan level 2
Reworked some stuff around slugs to use interface in a better way.
Also standardised phpdoc to use @return instead of @returns
2025-09-02 16:02:52 +01:00
Dan Brown bd966ef99e phpstan: Address a range of level 2 issues 2025-08-09 11:09:50 +01:00
Dan Brown 32ba3a591f ZIP Imports: Added API examples, finished testing
Also updated some types on a couple of controllers.
2025-07-18 16:19:14 +01:00
Dan Brown 47fd578edb Perms: Added transactions around permission effecting actions 2025-07-02 22:25:59 +01:00
Dan Brown 454b152b95 Pages: Redirect user to view if they can't edit
For #5568
2025-05-24 12:05:17 +01:00
Joshua Booth b6110ed3cd Add settings for number of books/shelves that will be displayed per page 2025-05-13 20:17:36 +01:00
Dan Brown dfbc78947f Revisions: Hid changes link for oldest revision
Just as a UX improvement to help avoid confusion, as the whole content
will be changes for this revision.

For #5454
2025-03-16 12:00:54 +00:00
Dan Brown 5508c171db PHP: Addressed 8.4 deprecations within app itself 2025-02-17 12:45:37 +00:00
Dan Brown ac0cd9995d Sorting: Reorganised book sort code to its own directory 2025-01-29 16:40:11 +00:00
Dan Brown 7e1a8e5ec6 API: Added cover to book/shelf list endpoints
Aligns with what we provide in the UI.
Added/updated tests to cover, and updated API examples.

For 5180.
2024-12-13 14:21:04 +00:00
Dan Brown 42b9700673 ZIP Exports: Finished up format doc, move files, started builder
Moved all existing export related app files into their new own dir.
2024-10-15 16:14:11 +01:00
Dan Brown 9aa3442a17 API: Fixed lacking permission enforcement on book contents 2024-08-29 14:43:21 +01:00
Dan Brown 1ea2ac864a Queries: Update API to align data with previous versions
Ensures fields returned match API docs and previous versions of
BookStack where we were accidentally returning more fields than
expected.
Updates tests to cover many of these.
Also updated clockwork to ignore image requests for less noisy
debugging.
Also updated chapter page query to not be loading all page data, via new
query in PageQueries.
2024-02-11 15:42:37 +00:00
Dan Brown b77ab6f3af Queries: Moved out or removed some class-level items
Also ran auto-removal of unused imports across app folder.
2024-02-07 22:41:45 +00:00
Dan Brown 546cfb0dcc Queries: Extracted static page,chapter,shelf queries to classes 2024-02-07 21:58:27 +00:00
Dan Brown 483410749b Queries: Updated all app book static query uses 2024-02-07 16:37:36 +00:00
Dan Brown 222c665018 Queries: Extracted PageRepo queries to own class
Started new class for PageRevisions too as part of these changes
2024-02-05 17:35:49 +00:00
Dan Brown 8e78b4c43e Queries: Extracted chapter repo queries to class
Updated query classes to align to interface for common aligned
operations.
Extracted repeated string-identifier-based finding from page/chapter
repos to shared higher-level entity queries.
2024-02-05 15:59:20 +00:00
Dan Brown 3886aedf54 Queries: Migrated bookshelf repo queries to new class 2024-02-04 19:32:19 +00:00
Dan Brown 1559b0acd1 Queries: Migrated BookRepo queries to new query class
Also moved to a non-static approach, and added a high-level class to
allow easy access to all other entity queries, for use in mixed-entity
scenarios and easier/simpler injection.
2024-02-04 17:35:16 +00:00