mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
[SearchEngine] Add search engine indexation
This commit is contained in:
@@ -146,6 +146,7 @@ class Tools implements ControllerProviderInterface
|
|||||||
|
|
||||||
if ((int) $request->request->get('ccfilename') === 1) {
|
if ((int) $request->request->get('ccfilename') === 1) {
|
||||||
$record->set_original_name($fileName);
|
$record->set_original_name($fileName);
|
||||||
|
$app['phraseanet.SE']->updateRecord($record);
|
||||||
}
|
}
|
||||||
|
|
||||||
$success = true;
|
$success = true;
|
||||||
|
@@ -1187,7 +1187,7 @@ class API_V1_adapter extends API_V1_Abstract
|
|||||||
|
|
||||||
$record->set_binary_status($datas);
|
$record->set_binary_status($datas);
|
||||||
|
|
||||||
$this->core['SearchEngine']->updateRecord($record);
|
$this->app['phraseanet.SE']->updateRecord($record);
|
||||||
|
|
||||||
$result->set_datas(array(
|
$result->set_datas(array(
|
||||||
"status" =>
|
"status" =>
|
||||||
|
@@ -329,6 +329,11 @@ class caption_field implements cache_cacheableInterface
|
|||||||
try {
|
try {
|
||||||
$record = $databox_field->get_databox()->get_record($row['record_id']);
|
$record = $databox_field->get_databox()->get_record($row['record_id']);
|
||||||
$record->set_metadatas(array());
|
$record->set_metadatas(array());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO NEUTRON add App
|
||||||
|
*/
|
||||||
|
$app['phraseanet.SE']->updateRecord($record);
|
||||||
unset($record);
|
unset($record);
|
||||||
} catch (Exception $e) {
|
} 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)
|
public static function delete_all_metadatas(Application $app, databox_field $databox_field)
|
||||||
{
|
{
|
||||||
|
$core = \bootstrap::getCore();
|
||||||
|
|
||||||
$sql = 'SELECT count(id) as count_id FROM metadatas
|
$sql = 'SELECT count(id) as count_id FROM metadatas
|
||||||
WHERE meta_struct_id = :meta_struct_id';
|
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 = new caption_field($app, $databox_field, $record);
|
||||||
$caption_field->delete();
|
$caption_field->delete();
|
||||||
$record->set_metadatas(array());
|
$record->set_metadatas(array());
|
||||||
|
|
||||||
|
$core['SearchEngine']->updateRecord($record);
|
||||||
unset($caption_field);
|
unset($caption_field);
|
||||||
unset($record);
|
unset($record);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
Reference in New Issue
Block a user