Commit Graph

61 Commits

Author SHA1 Message Date
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
Hugo Sales 15cf498e75 [I18N] Fix implementation of I18nHelper::formatICU 2021-04-14 15:37:21 +00:00
Hugo Sales 377965d100 [ROUTES] Add easier support for using TemplateController and improved documentation 2021-04-14 15:37:21 +00:00
Hugo Sales c9b0e994c1 [I18N] Small fixes. Still broken, though :') 2021-04-14 15:37:21 +00:00
Hugo Sales 652c3b5d62 [DEPENDENCY] Upgrade Symfony framework from 5.0 to 5.1 2021-04-14 15:37:21 +00:00
Hugo Sales 26be897578 [I18N] Overhaul _m() implementation to support ICU message formats 2021-04-14 15:37:21 +00:00
Hugo Sales 3108d82a4d [I18N] Added ability to call `_m_dynamic` from any class, allowing it to define translations for dynamic-valued calls to `_m` 2021-04-14 15:37:21 +00:00
Hugo Sales a8cd9034ff [I18N] Custom translation extractor based on Symfony's PhpExtractor, since we use instead of 2021-04-14 15:37:21 +00:00
Hugo Sales d73840352b [I18N] Refactor since rfc/use-static-function is not implemented
As the above mentioned RFC is not implemented, `_m` needs to be
outside of the I18n class, otherwise it would have to always be called
with `I18n::_m`.
2021-04-14 15:37:21 +00:00
Hugo Sales 766eac8467 [ROUTES] Add static wrapper around Symfony's router 2021-04-14 15:37:20 +00:00
Hugo Sales 0fe5ae7675 [CORE] Refactoring core 2021-04-14 15:37:20 +00:00