Merge pull request #3119 from pradpnayak/CRM-14380
[civicrm-core.git] / CRM / Core / OptionGroup.php
index 33251b38aca23ef2cbde174980c6563995571dfb..be06a3e487e94b3151ef75dcc60a08a61167fcfb 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -372,7 +372,7 @@ WHERE  v.option_group_id = g.id
    * @static
    *
    * @return string   the value from the row where is_default = true
-   */   
+   */
   static function getDefaultValue($groupName) {
     if (empty($groupName)) {
       return NULL;
@@ -394,7 +394,7 @@ WHERE  v.option_group_id = g.id
     $p = array(1 => array($groupName, 'String'));
     return CRM_Core_DAO::singleValueQuery($query, $p);
   }
-  
+
   /**
    * Creates a new option group with the passed in values
    * @TODO: Should update the group if it already exists intelligently, so multi-lingual is
@@ -596,6 +596,7 @@ WHERE  v.option_group_id = g.id
   static function flushAll() {
     self::$_values = array();
     self::$_cache = array();
+    CRM_Utils_Cache::singleton()->flush();
   }
 }