From 91eac363718e245d7741963c2b944ec7837d68a1 Mon Sep 17 00:00:00 2001 From: wolfcode <37436228+wolf-leo@users.noreply.github.com> Date: Wed, 15 Jan 2025 09:28:15 +0800 Subject: [PATCH] refactor(view): remove redundant template path generation - Remove unnecessary code that generates a template path based on the request pathinfo - Simplify the render function by removing the conditional block that sets the template path --- app/common/controller/AdminController.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/common/controller/AdminController.php b/app/common/controller/AdminController.php index 3934872..ab2295c 100644 --- a/app/common/controller/AdminController.php +++ b/app/common/controller/AdminController.php @@ -133,9 +133,6 @@ class AdminController extends BaseController { if ($layout) View::instance()->engine()->layout('/layout/default'); View::assign($vars); - if (empty($template)) { - $template = strtolower(str_replace('.', '/', $this->request->pathinfo())); - } return View::fetch($template); }