Commit graph

267 commits

Author SHA1 Message Date
Shish
7353683a13 no implicit nulls (they are deprecated in php8.4) 2024-09-01 00:06:46 +01:00
Shish
b3aa0fc381
Merge branch 'main' into speed-hax 2024-08-31 22:00:30 +01:00
Shish
845c8b3d85 [core] Make User::by_name / User::by_id not-null
Nearly everywhere that these functions are called, the result is assumed to be not-null, and a null will break things
2024-08-31 20:39:36 +01:00
Shish
8b20fa3bc2 Add preg_replace_ex
having preg_replace return string|array|null is a pain, string|exception is much cleaner
2024-08-31 19:56:27 +01:00
Shish
8f8c0d151a Update dependency versions 2024-08-31 17:06:39 +01:00
discomrade
350b44f250 [speed_hax] extract SPEED_HAX tweaks to extension 2024-06-14 13:52:49 +00:00
Shish
b9c7d632fd [graphql] custom field resolver, fixes #1089 2024-02-25 19:32:05 +00:00
Shish
2be141327a [graphql] fix graphql field access, fixes #1089 2024-02-25 16:54:13 +00:00
Shish
2f4d8572b7 [core] don't limit searchable tag length, only writable length, fixes #1087 2024-02-24 17:47:22 +00:00
Shish
ac14d1e4c6 [core] search code docs and test function 2024-02-24 14:44:17 +00:00
Shish
db0e788a67 [core] Deduplicate ImageAdditionEvent & ImageInfoSetEvent
Rather than ImageAddition triggering TagsSet/SourceSet/LockSet etc in one way, and ImageInfoSet triggering TagsSet/SourceSet/LockSet in a different way, why not have ImageAddition *just* deal with image addition, and then send a separate ImageInfoSet to deal with all of the metadata setting?
2024-02-20 22:15:24 +00:00
Shish
e80d235fe9 [core] use Safe library, reduce StdLibEx 2024-02-20 10:38:20 +00:00
Shish
4e362d816f [core] named constant for nice urls 2024-02-14 12:35:58 +00:00
Shish
ebeb3b6c60 [core] don't specify ORDER BY when counting total number of results, which allows the DB to be much faster 2024-02-13 17:46:16 +00:00
Shish
3d905b1055 [core] load null-strings as null, fixes #1023 2024-02-12 16:03:37 +00:00
Shish
62ece58403 [core] fix uglyurl thumbs 2024-02-11 21:37:00 +00:00
Shish
7a91833d22 [core] show known properties when one is missing 2024-02-11 18:36:47 +00:00
Shish
7ee4152942 [core] organise exceptions a bit 2024-02-11 16:03:23 +00:00
Shish
77b755e68b [core] reduce use of GET global 2024-02-09 16:36:57 +00:00
Shish
f0457b4f94 [core] image_id should never be null, only uninitialised 2024-01-20 23:54:26 +00:00
Shish
bc933bbbca [core] set image->posted on posting 2024-01-20 23:32:38 +00:00
Shish
b60c3fe362 [core] a load more type hints, and fix bugs revealed by type hints 2024-01-20 14:11:00 +00:00
Shish
bf649b012a fmt 2024-01-19 18:37:15 +00:00
Shish
448e270da8 more typing 2024-01-19 18:33:32 +00:00
Shish
6bde7457e7 wtf php, array_filter() will return an array with gaps in it... 2024-01-19 18:01:50 +00:00
Shish
8fe54794d8 [core] consider a dynamic prop to exist if it is defined, even without a value 2024-01-16 17:35:14 +00:00
Shish
2410a64551 derp 2024-01-15 21:16:09 +00:00
Shish
d75b410075 [core] fix more warnings 2024-01-15 21:01:22 +00:00
Shish
c1bc63e86b boo(l) 2024-01-15 18:54:46 +00:00
Shish
b872c021e1 [core] insert or update image in a single statement 2024-01-15 18:52:07 +00:00
Shish
107485d991 [core] width and height are non-null 2024-01-15 18:52:07 +00:00
Shish
2f05ef4a0b [core] cleanup 2024-01-15 18:52:07 +00:00
Shish
2a494504f3 [core] all image columns should be statically or dynamically defined - nothing undefined 2024-01-15 18:52:07 +00:00
Shish
fb034af699 [core] int_props + bool_props -> prop_types 2024-01-15 18:52:07 +00:00
Shish
bbea373c19 [core] use ArrayAccess rather than dynamic props for extra columns on the images table 2024-01-15 18:52:07 +00:00
Shish
589ff69eea [types] typetypetypetypetype 2024-01-15 15:08:22 +00:00
Shish
802ff336a2 [core,tests] even more types 2024-01-15 14:08:11 +00:00
Shish
6c6b09f762 [core] image->mime is not-nullable 2024-01-15 12:18:28 +00:00
Shish
646f95f91a [core] bump microcrud version, add types 2024-01-15 12:14:41 +00:00
Shish
4b8bc82ee4 [tag_edit] abort on error rather than only applying some tags 2024-01-11 10:28:41 +00:00
Shish
7b9201cb42 [core] Database::with_savepoint() 2024-01-09 21:59:24 +00:00
Shish
b2f67363a1 [core] roll back database transaction when upload fails - fixes #1007 2024-01-09 21:01:10 +00:00
Shish
4d011fa5e5 [core] remove add_image, send_event(DataUpload) is much clearer as to what it's actually doing 2024-01-09 19:24:56 +00:00
Shish
edb8ec33fa more consistency for 'old' and 'new' terminology 2024-01-09 15:27:02 +00:00
Shish
81ec577b32 [core] only move file to warehouse if all the rest of the upload is ok, fixes #1004 2024-01-09 04:49:19 +00:00
Shish
3c90597ca8 [core] inline some single-use functions 2024-01-09 04:22:59 +00:00
Shish
03d4045117 [core] also simplify uploading by having merge handled as a special case 2024-01-09 04:07:32 +00:00
Shish
4c2d6d9ca4 [replace] split upload and replace completely, fixes #1001 2024-01-09 03:38:51 +00:00
Shish
a28fb66b91 [core] have ImageReplace replace image->file with a new file, not replace a whole Image object 2024-01-09 02:33:14 +00:00
Shish
267e176658 [core] have extensions react to ImageAdditionEvent, instead of sending ImageAddition and other events in parallel 2024-01-09 01:32:34 +00:00