From 493a23e889b28f42ae69b315497cf44b6dc9e825 Mon Sep 17 00:00:00 2001 From: RayEhrhardt Date: Fri, 2 May 2014 08:46:51 +0000 Subject: [PATCH] #2492 - Added latest precheck fix --- setup+doku/d3precheck.php | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/setup+doku/d3precheck.php b/setup+doku/d3precheck.php index e01d886..4f0cabc 100644 --- a/setup+doku/d3precheck.php +++ b/setup+doku/d3precheck.php @@ -820,7 +820,7 @@ class requRemote { public $blUseRemote = true; - public $oModuleData; + public $oModuleData = array(); /** * @param $sModId @@ -897,28 +897,30 @@ class requRemote /** * @param $sUrl * - * @return string + * @return stdClass */ protected function _getRemoteServerData($sUrl) { - if ($this->oModuleData) { - return $this->oModuleData; + if (isset($this->oModuleData[$sUrl])) { + return $this->oModuleData[$sUrl]; } - if ($this->blUseRemote) { - $sUrl = '/serialized/' . $sUrl; + $oFailureData = new stdClass(); + $oFailureData->status = 'NOK'; - $sHost = "http://update.oxidmodule.com"; - $sData = $this->curlConnect($sHost . $sUrl); - $oData = unserialize($sData); - - $this->oModuleData = $oData; - } else { - $oData = new stdClass(); - $oData->status = 'NOK'; + if (false === $this->blUseRemote) { + return $oFailureData; } + $sHost = "http://update.oxidmodule.com"; + $sData = $this->curlConnect($sHost . '/serialized/' . $sUrl); + $oData = unserialize($sData); - return $oData; + if (false == $oData) { + return $oFailureData; + } + $this->oModuleData[$sUrl] = $oData; + + return $this->oModuleData[$sUrl]; } /**