diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php index 47c7ccbdca..c1b638d54a 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tools.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Tools.php @@ -146,6 +146,7 @@ class Tools implements ControllerProviderInterface if ((int) $request->request->get('ccfilename') === 1) { $record->set_original_name($fileName); + $app['phraseanet.SE']->updateRecord($record); } $success = true; diff --git a/lib/classes/API/V1/adapter.class.php b/lib/classes/API/V1/adapter.class.php index a45a4536e4..0f89c3d8be 100644 --- a/lib/classes/API/V1/adapter.class.php +++ b/lib/classes/API/V1/adapter.class.php @@ -1187,7 +1187,7 @@ class API_V1_adapter extends API_V1_Abstract $record->set_binary_status($datas); - $this->core['SearchEngine']->updateRecord($record); + $this->app['phraseanet.SE']->updateRecord($record); $result->set_datas(array( "status" => diff --git a/lib/classes/caption/field.class.php b/lib/classes/caption/field.class.php index 7506e0d8a1..b5ee85be98 100644 --- a/lib/classes/caption/field.class.php +++ b/lib/classes/caption/field.class.php @@ -329,6 +329,11 @@ 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) { @@ -343,6 +348,8 @@ class caption_field implements cache_cacheableInterface public static function delete_all_metadatas(Application $app, databox_field $databox_field) { + $core = \bootstrap::getCore(); + $sql = 'SELECT count(id) as count_id FROM metadatas WHERE meta_struct_id = :meta_struct_id'; @@ -380,6 +387,8 @@ class caption_field implements cache_cacheableInterface $caption_field = new caption_field($app, $databox_field, $record); $caption_field->delete(); $record->set_metadatas(array()); + + $core['SearchEngine']->updateRecord($record); unset($caption_field); unset($record); } catch (Exception $e) {