Skip to content

Commit

Permalink
Eoxia#41 [Mod] fix: update visibility instead of delete
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Apr 11, 2024
1 parent c698d45 commit a49af3a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/modules/modEasyURL.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ public function init($options = ''): int

$extraFields = new ExtraFields($this->db);

$extraFields->update('easy_url_signature_link', 'EasyUrlSignatureLink', 'url', '', 'propal', 0, 0, 2000, '', '', '', 0, 'EasyUrlLinkHelp', '', '', 0, 'easyurl@easyurl');
$extraFields->update('easy_url_payment_link', 'EasyUrlPaymentLink', 'url', '', 'commande', 0, 0, 2000, '', '', '', 0, 'EasyUrlLinkHelp', '', '', 0, 'easyurl@easyurl');
$extraFields->update('easy_url_payment_link', 'EasyUrlPaymentLink', 'url', '', 'facture', 0, 0, 2000, '', '', '', 0, 'EasyUrlLinkHelp', '', '', 0, 'easyurl@easyurl');
$extraFields->update('easy_url_signature_link', 'EasyUrlSignatureLink', 'url', '', 'contrat', 0, 0, 2000, '', '', '', 0, 'EasyUrlLinkHelp', '', '', 0, 'easyurl@easyurl');
$extraFields->update('easy_url_signature_link', 'EasyUrlSignatureLink', 'url', '', 'fichinter', 0, 0, 2000, '', '', '', 0, 'EasyUrlLinkHelp', '', '', 0, 'easyurl@easyurl');

// All element type extrafields
$shortenerUrlTypeDictionaries = saturne_fetch_dictionary('c_shortener_url_type');
$objectsMetadata = saturne_get_objects_metadata();
Expand Down Expand Up @@ -448,9 +454,7 @@ public function init($options = ''): int
}
}
}
$extraFields->delete('easy_url_signature_link', $objectMetadata['table_element']);
$extraFields->delete('easy_url_payment_link', $objectMetadata['table_element']);
$extraFields->delete('easy_url_all_link', $objectMetadata['table_element']);
$extraFields->update('easy_url_all_link', 'EasyUrlAllLink', 'url', '', $objectMetadata['table_element'], 0, 0, 2100, '', '', '', 0, 'EasyUrlAllLinkHelp', '', '', 0, 'easyurl@easyurl');
}

dolibarr_set_const($this->db, 'EASYURL_BACKWARD_EXTRAFIELDS', 1, 'integer', 0, '', $conf->entity);
Expand Down

0 comments on commit a49af3a

Please sign in to comment.