Commit Graph

494 Commits

Author SHA1 Message Date
1c9f807595
[Embed] Fix some bugs and change AttachmentEmbed::url to ::media_url 2021-09-14 13:12:56 +01:00
c9090e6cee
[ATTACHMENTS][GSFile] Rename ValidateAndStore functions 2021-09-14 13:12:56 +01:00
6d31945401
[ATTACHMENTS] In sendFile, check that file exists or show a custom exception 2021-09-14 13:12:56 +01:00
38cf8f8efe
[ENTITY] Change foreign key definition to new format for cover and profile_color tables 2021-09-14 13:12:56 +01:00
837f644458
[UTIL][Formatting] Add twigRenderFile 2021-09-14 13:12:55 +01:00
e9a96f1c9b
[DOCUMENTATION] Add high level code walkthrough to developer docs 2021-09-14 13:12:55 +01:00
8cb64ede7f
[AttachmentShowRelated] Move Attachment related to plugin 2021-09-14 13:12:55 +01:00
7509913fcf
[ENTITY] Add field size to attachments, used for quota calculations 2021-09-14 13:12:54 +01:00
29457ef50d
[UTIL] Add option for setting a file suffix on TemporaryFile constructor and add missing TemporaryFileException 2021-09-14 13:12:54 +01:00
e9b2b18093
[Avatar] Implement avatar deletion 2021-09-14 13:12:53 +01:00
2ec7059076
[AVATAR] Move avatar settings page to Avatar component 2021-09-14 13:12:53 +01:00
88e5cec8fc
[ENTITY][GSActor] Fix getAvatarUrl method 2021-09-14 13:12:53 +01:00
aea8639d44
[ATTACHMENTS] Restrict thumbnail generation to allowed sizes. Defaults to only configured sizes, but can be extended with the event 'GetAllowedThumbnailSizes'. The intention is to prevent DoS attacks, since handling a thumbnail request is a relatively slow process 2021-09-14 13:12:53 +01:00
436528172c
[ATTACHMENTS] Add controller and templates for the attachment show page, which shows extra info about an attachment, such as related notes and tags 2021-09-14 13:12:53 +01:00
be91fb754d
[CORE] Typo in GSFile and slight Twig weirdness in base template 2021-09-14 13:12:52 +01:00
b1e514832b
[Embed][ENTITY] Fix embed route and use attachment_view rather than _show. Rename Entity::have to Entity::has, because grammar 2021-09-14 13:12:52 +01:00
30107de079
[Embed] Fix plugin. Only attempt to show an image, if we have one 2021-09-14 13:12:52 +01:00
2adb3c3521
[ATTACHMENTS] Add event 'AttachmentFileInfo' to allow a plugin to override the file displayed 2021-09-14 13:12:52 +01:00
708a910870
[UTIL] Fix remove affix utilities, so they only try to remove an affix if the string starts/ends with it 2021-09-14 13:12:52 +01:00
a7ef2babe6
[AUTOGENERATED] Update autogenerated code 2021-09-14 13:12:52 +01:00
7adc198a52
[ENTITY] Add meta method 'have*' to Entity base class, which checks if a field 'isset' 2021-09-14 13:12:51 +01:00
34059a8d3d
[ATTACHMENTS][EVENT] Add onHashFile event, which can be used to deduplicate files
Currently, we simply hash the contents of the file with sha256, but in the future we can use something smarter,
which could find visual feature similarity between images
2021-09-14 13:12:51 +01:00
60a9085e56
[FORMATTING] Add utilities to remove affixes from strings 2021-09-14 13:12:51 +01:00
9a7f1358c2
[ENTITY] Add utils to Attachment and AttachmentThumbnail to get the corresponding URL and html representation parameters 2021-09-14 13:12:51 +01:00
2a74dced22
[UTIL] Add TemporaryFile class, courtesy of Alexei Sorokin from v2, a class that ensures files stored in /tmp are removed, as it doesn't happen in some cases 2021-09-14 13:12:51 +01:00
94edad43d9
[UTIL] Add method to validate url 2021-09-14 13:12:23 +01:00
5c78def973
[HTTPClient] Add utility functions for all HTTP methods 2021-09-14 13:12:23 +01:00
1b8f5b7bf0
[DB] Make DB::findOneBy throw a different exception if two values are found 2021-09-14 13:12:23 +01:00
e94df546c3
[Posting] Extract and store URLs from note content. Introduce 'AttachmentStoreNew' event 2021-09-14 13:12:23 +01:00
ae0e410986
[TESTS] Fix Nickname test 2021-09-14 13:12:23 +01:00
8dff0b1d0c
[Favourite] Make twig event operate on array rather than string 2021-09-14 13:12:23 +01:00
7a90e844b7
[SECURITY][DB] Make user register 'atomic', by using a single transaction for inserting all objects, to avoid partial inserts 2021-09-14 13:12:23 +01:00
3afa872cec
[UI] Use thumbnail path for thumbs 2021-09-14 13:12:22 +01:00
e1995f44ce
[ATTACHMENTS] Move thumbnail controller to core and cleanup 2021-09-14 13:12:22 +01:00
e6c6e7afd7
[AVATAR] Fix JS cropping script and save square image, in case other themes need it 2021-09-14 13:12:22 +01:00
d2bb5bba14
[ImageEncoder] Move DB::persist call to AttachmentThumbnail 2021-09-14 13:12:22 +01:00
e385a9ac29
[ATTACHMENTS] Even more further refactoring
Introduce Encoder plugins Instead of abstract upload and thumb modules

