Skip to content

Commit

Permalink
Evarisk#3819 [Risk] fix: clean code after environmental integration
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Apr 17, 2024
1 parent 761018d commit cd28875
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion class/actions_digiriskdolibarr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function printCommonFooter($parameters)
$fileDir = $upload_dir . '/' . $dirFiles;
$urlSource = $_SERVER['PHP_SELF'] . '?id=' . $object->id;

$out = saturne_show_documents('digiriskdolibarr:TicketDocument', $dirFiles, $fileDir, $urlSource, $user->rights->ticket->write, $user->rights->ticket->delete, getDolGlobalString('DIGIRISKDOLIBARR_TICKET_DEFAULT_MODEL'), 1, 0, 0, 0, '', '', '', '', '', $object); ?>
$out = saturne_show_documents('digiriskdolibarr:TicketDocument', $dirFiles, $fileDir, $urlSource, $user->rights->ticket->write, $user->rights->ticket->delete, getDolGlobalString('DIGIRISKDOLIBARR_TICKETDOCUMENT_DEFAULT_MODEL'), 1, 0, 0, 0, '', '', '', '', '', $object); ?>

<script>
jQuery('.fichehalfleft .div-table-responsive-no-min').first().append(<?php echo json_encode($out); ?>);
Expand Down
3 changes: 1 addition & 2 deletions core/tpl/digiriskdolibarr_projectcreation_action.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,7 @@

// CONST LISTING RISKS ACTION
dolibarr_set_const($db, 'MAIN_AGENDA_ACTIONAUTO_LISTINGRISKSACTION_CREATE', 1, 'integer', 0, '', $conf->entity);
dolibarr_set_const($db, 'DIGIRISKDOLIBARR_LISTINGRISKSACTION_ADDON',
'mod_listingrisksenvironmentalaction_standard', 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'DIGIRISKDOLIBARR_LISTINGRISKSACTION_ADDON', 'mod_listingrisksenvironmentalaction_standard', 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'DIGIRISKDOLIBARR_LISTINGRISKSACTION_ADDON_ODT_PATH', 'DOL_DOCUMENT_ROOT/custom/digiriskdolibarr/documents/doctemplates/listingrisksaction/', 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'DIGIRISKDOLIBARR_LISTINGRISKSACTION_CUSTOM_ADDON_ODT_PATH', 'DOL_DATA_ROOT/ecm/digiriskdolibarr/listingrisksaction/', 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, 'DIGIRISKDOLIBARR_LISTINGRISKSACTION_DEFAULT_MODEL', 'listingrisksaction_odt', 'chaine', 0, '', $conf->entity);
Expand Down
2 changes: 1 addition & 1 deletion sql/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -915,4 +915,4 @@ INSERT INTO llx_c_digiriskdolibarr_action_trigger (rowid, entity, elementtype, r
INSERT INTO llx_c_digiriskdolibarr_action_trigger (rowid, entity, elementtype, ref, label, description, active, position) VALUES (78, 0, 'auditreportdocument@digiriskdolibarr', 'AUDITREPORTDOCUMENT_GENERATE', 'AuditReportDocumentGenerated', 'Executed when a audit report document is generated', 1, 91);

-- 10.0.0
INSERT INTO llx_c_digiriskdolibarr_action_trigger (rowid, entity, elementtype, ref, label, description, active, position) VALUES (79, 0, 'listingrisksenvironmentalaction@digiriskdolibarr', 'LISTINGRISKSENVIRONMENTALACTION_GENERATE', 'listingRisksEnvironmentalActionGenerated', 'Executed when a listing risks environmental action is generated', 1, 82);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (rowid, entity, elementtype, ref, label, description, active, position) VALUES (79, 0, 'listingrisksenvironmentalaction@digiriskdolibarr', 'LISTINGRISKSENVIRONMENTALACTION_GENERATE', 'ListingRisksEnvironmentalActionGenerated', 'Executed when a listing risks environmental action is generated', 1, 82);
2 changes: 0 additions & 2 deletions view/digiriskelement/digiriskelement_risk.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@
$extrafields = new ExtraFields($db);
$DUProject = new Project($db);

$risk->type = $riskType;

$numberingModuleName = [
'riskanalysis/' . $risk->element => $conf->global->DIGIRISKDOLIBARR_RISK_ADDON,
'riskanalysis/' . $evaluation->element => $conf->global->DIGIRISKDOLIBARR_RISKASSESSMENT_ADDON,
Expand Down

0 comments on commit cd28875

Please sign in to comment.