From 078fa5d0c248694cdf7b5d2a0cd38a0bbb9333f4 Mon Sep 17 00:00:00 2001 From: taekyoungc Date: Tue, 14 Apr 2026 00:28:02 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=B4=EC=98=81=20URL=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=8F=84=20bag=20=ED=99=94=EB=A9=B4=EC=9D=80=20=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=ED=8A=B8=20=EB=A9=94=EB=89=B4=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=95=84=EC=9B=83=EC=9D=84=20=EC=82=AC=EC=9A=A9=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 요청 경로를 정규화해 bag 접두를 판별하도록 변경하고 지정판매소 경로의 관리자 레이아웃 강제 분기를 제거했습니다. --- app/Controllers/BaseController.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/app/Controllers/BaseController.php b/app/Controllers/BaseController.php index a027808..07c6ae9 100644 --- a/app/Controllers/BaseController.php +++ b/app/Controllers/BaseController.php @@ -51,13 +51,16 @@ abstract class BaseController extends Controller protected function renderWorkPage(string $title, string $contentView, array $contentData = []): string { $content = view($contentView, $contentData); - $uri = service('request')->getUri(); - $seg1 = $uri->getSegment(1); - $seg2 = $uri->getSegment(2); - - // 지정판매소 관리는 관리자 전용 기능으로, /bag 경로여도 관리자 레이아웃을 유지한다. - $forceAdminLayoutOnBag = ($seg1 === 'bag' && $seg2 === 'designated-shops'); - if ($seg1 === 'bag' && ! $forceAdminLayoutOnBag) { + helper('admin'); + $path = function_exists('current_nav_request_path') ? current_nav_request_path() : ''; + if ($path === '') { + $uri = service('request')->getUri(); + $path = trim((string) $uri->getPath(), '/'); + } + while (str_starts_with($path, 'index.php/')) { + $path = substr($path, strlen('index.php/')); + } + if ($path === 'bag' || str_starts_with($path, 'bag/')) { return view('bag/layout/main', [ 'title' => $title, 'content' => $content,