Fix missing argument in rename_all_metadata function

This commit is contained in:
Nicolas Le Goff
2014-12-12 16:58:07 +01:00
parent 76104ce919
commit edac914c8f
2 changed files with 2 additions and 6 deletions

View File

@@ -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) {

View File

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