Skip to content

Commit

Permalink
use the warning and error (#12265)
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 authored and rdeutz committed Oct 18, 2016
1 parent 9d72d84 commit 592d7e3
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions administrator/components/com_installer/models/languages.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@
class InstallerModelLanguages extends JModelList
{
/**
* @var integer Extension ID of the en-GB language pack.
* Extension ID of the en-GB language pack.
*
* @var integer
* @since 3.4
*/
private $enGbExtensionId = 0;

/**
* @var integer Upate Site ID of the en-GB language pack.
* Upate Site ID of the en-GB language pack.
*
* @var integer
* @since 3.4
*/
private $updateSiteId = 0;
Expand Down Expand Up @@ -271,7 +275,8 @@ public function install($lids)
// Could not find the url, the information in the update server may be corrupt.
$message = JText::sprintf('COM_INSTALLER_MSG_LANGUAGES_CANT_FIND_REMOTE_MANIFEST', $language->name);
$message .= ' ' . JText::_('COM_INSTALLER_MSG_LANGUAGES_TRY_LATER');
$app->enqueueMessage($message);
$app->enqueueMessage($message, 'warning');

continue;
}

Expand All @@ -283,7 +288,8 @@ public function install($lids)
// Could not find the url , maybe the url is wrong in the update server, or there is not internet access
$message = JText::sprintf('COM_INSTALLER_MSG_LANGUAGES_CANT_FIND_REMOTE_PACKAGE', $language->name);
$message .= ' ' . JText::_('COM_INSTALLER_MSG_LANGUAGES_TRY_LATER');
$app->enqueueMessage($message);
$app->enqueueMessage($message, 'warning');

continue;
}

Expand All @@ -296,7 +302,8 @@ public function install($lids)
// There was an error installing the package.
$message = JText::sprintf('COM_INSTALLER_INSTALL_ERROR', $language->name);
$message .= ' ' . JText::_('COM_INSTALLER_MSG_LANGUAGES_TRY_LATER');
$app->enqueueMessage($message);
$app->enqueueMessage($message, 'error');

continue;
}

Expand All @@ -306,8 +313,7 @@ public function install($lids)
// Cleanup the install files in tmp folder.
if (!is_file($package['packagefile']))
{
$config = JFactory::getConfig();
$package['packagefile'] = $config->get('tmp_path') . '/' . $package['packagefile'];
$package['packagefile'] = JFactory::getConfig()->get('tmp_path') . '/' . $package['packagefile'];
}

JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']);
Expand Down

0 comments on commit 592d7e3

Please sign in to comment.