function _GetRepositoryModules($prefix = '', $newest = 1) { global $CMS_VERSION; $url = $this->GetPreference('module_repository'); if ($url == '') { return array(false, $this->Lang('error_norepositoryurl')); } $nusoap =& $this->GetModuleInstance('nuSOAP'); $nusoap->Load(); $nu_soapclient = new nu_soapclient($url, false, false, false, false, false, 90, 90); if ($err = $nu_soapclient->GetError()) { return array(false, $this->Lang('error_nosoapconnect')); } $allmoduledetails = array(); $repversion = $nu_soapclient->call('ModuleRepository.soap_version'); if ($err = $nu_soapclient->GetError()) { return array(false, $this->Lang('error_soaperror') . ' (' . $url . '): ' . $err); } if (version_compare($repversion, MINIMUM_REPOSITORY_VERSION) < 0) { return array(false, $this->Lang('error_minimumrepository')); } $qparms = array(); if (!empty($prefix)) { $qparms['prefix'] = $prefix; } $qparms['newest'] = $newest; $qparms['clientcmsversion'] = $CMS_VERSION; $allmoduledetails = $nu_soapclient->call('ModuleRepository.soap_moduledetailsgetall', $qparms); if ($err = $nu_soapclient->GetError()) { return array(false, $this->Lang('error_soaperror') . ' (' . $url . '): ' . $err); } // if( !is_array( $allmoduledetails ) || count( $allmoduledetails ) == 0 ) // { // return array(false,$this->Lang('error_connectnomodules').' ('.$url.'): '.$err); // } return array(true, $allmoduledetails); }
if (!count($modules)) { $smarty->assign('nvmessage', $this->Lang('error_nomodules')); } else { $url = $this->GetPreference('module_repository'); if ($url == '') { $this->_DisplayErrorPage($id, $params, $returnid, $this->Lang('error_norepositoryurl')); return; } $nusoap =& $this->GetModuleInstance('nuSOAP'); $nusoap->Load(); $nu_soapclient = new nu_soapclient($url, false, false, false, false, false, 90, 90); if ($err = $nu_soapclient->GetError()) { $this->_DisplayErrorPage($id, $params, $returnid, 'SOAP Error: ' . $err); return; } $repversion = $nu_soapclient->call('ModuleRepository.soap_version'); if ($err = $nu_soapclient->GetError()) { $this->_DisplayErrorPage($id, $params, $returnid, $this->Lang('error_soaperror') . ' (' . $url . '): ' . $err); return; } if (version_compare($repversion, MINIMUM_REPOSITORY_VERSION) < 0) { $this->_DisplayErrorPage($id, $params, $returnid, $this->Lang('error_minimumrepository')); return; } $qparms['names'] = implode(',', $modules); $qparms['newest'] = '1'; $qparms['clientcmsversion'] = $CMS_VERSION; $versions = $nu_soapclient->call('ModuleRepository.soap_upgradelistgetall', $qparms); if ($err = $nu_soapclient->GetError()) { $this->_DisplayErrorPage($id, $params, $returnid, 'SOAP Error: ' . $err); echo htmlspecialchars($nu_soapclient->response);