Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend
This commit is contained in:
@@ -119,7 +119,7 @@ class Install extends \Espo\Core\Upgrades\Actions\Base
|
||||
$this->deletePackageFiles();
|
||||
|
||||
if ($this->getManifestParam('skipBackup')) {
|
||||
$this->getFileManager()->removeInDir($this->getPath('backupPath'), true);
|
||||
$this->getFileManager()->removeInDir([$this->getPath('backupPath'), self::FILES]);
|
||||
}
|
||||
|
||||
$GLOBALS['log']->debug('Installation process ['.$processId.']: end run.');
|
||||
|
||||
@@ -108,7 +108,6 @@ class AdminNotifications extends \Espo\Core\Services\Base
|
||||
$extensionName = $row['name'];
|
||||
|
||||
$latestRelease = $this->getLatestRelease($url, [
|
||||
'response' => 'latestRelease',
|
||||
'name' => $extensionName,
|
||||
]);
|
||||
|
||||
@@ -160,15 +159,16 @@ class AdminNotifications extends \Espo\Core\Services\Base
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
protected function getLatestRelease($url = null, array $requestData = ['response' => 'latestRelease'])
|
||||
protected function getLatestRelease($url = null, array $requestData = [], $urlPath = 'release/latest')
|
||||
{
|
||||
if (function_exists('curl_version')) {
|
||||
$ch = curl_init();
|
||||
|
||||
$requestUrl = $url ? trim($url) : base64_decode('aHR0cHM6Ly9zLmVzcG9jcm0uY29tLw==');
|
||||
$requestUrl = (substr($requestUrl, -1) == '/') ? $requestUrl : $requestUrl . '/';
|
||||
$requestUrl .= empty($requestData) ? $urlPath . '/' : $urlPath . '/?' . http_build_query($requestData);
|
||||
|
||||
curl_setopt($ch, CURLOPT_URL, $requestUrl . '?' . http_build_query($requestData));
|
||||
curl_setopt($ch, CURLOPT_URL, $requestUrl);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user