mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Merge pull request #3325 from alchemy-fr/PHRAS-2905-migration-patch-thesaurus-cterme
PHRAS-2905 #comment 4.1 Migration patch for "candidat terme", set zero when thesaurus branch is not define
This commit is contained in:
@@ -62,6 +62,16 @@ class patch_410alpha17a implements patchInterface
|
||||
// $sql = "ALTER TABLE `metadatas_structure` ADD `gui_editable` INT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `readonly`";
|
||||
// $databox->get_connection()->executeQuery($sql);
|
||||
|
||||
foreach ($databox->get_meta_structure() as $databox_field) {
|
||||
if ($databox_field->get_tbranch() != '') {
|
||||
$databox_field->set_generate_cterms(true);
|
||||
} else {
|
||||
$databox_field->set_generate_cterms(false);
|
||||
}
|
||||
|
||||
$databox_field->save();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user