mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-02 21:12:02 +08:00
Change for #430
https://github.com/the-djmaze/snappymail/issues/430#issuecomment-1149834667
This commit is contained in:
parent
82afd528d6
commit
cc3486ab63
1 changed files with 5 additions and 5 deletions
|
@ -237,11 +237,11 @@ abstract class Repository
|
|||
&& (!\is_file("{$sPath}.phar") || \unlink("{$sPath}.phar"));
|
||||
}
|
||||
|
||||
public static function installPackage(string $sType, string $sId, string $sFile) : bool
|
||||
public static function installPackage(string $sType, string $sId, string $sFile = '') : bool
|
||||
{
|
||||
empty($_ENV['SNAPPYMAIL_INCLUDE_AS_API']) && \RainLoop\Api::Actions()->IsAdminLoggined();
|
||||
|
||||
\RainLoop\Api::Logger()->Write('Start package install: '.$sFile.' ('.$sType.')', \MailSo\Log\Enumerations\Type::INFO, 'INSTALLER');
|
||||
\RainLoop\Api::Logger()->Write('Start package install: '.$sId.' ('.$sType.')', \MailSo\Log\Enumerations\Type::INFO, 'INSTALLER');
|
||||
|
||||
$sRealFile = '';
|
||||
|
||||
|
@ -255,9 +255,9 @@ abstract class Repository
|
|||
if ($sError) {
|
||||
throw new \Exception($sError);
|
||||
}
|
||||
if (isset($aList[$sId]) && $sFile === $aList[$sId]['file']) {
|
||||
$sRealFile = $sFile;
|
||||
$sTmp = static::download($sFile);
|
||||
if (isset($aList[$sId]) && (!$sFile || $sFile === $aList[$sId]['file'])) {
|
||||
$sRealFile = $aList[$sId]['file'];
|
||||
$sTmp = static::download($aList[$sId]['file']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue