<?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. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
* 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);
$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;
}
}