Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

add support for redirect on installer helper #1559

Merged
merged 2 commits into from

3 participants

@oc666

This is fix of bug #29374

@pasamio

This has some style errors:

Expected "if (...)\n...{...}\n...else\n"; found "if (...)\n...{...}\n...else ".
 .../libraries/joomla/installer/helper.php : 49
Usage of ELSE IF is not allowed; use ELSEIF instead.
 .../libraries/joomla/installer/helper.php : 53
@oc666

@pasamio, I've fixed this error.
Is there any guide for how to install code styling tool? (Preferred for Netbeans)

@pasamio pasamio merged commit 3797749 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 29, 2012
  1. @oc666
Commits on Oct 1, 2012
  1. @oc666

    fix style error

    oc666 authored
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 2 deletions.
  1. +6 −2 libraries/joomla/installer/helper.php
View
8 libraries/joomla/installer/helper.php
@@ -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']);
+ }
+ elseif (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];
Something went wrong with that request. Please try again.