Skip to content

Commit

Permalink
change: remove old thesaurus terms that are not used; `section_list_t…
Browse files Browse the repository at this point in the history
…hesaurus` and `search`. Now when a new hierarchy is build do not copy those nodes.
  • Loading branch information
alex-render committed Sep 4, 2024
1 parent e5b58a2 commit 483a74c
Showing 1 changed file with 61 additions and 61 deletions.
122 changes: 61 additions & 61 deletions core/hierarchy/class.hierarchy.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,72 +374,72 @@ public static function generate_virtual_section(object $options) : object {
}

// virtual search-list . terms
$options = new stdClass();
$options->terminoID = $tld2.'7';
$options->parent = $tld2.'1';
$options->modelo = 'dd524';
$options->esmodelo = 'no';
$options->esdescriptor = 'si';
$options->visible = 'si';
$options->traducible = 'no';
$options->relaciones = json_decode('[{"dd1747":"hierarchy22"},{"dd9":"hierarchy25"},{"dd428":"hierarchy27"},{"dd57":"hierarchy23"},{"dd10":"hierarchy28"},{"dd429":"hierarchy36"},{"dd57":"hierarchy24"},{"dd57":"hierarchy26"},{"dd43":"hierarchy41"},{"dd635":"hierarchy30"},{"dd10":"hierarchy32"},{"dd10":"hierarchy33"},{"dd530":"hierarchy35"},{"dd592":"hierarchy40"}]');
$options->properties = null;
$options->tld2 = $tld2;
$options->name = 'Search';

// create_term
$create_term = self::create_term( $options );
if ($create_term) {
$response->result = $create_term->result;
$response->msg[] = $create_term->msg;
}
// $options = new stdClass();
// $options->terminoID = $tld2.'7';
// $options->parent = $tld2.'1';
// $options->modelo = 'dd524';
// $options->esmodelo = 'no';
// $options->esdescriptor = 'si';
// $options->visible = 'si';
// $options->traducible = 'no';
// $options->relaciones = json_decode('[{"dd1747":"hierarchy22"},{"dd9":"hierarchy25"},{"dd428":"hierarchy27"},{"dd57":"hierarchy23"},{"dd10":"hierarchy28"},{"dd429":"hierarchy36"},{"dd57":"hierarchy24"},{"dd57":"hierarchy26"},{"dd43":"hierarchy41"},{"dd635":"hierarchy30"},{"dd10":"hierarchy32"},{"dd10":"hierarchy33"},{"dd530":"hierarchy35"},{"dd592":"hierarchy40"}]');
// $options->properties = null;
// $options->tld2 = $tld2;
// $options->name = 'Search';

// // create_term
// $create_term = self::create_term( $options );
// if ($create_term) {
// $response->result = $create_term->result;
// $response->msg[] = $create_term->msg;
// }

// virtual search-list . model . model terms
$options = new stdClass();
$options->terminoID = $tld2.'8';
$options->parent = $tld2.'2';
$options->modelo = 'dd524';
$options->esmodelo = 'no';
$options->esdescriptor = 'si';
$options->visible = 'si';
$options->traducible = 'no';
$options->relaciones = json_decode('[{"dd1747":"hierarchy22"},{"dd9":"hierarchy25"},{"dd428":"hierarchy27"},{"dd57":"hierarchy23"},{"dd10":"hierarchy28"},{"dd429":"hierarchy36"},{"dd57":"hierarchy24"},{"dd57":"hierarchy26"},{"dd43":"hierarchy41"},{"dd635":"hierarchy30"},{"dd10":"hierarchy32"},{"dd10":"hierarchy33"},{"dd530":"hierarchy35"},{"dd592":"hierarchy40"}]');
$options->properties = null;
$options->tld2 = $tld2;
$options->name = 'Search';

// create_term
$create_term = self::create_term( $options );
if ($create_term) {
$response->result = $create_term->result;
$response->msg[] = $create_term->msg;
}
// $options = new stdClass();
// $options->terminoID = $tld2.'8';
// $options->parent = $tld2.'2';
// $options->modelo = 'dd524';
// $options->esmodelo = 'no';
// $options->esdescriptor = 'si';
// $options->visible = 'si';
// $options->traducible = 'no';
// $options->relaciones = json_decode('[{"dd1747":"hierarchy22"},{"dd9":"hierarchy25"},{"dd428":"hierarchy27"},{"dd57":"hierarchy23"},{"dd10":"hierarchy28"},{"dd429":"hierarchy36"},{"dd57":"hierarchy24"},{"dd57":"hierarchy26"},{"dd43":"hierarchy41"},{"dd635":"hierarchy30"},{"dd10":"hierarchy32"},{"dd10":"hierarchy33"},{"dd530":"hierarchy35"},{"dd592":"hierarchy40"}]');
// $options->properties = null;
// $options->tld2 = $tld2;
// $options->name = 'Search';

// // create_term
// $create_term = self::create_term( $options );
// if ($create_term) {
// $response->result = $create_term->result;
// $response->msg[] = $create_term->msg;
// }

// virtual section-list-thesaurus . thesaurus list
// use section-list-thesaurus from real section. only overwrite when really need
$options = new stdClass();
$options->terminoID = $tld2.'9';
$options->parent = $tld2.'1';
$options->modelo = 'dd144'; // 'dd91';
$options->esmodelo = 'no';
$options->esdescriptor = 'si';
$options->visible = 'si';
$options->traducible = 'no';

// Thesaurus list . Reference for new element
$RecordObj_dd = new RecordObj_dd('hierarchy44');

$options->relaciones = $RecordObj_dd->get_relaciones();
$options->properties = $RecordObj_dd->get_properties();
$options->tld2 = $tld2;
$options->name = 'Thesaurus list';

// create_term
$create_term = self::create_term( $options );
if ($create_term) {
$response->result = $create_term->result;
$response->msg[] = $create_term->msg;
}
// $options = new stdClass();
// $options->terminoID = $tld2.'9';
// $options->parent = $tld2.'1';
// $options->modelo = 'dd144'; // 'dd91';
// $options->esmodelo = 'no';
// $options->esdescriptor = 'si';
// $options->visible = 'si';
// $options->traducible = 'no';

// // Thesaurus list . Reference for new element
// $RecordObj_dd = new RecordObj_dd('hierarchy44');

// $options->relaciones = $RecordObj_dd->get_relaciones();
// $options->properties = $RecordObj_dd->get_properties();
// $options->tld2 = $tld2;
// $options->name = 'Thesaurus list';

// // create_term
// $create_term = self::create_term( $options );
// if ($create_term) {
// $response->result = $create_term->result;
// $response->msg[] = $create_term->msg;
// }

// set main_dd counter. Creates a counter in main_dd with $current_value +1 (9)
// $counter_value = RecordObj_dd_edit::update_counter($tld2, $current_value=8);
Expand Down

0 comments on commit 483a74c

Please sign in to comment.