diff --git a/lib/classes/caption/field.php b/lib/classes/caption/field.php index 2ca484ff58..604436442d 100644 --- a/lib/classes/caption/field.php +++ b/lib/classes/caption/field.php @@ -288,7 +288,7 @@ class caption_field implements cache_cacheableInterface return $values; } - public static function rename_all_metadatas(databox_field $databox_field) + public static function rename_all_metadatas(Application $app, databox_field $databox_field) { $sql = 'SELECT count(id) as count_id FROM metadatas WHERE meta_struct_id = :meta_struct_id'; @@ -323,10 +323,6 @@ class caption_field implements cache_cacheableInterface try { $record = $databox_field->get_databox()->get_record($row['record_id']); $record->set_metadatas(array()); - - /** - * TODO NEUTRON add App - */ $app['phraseanet.SE']->updateRecord($record); unset($record); } catch (\Exception $e) { diff --git a/lib/classes/databox/field.php b/lib/classes/databox/field.php index 04e241201a..f80df177fc 100644 --- a/lib/classes/databox/field.php +++ b/lib/classes/databox/field.php @@ -416,7 +416,7 @@ class databox_field implements cache_cacheableInterface $stmt->closeCursor(); if ($this->renamed) { - caption_field::rename_all_metadatas($this); + caption_field::rename_all_metadatas($this->app, $this); $this->renamed = false; }