Commit Graph

19 Commits (98ea1f68c4d5c2b341e7c8597c60dfdada63d4fc)

Author SHA1 Message Date
Your Name e3b6cebf27 Fix MariaDB driver detection and reblog caption null inserts
Laravel 11 exposes MariaDB as a dedicated 'mariadb' driver, so
config('database.default') === 'mysql' checks silently misclassified
MariaDB as the non-mysql (postgres) branch.

- Add App\Util\Database\DatabaseDriver with isMysqlLike()/isPgsql()
  plus db_is_mysql_like()/db_is_pgsql() global helpers.
- Route all database.default driver checks through the helpers so
  MySQL and MariaDB are treated as one group.
- Use '' (not null) for share/compose caption+rendered, valid whether
  the column is nullable or NOT NULL (it is NOT NULL on MySQL/MariaDB).
- Guard pgsql strtolower() in registration against missing fields.
- Scope CustomEmoji::duplicateShortcodes to the grouped column for
  Postgres GROUP BY validity.
- Remove stale Postgres guard in status:dedup; use havingRaw for
  cross-driver HAVING.
2 weeks ago
Your Name c0cde2f682 refactor: move 52 legacy models from App\ to App\Models\
Move all Eloquent models from the app/ root directory to app/Models/
for consistency with modern Laravel conventions. The project already had
54 models in App\Models; this migrates the remaining 52 legacy models.

Changes:
- Move 52 model files from app/ to app/Models/
- Update namespace declarations in each model
- Update all ~1000 import references across the codebase
- Add Relation::morphMap() in AppServiceProvider for backward
  compatibility with existing polymorphic database records
- Add missing HasSnowflakePrimary imports for models that relied
  on same-namespace resolution
4 weeks ago
Your Name 54cfdf3c2b refactor: add return type declarations to controller methods
Adds explicit return type declarations to 498 controller methods
across 88 files. Types inferred from return statements:

- JsonResponse for response()->json() returns
- RedirectResponse for redirect()/back() returns
- View (contract) for view() returns
- Response for response() returns
- void for methods with no return value
- array for array returns
- string/int/bool for scalar returns

Also fixes 3 methods with incorrect bare returns:
- AvatarController::deleteAvatar - bare return → json response
- ImportPostController::checkPermissions - bare return → true
- RemoteAuthController::accountToId - bare return → empty array
4 weeks ago
Daniel Supernault 374344754e
Lint 9 months ago
Mackenzie Morgan 1f7a1bd72b accept bare domains without http scheme in domain block controller
Fixes #5645
2 years ago
daniel 1dbcdee289
Merge branch 'staging' into feat/implement-admin-domain-blocks-api 2 years ago
Emelia Smith 626c87a420
Fix default severity for domain blocks 3 years ago
Emelia Smith 96a226d90c
Fix issue with wildcard domain blocks 3 years ago
Emelia Smith 4afe72e62f
Add oauth protection to admin domain blocks API 3 years ago
Emelia Smith feed580f51
Minor compatibility fixes 3 years ago
Emelia Smith 21466556d4
Add update and delete 3 years ago
Emelia Smith 652654e24f
WIP: Implement domain blocks 3 years ago
Daniel Supernault 6ce513f8c3
Update user_filters, use config_cache 3 years ago
Daniel Supernault e354750808
Fix api endpoints 3 years ago
Emelia Smith 0f8e45fe75
Implement proper OAuth authorization on API endpoints 3 years ago
Daniel Supernault 6d81214138
Update DomainBlockController, purge domainBlocks cache 3 years ago
Daniel Supernault 87bba03d23
Update DomainBlockController, dispatch jobies 3 years ago
Daniel Supernault 28da107f66
Add DomainBlockController 3 years ago
Daniel Supernault aa166ab11a
Update ApiV1Controller, move tags endpoints to TagsController 3 years ago