Commit graph

1686 commits

Author SHA1 Message Date
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
Shish
4ff93c63c3 new php-cs-fixer, new opinions about what is today's preferred format... 2022-10-27 17:21:46 +01:00
Shish
caa3c80de4 Use Y-m-d H:i:s for default 'posted' date 2022-10-27 17:09:39 +01:00
Shish
a828c3e0e5 more thorough testing for path_to_tags, and handle more edge cases 2022-10-27 17:09:39 +01:00
Shish
22ec34ea52 format 2022-09-27 17:38:15 +01:00
myname
10e63a0666 Fixing bulk add bug, tag is set to "\" if no other tags are present 2022-09-27 02:12:24 -05:00
Shish
e97198aa10 format 2022-07-09 23:37:43 +01:00
Ruben Rodriguez
b2792481fa fix no handler for 'bulk_download'
Shimmie out of the box has bulk downloads enabled for the 'user' and 'base', but perform bulk actions isn't enabled, so it goes to a handler not found page. This fixes that.
2022-07-06 08:57:10 -04:00
Shish
b859e1fc60
Merge pull request #869 from thoughever/reverse_proxy
X-Real-IP support and Varnish PURGE config options
2022-05-01 10:42:54 +01:00
Jessica Stokes
6bc1ec4f81 Allow setting $image->posted values 2022-04-29 11:21:57 -07:00
thoughever
f15407bc75 X-Real-IP support and Varnish PURGE config options
X-Real-IP for core functionality

Global config define REVERSE_PROXY_X_HEADERS

Config host and port for varnish PURGE

config option to specify PURGE protocol

exception in curl purge now shows error code

ipv6 x-real-ip addresses are now validated properly

X-Forwarded-Proto enabled by define
2022-01-20 22:25:22 +00:00
Shish
3061a9d7d5 avoid warning when HTTP_X_FORWARDED_PROTO isn't set 2022-01-01 10:29:32 +00:00
jellykells
7b7596167a add support for x-forwarded-proto header 2021-12-26 00:16:07 +00:00
Shish
3d9e32e919 new php-cs-fixer 2021-12-14 18:32:47 +00:00
Shish
bed0db40d7 mark invalid url as user error 2021-11-16 14:55:37 +00:00
Shish
68a128c0ea don't log user errors into the server error log 2021-11-16 14:52:26 +00:00
Shish
58db685b29 more error handling 2021-11-10 19:33:51 +00:00
Shish
4c4b26f098 write internal errors to error log 2021-11-06 16:46:05 +00:00
Shish
6377ea19cc don't crash if recaptcha repsonse is empty 2021-11-06 16:17:38 +00:00
Shish
d932178670 don't crash when the user searches with no positive tags and multiple non-existent negative tags 2021-10-06 17:02:29 +00:00
Shish
3f0a8399d1 clarify some nullables 2021-09-25 13:40:41 +01:00
Shish
e7808096ff format 2021-09-22 16:02:33 +01:00
Shish
3bb1566df2 Allow db->set_timeout(null) to disable DB timeouts, see #874 2021-09-22 15:42:41 +01:00
Laureano Passafaro
8bd781cc8c CSS and JS files configurable by themes 2021-07-26 12:26:03 +01:00
Shish
faf35cc884 video references image width / height 2021-03-16 01:49:48 +00:00
Shish
89bf741ed4 bump 2021-03-15 00:59:46 +00:00
Shish
7babe9d2a6 format 2021-03-14 23:56:23 +00:00
Shish
45cf45ed77 bump 2021-03-14 23:55:05 +00:00
Shish
77f7121e26 drop php7.3 support, make use of 7.4 features 2021-03-14 23:43:50 +00:00
Matthew Barbour
e7d11f2310 Converted cron_upload to be able to run per-user, using user API keys 2021-01-16 14:35:04 -06:00
Matthew Barbour
e82b9ea811 Added post peek extension 2021-01-16 14:26:19 -06:00
Matthew Barbour
1b469d9919 Added image dimension data attributes 2021-01-16 14:26:19 -06:00
Matthew Barbour
4f82dce662 Changed image->get_tag_array to sort the array before returning 2021-01-16 14:26:18 -06:00
Matthew Barbour
72268d529d Moved user options to separate page, modularized the settings page code so that it can be re-used to simplify and standardize user settings in the same manner as global settings 2021-01-16 14:26:17 -06:00
Shish
3f5930b4cb simplify and add tests for upload (and replace) path 2020-10-28 20:51:34 +00:00
Shish
ecafd4e131 Merge branch 'image2post' 2020-10-27 22:42:47 +00:00
Shish
338bbcdbcb more test passing 2020-10-27 22:19:26 +00:00
Shish
81fe37de50 transactions 2020-10-27 22:03:56 +00:00
Shish
a4ff796b35 remove dead code 2020-10-27 21:51:34 +00:00
Shish
6c223d16bd use inTransaction() instead of trying to maintain our own state 2020-10-27 21:51:15 +00:00
Shish
8bc44f6cb5 remove redundant install step 2020-10-27 02:17:11 +00:00
Shish
c13835d2ef transaction for table creation 2020-10-27 02:08:12 +00:00
Shish
2863ff7508 trace 2020-10-27 02:04:02 +00:00
Shish
b6151ce714 ??? 2020-10-27 01:55:48 +00:00
Shish
3ac7ab2cf3 remove old bool support 2020-10-27 01:50:39 +00:00
Shish
754f0b2f39 strpos 2020-10-27 01:41:07 +00:00
Shish
10f563ee37 boolinate locked 2020-10-27 01:05:12 +00:00
Shish
ee7a4f178c boolinate video/audio 2020-10-27 00:58:18 +00:00
Shish
ed735e17be boolinate image 2020-10-27 00:58:18 +00:00
Shish
607803c04f Revert "boolinate locked"
This reverts commit 533ea85da9.
2020-10-26 23:42:02 +00:00
Shish
ea29e29a06 mostly postgres doesn't need migrating 2020-10-26 23:38:52 +00:00
Shish
533ea85da9 boolinate locked 2020-10-26 23:30:52 +00:00
Shish
aceb3e23f3 remove redundant casts 2020-10-26 23:18:14 +00:00
Shish
56f1fac4c5 Revert "different hack for old sqlite"
This reverts commit 634124e17f.
2020-10-26 22:49:39 +00:00
Shish
634124e17f different hack for old sqlite 2020-10-26 22:43:47 +00:00
Shish
cc06df171a Argh, that doesn't work for OTHER versions of sqlite...
This reverts commit 55e3cb5d63.
2020-10-26 22:37:25 +00:00
Shish
55e3cb5d63 compatibility with out-of-date sqlite: use '(1=0)' instead of 'false' 2020-10-26 22:33:11 +00:00