version fixes
[civicrm-core.git] / CRM / Financial / BAO / FinancialType.php
index df8b7c0027010c9313b34fa201ff2ab8dd22929f..aa347c9082e8b1c28c88cafe25f4dff8e5228f47 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
   +--------------------------------------------------------------------+
-  | CiviCRM version 4.6                                                |
+  | CiviCRM version 4.7                                                |
   +--------------------------------------------------------------------+
-  | Copyright CiviCRM LLC (c) 2004-2014                                |
+  | Copyright CiviCRM LLC (c) 2004-2015                                |
   +--------------------------------------------------------------------+
   | This file is a part of CiviCRM.                                    |
   |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -75,7 +75,7 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
    *   Value we want to set the is_active field.
    *
    * @return Object
-   *   DAO object on sucess, null otherwise
+   *   DAO object on success, null otherwise
    */
   public static function setIsActive($id, $is_active) {
     return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active);
@@ -133,9 +133,9 @@ class CRM_Financial_BAO_FinancialType extends CRM_Financial_DAO_FinancialType {
     $occurrences = $financialType->findReferences();
     if ($occurrences) {
       $tables = array();
-      foreach ($occurrences as $occurence) {
-        $className = get_class($occurence);
-        if (!in_array($className, $ignoreTables)) {
+      foreach ($occurrences as $occurrence) {
+        $className = get_class($occurrence);
+        if (!in_array($className, $tables) && !in_array($className, $ignoreTables)) {
           $tables[] = $className;
         }
       }