Commit Graph

67 Commits (e4e12fad7cffee99ef017c30d03037fafb9bfae3)

Author SHA1 Message Date
Your Name e4e12fad7c Extract duplicated blocked-id and duplicate-shortcode query patterns
Two query patterns were copy-pasted across several call sites:

- The 'users who blocked me, plus myself' list used to filter profile
  search (UserFilter::whereFilterableId($pid)->pluck('user_id')->push($pid))
  appeared in ComposeController (x2) and DirectMessageController. Extracted
  to UserFilterService::searchExcludedProfileIds(). Note this is the
  inverse of blocks() (who I blocked), so it is a distinct method.

- CustomEmoji duplicate detection (groupBy('shortcode')->havingRaw(
  'count(*) > 1')) appeared three times in AdminController. Extracted to a
  CustomEmoji::duplicateShortcodes() query scope.

Adds tests for both. No behaviour change.
3 weeks ago
Your Name 40b323bca4 revert: remove emoji local-to-cloud storage changes
Back out all emoji cloud-storage work from staging so it can be reworked and
re-landed separately (the URL resolution flips to cloud on a global config
flag, which created a broken-URL window, and the migration approach needs
revisiting).

Reverts to pre-emoji state:
- CustomEmoji model URL/storage helpers (urlForPath, storageTarget, storeMedia,
  storeMediaFromFile, deleteMedia, url) and callers in ImportEmojis,
  CustomEmojiService, AdminController
- admin custom-emoji blade views back to local /storage URLs
- Remove admin:EmojiMoveStorageLocalToCloud command
- Remove the deploy migration and its scheduler entry

Media (and the already-reverted story) scheduler entries are untouched.
4 weeks ago
Your Name fa76e1014a feat: store custom emoji on cloud storage when enabled
Custom emoji were always written locally and served via hardcoded /storage
URLs, so they never used S3 even on cloud instances.

- CustomEmoji: centralize URL + storage on the active disk (cloud when
  pixelfed.cloud_storage is enabled, else local public/ disk) via
  urlForPath/url/storageTarget/storeMedia/storeMediaFromFile/deleteMedia
- Route emoji writes/deletes and URL generation (scan, CustomEmojiService::all)
  through those helpers in ImportEmojis, CustomEmojiService::import and
  AdminController
- Add admin:EmojiMoveStorageLocalToCloud to migrate existing local emoji to
  cloud: copy, verify by size, delete local, bust caches
- Schedule it daily when cloud storage is enabled
4 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
Your Name e7ba43e2e1 fix: add missing use imports to resolve phpstan class.notFound errors
Add missing imports for Log, Cache, DB, FollowerService, StatusService,
LikeService, ReblogService, UserFilterService, AdminProfile, OauthClient,
and fix StatusTimelineTransformer reference (class didn't exist, replaced
with StatusTransformer).
4 weeks ago
Your Name c807a8524c refactor: replace short facade aliases with fully-qualified imports
Convert all 273 short facade alias imports (e.g. 'use Cache;') to their
fully-qualified class names (e.g. 'use Illuminate\Support\Facades\Cache;')
across 193 files.

This resolves 643 PHPStan 'class.notFound' errors caused by the static
analyzer being unable to resolve global aliases, and aligns with modern
Laravel conventions. It also unblocks removing the aliases array from
config/app.php in a future change.

All 107 tests pass.
4 weeks ago
Your Name 98267eb26f refactor: replace deprecated str_random() with Str::random()
str_random() is a deprecated helper from laravel/helpers that was
missed in the initial helpers removal. Replace all 18 call sites
with the modern Str::random() equivalent.
4 weeks ago
Your Name edb4368b08 refactor: replace deprecated laravel/helpers with native alternatives
Replace all deprecated helper function calls:
- str_slug() → Str::slug()
- starts_with() → str_starts_with()
- ends_with() → str_ends_with()
- array_first() → Arr::first()
- array_last() → Arr::last()
- array_flatten() → Arr::flatten()

