From ea42de9181a39f285f0209bd3532b2fd4334b789 Mon Sep 17 00:00:00 2001 From: LeMaX10 Date: Thu, 2 Apr 2020 19:52:23 +0300 Subject: [PATCH] Use plugin & theme path helpers in the update manager (#4770) --- modules/system/classes/UpdateManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/system/classes/UpdateManager.php b/modules/system/classes/UpdateManager.php index 53ba96468..0aed46961 100644 --- a/modules/system/classes/UpdateManager.php +++ b/modules/system/classes/UpdateManager.php @@ -582,7 +582,7 @@ class UpdateManager $fileCode = $name . $hash; $filePath = $this->getFilePath($fileCode); - if (!Zip::extract($filePath, $this->baseDirectory . '/plugins/')) { + if (!Zip::extract($filePath, plugins_path())) { throw new ApplicationException(Lang::get('system::lang.zip.extract_failed', ['file' => $filePath])); } @@ -624,7 +624,7 @@ class UpdateManager $fileCode = $name . $hash; $filePath = $this->getFilePath($fileCode); - if (!Zip::extract($filePath, $this->baseDirectory . '/themes/')) { + if (!Zip::extract($filePath, themes_path())) { throw new ApplicationException(Lang::get('system::lang.zip.extract_failed', ['file' => $filePath])); }