29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-25 23:02:55 +00:00

Add a proper error message if a pack fails to download (#35841)

This commit is contained in:
George Wilson 2021-11-21 13:23:21 +00:00 committed by GitHub
parent f2d6ddcc98
commit efb87a1428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,7 @@ INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU_ITEM="Joomla was unable to automatic
INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_MENU_MODULE="Joomla was unable to automatically create the %s menu module."
INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_CATEGORY="Joomla was unable to automatically create the %s content category."
INSTL_DEFAULTLANGUAGE_COULD_NOT_CREATE_ARTICLE="Joomla was unable to automatically create the %s localised article."
INSTL_DEFAULTLANGUAGE_COULD_NOT_DOWNLOAD_PACKAGE="Joomla failed to download or unpack the language pack from: %s"
INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_MODULESWHITCHER_LANGUAGECODE="Joomla was unable to automatically publish the language switcher module."
INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGECODE="Joomla was unable to automatically enable the Language Code Plugin."
INSTL_DEFAULTLANGUAGE_COULD_NOT_ENABLE_PLG_LANGUAGEFILTER="Joomla was unable to automatically enable the Language Filter Plugin."

View File

@ -177,6 +177,13 @@ class InstallationModelLanguages extends JModelBase
// Download the package to the tmp folder.
$package = $this->downloadPackage($package_url);
if (!$package)
{
JFactory::getApplication()->enqueueMessage(JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_DOWNLOAD_PACKAGE', $package_url), 'error');
continue;
}
// Install the package.
if (!$installer->install($package['dir']))
{