Merge pull request #5479 from eileenmcnaughton/4.6
[civicrm-core.git] / CRM / Extension / Browser.php
index 24cdd031496e02c491f3ec1243abb47569ed663a..b3929d49e5fa2365ace36dc932b5da1149272b9f 100644 (file)
@@ -23,7 +23,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  * This class glues together the various parts of the extension
@@ -37,7 +37,7 @@
 class CRM_Extension_Browser {
 
   /**
-   * An URL for public extensions repository
+   * An URL for public extensions repository.
    */
   const DEFAULT_EXTENSIONS_REPOSITORY = 'https://civicrm.org/extdir/ver={ver}|cms={uf}';
 
@@ -88,7 +88,7 @@ class CRM_Extension_Browser {
   }
 
   /**
-   * Determine whether downloading is supported
+   * Determine whether downloading is supported.
    *
    * @return array
    *   List of error messages; empty if OK.
@@ -118,7 +118,7 @@ class CRM_Extension_Browser {
   }
 
   /**
-   * Get a list of all available extensions
+   * Get a list of all available extensions.
    *
    * @return array
    *   ($key => CRM_Extension_Info)
@@ -141,7 +141,7 @@ class CRM_Extension_Browser {
   }
 
   /**
-   * Get a description of a particular extension
+   * Get a description of a particular extension.
    *
    * @param string $key
    *   Fully-qualified extension name.
@@ -220,7 +220,8 @@ class CRM_Extension_Browser {
    * extensions.
    *
    *
-   * @return Array list of extension names
+   * @return array
+   *   list of extension names
    */
   private function grabRemoteKeyList() {
 
@@ -262,10 +263,10 @@ class CRM_Extension_Browser {
     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 (<a href="%1">requested extensions from here</a>). If you want to install an extension which is not marked as compatible, you may be able to <a href="%3">download and install extensions manually</a> (depending on access to your web server).<br />', array(
-            1 => $this->getRepositoryUrl(),
-            2 => $config->civiVersion,
-            3 => 'http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions',
-          )), ts('No Extensions Available for this Version'), 'info');
+        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');
@@ -324,7 +325,10 @@ class CRM_Extension_Browser {
   }
 
   /**
-   * A dummy function required for suppressing download errors
+   * A dummy function required for suppressing download errors.
+   *
+   * @param $errorNumber
+   * @param $errorString
    */
   public static function downloadError($errorNumber, $errorString) {
   }