mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix missing argument in rename_all_metadata function
This commit is contained in:
@@ -288,7 +288,7 @@ class caption_field implements cache_cacheableInterface
|
|||||||
return $values;
|
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
|
$sql = 'SELECT count(id) as count_id FROM metadatas
|
||||||
WHERE meta_struct_id = :meta_struct_id';
|
WHERE meta_struct_id = :meta_struct_id';
|
||||||
@@ -323,10 +323,6 @@ 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);
|
$app['phraseanet.SE']->updateRecord($record);
|
||||||
unset($record);
|
unset($record);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@@ -416,7 +416,7 @@ class databox_field implements cache_cacheableInterface
|
|||||||
$stmt->closeCursor();
|
$stmt->closeCursor();
|
||||||
|
|
||||||
if ($this->renamed) {
|
if ($this->renamed) {
|
||||||
caption_field::rename_all_metadatas($this);
|
caption_field::rename_all_metadatas($this->app, $this);
|
||||||
$this->renamed = false;
|
$this->renamed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user