Ported attachment routes. In v3 thumbnail depends on existing attachment
so route updated accordingly.
2021-09-14 13:12:18 +01:00
0eaccc32fe
[ATTACHMENTS] Further refactoring
Some key points:
- Components and Plugins shouldn't extend Module directly
- Avatars should be fetched via GSActor ID, not by nickname as that isn't unique
- Avatar now is a separate Component
- Common file utilities are now to be placed in Core\GSFile, this will
  handle storage and trigger validation
- Some bug fixes
2021-09-14 13:11:51 +01:00
cdef6858ce
[ENTITY] Cache AttachmentThumbnail query result 2021-09-14 13:11:51 +01:00
65999bd183
[Poll] Move tables from core to plugin 2021-09-14 13:11:51 +01:00
716ca063d5
[ImageThumbnail] Finish image thumbnailing functionality 2021-09-14 13:11:51 +01:00
19850b5e0d
[DB] Fix bug in custom criteria format wrangling 2021-09-14 13:11:51 +01:00
4358656c55
[ImageThumbnail] Implement image resizing with Intervention/Image 2021-09-14 13:11:50 +01:00
7284c833a6
[DB] Allow DQL queries with table name rather than entity 2021-09-14 13:11:50 +01:00
0d01f1d060
[CORE] Add functionality to App\Core\Controller to get and validate GET parameters 2021-09-14 13:11:50 +01:00
5579f4fa5d
[MEDIA] Rename File to Attachment 2021-09-14 13:11:50 +01:00
dc5bdfa1fb
[CORE] Rename NoteScope to VisibilityScope, as it will be used for attachment visbility too 2021-09-14 13:11:50 +01:00
9659762726
[DB] Add table map which allows using table names rather than entities in Doctrine operations 2021-09-14 13:11:50 +01:00
c44443b52c
[AUTOGENERATED] Update autogenerated code 2021-09-14 13:11:50 +01:00
e7ed325ac6
[MEDIA] Refactor File as Attachment 2021-09-14 13:11:49 +01:00
566c7694b5
[CONFIG][TWIG] Move twig config to php code to add support for placing templates in modules (plugins and components) 2021-09-14 13:11:49 +01:00
299bc5b551
[TWIG] Add way to launch events from TWIG, capture service and add way to render from a string 2021-09-14 13:11:49 +01:00
1687ecaa24
[FAVOURITE] Temporary commit to fix exception in timeline 2021-09-14 13:11:48 +01:00
ccf3aa990a
[MODULES] Introduce the concept of abstract modules to V3
Introduce placeholder for abstract upload and thumb modules
Temporarily supress some bugs
2021-09-14 13:11:45 +01:00
539f1861a6
[NETWORK] Fix big brain bug 2021-09-14 13:10:55 +01:00
ea802621aa
[ENTITY] Remove extraneous File_thumbnail.php file 2021-09-14 13:10:55 +01:00
e2e561e663
[DB][FKEY] Temporarily disable foreign key mapping, as there seems to be a bug in doctrine, which is under investigation 2021-09-14 13:10:23 +01:00
faa362e2e2
[DB] Remove unique constraint from GSActor.nickname and fix register and related functionality 2021-09-14 13:10:23 +01:00
68de1b09b1
[NICKNAME] Don't throw when normalizing reserved nicknames 2021-09-14 13:10:23 +01:00
78548365da
[WEB] Fix translations and small inconsistency when opening on web 2021-09-14 13:10:23 +01:00
8b5bd40421
[TESTS] Add tests to all relevant methods under App\Util and fix errors that popup 2021-09-14 13:10:23 +01:00
57dad5eca4
[NICKNAME] Add nickname min length config and check it in Nickname::normalize 2021-09-14 13:10:23 +01:00
5afd2c9843
Duplicate src/Util/Exception/NicknameTooLongException.php history in src/Util/Exception/NicknameTooShortException.php history. 2021-09-14 13:10:23 +01:00
dc2a453e94
[TESTS] Add tests of Common and fix small oddities that pop up 2021-09-14 13:10:22 +01:00
b387ea9aa0
[TESTS] Fix error when testing cold redis cache 2021-09-14 13:10:22 +01:00
88e4044d02
[TESTS] Add tests for the bitmap utility and fix implementation 2021-09-14 13:10:22 +01:00
8d25859de7
[LOG] Only try to log if setup, so logs can be disabled, in tests, for instance 2021-09-14 13:10:22 +01:00
7e648a296f
CACHE] Fix cache implementation with the help of tests and remove premature optimization for non-redis list caching
This complicated the code significantly and likely didn't help that much, if at all. The recommended setup is using Redis, anyway, which is plenty optimized
2021-09-14 13:10:22 +01:00
c539f17ba5
[TESTS] Add App\Core\Cache test 2021-09-14 13:10:22 +01:00
1028f05cd8
[TESTS] Fix unkept unit tests 2021-09-14 13:10:21 +01:00
2174f288d1
[DB] Fix Doctrine errors due to lack of column uniqueness
So, Doctrine doesn't like that `GSActorTag.tag` is not unique, even
though composite key `[tagger, tag]` is. `tag` can't unique, but
doctrine doesn't understand this. This seems like a Doctrine bug that
should be investigated. For now we'll just not mark it as a foreign
key
2021-09-14 13:10:20 +01:00
c894a4faa4
[DB] Make Note.source reference NoteSource.code, the primary key 2021-09-14 13:10:20 +01:00
up201706832
f9443f1e87
[AUTH][REMEMBER-ME] Changed name of column in rememberme_token database table to fix bug 2021-09-14 13:10:19 +01:00
Daniel
afae038cff
[ProfileColor] Added Profile Color entity, color form and db store/load to color settings controler 2021-09-14 13:10:19 +01:00
Daniel
f04923405f
[REVERSEFAV] Added reverse favorourites stream/template 2021-09-14 13:10:19 +01:00
João Brandão
5516a77b33
[UI][TIMELINES] Refactored query for public stream 2021-09-14 13:10:19 +01:00
Angelo D. Moura
fe170ff508
[Directory] Finished implementing groups stream using Directory plugin 2021-09-14 13:10:18 +01:00
Angelo D. Moura
098fdb3361
[Directory] Changed the route so the plugin Directory doesn't take over - query is not working for some reason 2021-09-14 13:10:18 +01:00
Angelo D. Moura
eb1ef4dd0f
[Directory] Added the route, controller and a blank template file - something is broken 2021-09-14 13:10:18 +01:00
Angelo D. Moura
4f85efa071
[Directory] Actors are now organized by nickname 2021-09-14 13:10:18 +01:00
Angelo D. Moura
505e60d89f
[Directory] Actors are no longer related with notes, and the logged in user now shows on the stream 2021-09-14 13:10:18 +01:00
Angelo D. Moura
0c5941f515
[Directory] Almost finishied creating the /actors stream - problems with the css files 2021-09-14 13:10:17 +01:00
Angelo D. Moura
517cba3510
[Directory] Add the route, controller function, and blank template file 2021-09-14 13:10:17 +01:00
Daniel
fdc2bc39d0
[Cover] Input restrictions, Code cleanup 2021-09-14 13:10:17 +01:00
Daniel
aeec9149fc
[Cover] Cover route, cover now renders 2021-09-14 13:10:16 +01:00
Daniel
1cfe64cc25
[Cover] Added Cover Entity, updated form handler
Basically the same as the avatar
2021-09-14 13:10:16 +01:00
Diogo Machado
f18a2a4bb6
[STATIC ANALYSIS] Started removal process for the errors found by PHPStan 2021-09-14 13:10:16 +01:00
Daniel
c0d363e317
[Poll] Restructured templates, added misssing poll related css 2021-09-14 13:10:13 +01:00
Daniel
7a299162e1
[Poll] Polls now have an associated note, poll templates, start_show_styles event, started css 2021-09-14 13:10:13 +01:00
Daniel
090c593a61
[Poll] Started testing with note integration 2021-09-14 13:10:13 +01:00
Daniel
50ec306243
[Poll] Added file headers 2021-09-14 13:10:12 +01:00
Daniel
ffb4b9df23
[Poll] Added modified param for Poll/Poll response, added PollTest 2021-09-14 13:10:12 +01:00
Daniel
f34fb9c7b9
[Poll] Added variable num of options
not sure if it is the right way to do it
2021-09-14 13:10:12 +01:00
Daniel
cdbf7da8be
[Poll] Added templates, response counting 2021-09-14 13:10:12 +01:00
Daniel
27a0c43f7b
[Poll] Store poll response to DB 2021-09-14 13:10:12 +01:00
Daniel
3725818e4f
[Poll] Added New Route, RespondPoll, Poll Response, PollResponseForm 2021-09-14 13:10:12 +01:00
Daniel
dbb55362c8
[Poll] Fixed ShowPoll route, moved Poll Entity, created NewPollForm
Entity was temporarily moved to src/Entity in order to load from DB, since it is yet no possible to do that from Plugin
2021-09-14 13:10:12 +01:00
Angelo D. Moura
d53fef09a8
[TWIG] Moves the SVG custom function to an extension and change the test regex 2021-09-14 13:06:58 +01:00
Angelo D. Moura
5acfda8ae5
[TWIG] Add SVG icon embed function 2021-09-14 13:06:58 +01:00
Diogo Machado
fbc85086fd
[DB][TESTS] Implement Doctrine event listener to update timestamps on modification, and related tests 2021-09-14 13:06:58 +01:00
Daniel
c3aa2ae400
[FORM] Implement ActorArrayTransformer 2021-09-14 13:06:57 +01:00
279cfcd058
[PLUGIN][Favourite] Move favourite table definition to inside the plugin, as it is now supported 2021-09-14 13:06:57 +01:00
417e2f351b
[SchemaDef] Finish association mapping implementation 2021-09-14 13:06:57 +01:00
1d42c7a835
[DB][NoteLocation] Add missing multiplicity to column 2021-09-14 13:06:57 +01:00
4e4d4dfdc5
[DB] Fix typo in table definitions and fix name of GSActorCircle table 2021-09-14 13:06:57 +01:00
481027b09b
[AUTOGENERATED][DB][File][GroupJoinQueue] Update autogenerated code and add select fields as specified in the previous commit 2021-09-14 13:06:57 +01:00
1712782cc5
[DB] Change foreign key specification to new format 2021-09-14 13:06:57 +01:00
ea0aca4b00
[SCHEMADEF] Add preliminary support for foreign keys 2021-09-14 13:06:57 +01:00
e2e53d9a2a
[AUTOGENERATED] Update auto generated code in entities 2021-09-14 13:06:56 +01:00
460712e15e
[GIT] Change my email to the new one in all files and bump copyright year 2021-09-14 13:06:56 +01:00
74e586182d
[DB] Merge definition of SchemaDefDriver with SchemaDefPass for clarity 2021-09-14 13:06:56 +01:00
fc015c6fdf
[NETWORK][TreeNotes] Add TreeNotes plugin which takes over the responsibility of displaying a conversation as a tree, in order to reduce the number of queries 2021-09-14 13:06:56 +01:00
Hugo Sales
eefdf74658
Ensure group table name is quoted, as it's a reserved word in postgreSQL 2021-09-14 13:06:56 +01:00
Hugo Sales
3301770642
[COMMAND] Change the way ListEventsCommand outputs the results to use the output interface and add some formatting 2021-09-14 13:06:55 +01:00
Hugo Sales
e8feb2ae84
[DOCUMENTATION][REFACTOR] Add documentation to all flagged function and do some small cleanup 2021-09-14 13:06:55 +01:00
Hugo Sales
1949e0b987
[EVENT] Rename event names to camel case to make finding handlers easier 2021-09-14 13:06:55 +01:00
Hugo Sales
0b759da780
[REGISTER] Add self follow when registering, fixing the '-1 followers' bug 2021-09-14 13:06:54 +01:00
Hugo Sales
089c710711
[SETTINGS][NOTIFICATIONS] Fix error when displaying the user notification settings page 2021-09-14 13:06:54 +01:00
Hugo Sales
be324bb390
[CONTROLLER] Fix use of undefined variable 2021-09-14 13:06:54 +01:00
Hugo Sales
44f51ce715
[CONFIG][CACHE] Move cache configuration from environment variables to the configuration file 2021-09-14 13:06:54 +01:00
Hugo Sales
e949dd654a
[CONFIG] Various fixes to use new configuration format 2021-09-14 13:06:54 +01:00
Hugo Sales
c4c693b283
[CONFIG] Fix error on missing or empty local configuration 2021-09-14 13:06:53 +01:00
Hugo Sales
dd40255c4a
[CONFIG][DB] Remove config from the database, put it in yaml, so it can be baked into the container 2021-09-14 13:06:53 +01:00
Hugo Sales
46f1cf9529
[CORE] Add missing use statement in module base class 2021-09-14 13:06:53 +01:00
Hugo Sales
179d7f3335
[UTILS] Make bitmap not use a static class var and set object properties as lowercase 2021-09-14 13:06:53 +01:00
Hugo Sales
147ff89e74
[NoteAction] Refactor duplicated code out to base class 2021-09-14 13:06:53 +01:00
Hugo Sales
a6c24393b5
[NOTE] Add isVisibleTo 2021-09-14 13:06:53 +01:00
Hugo Sales
63d2d58e9e
[EXCEPTION] Make findOne return NotFoundException 2021-09-14 13:06:52 +01:00
Hugo Sales
c07a0cdcd5
[EXCEPTION] Add base class to invalid form exception and add URL arguments to redirect exception 2021-09-14 13:06:52 +01:00
Hugo Sales
0e332b718e
[SECURITY] Fix getRoles 2021-09-14 13:06:52 +01:00
Hugo Sales
c0ce25c352
[MODULES] Fix module manager dev-mode rebuild 2021-09-14 13:06:52 +01:00
Hugo Sales
0a56061639
[UI] Only show note action buttons if a user is logged in 2021-09-14 13:06:52 +01:00
Hugo Sales
2164f21834
[Controller] Fix exception handler to recurse on the exception's previous (in some contexts, RedirectException gets wrapped) 2021-09-14 13:06:52 +01:00
Hugo Sales
ffcf909bda
[UTIL] Update bitmap base class, making using easier 2021-09-14 13:06:52 +01:00
Hugo Sales
72208b066c
[NoteActions] Refactor note actions and fix bug in favourite 2021-09-14 13:06:51 +01:00
Hugo Sales
4c15271d36
[UI] Display error when submitted form is invalid 2021-09-14 13:06:51 +01:00
Hugo Sales
5fc7647c40
[MODULE][DB] Added support for loading entity definitions from modules 2021-09-14 13:06:51 +01:00
Hugo Sales
b906dde059
[EXCEPTION][UI][UX] Add RedirectException, which can be thrown anywhere to redirect somewhere, and an exception handler 2021-09-14 13:06:51 +01:00
Hugo Sales
420b4767b2
[UI][NOTE] Add reply to in UI 2021-09-14 13:06:51 +01:00
Hugo Sales
7af424b64a
[DB] Add rendered collumn to note table, so we can preserve microtags from other services 2021-09-14 13:06:50 +01:00
Hugo Sales
460cbbd4c9
[DB] Fix local_user table to use a numeric id, since the username is editable 2021-09-14 13:06:50 +01:00
rainydaysavings
492360ceeb
[CONTROLLER][ROUTE] Favourites page initial query implementation and routing 2021-09-14 13:06:50 +01:00
Hugo Sales
55466143f2
[UI][FEED] Fix scope in timelines; major rewrite of home timeline query, still missing scoping and paging 2021-09-14 13:06:49 +01:00
Hugo Sales
e1181ab998
[DB][DEFAULTS] Change attachment storage location from uploads to attachments 2021-09-14 13:06:49 +01:00
Hugo Sales
3b86a46625
[DB] Rename notice to activity in notification table 2021-09-14 13:06:49 +01:00
Hugo Sales
51a398f27a
[UI] Subtract self follow from total user follows 2021-09-14 13:06:49 +01:00
Hugo Sales
6e11143b79
[DB][NOTE] Update scope 2021-09-14 13:06:49 +01:00
Hugo Sales
6165f7cd55
[Media] Display images and videos inline in notes 2021-09-14 13:06:49 +01:00
rainydaysavings
a9d5f8ac5b
[UI][TWIG] Fixing note actions placement and size, more descriptive rules 2021-09-14 13:06:49 +01:00
Hugo Sales
07078414bb
[FORM] Add names to forms 2021-09-14 13:06:48 +01:00