From: Dave Greenberg Date: Thu, 1 Aug 2013 00:17:38 +0000 (-0700) Subject: Corrected issue in patch noted by Tim on PR. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=70619090c59c604610458162050410ecbd5705cc;p=civicrm-core.git Corrected issue in patch noted by Tim on PR. --- diff --git a/CRM/Extension/Browser.php b/CRM/Extension/Browser.php index c3407daf82..ceb84ad499 100644 --- a/CRM/Extension/Browser.php +++ b/CRM/Extension/Browser.php @@ -221,10 +221,6 @@ class CRM_Extension_Browser { list ($status, $extdir) = CRM_Utils_HttpClient::singleton()->get($this->getRepositoryUrl() . $this->indexPath); if ($extdir === FALSE || $status !== CRM_Utils_HttpClient::STATUS_OK) { CRM_Core_Session::setStatus(ts('The CiviCRM public extensions directory at %1 could not be contacted - please check your webserver can make external HTTP requests or contact CiviCRM team on CiviCRM forum.
', array(1 => $this->getRepositoryUrl())), ts('Connection Error'), 'error'); - } else if (empty($exts)) { - // CRM-13141 There may not be any compatible extensions available for the requested CiviCRM version + CMS. If so, $extdir is empty so just return a notification. - $config = CRM_Core_Config::singleton(); - CRM_Core_Session::setStatus(ts('There are currently no extensions on the CiviCRM public extension directory which are compatible with version %2 (requested extensions from here). If you want to install an extension which is not marked as compatible, you may be able to download and install extensions manually (depending on access to your web server).
', array(1 => $this->getRepositoryUrl(), 2 => $config->civiVersion, 3 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions')), ts('No Extensions Available for this Version'), 'info'); } else { $lines = explode("\n", $extdir); @@ -240,6 +236,12 @@ class CRM_Extension_Browser { } } + // CRM-13141 There may not be any compatible extensions available for the requested CiviCRM version + CMS. If so, $extdir is empty so just return a notification. + if (empty($exts)) { + $config = CRM_Core_Config::singleton(); + CRM_Core_Session::setStatus(ts('There are currently no extensions on the CiviCRM public extension directory which are compatible with version %2 (requested extensions from here). If you want to install an extension which is not marked as compatible, you may be able to download and install extensions manually (depending on access to your web server).
', array(1 => $this->getRepositoryUrl(), 2 => $config->civiVersion, 3 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions')), ts('No Extensions Available for this Version'), 'info'); + } + ini_restore('allow_url_fopen'); ini_restore('default_socket_timeout');