Commit Graph

71 Commits

Author SHA1 Message Date
Hugo Sales a5c97762e0 [AVATAR] Fixed avatar upload, added avatar inline download and updated template and base controller 2021-04-14 15:37:22 +00:00
Hugo Sales 7635f455ab [DB] Add entity base class to allow sharing methods such as 'create' 2021-04-14 15:37:22 +00:00
Hugo Sales ed84c1f8bf [MODULE] Reload modules if modified, except in production environment 2021-04-14 15:37:22 +00:00
Hugo Sales 7945a9c825 [EVENT][ROUTES] Add event to allow modules to add routes, 'add_route' 2021-04-14 15:37:21 +00:00
Hugo Sales 4c60aac8f8 [FRAMEWORK] Avoid double initializing the framework 2021-04-14 15:37:21 +00:00
Hugo Sales d394f6fc9c [EVENT] Fix event handler and rename events to snake_case 2021-04-14 15:37:21 +00:00
Hugo Sales 0e401edac2 [MODULE] Added module base class 2021-04-14 15:37:21 +00:00
Hugo Sales f5f10890b6 [COMPOSER][MODULE] Add autoloading rules for components and plugins 2021-04-14 15:37:21 +00:00
Hugo Sales 4b73024a57 [MAIL] Make mailserver a required service 2021-04-14 15:37:21 +00:00
Hugo Sales e10e6644e3 [FORM] Add Form::handle which automagically creates a form, handles a request, and writes the data to the given entity and update Form::create to do some more magic as well 2021-04-14 15:37:21 +00:00
Hugo Sales 0cba00ebbb [CORE][SECURITY][UX] Save previous url on /register and /logout 2021-04-14 15:37:21 +00:00
Hugo Sales e7f541219d [DATABASE][TOOLS] Update local_user, SchemaDefDriver and bin/generate_entity_fields to use the phone_number type (which maps to a varchar 35 and does validation) 2021-04-14 15:37:21 +00:00
Hugo Sales b98d01bd06 [CORE][UX] Save previous url to redirect back after registering 2021-04-14 15:37:21 +00:00
Hugo Sales 2838aaad14 [FORM] Add Form::isRequired 2021-04-14 15:37:21 +00:00
Hugo Sales d6a7843240 [DATABASE] Refactor DB.php and make findBy always return an array, instead of a doctrine collection 2021-04-14 15:37:21 +00:00
Hugo Sales b4fb1569ce [FORM][WRAPPER] Merge argument options, not replace 2021-04-14 15:37:21 +00:00
Hugo Sales 39e3e8a04e [MAILER][WRAPPER] Add mailer wrapper that respects the configuration 2021-04-14 15:37:21 +00:00
Hugo Sales 7bb3717673 [FIX] Fix bug in DATABASE.php, since findBy can return different types 2021-04-14 15:37:21 +00:00
Hugo Sales 0af82054ff [COMMON][SECURITY][WRAPPER] Added security service static wrapper and Common::getUser 2021-04-14 15:37:21 +00:00
Hugo Sales f812d9142f [CORE][ROUTES] Small refactor on entrypoint and RouteLoader 2021-04-14 15:37:21 +00:00
Hugo Sales 1b2c308808 [CONTROLLER][ROUTES] Refactor the base Controller to not reinvent the wheel too much and rely on Symfony's events 2021-04-14 15:37:21 +00:00
Hugo Sales fc4d8bcf65 [DEFAULTS] Add password hashing algorithm default settings 2021-04-14 15:37:21 +00:00
Hugo Sales 0ef9223803 [LOGIN] Implement password checking and related systems 2021-04-14 15:37:21 +00:00
Hugo Sales 9bc186a072 [USER] Add UserRoles 2021-04-14 15:37:21 +00:00
Hugo Sales aadb4832bc [DEFAULTS][FIX] Fix logic error that kept reloading the table when the file wasn't modified 2021-04-14 15:37:21 +00:00
Hugo Sales 0e96ffe287 [UI][SESSION] Add login and logout pages 2021-04-14 15:37:21 +00:00
Hugo Sales 0a6b134f23 [CORE] Refactor GNUsocial.php so it initializes itself as a service 2021-04-14 15:37:21 +00:00
Hugo Sales a7715fc9c3 [I18N] Remove support for context until it proves necessary, as it broke the code 2021-04-14 15:37:21 +00:00
Hugo Sales 7b00ab4699 [CORE][I18n][DEFAULTS] Remove I18nHelper 2021-04-14 15:37:21 +00:00
Hugo Sales 640c4b2ca8 [DEFAULTS] Update default reserved usernames 2021-04-14 15:37:21 +00:00
Hugo Sales 11822cbed0 [DATABASE][WRAPPER] Add findBy method which allows finding entities with a complex expression 2021-04-14 15:37:21 +00:00
Hugo Sales 91ff4dbdec [DATABASE][WRAPPER] Update DATABASE wrapper so entity names are provided without the namespace 2021-04-14 15:37:21 +00:00
Hugo Sales 7cedbcd63f [CACHE] Fix usage of the redis extension 2021-04-14 15:37:21 +00:00
Hugo Sales 02a23a2aff [CACHE][Redis] Add special support for redis (fixed size lists), set method and general fixes 2021-04-14 15:37:21 +00:00
Hugo Sales 62c9b56b3f [CACHE] Add support for multiple pools with the syntax (as an example) SOCIAL_CACHE_ADAPTER='default=redis://localhost:6379,memcached://localhost:11211;db.config=apcu://' 2021-04-14 15:37:21 +00:00
Hugo Sales 89ce298a3b [DEFAULTS] Add modified time to config table (as value) and only reload the defaults if the file is newer 2021-04-14 15:37:21 +00:00
Hugo Sales 9563fb0af3 [CACHE] Extend the static wrapper to support working with lists in caches that don't natively support them 2021-04-14 15:37:21 +00:00
Hugo Sales 7a07b95240 [DEFAULTS][FIX] Fix defaults to use value from environment 2021-04-14 15:37:21 +00:00
Hugo Sales aaba304ca8 [CACHE][WRAPPER] Fix cache wrapper 2021-04-14 15:37:21 +00:00
Hugo Sales 288f8363ae [FORMATTING][DEFAULTS] Fix formatting and remove redundant config defaults 2021-04-14 15:37:21 +00:00
Hugo Sales 9fadb73ea5 [CACHE] Add a static wrapper around symfony/cache 2021-04-14 15:37:21 +00:00
Hugo Sales b579842eb6 [LOG][WRAPPER] Refactor log wrapper 2021-04-14 15:37:21 +00:00
Hugo Sales 47ab835549 [QUEUE] Add queueing wrapper, default configuration and example usage 2021-04-14 15:37:21 +00:00
Hugo Sales 17da1f7fb5 [MODULES] Make ModulesManager check if file exists 2021-04-14 15:37:21 +00:00
Hugo Sales 43e56c08f7 [CONTROLLER] Add Controller base class, which handles rendering templates if requested HTML or json, accordingly 2021-04-14 15:37:21 +00:00
Hugo Sales 3a6b4cca1e [CORE][DATABASE] Replace zero dates with CURRENT_TIMESTAMP and add defaults to all 'created' or 'modified'
This commit is a port from v2's 9a515b9234 ([SCHEMA] Improve timestamp storage) to v3.

