From dcb78d977634b9e5e0a414d96a4f50bddbc8218b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 14 Mar 2018 14:33:09 +0100 Subject: [PATCH] remove due to own table in 17.1 no longer needed migration of (private) custome-fields --- .../class.admin_cmd_change_account_id.inc.php | 3 -- api/src/Storage/Customfields.php | 36 ------------------- 2 files changed, 39 deletions(-) diff --git a/admin/inc/class.admin_cmd_change_account_id.inc.php b/admin/inc/class.admin_cmd_change_account_id.inc.php index fb643f4f0c..52f6ed024d 100644 --- a/admin/inc/class.admin_cmd_change_account_id.inc.php +++ b/admin/inc/class.admin_cmd_change_account_id.inc.php @@ -179,9 +179,6 @@ class admin_cmd_change_account_id extends admin_cmd { foreach($GLOBALS['egw_info']['apps'] as $app => $data) { - $total += ($changed = Api\Storage\Customfields::change_account_ids($app, $this->change)); - if ($changed) echo "$app:\t$changed id's in definition of private custom fields changed\n"; - $total += ($changed = Api\Framework\Favorites::change_account_ids($app, $this->change)); if ($changed) echo "$app:\t$changed id's in favorites or index-state changed\n"; } diff --git a/api/src/Storage/Customfields.php b/api/src/Storage/Customfields.php index 8b61cd199b..b6138c98be 100755 --- a/api/src/Storage/Customfields.php +++ b/api/src/Storage/Customfields.php @@ -479,42 +479,6 @@ class Customfields implements \IteratorAggregate } } - /** - * Change account_id's of private custom-fields - * - * @param string $app - * @param array $ids2change from-id => to-id pairs - * @return integer number of changed ids - */ - public static function change_account_ids($app, array $ids2change) - { - $total = 0; - if (($cfs = self::get($app, true))) - { - foreach($cfs as &$data) - { - if ($data['private']) - { - $changed = 0; - foreach($data['private'] as &$id) - { - if (isset($ids2change[$id])) - { - $id = $ids2change[$id]; - ++$changed; - } - } - if ($changed) - { - self::update($data); - $total += $changed; - } - } - } - } - return $total; - } - /** * Return names of custom fields containing account-ids *