Skip to content

Commit

Permalink
# [#29374] Languages Cannot be Installed Using Install Languages.
Browse files Browse the repository at this point in the history
Thanks Ofer
  • Loading branch information
oc666 authored and infograf768 committed Sep 29, 2012
1 parent 78caea6 commit a955fc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions installation/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ $ -> Language fix or change
29-Sep-2012 Jean-Marie Simonet
# [#29343] 'Remove installation folder' button not always working. Thanks Ofer
# [#29380] Override Language String Created Cannot be Deleted. Thanks Patrick
# [#29374] Languages Cannot be Installed Using Install Languages. Thanks Ofer

28-Sep-2012 Jean-Marie Simonet
+$ Adding installation languages: tr-TR
Expand Down
8 changes: 6 additions & 2 deletions libraries/joomla/installer/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ public static function downloadPackage($url, $target = false)

$http = JHttpFactory::getHttp();
$response = $http->get($url);
if (200 != $response->code)
if (302 == $response->code && isset($response->headers['Location']))
{
return self::downloadPackage($response->headers['Location']);
}
else if (200 != $response->code)
{
JLog::add(JText::_('JLIB_INSTALLER_ERROR_DOWNLOAD_SERVER_CONNECT'), JLog::WARNING, 'jerror');
return false;
}

if ($response->headers['wrapper_data']['Content-Disposition'])
if (isset($response->headers['wrapper_data']['Content-Disposition']))
{
$contentfilename = explode("\"", $response->headers['wrapper_data']['Content-Disposition']);
$target = $contentfilename[1];
Expand Down

0 comments on commit a955fc3

Please sign in to comment.