Shish
434455b836
[tests] more voiding of tests
2024-01-15 14:31:51 +00:00
Shish
a1f22ef67c
[themes] void return type for display_* functions
2024-01-15 14:23:12 +00:00
Shish
8a895113f3
[core] typed cookie object
2024-01-15 14:08:13 +00:00
Shish
7b7ec9c83f
[tests] phpstan version bump
2024-01-15 14:08:12 +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
bb9ab613ce
[everything] bulk set event handler return types to void
2024-01-15 11:52:35 +00:00
Shish
4b8bc82ee4
[tag_edit] abort on error rather than only applying some tags
2024-01-11 10:28:41 +00:00
Shish
acd3abcc77
[core] fix error in error handling
2024-01-11 10:19:38 +00:00
Shish
ec35cace6a
[core] replace quarter-arsed CLI interface with Symfony Console
2024-01-11 01:01:39 +00:00
Shish
39bfde6dff
[tests] clear() at the end of each class, not the end of each test
2024-01-10 09:04:39 +00:00
Shish
432be420fd
[core] trace savepoints
2024-01-09 22:47:22 +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
cafef06b14
[core] avoid making convert show an error message
2024-01-09 15:26:45 +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
Shish
baf5f38a25
[core] only check image contents if the mime type is one we can handle
2024-01-09 01:05:33 +00:00
Shish
0762da54eb
[core] have ThumbnailGenerationEvent work on an Image
2024-01-09 01:03:46 +00:00
Shish
c494bf293d
[core] if image is created from a temp file, have get_image_filename() return that file
2024-01-09 00:17:54 +00:00
Shish
7146d07f4e
[style] use CSS for text-wrapping
2024-01-08 21:24:41 +00:00
Shish
29fde1388a
[core] only show decimal for KB/MB/etc less than 10
2024-01-08 19:35:25 +00:00
Shish
63b479592a
[core] parse CACHE_DSN using parse_url, and support username / password for redis, fixes #1000
2024-01-07 23:28:15 +00:00
Shish
15582c5138
[core] default cache TTL to null rather than zero, fixes #997
2024-01-07 18:47:32 +00:00
Shish
051d6242ed
[tests] add assertException because PHPUnit doesn't have it
2024-01-07 17:22:16 +00:00
Shish
77e88f6f54
[ratings/search] remove implicit 'rating:*' from image counting process, hopefully fixes #991
2024-01-07 04:17:22 +00:00
Shish
6a2d3f49e2
typed return arrays too
2024-01-06 21:34:30 +00:00
Shish
e57264fd95
[ci] more specific version in /system_info, less specific version in footer
2024-01-06 19:32:33 +00:00
Shish
f47c7d7ee8
[core] version alpha to beta
2024-01-05 15:35:29 +00:00
Shish
26630a4e3b
fmt
2024-01-05 15:32:07 +00:00
Shish
d4b86b0e95
[core] redo deltree to also delete dotfiles, fixes #972
2024-01-05 15:30:32 +00:00
Shish
af309601f5
[upload] separate out DataUpload, ImageAddition, and TagSet/SourceSet/LockSet/etc
2024-01-05 15:00:07 +00:00
Shish
48b3de3c6e
[core] fix error in error handling
2024-01-04 23:10:31 +00:00
Shish
7673b394f4
[search] get_images function to get specific images in specific order with search visibility (ratings etc) taken into account
2024-01-04 16:55:39 +00:00
Shish
ff04083ad5
[handle_archive] merge tags from inside the archive and the form, fixes #483
2024-01-04 15:55:48 +00:00
Shish
e49fcfa0c7
[core] allow ip_in_range to match exact IPs
2024-01-04 15:07:07 +00:00
Shish
c5395df243
[core] trust x-forwarded-for from trusted proxies, see #800
2024-01-04 14:50:36 +00:00
Shish
502d50c57d
[upload] keep original post date when replacing image, fixes #903
2024-01-04 14:29:09 +00:00
Shish
74fd48a0f2
[theme] add data-userclass to body tag
2024-01-04 14:11:20 +00:00
Shish
ef3492e9b5
[theme] add data-rating attribute to thumbnails
2024-01-04 14:11:20 +00:00
Shish
55d5dc0a35
[themes] have themes implement head_html/body_html rather than render
2024-01-04 14:11:20 +00:00
Shish
72a0d3f90b
[install] sqlite as the default DB
2024-01-04 12:08:08 +00:00
Shish
49d2760ab6
happy new year
2024-01-03 14:47:58 +00:00
Shish
1f9de8dd5a
more tests
2024-01-03 03:46:04 +00:00
Shish
aea533b345
[file handlers] separate out display_image and display_metadata
2024-01-01 20:21:51 +00:00
Shish
509f8eee3e
[core] separate init.js for code which needs to run before page load
2024-01-01 20:03:50 +00:00
Shish
8815b702c5
[core] DIY CSS/JS minifier
2024-01-01 19:52:33 +00:00
Shish
9f002b6bf7
typed arrays
2024-01-01 03:30:21 +00:00
Shish
26bf4277e0
Separate out GET and POST more explicitly
...
- No longer allow uploading directly via GET, that is terrible for
security. Instead, use the GET parameters to pre-fill the upload form.
- PageRequestEvent has a `method` property that can be checked in
extensions
2024-01-01 03:30:21 +00:00
Shish
0f52b54667
format
2023-12-31 23:08:53 +00:00
Shish
9e9225acf3
[core] allow SHM_POST_INFO html element to accept a link parameter
2023-12-31 22:27:32 +00:00
Shish
625406e591
extra comments
2023-12-31 18:48:56 +00:00
Shish
fb49b785ef
[core] don't take shortcuts when going next/prev, as some extensions (eg ratings) might want to alter search results ( fixes #984 )
2023-12-31 18:48:49 +00:00
Shish
6df0f4f307
put runtime-generated data into data/
2023-12-31 17:42:04 +00:00
Shish
e3c61b72dc
[core] cache event listeners based on which extensions are enabled + version number
2023-12-31 15:44:35 +00:00
Shish
42fc180c25
[docker] set BUILD_TIME/BUILD_HASH vars
2023-12-31 14:45:39 +00:00
Shish
c2befbdf9f
remove modernizr
2023-12-30 03:45:29 +00:00
Shish
840b0849df
[user] make email-requiredness a setup option
2023-12-27 10:07:09 +00:00
myname
85b1e54904
Refactoring auto-complete functionality for alias editor and auto tagger
2023-12-26 02:37:47 +00:00
Shish
2ac243d20d
[core] use rawurlencode/decode consistently, deprecate caret system
2023-12-24 22:42:14 +00:00
Shish
ad181377c8
[userclass] ghosts should still be able to read PMs
2023-12-21 21:15:46 +00:00
Shish
9e7f3cb397
Make SHM_POST_INFO more logical
...
Rather than having a boolean for view or edit + optional editor, use the
existence of the editor to know if a field is editable
2023-12-19 11:41:02 +00:00
Shish
64e6460f22
don't look at cookies if bearer token was ok
2023-12-17 00:08:06 +00:00
Shish
282d13f632
Use nginx Unit rather than the php development server
2023-12-16 23:03:04 +00:00
Shish
f00a4e3d90
fewer loose functions
2023-12-16 11:04:52 +00:00
Shish
71341be3a8
move testcase to core, so that require(ext/X/*.php) can work
2023-12-16 10:52:50 +00:00
Shish
b1c6894fbc
cleaner extension loading
2023-12-16 01:31:46 +00:00
Shish
f8ec844745
[themes] move disable_left to base class
2023-12-15 21:25:18 +00:00
Shish
c1acf5c38c
remove dead import
2023-12-15 13:23:20 +00:00
Shish
10ba2ccb7f
fix search encoding
2023-12-15 07:55:38 +00:00
Shish
d8a7ac985d
make cache table name into a valid postgres identifier for notifications
2023-12-14 22:02:10 +00:00
Shish
7f98412d8b
cache_get_or_set function
2023-12-14 22:02:10 +00:00
Shish
a5c6f1321b
refactor search a little and add much better testing
2023-12-14 17:04:16 +00:00
Shish
4c8274161f
fix more search edge-cases
2023-12-14 02:13:01 +00:00
Shish
e114057dfe
PHPUnit 10 (and other bumps)
2023-12-14 00:25:32 +00:00
Shish
fd1bb21f9d
bumps
2023-11-11 22:05:28 +00:00
Shish
9c95646aa7
only hide deprecation warnings, not all errors
2023-08-18 21:51:01 +01:00
Shish
d0faf29c9f
hide deprecation warnings
2023-08-18 21:51:01 +01:00
Shish
7a4f033cce
split installer CSS into its own file, since we only use it in one place
2023-08-18 21:51:01 +01:00
Shish
ecd7ec5b6b
make source maps better upstream
2023-08-18 21:51:01 +01:00
Shish
5ef00eb37c
only generate source maps in debug mode
2023-08-18 21:51:01 +01:00
Shish
74037d9d0a
use (a forked version of) tbela99/css for css minification
2023-08-18 21:51:01 +01:00
Shish
d9489ac8aa
split css_cache_file / js_cache_file into their own functions
2023-08-18 21:51:01 +01:00
Shish
43c7be0e89
dedicated search_link() function for generating links to search results, see #936
2023-08-18 13:52:03 +01:00
Shish
23e36b4349
only link to post/list when you actually want post/list, if you want just a default page, leave it empty
2023-08-18 12:45:56 +01:00
Shish
0c014fde01
use joinHTML for paginator
2023-08-17 18:34:39 +01:00
Shish
5879184895
SHM_POST_INFO element for doing info box elements in a standard way
2023-08-17 18:21:28 +01:00
Shish
efe8bd5f43
remove dead imports
2023-08-17 18:21:28 +01:00
Shish
aa8de9d420
the php string type is lowercase
2023-08-17 18:20:46 +01:00
Github Actions
9c0a6ebec3
Auto-merge master to main
2023-08-16 14:54:27 +00:00
Shish
f040709a76
proper support for html in usernav
2023-08-16 15:52:14 +01:00
Luana
aef5bc9e2e
SHM_ functions in its own file
2023-08-16 15:40:08 +01:00
Luana
a5e585d991
SHM_A
2023-08-16 15:40:08 +01:00
Luana
0978ef99e3
MicroHTML on pools ext
2023-08-16 15:40:08 +01:00
Luana
8202367eaa
build_selector and make_form_microhtml as SHM_ functions
2023-08-16 15:40:08 +01:00
Luana
34b608c4b7
ratings ext fully MicroHTML
2023-07-03 16:35:43 +01:00
Luana
84d232ca0d
build_selector returns HTMLElement
2023-07-03 16:35:43 +01:00
Luana
7ee31db5c6
fixed docstring
2023-07-03 16:35:43 +01:00
Luana
ca88b28b1e
use MicroHTML
2023-07-03 16:35:43 +01:00
Luana
969a1eeab1
html_escape on build_selector
2023-07-03 16:35:43 +01:00
Luana
819a5b16e9
remove useless check
2023-07-03 16:35:43 +01:00
Luana
8db0086d7a
standard HTML select code
2023-07-03 16:35:43 +01:00
Shish
016a5d240b
truncate filenames to 250 chars, fixes #931
2023-07-03 15:09:38 +01:00
Shish
340b9daa71
connect to db before setting db timeout
2023-06-30 10:49:25 +01:00
Shish
0f162fe32a
format
2023-06-28 13:09:02 +00:00
Shish
0c45cf17b2
empty timeout should be unlimited, not immediate death
2023-06-28 13:09:02 +00:00
Shish
8fb6fd5f54
stricter nulls
2023-06-27 17:45:35 +01:00
Shish
00d4f9f75c
always have a Themelet, never null
2023-06-27 16:11:14 +01:00
Shish
304a86b554
types
2023-06-27 16:11:14 +01:00
Shish
314528801b
make clamp() more robust
2023-06-27 16:11:14 +01:00
Shish
e62cdb0979
offset can't be null, and named args
2023-06-27 15:32:39 +01:00
Shish
e8aadf8d23
don't die with invalid cache DSN
2023-06-27 15:31:59 +01:00
Shish
533c4f5128
It's been a while...
2023-06-27 14:21:13 +01:00
Shish
dc7e8ee231
microhtml for themelet functions, see #828
2023-06-27 14:10:53 +01:00
Shish
f9f37fc637
Tag::implode should sort case-insensitively
2023-06-25 21:56:02 +00:00
Shish
2ebeb27bb6
avoid retagging unnecessarily?
2023-06-25 21:47:08 +00:00
Shish
284b7313cc
...
2023-06-25 21:35:53 +00:00
Shish
6fb9b66e45
ffsphp
2023-06-25 21:30:43 +00:00
Shish
cc809bc005
trace database writes (how did it take so long to do this? T_T)
2023-06-25 20:47:55 +00:00
Shish
f9af363664
argh php
2023-06-25 20:47:55 +00:00
Shish
33f32f7b22
Revert "INSERT ... RETURNING is well-supported now" - mysql doesn't...
...
This reverts commit 633d5c5348
.
2023-06-25 20:31:11 +00:00
Shish
948ed2724c
single query to insert new image tags
2023-06-25 20:26:51 +00:00
Shish
633d5c5348
INSERT ... RETURNING is well-supported now
2023-06-25 20:25:09 +00:00
Shish
a03840c60e
Merge pull request #921 from luanalatte/approval-bypass
...
Approval bypass
2023-06-25 19:54:07 +01:00
Shish
32f2ab8eb6
optimise tag setting
2023-06-25 14:59:10 +00:00
Shish
e66acefa53
extra tracing for bulk tag edit
2023-06-25 14:42:24 +00:00
Shish
c5e2353447
manual timeouts
2023-06-25 14:19:52 +01:00
Shish
1558318283
pnctl is only available in CLI...
2023-06-25 14:04:26 +01:00
Shish
b85e7ec209
manually control timeout, to dump trace data after hitting the limit
2023-06-25 13:40:57 +01:00
Shish
162aaccb62
Display documentation for permissions
2023-06-24 21:24:25 +01:00
Luana
6cbc12e427
Approval bypass
2023-06-14 04:48:38 -03:00
Shish
ac29324184
simplify search a little
2023-05-25 12:59:25 +01:00
Shish
12f0bc3a81
Allow SearchTermParseEvent to have a bit more control over results
...
Rather than "add querylet or do nothing", moving more code into the
event means that event handlers are able to add a positive or negative
querylet, add a positive or negative tag, or do nothing
This means that events can respond to the `null` search term by adding a
tag, which would be useful for #917
2023-05-25 12:59:25 +01:00
Shish
05da99c428
fix error in error handler
2023-04-03 22:14:41 +00:00
Shish
7e017ded3b
format
2023-03-30 20:37:06 +01:00
yls4
d6a0d0cb8d
Merge pull request #1 from shish/master
...
Updating to current version
2023-03-26 17:09:08 -05:00
myname
a352a02b2e
Bulk Actions for setting a chain of parent child relationships in the order of images selected.
...
Does not support setting multiple children to one parent in bulk.
2023-03-26 17:01:46 -05:00
Shish
64c98e4755
offset/limit for standard terminology in API
2023-03-08 22:26:49 +00:00
Shish
4fb2878728
admins can vote too
2023-02-28 23:17:00 +00:00
Shish
6d41012f50
use permissions for voting
2023-02-24 22:49:10 +00:00
Shish
36951db563
use DataUploadEvent fields rather than required metadata
2023-02-24 22:42:03 +00:00
Shish
077a5e7727
fix php8.2 warnings
2023-02-19 11:24:33 +00:00
Shish
0715398244
Use enum for permissions
2023-02-15 22:27:00 +00:00
Shish
86aa959097
expose join date
2023-02-15 22:00:00 +00:00
Shish
ede2dc7cfe
raw_db should always return something
2023-02-14 01:14:49 +00:00
Shish
3896856c06
more fields
2023-02-14 01:02:58 +00:00
Shish
301a5d3027
updates
2023-02-13 22:28:50 +00:00
Shish
03cf09937b
fixes
2023-02-12 12:27:37 +00:00
Shish
4e5444e217
avatar URL function
2023-02-08 01:29:52 +00:00
Shish
fadadc0efd
Use HTTP/1.1
2023-02-07 13:56:44 +00:00
Shish
9b435f6fc3
Allow auth via Bearer token
2023-02-07 13:24:56 +00:00
Shish
010f976af5
expose userclass / permissions
2023-02-07 13:21:37 +00:00
Shish
90dd842a7c
TagUsage is not-null
2023-02-07 13:18:42 +00:00
Shish
7fbc19d7a9
expose more image fields
2023-02-07 13:18:00 +00:00
Shish
0bb8d88c1f
don't die when stack trace contains bool
2023-02-07 13:16:30 +00:00
Shish
09723bbcb9
less whitespace in logs
2023-02-05 01:26:07 +00:00
Shish
689b2b13af
send_event(T) -> T
2023-02-04 20:50:26 +00:00
Shish
8492ae9ea4
graphqlitism
2023-02-04 18:55:19 +00:00
Shish
6ca330dd8b
hint
2023-02-04 18:19:04 +00:00
Shish
7c53989038
types
2023-02-04 14:15:47 +00:00
Shish
7ecedc8df7
cache logging details
2023-02-04 13:43:23 +00:00
Shish
180f21e29e
Use graphqlite-like API
2023-02-04 13:29:21 +00:00
Shish
fcfeed8413
fix l2 errors
2023-02-03 20:03:04 +00:00
Shish
ff71a89948
fixes
2023-02-03 16:58:16 +00:00
Shish
54e2ca21ec
phpstan
2023-02-03 16:44:16 +00:00
Shish
78c56e0a57
sentinel for cache hitting
2023-02-02 16:52:19 +00:00
Shish
9721dc8050
format
2023-02-02 16:50:09 +00:00
Shish
ab874cffd3
Let's not implement our own cache abstraction layer
2023-02-02 16:49:41 +00:00
Shish
5ef6268e54
fix caching for userconfigs
2023-02-02 16:39:36 +00:00
Shish
708e102338
Have shimmie's global cache object implement PSR-16
2023-02-02 16:04:35 +00:00
Shish
e79470d974
experimental graphql api
2023-02-01 21:57:18 +00:00
Shish
d70f68099f
also stringify numbers
2023-01-28 23:41:44 +00:00
Shish
215b30dfca
get_debug_info_arr
2023-01-28 19:03:15 +00:00
Shish
d663c7892a
fix stringing
2023-01-28 19:02:41 +00:00
Shish
7e64d1b052
more reliable stringing
2023-01-28 18:57:42 +00:00
Shish
f0ee76e7c7
format
2023-01-11 19:45:26 +00:00
Shish
9b6f40e06e
updates
2023-01-11 18:39:46 +00:00
Shish
c81911893f
tests
2023-01-11 14:04:35 +00:00
Shish
2a18322dd5
god damn it php
2023-01-11 13:27:57 +00:00
Shish
f91daba264
count less
2023-01-11 11:41:13 +00:00
Shish
9587bedae0
argh
2023-01-11 11:18:16 +00:00
Shish
5a64e8729b
nits
2023-01-11 11:15:26 +00:00
Shish
91b354f6f8
assert
2023-01-11 10:12:19 +00:00
Shish
f0c8affc07
fmt
2023-01-11 00:51:57 +00:00
Shish
8434785da3
??
2023-01-11 00:48:18 +00:00
Shish
bce2d55744
Namespaces are one honking great idea—let's do more of those!
2023-01-10 22:44:09 +00:00
Shish
165eea11b1
all the strict_types
2023-01-10 21:21:26 +00:00
nodate-yaozua
c2b946f282
Fix database not detected on installation
2023-01-10 22:34:47 +09:00
Cirvaazny
af522b3c0b
Update memcache conditon matching
...
Add an additional OR conditional for memcache usage. If you use the DSN as listed at https://github.com/shish/shimmie2/wiki/Performance#software-cache the memcache section will never run because it is looking only for DSNs with 'memcached' causing an exception to be thrown on the first access as the cache is never setup.
2022-11-12 19:33:03 -06:00
Shish
d2f5796c22
format
2022-10-28 01:46:48 +01:00
Shish
a04bc2e7e4
php8.1 gogogo
2022-10-28 01:45:35 +01:00
Shish
522b57da37
bump
2022-10-27 23:31:54 +01:00
Shish
47ab0eda0a
Jesus heckin' christ PHP is awful
...
PHP-CS-Fixer 3.12.0 on my laptop gives different results to PHP-CS-Fixer
3.12.0 in github...
2022-10-27 17:29:24 +01:00