Commit graph

1497 commits

Author SHA1 Message Date
Shish
36f0024426 ffffff php... 2020-03-19 14:01:48 +00:00
Shish
adf4534816 base user all permissions disabled by default, and reg viewer 2020-03-19 13:37:14 +00:00
MikChan
cb275d3e3b
Fixed code style according to PSR-2 2020-03-19 01:15:25 +03:00
MikChan
a5f5b44798
Fixed Admin permissions 2020-03-19 01:06:55 +03:00
Shish
7fa9d11512 hard-code one bad case 2020-03-13 10:04:12 +00:00
Shish
8f3002f2d8 dot in special chars list 2020-03-13 09:47:43 +00:00
Shish
1597eff082 lint fixing 2020-03-13 09:23:54 +00:00
Matthew Barbour
b4bde94516 Added auto-tagger extension 2020-03-02 15:24:40 +00:00
Matthew Barbour
ac80ca8443 Added exists function to database object 2020-03-02 15:21:49 +00:00
Matthew Barbour
546f0701a9 Added text to transcode message to indicate file size change 2020-03-02 14:24:08 +00:00
Shish
33731e8cb0 separate link formatting for URLs and for plain text 2020-02-25 12:26:56 +00:00
Shish
b44a4de42c one return 2020-02-25 12:18:18 +00:00
Shish
89dd1a7658 create_scaled_image, for other uses 2020-02-25 12:04:37 +00:00
Matthew Barbour
152e55b5db Changed Image::by_hash so that it isn't case-sensitive 2020-02-23 23:07:02 -06:00
Shish
e1e161759e rename handle_static to static_files - stop confusing it with file handlers 2020-02-23 18:48:25 +00:00
Shish
174b87d0c4 info show types 2020-02-23 18:38:23 +00:00
Shish
b5e9daeab5 dedupe more data handling 2020-02-23 18:37:22 +00:00
Shish
674d3fc6fa dedupe create_image_from_data 2020-02-23 18:19:27 +00:00
Shish
c5d8585824 info command 2020-02-23 18:14:35 +00:00
Shish
4ade3452ee dedupe getSubclassesOf 2020-02-23 18:14:35 +00:00
Shish
43ab3088cf cache key 2020-02-13 20:54:59 +00:00
Shish
3a57817fc2 Spread ParseLinkTemplate work across relevant extensions 2020-02-09 19:22:25 +00:00
Shish
41a205d24a avoid having nice_urls as both system and admin setting 2020-02-09 16:36:22 +00:00
Shish
641fd5a16f remove CACHE_HTTP - client side page cache causes more problems than it solves 2020-02-09 16:25:17 +00:00
Shish
3c78b5685e remove runtime-coverage -- when we want coverage, we enable it at the PHP runtime level 2020-02-09 16:08:35 +00:00
Shish
d749784e95 remove redundant escaping and split load_balance_url into a separate function with testing 2020-02-09 16:02:37 +00:00
Shish
cc7a33b31f show lengths to 1/10th second 2020-02-09 00:32:20 +00:00
Shish
4b5becfb7f video length in thumb 2020-02-08 20:44:23 +00:00
Shish
fd7c774f5b handle_svg doesn't need to override ALL of onDataUpload 2020-02-08 20:44:23 +00:00
Shish
0b304bdf2e use Permissions for Favourites / Artist / Relationships, and also check image lock when sending ImageInfoSet instead of getting each receiver to check it 2020-02-08 00:24:42 +00:00
Shish
aac9cf1fe0 merge some self-contained bits from @sanmadjack's branch 2020-02-07 22:05:27 +00:00
Shish
cdaecb3380 format 2020-02-06 03:10:30 +00:00
Shish
81880f7458 Make installer nice again 2020-02-06 02:19:51 +00:00
Shish
03af4dd92f ??? 2020-02-05 09:01:22 +00:00
Shish
23943692ce formatting 2020-02-05 01:38:32 +00:00
Shish
342f30142b re-enable prefetch 2020-02-05 01:27:00 +00:00
Shish
ef82d5f1a1 account for missing tags 2020-02-05 01:26:18 +00:00
Shish
f7feb4075a order, order 2020-02-05 00:27:37 +00:00
Shish
1a07f84622 inline build_accurate_search_querylet 2020-02-05 00:16:47 +00:00
Shish
e971d10d41 we can also optimise one negative tag in the same way 2020-02-04 23:49:54 +00:00
Shish
b81a95129c faster search for getting deep into individual tag archives 2020-02-04 23:43:24 +00:00
Shish
c0bdb6b7f8 merge common stuff into build_search_querylet 2020-02-04 23:27:01 +00:00
Shish
aa5cf0e81b optimise counting number of results for one negative tag 2020-02-04 23:05:07 +00:00
Shish
9216be3c96 if we're past the searchable number of pages, don't bother counting the number of pages, just 404 2020-02-04 22:44:27 +00:00
Shish
7d4008bae8 remove email stuff that was never used 2020-02-04 21:09:58 +00:00
Shish
13f4de8c14 Have arrowkey nav use HTML next/prev links 2020-02-04 01:59:08 +00:00
Shish
fdfae4f9c0 first/last links too 2020-02-04 01:18:04 +00:00
Shish
0f0cceae22 format 2020-02-04 01:15:25 +00:00
Shish
d13c91ff9a Merge branch 'master' of https://github.com/shish/shimmie2 2020-02-04 01:14:11 +00:00
Shish
ad905248e8 prev/next/preload links for any page with a paginator 2020-02-04 01:12:50 +00:00
Shish
0452de1be9 flush stdout after each CLI logging call 2020-02-02 15:53:05 +00:00
Shish
f70bce113d BASE_HREF is always defined, but sometimes defined as null 2020-02-01 23:42:40 +00:00
Shish
f5c402ad85 inline a one-use function 2020-02-01 23:37:20 +00:00
Shish
b6656e8141 more privacy 2020-02-01 23:30:19 +00:00
Shish
0bcbcb679e have navlinks as a utility methods that themes can call, if they want to 2020-02-01 23:23:23 +00:00
Shish
6d2c92575d tests for format_milliseconds 2020-02-01 23:03:23 +00:00
Shish
e91acbb2c2 remove unused scoreql parameters 2020-02-01 22:51:30 +00:00
Shish
40ab91f8ea remove redundant scoreql_to_sql 2020-02-01 22:44:50 +00:00
Shish
1589b42a10 test_truncate 2020-02-01 22:35:41 +00:00
Shish
ce8da04d3a dedupe BASE_URL / BASE_HREF 2020-02-01 22:26:08 +00:00
Shish
e9ab6aa802 drop redundant end-php tag 2020-02-01 21:42:47 +00:00
Shish
665d5db3f6 drop un-used, un-tested config variants 2020-02-01 21:40:35 +00:00
Shish
6f7e0e5b12 drop logging args that didn't get used in practice 2020-02-01 21:37:07 +00:00
Shish
3f689b68bc MockDatabase didn't get used 2020-02-01 21:32:38 +00:00
Shish
66bd27b0ee fix login for names with spaces 2020-02-01 21:21:27 +00:00
Shish
a5c7faeff7 move stream_file to its own function 2020-02-01 21:20:32 +00:00
Shish
1b4d06c8d2 explanation 2020-02-01 20:01:25 +00:00
Shish
43ea7fb70c replace array_{add,remove} with array_diff 2020-02-01 19:30:32 +00:00
Shish
dcb1f862e6 types 2020-02-01 18:27:21 +00:00
Shish
f0f3cc7aa0 merge layout stuff into Page class 2020-02-01 18:11:11 +00:00
Shish
de0a7138d2 formatting 2020-02-01 11:59:39 +00:00
Shish
135b8db720 fix types in http_range support 2020-02-01 11:59:39 +00:00
Shish
da42b19d6b make it more explicit that caret/decaret are for encoding tags into URL paths 2020-01-30 21:50:30 +00:00
Shish
fb80509be9 also escape ? and & in tags 2020-01-30 21:24:16 +00:00
Shish
0ec305a886 stop using ? as a wildcard 2020-01-30 10:55:35 +00:00
Shish
c2231432f3 no make_link for forms 2020-01-30 10:31:11 +00:00
Shish
831906681e fixes for mysql 2020-01-30 09:01:19 +00:00
Shish
fb5bce69f8 SQL T_T 2020-01-29 20:34:02 +00:00
Shish
4e57e04ddf fix a lot of tests 2020-01-29 20:22:50 +00:00
Shish
86d93b2cc2 bool_escape('1') should be True 2020-01-29 20:20:17 +00:00
Shish
6d3ca01424 format 2020-01-29 00:49:26 +00:00
Shish
615da9e9d2 fix all the tests (for sqlite, php7.4, osx, at least) 2020-01-28 21:19:59 +00:00
Shish
ac1076b3f3 don't use string concatenation for sql 2020-01-28 00:49:51 +00:00
Shish
94635c0c00 add some tests 2020-01-28 00:47:30 +00:00
Shish
a887077ac8 remove redundant escapes 2020-01-28 00:16:22 +00:00
Shish
9ac8246fa2 fixes 2020-01-27 22:22:07 +00:00
Shish
af48aa504b stop ENABLED_MODS 2020-01-27 20:00:23 +00:00
Shish
59c89ee135 Stop failing to have a separate SCORE_VERSION 2020-01-27 19:57:07 +00:00
Shish
15d1e4ef17 Remove MIN_PHP_VERSION - that's not a thing that end users can change 2020-01-27 19:54:51 +00:00
Shish
22c7cab0cd Merge AUTO_DB_UPGRADE into SPEED_HAX 2020-01-27 19:52:54 +00:00
Shish
3c5e6f0746 delete search-accel stuff - built-in queries are faster now 2020-01-27 19:49:50 +00:00
Shish
87d1e21679 merge COMPILE_ELS into SPEED_HAX 2020-01-27 19:48:20 +00:00
Shish
d254b98780 more helpful installer exception 2020-01-27 19:37:28 +00:00
Shish
7080f8bc2a fix InstallerException 2020-01-27 19:31:38 +00:00
Shish
7e43e2e304 split www stuff to index.php and test things to tests/bootstrap.php 2020-01-27 19:28:58 +00:00
Shish
b0237ddd97 more stuff to util.php 2020-01-27 19:05:43 +00:00
Shish
fc6db3509a tracer_enabled is global 2020-01-27 18:36:29 +00:00
Shish
dba89e9d13 make all themes have a Page class, to simplify loading 2020-01-27 18:35:36 +00:00
Shish
903679dc53 more stuff into regular functions 2020-01-27 18:24:11 +00:00
Shish
9b50e98927 move some installer bits to util.php 2020-01-27 17:47:28 +00:00
Shish
4bd1d8b6ee forms 2020-01-26 23:23:15 +00:00
Shish
50f3d04f0c transload error log-ish 2020-01-26 23:23:01 +00:00
Shish
b98dd3dd76 typing 2020-01-26 22:58:59 +00:00
Shish
cddf6e9d5f more types 2020-01-26 19:44:36 +00:00
Shish
235b976dbc databases... 2020-01-26 18:10:58 +00:00
Shish
9d9532a215 warner 2020-01-26 17:47:41 +00:00
Shish
d3737c7a66 warner 2020-01-26 17:43:39 +00:00
Shish
06fffd6328 more 2020-01-26 17:39:55 +00:00
Shish
3631084afd format 2020-01-26 16:38:26 +00:00
Shish
9eb5acf2dc use strict types 2020-01-26 16:27:56 +00:00
Shish
f5ccffdaf4 shm_simple_form 2020-01-26 13:29:04 +00:00
Shish
73c63e3477 microhtml for user page 2020-01-16 19:13:12 +00:00
Shish
057ccd65c3 Merge branch 'master' of https://github.com/shish/shimmie2 2019-12-26 16:37:37 +00:00
Shish
51628607d0 ...? 2019-12-26 16:33:08 +00:00
Shish
8bc7d5d445 pg 2019-12-26 16:21:15 +00:00
Shish
f3cb70a06d Revert "inline some one-use vars"
This reverts commit 1c3d4ad5e3.
2019-12-26 16:20:05 +00:00
Shish
b8dc0a880b if login fails with a space, try with underscore 2019-12-16 09:01:09 +00:00
Shish
678b25d92b get flash from GET as early as possible 2019-12-16 00:06:04 +00:00
Shish
86d4f2eb82 permissions for sending & reading PMs, so that ghosts can have them revoked 2019-12-15 20:40:05 +00:00
Shish
70db0ce5bd flash_message -> page->flash, with no cookies 2019-12-15 19:47:18 +00:00
Shish
1c3d4ad5e3 inline some one-use vars 2019-12-15 16:13:09 +00:00
Shish
090ff65109 replace ILIKE with the better-supported LOWER 2019-12-15 16:09:48 +00:00
Shish
d7a2ca9ddc remove SCORE_STRNORM - everyone supports LOWER now 2019-12-15 16:07:46 +00:00
Shish
d705578f79 formatting 2019-12-15 15:31:44 +00:00
GP32
e4400631a9
fixing "12 hours ago" error when using SQLite 2019-12-10 12:50:47 +09:00
Shish
cb29d07ecc get rid of exists(), because rowCount doesn't work consistently 2019-12-10 01:17:14 +00:00
Shish
562a2c8fea use microhtml for ext_manager 2019-12-09 14:20:56 +00:00
Shish
7f041a9f93 have fatal_error print out a bunch more info when run from CLI 2019-12-07 22:53:59 +00:00
Shish
d6fe059b67 stringer() function, because php lacks a good repr() D: 2019-12-07 22:51:28 +00:00
Shish
0806b2e5f0 Give Event a default toString 2019-12-07 22:49:02 +00:00
Shish
3e408c0f28 allow dashes in block IDs 2019-12-01 23:41:10 +00:00
Shish
30b85f58db anon-ghost mode, and ghosts can't sign up for accounts 2019-11-28 21:32:18 +00:00
Shish
358f6d7abc ghost bans 2019-11-28 17:20:23 +00:00
Shish
7bf60542df script defer 2019-11-28 11:43:30 +00:00
Shish
a9993b47a8 working microcrud for ipbans 2019-11-27 21:06:14 +00:00
Shish
6b2304af93 format 2019-11-27 12:13:04 +00:00
Shish
861def1aa3 be explicit about using FFS-PHP's PDO not vanilla PDO 2019-11-26 10:26:38 +00:00
Shish
29994e9613 postgres now recommends IDENTITY over SERIAL 2019-11-25 00:24:45 +00:00
Shish
a175405210 replace ipban page with microcrud 2019-11-24 15:59:14 +00:00
Shish
c94f289291 html_escape all exception messages - pass query out-of-band if we want it formatted 2019-11-11 16:43:42 +00:00
Shish
6486bb95da name_to_id 2019-11-11 16:43:42 +00:00
Shish
247cfcbd77 Avoid shadowing global variable
When we aren't referencing the current `global $user`, we should give it
a different name to avoid confusion
2019-11-11 16:43:42 +00:00
Shish
bde49c4f5e paged ip bans 2019-11-11 12:52:11 +00:00
Shish
10b9e0ccbc fix page number logic 2019-11-08 17:34:06 +00:00
Shish
f79eafc91e format 2019-11-04 00:42:06 +00:00
Shish
d17e207984 Have get_arg never return null
90% of places assume it will never return null, and they will break in
weird ways if it does return null
2019-11-04 00:40:10 +00:00
Shish
494ba15a70 log every ext version change 2019-11-03 19:04:57 +00:00
Shish
0fa371c7b0 create tables before init 2019-11-03 18:32:50 +00:00
Shish
c58a13ae88 formatting 2019-11-03 18:28:38 +00:00
Shish
6bc33ee691 Drop SCORE_DATETIME/NOW - all the databases we care about now support TIMESTAMP/CURRENT_TIMESTAMP 2019-11-03 18:28:05 +00:00
Shish
031c441e47 split DatabaseUpgrade into a separate event from InitExt 2019-11-03 17:21:05 +00:00
Shish
ac5546c6ef remove more old comments 2019-11-03 16:22:59 +00:00
Shish
55c6854003 formatting 2019-11-02 19:57:34 +00:00
Matthew Barbour
6b22f6da3f Cleanup 2019-11-01 23:55:23 -05:00
Matthew Barbour
2b46ede098 approval permissions 2019-11-01 23:49:01 -05:00
Matthew Barbour
016fb6be65 Small fixes and corrections 2019-11-01 23:47:53 -05:00
Matthew Barbour
ed8caa86bf Fix for random issue 2019-10-18 16:35:44 +01:00
Matthew Barbour
3efa76c6a2 Added set_timeout to database and engine 2019-10-18 16:34:12 +01:00
Matthew Barbour
d1853ee1db Added scoreql option to database functions to make using scoreql less verbose
Added exists function to the database
2019-10-18 16:32:06 +01:00
Matthew Barbour
9139bbfd01 Added another lower() to a tag lookup 2019-10-18 16:31:38 +01:00
Matthew Barbour
3a14857b40 Consolidated tag sanitization functions
Added more tag convenience functions
2019-10-18 16:29:04 +01:00
Matthew Barbour
6b030c00eb Constants for index config 2019-10-18 16:26:11 +01:00
Matthew Barbour
d605e0e572 Added cron_admin permission 2019-10-17 14:26:14 -05:00
Matthew Barbour
92a0afc15e Supporting function for cron uploader changes 2019-10-10 10:41:17 -05:00
Shish
4564fd4092 by_id_or_hash for more elegant CLI use 2019-10-04 20:48:21 +01:00
Shish
71c74e034b allow find_images without limit 2019-10-04 20:47:48 +01:00
Shish
cfa48deda1 consistent indent 2019-10-03 17:57:32 +01:00
Shish
30698fefdc remove a bunch of dead variables and things 2019-10-02 11:23:57 +01:00
Shish
e08cdb1638 make Cache its own thing, separate from Database 2019-10-02 10:49:32 +01:00
Shish
486c048950 typo 2019-10-02 09:06:00 +01:00
Shish
704cab4470 type fixes 2019-10-02 09:03:14 +01:00
Shish
785e5b67e6 assert for type checking 2019-10-02 08:35:54 +01:00
Shish
6ccf7b72e2 int for port numbers 2019-10-02 00:39:45 +01:00
Shish
c197d021bb Memcache hasn't been supported since php5 - we use Memcached now 2019-10-02 00:38:22 +01:00
Shish
f1c146b512 support set_int(foo, null) 2019-10-02 00:37:22 +01:00
Shish
08293bd32a remove hack for ancient php bug 2019-10-01 11:07:38 +01:00
Shish
d7b08d7b95 bump required versions based on Debian Stable 2019-10-01 11:06:40 +01:00
Shish
5183c52223 version bump 2019-10-01 10:45:07 +01:00
Shish
cea6e2b121 postgres has true / false 2019-09-30 18:05:35 +01:00
Shish
19c4fcaf34 even with EMULATE_PREPARES=false, sqlite still returns strings for int columns... 2019-09-30 10:40:15 +01:00
Shish
fd2d434c61 return native types (int, float) for mysql 2019-09-30 10:19:47 +01:00
Shish
a7bddb1dac get rid of is_admin, fixes #676 2019-09-29 19:01:09 +01:00
Shish
0f4a0275b5 use is_int instead of is_numeric if we want to reject numeric strings, should fix #681 2019-09-29 17:58:56 +01:00
Shish
54067f02a4 fix merge 2019-09-29 15:44:59 +01:00
Shish
e6a402cd4e Merge branch 'custom_ratings' into develop 2019-09-29 14:41:14 +01:00
Shish
f5119b20a3 formatting 2019-09-29 14:32:51 +01:00
Shish
a6bb15d859 formatting 2019-09-29 14:30:55 +01:00
matthew
cf8ed3b134 Added UserLoginEvent 2019-09-29 14:21:23 +01:00
Matthew Barbour
73b784266e Moved user config stuff into an extension 2019-09-29 14:20:40 +01:00
matthew
120cdb49a6 Added $user_config global based on existing config object for storing user-specific settings.
Added event to the user page so that extensions can hook into it, providing user-specific setting controls
2019-09-29 14:19:52 +01:00
Matthew Barbour
88e6e68d79 Changed omitted related tags (like tagme) to be powered by a setting, allowing any performance-impacting (or just not useful in this context) tags to be omitted
Further tag list performance improvements
TagListConfig constants
2019-09-26 15:46:28 +01:00
Shish
33fff87f39
Merge pull request #680 from sanmadjack/ext_info
Proposed extension info change to allow getting info for unloaded ext…
2019-09-26 15:37:16 +01:00
Daniel Oaks
a1c276c840 Fix SQLite underscore searching (#619) 2019-09-14 13:46:39 +10:00
Shish
9341c408b9 allow randomness to be limited, because sql's OFFSET N is O(n) 2019-09-08 17:13:20 +01:00
Matthew Barbour
ac6ded877f Added dependency support for extensions
Separated a few extensions that had multiple extension classes in the same file
2019-08-07 16:32:44 -05:00
Matthew Barbour
f4b647b6b8 Updated util for new extension methods 2019-08-07 15:59:06 -05:00
Matthew Barbour
91b46d6598 Moved user config stuff into an extension 2019-08-07 15:49:56 -05:00
Matthew Barbour
68ee4d0e77 Custom rating support, user rating filter settings 2019-08-07 15:49:26 -05:00
Matthew Barbour
8f0aa8a4ca Added $user_config global based on existing config object for storing user-specific settings.
Added event to the user page so that extensions can hook into it, providing user-specific setting controls
2019-08-07 15:48:18 -05:00
Matthew Barbour
de98e86938 ExtensionInfo conversions what have I done 2019-08-07 15:40:01 -05:00