From cc2d56dbf060e3bd84550977fbc439126f41f7c8 Mon Sep 17 00:00:00 2001 From: sunhao Date: Wed, 27 Nov 2024 14:26:58 +0800 Subject: [PATCH] * [bug #56147, done, 0.5h] export image proxy url to js var. --- lib/zin/wg/pagebase/v1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/zin/wg/pagebase/v1.php b/lib/zin/wg/pagebase/v1.php index 05056e5331..215737ed12 100644 --- a/lib/zin/wg/pagebase/v1.php +++ b/lib/zin/wg/pagebase/v1.php @@ -107,10 +107,10 @@ class pageBase extends wg { $extraJS = isset($config->zin->extraJS) ? $config->zin->extraJS : 'zin.js'; if(!empty($extraJS)) $headImports[] = h::importJs($webRoot . 'js/zui3/' . $extraJS); + array_unshift($js, 'zui.defineFn();'); + array_unshift($headImports, h::js("window.EDITOR_IMAGE_PROXY_ENDPOINT='{$webRoot}imgproxy.php';")); } - if($zui) array_unshift($js, 'zui.defineFn();'); - $currentLang = $this->props->get('lang'); if(empty($currentLang)) $currentLang = $app->getClientLang();