From c4536d94e28cbbe28059f9914e4ab3f738c5c21c Mon Sep 17 00:00:00 2001 From: liugang Date: Fri, 17 Oct 2025 09:02:54 +0800 Subject: [PATCH] * [bug#66211] Display the license agreement during installation. --- module/install/model.php | 4 ++-- module/upgrade/control.php | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/module/install/model.php b/module/install/model.php index 372bbbb6aa..7d85cceb66 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -24,8 +24,8 @@ class installModel extends model { $clientLang = $this->app->getClientLang(); - $licenseCN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.CN'); - $licenseEN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.EN'); + $licenseCN = file_get_contents($this->app->getBasePath() . 'LICENSE.CN'); + $licenseEN = file_get_contents($this->app->getBasePath() . 'LICENSE.EN'); if($clientLang == 'zh-cn' || $clientLang == 'zh-tw') return $licenseCN . $licenseEN; return $licenseEN . $licenseCN; diff --git a/module/upgrade/control.php b/module/upgrade/control.php index d42d9397d7..ee4694013a 100644 --- a/module/upgrade/control.php +++ b/module/upgrade/control.php @@ -48,15 +48,8 @@ class upgrade extends control { if($this->get->agree == true) $this->locate(inlink('backup')); - $clientLang = $this->app->getClientLang(); - $licenseCN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.CN'); - $licenseEN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.EN'); - - $license = $licenseEN . $licenseCN; - if($clientLang == 'zh-cn' || $clientLang == 'zh-tw') $license = $licenseCN . $licenseEN; - $this->view->title = $this->lang->upgrade->common; - $this->view->license = $license; + $this->view->license = $this->loadModel('install')->getLicense(); $this->display(); }