remove due to own table in 17.1 no longer needed migration of (private) custome-fields

This commit is contained in:
Ralf Becker 2018-03-14 14:33:09 +01:00
parent a1fa2246af
commit dcb78d9776
2 changed files with 0 additions and 39 deletions

View File

@ -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";
}

View File

@ -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
*