CRM-16478 Initial changes to remove custom error template path
[civicrm-core.git] / CRM / Utils / VersionCheck.php
index 8dccc0789e5fd87c5f9ff5ff202613b92fcb9580..e41f9ffaf21aac26c2b96c80e4b8bc8ee0dbba48 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id: $
  *
  */
@@ -49,7 +49,6 @@ class CRM_Utils_VersionCheck {
    * singleton pattern and cache the instance in this variable
    *
    * @var object
-   * @static
    */
   static private $_singleton = NULL;
 
@@ -96,7 +95,7 @@ class CRM_Utils_VersionCheck {
   protected $cacheFile;
 
   /**
-   * Class constructor
+   * Class constructor.
    */
   public function __construct() {
     global $civicrm_root;
@@ -131,7 +130,7 @@ class CRM_Utils_VersionCheck {
   }
 
   /**
-   * Static instance provider
+   * Static instance provider.
    *
    * Method providing static instance of CRM_Utils_VersionCheck,
    * as in Singleton pattern
@@ -146,7 +145,7 @@ class CRM_Utils_VersionCheck {
   }
 
   /**
-   * Finds the release info for a minor version
+   * Finds the release info for a minor version.
    * @param string $version
    * @return array|null
    */
@@ -197,7 +196,7 @@ class CRM_Utils_VersionCheck {
    * Get the latest version number if it's newer than the local one
    *
    * @return string|null
-   * Returns version number of the latest release if it is greater than the local version
+   *   Returns version number of the latest release if it is greater than the local version
    */
   public function isNewerVersionAvailable() {
     $newerVersion = NULL;
@@ -239,7 +238,7 @@ class CRM_Utils_VersionCheck {
   }
 
   /**
-   * Alert the site admin of new versions of CiviCRM
+   * Alert the site admin of new versions of CiviCRM.
    * Show the message once a day
    */
   public function versionAlert() {
@@ -279,7 +278,7 @@ class CRM_Utils_VersionCheck {
   }
 
   /**
-   * Collect info about the site to be sent as pingback data
+   * Collect info about the site to be sent as pingback data.
    */
   private function getSiteStats() {
     $config = CRM_Core_Config::singleton();
@@ -307,10 +306,10 @@ class CRM_Utils_VersionCheck {
   }
 
   /**
-   * Get active payment processor types
+   * Get active payment processor types.
    */
   private function getPayProcStats() {
-    $dao = new CRM_Financial_DAO_PaymentProcessor;
+    $dao = new CRM_Financial_DAO_PaymentProcessor();
     $dao->is_active = 1;
     $dao->find();
     $ppTypes = array();
@@ -326,7 +325,7 @@ class CRM_Utils_VersionCheck {
   }
 
   /**
-   * Fetch counts from entity tables
+   * Fetch counts from entity tables.
    * Add info to the 'entities' array
    */
   private function getEntityStats() {
@@ -354,7 +353,7 @@ class CRM_Utils_VersionCheck {
       'CRM_Pledge_DAO_PledgeBlock' => NULL,
     );
     foreach ($tables as $daoName => $where) {
-      $dao = new $daoName;
+      $dao = new $daoName();
       if ($where) {
         $dao->whereAdd($where);
       }
@@ -436,7 +435,7 @@ class CRM_Utils_VersionCheck {
   }
 
   /**
-   * Save version info to file
+   * Save version info to file.
    * @param string $contents
    */
   private function writeCacheFile($contents) {