1
0
forked from Public/pics
Commit Graph

462 Commits

Author SHA1 Message Date
5832ce6228 Dispatcher: fix trigger404 using nonexistent ViewErrorPage class
Use the existing errorPage() helper, consistent with trigger400 and
trigger403.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 15:23:44 +01:00
a71b8c9717 Add SQLite support as alternative database backend
Support config-driven choice between MySQL and SQLite via DB_DRIVER
constant, defaulting to MySQL for backward compatibility. All SQL
adaptation lives in Database.php (UDFs + query rewriting), so model
files need no changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

SQLite: remove FK constraints, revert 0→null sentinel changes

The SQLite schema had FOREIGN KEY constraints that don't exist in the
MySQL schema. These forced a cascade of 0→null changes to satisfy FK
enforcement. Removing them keeps the two backends behaviorally consistent
and minimises the diff. Real SQLite compat fixes (UDFs, query rewriting,
rowCount→count, Router fixes, EditAlbum guard) are preserved.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 15:23:41 +01:00
b0ee3081a6 Tag: invert behaviour of getCount and getOffset methods 2026-02-14 12:56:50 +01:00
2cd2f472d0 Merge pull request 'ViewPeople: fix incorrect pagination count' (#55) from yorick/pics:fix/viewpeople-pagination-count into master
Reviewed-on: Public/pics#55
2026-02-14 12:43:56 +01:00
7f7067852a ViewPeople: fix incorrect pagination count
Tag::getCount was called without the third argument, causing it to
count tags where kind \!= 'Person' instead of kind = 'Person'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 11:19:04 +01:00
ea4983e967 FeaturedThumbnailManager: add pager widget; show only 20 thumbs per page 2025-09-24 12:44:05 +02:00
b48c8ea820 EditAlbum: reorder asset loading 2025-09-24 12:32:29 +02:00
c9da46b36f EditAlbum: drop old thumbnail id field entirely 2025-09-24 12:30:22 +02:00
2b8b12e065 Merge branch 'inline-forms' 2025-09-24 12:23:50 +02:00
2af4e865e0 TabularData: take control of juxtapositing pager and form 2025-09-23 15:04:57 +02:00
77fa33730a InlineFormView: combine fields and buttons into one 'controls' array 2025-09-23 14:48:08 +02:00
0274ff5bf4 InlineFormView: remove support for unused 'html_after' property 2025-09-23 14:44:07 +02:00
2dea80b58e InlineFormView: split rendering into smaller methods 2025-09-23 14:42:47 +02:00
2bf78b9f5d InlineFormView: split off from TabularData template 2025-09-23 14:35:40 +02:00
913fb974c7 Fix two more stray queries 2025-09-18 11:10:04 +02:00
92b2cfa391 Merge pull request 'Simplify and clarify Forms and FormViews' (#54) from form-views into master
Reviewed-on: Public/pics#54
2025-09-18 11:08:42 +02:00
48377ec823 Update stray queries to PDO-style parameters 2025-09-18 11:07:55 +02:00
8373c5d2d5 Form: reorder class properties and rework constructor 2025-09-11 20:01:36 +02:00
e69139e591 Form: introduce 'after_fields' content as well 2025-09-11 20:00:22 +02:00
f88d1885a2 Form: rename 'content_above' to 'before_fields' 2025-09-11 19:59:53 +02:00
be51946436 Form: rename 'content_below' to 'buttons_extra' 2025-09-11 19:59:30 +02:00
094fa16e78 FormView: add 'after_html' equivalent to 'before_html' 2025-09-11 19:58:35 +02:00
12352c0d71 FormView: remove unused 'before' and 'after' properties 2025-09-11 19:57:45 +02:00
416cb73069 FormView: remove unused $exclude and $include field lists 2025-09-11 19:57:12 +02:00
f82e952247 Asset: fix createNew query 2025-08-21 21:59:22 +02:00
609edf3332 Merge pull request 'Rework DBA to use PDO' (#53) from pdo into master
Reviewed-on: Public/pics#53
Reviewed-by: Roflin <d.brentjes@gmail.com>
2025-05-17 15:31:38 +02:00
26d8063c45 Asset/Thumbnail: replace 'NULL' placeholder strings with actual null values 2025-05-16 11:57:07 +02:00
3dfda45681 GenericTable: better handling of null values for timestamps 2025-05-16 11:54:05 +02:00
219260c57f Member: set empty reset key for new users 2025-05-16 11:53:59 +02:00
4b26c677bb AssetIterator: rewrite to standard Iterator interface 2025-05-13 23:29:43 +02:00
9989ba1fa7 CachedPDOIterator: introduce rewindable PDOStatement iterator 2025-05-13 22:51:12 +02:00
8dbf1dce7b Database: start reworking the DBA to work with PDO 2025-05-13 20:51:43 +02:00
7faa59562d Database: address PHP 8.5 mysqli deprecation warning 2025-04-18 19:26:50 +02:00
d6a319b886 Merge pull request 'Add time-out to password resets; prevent repeated mails' (#50) from password-reset into master
Reviewed-on: Public/pics#50
2025-03-02 15:01:08 +01:00
fc9de822d8 Merge branch 'master' into password-reset 2025-03-02 15:00:34 +01:00
b775cffc0c EditAlbum: address refactor mistake 2025-02-26 15:44:30 +01:00
041b56ff8c ErrorPage: display debug info in separate box 2025-02-26 15:33:18 +01:00
13cbe08219 Merge pull request 'Replace deprecated trigger_error calls with exceptions' (#52) from trigger-error into master
Reviewed-on: Public/pics#52
2025-02-26 15:29:13 +01:00
afd9811616 Merge pull request 'Refactor the GenericTables class' (#51) from generic-tables into master
Reviewed-on: Public/pics#51
2025-02-26 15:29:02 +01:00
85ed6ba8d3 Replace deprecated trigger_error calls with exceptions 2025-02-13 11:38:45 +01:00
00ca931cf3 GenericTable: rework timestamp formatting 2025-01-08 19:11:10 +01:00
7c25d628e1 GenericTable: remove unused formatting types 2025-01-08 19:11:10 +01:00
9740416cb2 Management controllers: make format functions first-level 2025-01-08 19:11:10 +01:00
6ca3ee6d9d GenericTable: move link generation out of from formatting options 2025-01-08 19:11:10 +01:00
77809faada GenericTable: rename 'parse' option to 'format' 2025-01-08 19:11:10 +01:00
cc0ff71ef7 Management controllers: move table queries into models 2025-01-08 19:11:10 +01:00
2d2ef38422 MainNavBar: harden Registry access 2024-12-22 15:45:44 +01:00
1e26a51d08 ErrorLog: use DELETE FROM instead of TRUNCATE 2024-12-22 15:35:50 +01:00
bb8a8bad27 GenericTable: refactor order and pagination initalisation 2024-12-19 15:00:00 +01:00
06c95853f5 GenericTable: drop $tableIsSortable property 2024-12-19 12:01:00 +01:00