Fix error when autoinstall module can't download package data from server

https://xetown.com/questions/1505137
This commit is contained in:
Kijin Sung 2021-01-08 16:53:31 +09:00
parent c8c23e8afe
commit 2717f420e0

View file

@ -79,14 +79,19 @@ class autoinstallAdminController extends autoinstall
$config = $oAdminModel->getAutoInstallAdminModuleConfig();
$buff = FileHandler::getRemoteResource($config->download_server, $body, 3, "POST", "application/xml", array(), array(), array(), $request_config);
$xml = new XeXmlParser();
$xmlDoc = $xml->parse($buff);
$this->updateCategory($xmlDoc);
$this->updatePackages($xmlDoc);
$this->checkInstalled();
$oAdminController = getAdminController('admin');
$oAdminController->cleanFavorite();
if ($buff)
{
$xml = new XeXmlParser();
$xmlDoc = $xml->parse($buff);
if ($xmlDoc)
{
$this->updateCategory($xmlDoc);
$this->updatePackages($xmlDoc);
$this->checkInstalled();
}
$oAdminController = getAdminController('admin');
$oAdminController->cleanFavorite();
}
}
/**