From 58aee0a710d79bc50453eeed4bd7deb7ddcb29d0 Mon Sep 17 00:00:00 2001 From: Taufik Nurrohman Date: Wed, 21 Jun 2023 21:16:46 +0700 Subject: [PATCH] Late Enough --- index/panel/route.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/index/panel/route.php b/index/panel/route.php index 6e4d2f8..5605951 100644 --- a/index/panel/route.php +++ b/index/panel/route.php @@ -33,11 +33,8 @@ function __tweak($_) { 'stack' => 10, 'type' => 'fields' ]; - // Had to set these hidden value(s) later because panel route(s) will be executed before native type definition file(s) - \Hook::set('_', function ($_) { - $_['lot']['desk']['lot']['form']['values']['file']['name'] = 'state.php'; - $_['lot']['desk']['lot']['form']['values']['path'] = 'x/panel.tweak'; - return $_; - }, 0); + $_['lot']['desk']['lot']['form']['values']['file']['name'] = 'state.php'; + $_['lot']['desk']['lot']['form']['values']['path'] = 'x/panel.tweak'; + $GLOBALS['file'] = $file = new \File(\LOT . \D . 'x' . \D . 'panel.tweak' . \D . 'state.php'); return $_; } \ No newline at end of file