As explained by Alexei Sorokin:

Avoid the use of deprecated MariaDATABASE "zero dates" globally. If they're present
as attribute defaults somewhere, they will be replaced with NULL implicitly.
The existing "zero dates" in MariaDATABASE storage will be left intact and this
should not present any issues.

The "timestamp" type in table definitions now corresponds to DATETIME in
MariaDATABASE with "DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", which
should be close enough to the original behaviour for compatibility purposes.
It is now the recommended type for "modified" attributes, because of the
update trigger on MariaDATABASE. But there is no such trigger implemented on
PostgreSQL as of this moment.
2021-04-14 15:37:21 +00:00
Hugo Sales 6c0c84c284 [DEFAULTS] Small fixes and add check of SOCIAL_NO_RELOAD_DEFAULTS from the environment, to override the reloading of default values 2021-04-14 15:37:21 +00:00
Hugo Sales bf92c44d81 [CORE][Event] Move GSEvent to Event, no longer a name collision 2021-04-14 15:37:21 +00:00
Hugo Sales 07422c4e1a [FORM] Added Symfony Form wrapper 2021-04-14 15:37:21 +00:00
Hugo Sales 6e6e50939b [CORE][Symfony] Fixed deprecation resultant from Symfony 5.1 upgrade
User Deprecated: Since symfony/framework-bundle 5.1: Using type
"Symfony\Component\Routing\RouteCollectionBuilder" for argument 1 of
method "App\Kernel:configureRoutes()" is deprecated, use
"Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator"
instead.
2021-04-14 15:37:21 +00:00