From 2628e119bbd2cc3d0511bb6ec61017befceeb8ce Mon Sep 17 00:00:00 2001 From: zenggang Date: Wed, 13 Apr 2022 05:27:40 +0000 Subject: [PATCH] * Fix bug#15760 --- module/backup/control.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/backup/control.php b/module/backup/control.php index 8f4756b051..0f39f398d3 100644 --- a/module/backup/control.php +++ b/module/backup/control.php @@ -336,7 +336,11 @@ class backup extends control if($statusFile) { $this->app->loadLang('extension'); - $statusFile = str_replace(dirname($this->app->getBasePath()) . DS, '', $statusFile); + + $search = dirname($this->app->getBasePath()) . DS; + $pos = strpos($statusFile, $search); + if($pos !== false) $statusFile = substr_replace($statusFile, '', $pos, strlen($search)); + $this->view->error = sprintf($this->lang->extension->noticeOkFile, $statusFile, $statusFile); return print($this->display()); }