Merge pull request #3476 from eileenmcnaughton/CRM-14838
[civicrm-core.git] / CRM / Utils / VersionCheck.php
index 0f6404d756c08954f3318cd065f784ae3168b5f1..bea90d1e17e09f280b4319c25fa108efc9964912 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -177,7 +177,8 @@ class CRM_Utils_VersionCheck {
    * Show the message once a day
    */
   public function versionAlert() {
-    if (CRM_Core_Permission::check('administer CiviCRM') && $this->newerVersion()) {
+    if (CRM_Core_Permission::check('administer CiviCRM') && $this->newerVersion()
+    && CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'versionAlert', NULL, TRUE)) {
       $session = CRM_Core_Session::singleton();
       if ($session->timer('version_alert', 24 * 60 * 60)) {
         $msg = ts('A newer version of CiviCRM is available: %1', array(1 => $this->latestVersion))
@@ -223,7 +224,7 @@ class CRM_Utils_VersionCheck {
       'CRM_Contribute_DAO_ContributionProduct' => NULL,
       'CRM_Contribute_DAO_Widget' => 'is_active = 1',
       'CRM_Core_DAO_Discount' => NULL,
-      'CRM_Price_DAO_SetEntity' => NULL,
+      'CRM_Price_DAO_PriceSetEntity' => NULL,
       'CRM_Core_DAO_UFGroup' => 'is_active = 1',
       'CRM_Event_DAO_Event' => 'is_active = 1',
       'CRM_Event_DAO_Participant' => 'is_test = 0',