From ac8c79bf9e8c8d86bae686f6c0d129f491778318 Mon Sep 17 00:00:00 2001 From: bohwaz Date: Wed, 13 Sep 2023 15:24:46 +0200 Subject: [PATCH] No need for menuItem signal now --- install.php | 2 -- lib/Facture.php | 5 ----- plugin.ini | 4 +++- upgrade.php | 4 ++-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/install.php b/install.php index 9393594..81250a2 100644 --- a/install.php +++ b/install.php @@ -6,5 +6,3 @@ use Paheko\Plugin\Facturation\Facture; $db = DB::getInstance(); $db->import(dirname(__FILE__) . "/data/schema.sql"); - -$plugin->registerSignal('menu.item', [Facture::class, 'menuItem']); \ No newline at end of file diff --git a/lib/Facture.php b/lib/Facture.php index 4cf07c9..5ad987e 100644 --- a/lib/Facture.php +++ b/lib/Facture.php @@ -523,9 +523,4 @@ class Facture { return DB::getInstance()->delete('plugin_facturation_factures', 'id = '. (int)$id); } - - public static function menuItem(array $params, array &$list): void - { - $list['plugin_facturation'] = sprintf('Facturation', \Paheko\ADMIN_URL); - } } diff --git a/plugin.ini b/plugin.ini index 845bb29..de76af4 100644 --- a/plugin.ini +++ b/plugin.ini @@ -2,6 +2,8 @@ name="Facturation" description="Permet d'éditer des factures, devis et reçus à ses membres ainsi qu'à une base de clients supplémentaire." author="zou" url="https://gitlab.com/noizette/garradin-plugin-facturation/" -version="0.8.0" +version="0.8.1" menu=true +restrict_section="accounting" +restrict_level="read" min_version="1.2.0" \ No newline at end of file diff --git a/upgrade.php b/upgrade.php index 9a38d0d..c2ec1b8 100644 --- a/upgrade.php +++ b/upgrade.php @@ -201,7 +201,7 @@ if (version_compare($version, '0.7.1', '<')) } // 0.7.4 - Signal menu item -if (version_compare($version, '0.7.4', '<')) +if (version_compare($version, '0.8.1', '<')) { - $plugin->registerSignal('menu.item', [Facture::class, 'menuItem']); + $plugin->unregisterSignal('menu.item'); } \ No newline at end of file