Merge pull request #3914 from eileenmcnaughton/CRM-15168
[civicrm-core.git] / CRM / Contact / BAO / RelationshipType.php
index 09906576920ecb719b6eca7a192cf640ebd8166f..b41a21afda6d5caffc85f7c958c7f96eb79aefa2 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | 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$
  *
  */
@@ -126,13 +126,21 @@ class CRM_Contact_BAO_RelationshipType extends CRM_Contact_DAO_RelationshipType
 
     $relationshipType->id = CRM_Utils_Array::value('relationshipType', $ids);
 
-    return $relationshipType->save();
+    $result = $relationshipType->save();
+
+    CRM_Core_PseudoConstant::relationshipType('label', TRUE);
+    CRM_Core_PseudoConstant::relationshipType('name', TRUE);
+    CRM_Case_XMLProcessor::flushStaticCaches();
+    return $result;
   }
 
   /**
    * Function to delete Relationship Types
    *
    * @param int $relationshipTypeId
+   *
+   * @throws CRM_Core_Exception
+   * @return mixed
    * @static
    */
   static function del($relationshipTypeId) {