Use plugin & theme path helpers in the update manager (#4770)

This commit is contained in:
LeMaX10 2020-04-02 19:52:23 +03:00 committed by GitHub
parent 32443135c9
commit ea42de9181
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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]));
}