Skip to content

Commit

Permalink
Fixed issue #6848: Unable to use administration if PECL http extensio…
Browse files Browse the repository at this point in the history
…n is installed on the server
  • Loading branch information
c-schmitz committed Nov 15, 2012
1 parent a118d04 commit 3ce8ed2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions application/controllers/admin/update.php
Expand Up @@ -27,7 +27,7 @@ class update extends Survey_Common_Action
function index($sSubAction = null)
{
$this->_RunUpdaterUpdate();
Yii::import('application.libraries.admin.http.httpRequest');
Yii::import('application.libraries.admin.http.httpRequestIt');

$clang = $this->getController()->lang;
$iCurrentBuildnumber = Yii::app()->getConfig("buildnumber");
Expand Down Expand Up @@ -59,8 +59,8 @@ function index($sSubAction = null)

private function _getChangedFiles($buildnumber, $updaterversion, $updatekey)
{
Yii::import('application.libraries.admin.http.httpRequest');
$http = new httpRequest;
Yii::import('application.libraries.admin.http.httpRequestIt');
$http = new httpRequestIt;
$httperror = $this->_requestChangedFiles($http, $buildnumber, $updaterversion, $updatekey);

if ($httperror != '') {
Expand All @@ -71,8 +71,8 @@ private function _getChangedFiles($buildnumber, $updaterversion, $updatekey)

private function _getChangelog($buildnumber, $updaterversion, $updatekey)
{
Yii::import('application.libraries.admin.http.httpRequest');
$http = new httpRequest;
Yii::import('application.libraries.admin.http.httpRequestIt');
$http = new httpRequestIt;
$httperror = $this->_requestChangelog($http, $buildnumber, $updaterversion, $updatekey);

if ($httperror != '') {
Expand All @@ -81,7 +81,7 @@ private function _getChangelog($buildnumber, $updaterversion, $updatekey)
return $this->_readChangelog($http);
}

private function _readChangelog(httpRequest $http)
private function _readChangelog(httpRequestIt $http)
{
$szLines = '';
$szResponse = '';
Expand All @@ -96,7 +96,7 @@ private function _readChangelog(httpRequest $http)
}
}

private function _requestChangelog(httpRequest $http, $buildnumber, $updaterversion, $updatekey)
private function _requestChangelog(httpRequestIt $http, $buildnumber, $updaterversion, $updatekey)
{
$http->timeout = 0;
$http->data_timeout = 0;
Expand All @@ -108,7 +108,7 @@ private function _requestChangelog(httpRequest $http, $buildnumber, $updatervers
return $http->SendRequest($arguments);
}

private function _requestChangedFiles(httpRequest $http, $buildnumber, $updaterversion, $updatekey)
private function _requestChangedFiles(httpRequestIt $http, $buildnumber, $updaterversion, $updatekey)
{
$http->timeout = 0;
$http->data_timeout = 0;
Expand Down Expand Up @@ -327,8 +327,8 @@ function step4()
// Create DB and file backups now

$downloaderror=false;
Yii::import('application.libraries.admin.http.httpRequest');
$http=new httpRequest;
Yii::import('application.libraries.admin.http.httpRequestIt');
$http=new httpRequestIt;

// Allow redirects
$http->follow_redirect=1;
Expand Down Expand Up @@ -433,8 +433,8 @@ private function _RunUpdaterUpdate()
$buildnumber = Yii::app()->getConfig("buildnumber");
$tempdir = Yii::app()->getConfig("tempdir");

Yii::import('application.libraries.admin.http.httpRequest');
$oHTTPRequest=new httpRequest;
Yii::import('application.libraries.admin.http.httpRequestIt');
$oHTTPRequest=new httpRequestIt;

/* Connection timeout */
$oHTTPRequest->timeout=0;
Expand Down Expand Up @@ -485,8 +485,8 @@ private function _RunUpdaterUpdate()
// Create DB and file backups now

$downloaderror=false;
Yii::import('application.libraries.admin.http.httpRequest');
$oHTTPRequest=new httpRequest;
Yii::import('application.libraries.admin.http.httpRequestIt');
$oHTTPRequest=new httpRequestIt;

// Allow redirects
$oHTTPRequest->follow_redirect=1;
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/common_helper.php
Expand Up @@ -4460,8 +4460,8 @@ function removeBOM($str=""){
function getUpdateInfo()
{
//require_once($homedir."/classes/http/http.php");
Yii::import('application.libraries.admin.http.httpRequest');
$http=new httpRequest;
Yii::import('application.libraries.admin.http.httpRequestIt');
$http=new httpRequestIt;

$http->timeout=0;
$http->data_timeout=0;
Expand Down
Expand Up @@ -6,7 +6,7 @@
*
*/

class httpRequest
class httpRequestIt
{
var $host_name="";
var $host_port=0;
Expand Down

0 comments on commit 3ce8ed2

Please sign in to comment.