feat(ckeditor5,board,ecommerce,page,core,admin_basic): 미참조 에디터 업로드 이미지 정리 신설 + 업로드 고아 동종 결함 7건 전수 해소

공개 (@Tuwasduliebst 제보) 대응.

- ckeditor5: 미참조 이미지 정리 엔진 신설 — 참조 판정(hash + 파일명 2토큰,
 filter_reference_sources 훅으로 확장 콘텐츠 등록) + 정리 커맨드(기본 꺼짐 옵트인,
 3중 게이트) + 업로드 관리 화면(권한 분리·참조 배지·개별/선택 삭제) + 기설치본
 설정 백필 upgrade step
- board: 임시 첨부 GC(상시) + 소프트삭제 첨부 영구 정리(옵트인) + 설정 UI,
 저장 payload 누락(F4)·빈 temp 디렉토리 잔존(F5) 수정
- ecommerce: 임시 상품 이미지 GC + 카테고리 삭제 시 이미지 파일 미삭제(S4) 수정
- page: 임시 첨부 GC
- 코어: 고아 첨부 정리 커맨드(옵트인, site_logo 보호) + 사이트 로고 교체 시
 구 로고 재편입 차단(S6) + DB 백업 미구현 501 정직화(B3) + 플러그인 관리자
 메뉴 설치·업데이트 자동 동기화(F1·F7)
- 동반: 플러그인 설정 검증 오류 필드명 라벨화(F3), Toggle 노드 type 정정
 수평 전개(marketing 1.0.2 bump·gdpr·ecommerce), ja 언어팩 4종, API 문서,
 hooks.md, 시나리오 매니페스트 8종, Playwright E2E 4종
This commit is contained in:
HeuJung committed 2026-08-17 02:44:54 +09:00
1 parent 1d895a6428
commit cfc2caba1b
170 files changed
+11142 -209

No files matched your search

@@ -3,6 +3,8 @@
namespace Modules\Sirsoft\Page\Repositories\Contracts;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Carbon;
use Modules\Sirsoft\Page\Models\PageAttachment;
/**
@@ -65,7 +67,7 @@ interface PageAttachmentRepositoryInterface
* @param int $id 첨부파일 ID
* @return PageAttachment 첨부파일 모델
*
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
* @throws ModelNotFoundException
*/
public function findOrFail(int $id): PageAttachment;
@@ -77,6 +79,18 @@ interface PageAttachmentRepositoryInterface
*/
public function delete(PageAttachment $attachment): bool;
/**
* 페이지에 연결되지 않은 채 방치된 임시 첨부를 오래된 순으로 조회합니다.
*
* 페이지 작성 폼에서 업로드만 하고 저장 없이 이탈하면 `temp_key` 가 남은 채
* `page_id` 가 비어 있는 행과 그 파일이 영구 잔존합니다. 그 회수 대상을 찾습니다.
*
* @param Carbon $threshold 기준 시각 (이 시각 이전 업로드가 대상)
* @param int $limit 최대 조회 건수
* @return Collection<int, PageAttachment> 임시 첨부 목록 (created_at 오름차순)
*/
public function findStaleTempAttachments(Carbon $threshold, int $limit): Collection;
/**
* 첨부파일을 수정합니다.
*
@@ -3,6 +3,8 @@
namespace Modules\Sirsoft\Page\Repositories;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Modules\Sirsoft\Page\Models\PageAttachment;
use Modules\Sirsoft\Page\Repositories\Contracts\PageAttachmentRepositoryInterface;
@@ -97,7 +99,7 @@ class PageAttachmentRepository implements PageAttachmentRepositoryInterface
* @param int $id 첨부파일 ID
* @return PageAttachment 첨부파일 모델
*
* @throws \Illuminate\Database\Eloquent\ModelNotFoundException
* @throws ModelNotFoundException
*/
public function findOrFail(int $id): PageAttachment
{
@@ -115,6 +117,21 @@ class PageAttachmentRepository implements PageAttachmentRepositoryInterface
return (bool) $attachment->delete();
}
/**
* {@inheritDoc}
*/
public function findStaleTempAttachments(Carbon $threshold, int $limit): Collection
{
return PageAttachment::query()
->whereNotNull('temp_key')
->whereNull('page_id')
->where('created_at', '<', $threshold)
->orderBy('created_at')
->orderBy('id')
->limit($limit)
->get(['id', 'temp_key', 'disk', 'path', 'created_at']);
}
/**
* 첨부파일을 수정합니다.
*