diff --git a/.easya_info.json b/.easya_info.json new file mode 100644 index 0000000000000000000000000000000000000000..a1db5f1493a14c9a94b3e8cf59e400e950e37b58 --- /dev/null +++ b/.easya_info.json @@ -0,0 +1,6 @@ +{ + "dlb_min_version": 14, + "dlb_max_version": 18, + "php_min_version": 7.1, + "php_max_version": 8.2 +} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..70cee73706cac824bb17ba0f1ce2ce44dc49cc3d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,3 @@ +include: + - project: "opendsi/ci-templates" + file: "/dolibarr/module/main.yml" \ No newline at end of file diff --git a/ChangeLog.md b/ChangeLog.md index 3d075320f2d9f25b57ff571e024d23e994928c4f..e6a7fd34ba3532050641dd45583f20d6f952bd80 100755 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,15 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co ## [Non Distribué] +## [14.0.3] - 07-06-2024 +- Ajout version php. + +## [14.0.2] - 05-06-2024 +- Correction version. + +## [14.0.1] - 28-05-2024 +- Changement de marque, support, CI. + ## [14.0.0] - 23-02-2024 - Changement de numérotation @@ -24,8 +33,11 @@ Le format du fichier est basé sur [Tenez un ChangeLog](http://keepachangelog.co ## [1.0.0] - 20-01-2021 - Version initiale. -[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/compare/v1.0.5...HEAD -[14.0.0]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/v14.0.0 +[Non Distribué]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/compare/14.0.3...HEAD +[14.0.3]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/14.0.3 +[14.0.2]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/14.0.2 +[14.0.1]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/14.0.1 +[14.0.0]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/14.0.0 [1.0.5]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/v1.0.5 [1.0.4]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/v1.0.4 [1.0.3]: http://git.open-dsi.fr/dolibarr-extension/openmetabase/commits/v1.0.3 diff --git a/VERSION b/VERSION index 4b964e965400d541bf60329f063e1e999d14b3ec..3b0c3fb7919d6f11e87c30b4b8dbee42ef376055 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -14.0.0 +14.0.3 \ No newline at end of file diff --git a/admin/about.php b/admin/about.php index 6a162590cd5e6a1729269538761e9b37ef1e326b..8fdbe2aa3bf804b609ce456484be2bea0d7128a9 100755 --- a/admin/about.php +++ b/admin/about.php @@ -29,6 +29,7 @@ if (!$res && file_exists('../../../main.inc.php')) $res = @include '../../../ma if (!$res) die('Include of main fails'); require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; dol_include_once('/openmetabase/lib/openmetabase.lib.php'); +dol_include_once('/openmetabase/core/modules/modOpenMetabase.class.php'); $langs->loadLangs(array('admin', 'openmetabase@openmetabase', 'opendsi@openmetabase')); @@ -47,14 +48,35 @@ print '<br>'; $head = openmetabase_admin_prepare_head(); -dol_fiche_head($head, 'about', $langs->trans('About'), 0, 'opendsi@openmetabase'); +print dol_get_fiche_head($head, 'about', $langs->trans("Module163052Name"), 0, 'opendsi@openmetabase'); -print '<table width="100%"><tr>'; -print '<td width="310px"><img src="../img/opendsi_dolibarr_preferred_partner.png" /></td>'; -print '<td align="left" valign="top"><p>' . $langs->trans('OpenDsiAboutDesc') . '</p></td>'; -print '</tr></table>'; +$modClass = new modOpenMetabase($db); +$OpenMetabaseVersion = !empty($modClass->getVersion()) ? $modClass->getVersion() : 'NC'; -dol_fiche_end(); +$supportvalue = "/*****"."<br>"; +$supportvalue.= " * Module : ".$langs->trans("Module163052Name")."<br>"; +$supportvalue.= " * Module version : ".$OpenMetabaseVersion."<br>"; +$supportvalue.= " * Module version installation initiale : ".$OpenMetabaseVersion."<br>"; +$supportvalue.= " * Dolibarr version : ".DOL_VERSION."<br>"; +$supportvalue.= " * Dolibarr version installation initiale : ".$conf->global->MAIN_VERSION_LAST_INSTALL."<br>"; +$supportvalue.= " * Version PHP : ".PHP_VERSION."<br>"; +$supportvalue.= " *****/"."<br>"; +$supportvalue.= "Description de votre problème :"."<br>"; + +print '<table width="100%">'; +print '<tr>'; +print '<form id="ticket" method="POST" target="_blank" action="https://support.easya.solutions/create_ticket.php">'; +print '<input name=message type="hidden" value="'.$supportvalue.'" />'; +print '<input name=email type="hidden" value="'.$user->email.'" />'; +print '<td class="titlefield center"><img alt="Easya Solutions" src="../img/opendsi_dolibarr_preferred_partner.png" /></td>'."\n"; +print '<td class="left"><p>'.$langs->trans("OpenDsiAboutDesc1").' <button type="submit" >'.$langs->trans("OpenDsiAboutDesc2").'</button> '.$langs->trans("OpenDsiAboutDesc3").'</p></td>'."\n"; +print '</tr>'."\n"; +print '</table>'."\n"; + +print '<br>'."\n"; + + +print dol_get_fiche_end(); llxFooter(); diff --git a/admin/changelog.php b/admin/changelog.php index 054f7f9f9883215211a1c73cc29bc365302840ed..b861ac35654b94db0c78e67befcb4d363af39cd6 100755 --- a/admin/changelog.php +++ b/admin/changelog.php @@ -48,7 +48,7 @@ print '<br>'; $head = openmetabase_admin_prepare_head(); -dol_fiche_head($head, 'changelog', $langs->trans('OpenDsiChangeLog'), 0, 'opendsi@openmetabase'); +print dol_get_fiche_head($head, 'changelog', $langs->trans("Module163052Name"), 0, 'opendsi@openmetabase'); $changelog = opendsi_common_getChangeLog('openmetabase'); @@ -56,7 +56,7 @@ print '<div class="moduledesclong">'; print (!empty($changelog) ? $changelog : $langs->trans('NotAvailable')); print '<div>'; -dol_fiche_end(); +print dol_get_fiche_end(); llxFooter(); diff --git a/core/modules/modOpenMetabase.class.php b/core/modules/modOpenMetabase.class.php index fd0412aebd2efcc0f7004adbf5f22785b0db6e88..b92e1172773a8a6678fcb52ea73ada45453e0a95 100755 --- a/core/modules/modOpenMetabase.class.php +++ b/core/modules/modOpenMetabase.class.php @@ -66,17 +66,29 @@ class modOpenMetabase extends DolibarrModules // Module description, used if translation string 'ModuleXXXDesc' not found (where XXX is value of numeric property 'numero' of module) $this->description = "Description of module OpenMetabase"; $this->descriptionlong = ""; - $this->editor_name = 'Open-DSI'; - $this->editor_url = 'http://www.open-dsi.fr'; + $this->editor_name = '<b>Easya Solutions</b>'; + $this->editor_web = 'https://easya.solutions'; + $this->editor_url = "https://easya.solutions"; + $this->editor_email = 'support@easya.solutions'; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' - $this->version = '1.0.5'; + $this->version = file_get_contents(__DIR__.'/../../VERSION'); + $this->url_last_version = 'https://git.open-dsi.fr/dolibarr-extension/'.strtolower($this->name).'/-/raw/2024/VERSION'; // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) + + $easya_info = json_decode(file_get_contents(__DIR__.'/../../.easya_info.json')); + $this->phpmin = explode('.', $easya_info->php_min_version); // Minimum version of PHP required by module + $this->need_dolibarr_version = explode('.', $easya_info->dlb_min_version); // Minimum version of Dolibarr required by module + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of image file used for this module. // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' - $this->picto='opendsi@openmetabase'; + if((float)DOL_VERSION <= 11.0) { + $this->picto='opendsi@'.strtolower($this->name); + } else { + $this->picto='opendsi_big@'.strtolower($this->name); + } // Defined all module parts (triggers, login, substitutions, menus, css, etc...) // for default path (eg: /mymodule/core/xxxxx) (0=disable, 1=enable) @@ -112,8 +124,8 @@ class modOpenMetabase extends DolibarrModules $this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->requiredby = array(); // List of modules id to disable if this one is disabled $this->conflictwith = array(); // List of modules id this module is in conflict with - $this->phpmin = array(5,0); // Minimum version of PHP required by module - $this->need_dolibarr_version = array(4,0); // Minimum version of Dolibarr required by module + // $this->phpmin = array(5,0); // Minimum version of PHP required by module + // $this->need_dolibarr_version = array(4,0); // Minimum version of Dolibarr required by module $this->langfiles = array("openmetabase@openmetabase", "opendsi@openmetabase"); $langs->load('openmetabase@openmetabase'); diff --git a/easya_version.json b/easya_version.json deleted file mode 100644 index 6a2581bb01c14deaa0d0ef92841450a41a164704..0000000000000000000000000000000000000000 --- a/easya_version.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "dol_min": 14, - "dol_max": 18 -} diff --git a/img/object_opendsi.png b/img/object_opendsi.png index aef508af5f33ddff31d4109e58df3e6fe1cb3142..57330480ea30081971cecfe905a3ed08eda34d69 100644 Binary files a/img/object_opendsi.png and b/img/object_opendsi.png differ diff --git a/img/object_opendsi_big.png b/img/object_opendsi_big.png index 9a1c90a64aba49c2def7caa9561052ff1225cb42..6ed22cdcbaeb3e942d286e924be0b10aa64f767c 100644 Binary files a/img/object_opendsi_big.png and b/img/object_opendsi_big.png differ diff --git a/img/opendsi_dolibarr_preferred_partner.png b/img/opendsi_dolibarr_preferred_partner.png index c94f5a01c0dc9407949710871526b6a5d701bb31..2b541614c833317c003be64b8b01d057ff365fde 100644 Binary files a/img/opendsi_dolibarr_preferred_partner.png and b/img/opendsi_dolibarr_preferred_partner.png differ diff --git a/langs/fr_FR/opendsi.lang b/langs/fr_FR/opendsi.lang index 44cdedbebb15434b44780d03b9398c50ace76213..f145edd0ee84020fb9eabfb26226f86596dbf966 100755 --- a/langs/fr_FR/opendsi.lang +++ b/langs/fr_FR/opendsi.lang @@ -1,5 +1,7 @@ # Dolibarr language file - fr_FR - opendsi CHARSET=UTF-8 OpenDsiFamily=Open-DSI -OpenDsiAboutDesc=Ce module a été développé par <a href="http://www.open-dsi.fr" target="_blank">Open-DSI</a><br>Vous pouvez trouver la documentation sur notre <a href="http://wiki.open-dsi.fr/index.php/Accueil" target="_blank">wiki</a><br><br>Pour toute question technique ou retour, contactez-nous sur <a href="mailto:support@open-dsi.fr">support@open-dsi.fr</a><br><br>Pour toute question commerciale, contactez-nous sur <a href="mailto:contact@open-dsi.fr">contact@open-dsi.fr</a> ou au +33 4 82 53 94 76<br><br>Retrouvez nos autres modules sur <a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=open-dsi&submit_search=Rechercher" target="_blank">Dolistore</a> OpenDsiChangeLog=Fichier de log +OpenDsiAboutDesc1=Ce module a été développé par <a href="https://easya.solutions" target="_blank">Easya Solutions</a><br><br>Pour toute question technique ou retour, déposez une demande de support sur +OpenDsiAboutDesc2=notre support +OpenDsiAboutDesc3=<br><br>Pour toute question commerciale, contactez-nous sur <a href="mailto:info@easya.solutions">info@easya.solutions</a> ou au +33 4 82 53 94 76<br><br>Retrouvez nos autres modules sur <a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=easya&submit_search=Rechercher" target="_blank">Dolistore</a> diff --git a/langs/fr_FR/openmetabase.lang b/langs/fr_FR/openmetabase.lang index aedec4a8160e894025f4b5765ae728e87f17794f..54a5f9cadd3565f54d114f9c10ad057511e5ca2f 100755 --- a/langs/fr_FR/openmetabase.lang +++ b/langs/fr_FR/openmetabase.lang @@ -20,6 +20,8 @@ OpenMetabaseDatabaseNameName = Nom de la base de donnée OpenMetabaseDatabaseNameDesc = Nom de la base de donnée où le dump doit être restauré OpenMetabaseRestoreOptionsName = Options de restauration OpenMetabaseRestoreOptionsDesc = Options de restauration (Disponibles: 'pgsql_dump_format') +OpenMetabaseSetup = Configuration du module OpenMetabase +OpenMetabaseSetupPage = Page de configuration du module OpenMetabase ####################################################################### # Cron diff --git a/lib/openmetabase.lib.php b/lib/openmetabase.lib.php index 6159e81f338b605c57b2c020aadf8bd6eddf993c..a5b8c4509478a2ffa9df8d87b3ba0a7380b42db9 100755 --- a/lib/openmetabase.lib.php +++ b/lib/openmetabase.lib.php @@ -40,7 +40,7 @@ function openmetabase_admin_prepare_head() $h++; $head[$h][0] = dol_buildpath("/openmetabase/admin/about.php", 1); - $head[$h][1] = $langs->trans("About"); + $head[$h][1] = $langs->trans("About") . " / " . $langs->trans("Support"); $head[$h][2] = 'about'; $h++;