Remove laravel/helpers package from composer.json as it is no longer
needed and will not be maintained for Laravel 13.
4 weeks ago
Daniel Supernault 0032eaf482
Fix AdminController 9 months ago
Daniel Supernault 374344754e
Lint 9 months ago
Daniel Supernault 0c6e885b6f
Update AdminController 2 years ago
Daniel Supernault 3004c438f1
Update Admin routes 2 years ago
Daniel Supernault ecf22b54d5
Add custom css to admin dashboard 2 years ago
Daniel Supernault 481314cd23
Update custom emoji, add config_cache support 3 years ago
Daniel Supernault 132a58de54
Add Autospam Advanced Detection 3 years ago
Daniel Supernault 3dac45f388
Update AdminController, fix custom emoji domain search on postgres. Closes #4333 3 years ago
Daniel Supernault 22da2647c7
Update filesystems, store all files as public by default and add default permissions. Fixes #4273, #4275. Closes #3825 4 years ago
daniel b51bacf672
Merge pull request #3803 from syntafin/dev
Fix Emoji Mime Type Validation
4 years ago
Daniel Supernault 2652e95467
Update newsroom 4 years ago
Daniel Supernault 8487231177
Add hashtag administration 4 years ago
Syntafin fdb227e155 Fix Emoji Mime Type Validation 4 years ago
Daniel Supernault 94697d536b
Add Server Directory integration 4 years ago
Daniel Supernault 9d52b9c2d6
Improve admin dashboard by moving expensive stats to its page and loading stats and recent data async on the dashboard home page 4 years ago
Shlee d0c44757e7 Update AdminController.php 4 years ago
Daniel Supernault bae6126db3
Update compiled assets 5 years ago
Daniel Supernault 16e725183e
Update ApiV1Controller, add custom_emoji endpoint 5 years ago
Daniel Supernault 1e00c431a8
Fix custom emoji admin dashboard bug 5 years ago
Daniel Supernault dc7962d898
Add shortcode & domain search 5 years ago
Daniel Supernault efeaf427e1
Add CustomEmoji admin dashboard 5 years ago
Daniel Supernault dff3dad1c8
Update AdminController, move report methods to AdminReports trait 5 years ago
Daniel Supernault bc65938757
Add manual email verification requests 5 years ago
Daniel Supernault a4a1270e70
Add Stories to admin dashboard 5 years ago
Daniel Supernault 64725ecce7
Add diagnostics to error page and admin dashboard 5 years ago
Daniel Supernault 2ab73e1e96
Update AdminController, update reports method 6 years ago
Daniel Supernault b1fd99644b
Update AdminController, show open reports by default 6 years ago
Daniel Supernault 6edaf94099
Update AdminController, fix variable name in updateSpam method 6 years ago
Daniel Supernault 6d078377f1
Update AdminController 6 years ago
Daniel Supernault b892bcf0e8
Add autospam feature 6 years ago
Daniel Supernault c95085ca31
Update AdminController, add appeals support 6 years ago
Daniel Supernault 9a0c5bc8ae
Update admin dashboard 7 years ago
Daniel Supernault 41abe9d261
Update AdminController 7 years ago
Daniel Supernault dbd5c4cf77
Update admin reports, fix 404 bug 7 years ago
Daniel Supernault 481954445e
Update AdminController, add Newsroom 7 years ago
Daniel Supernault 72db2b35b5
Update AdminController, improve dashboard caching 7 years ago
Daniel Supernault 6751aa4ea6
Update admin dashboard 7 years ago
Daniel Supernault a71a2c96b7
Update AdminController 7 years ago
Daniel Supernault 4a62aeee19
Update AdminController 7 years ago
Daniel Supernault 8e5e2fbc5f
Update AdminSettingsController 7 years ago
Daniel Supernault a7a16d8a0b
Update AdminController 7 years ago