From 5933f879cc684188ca6dee97175b898008650d84 Mon Sep 17 00:00:00 2001 From: JustCarmen Date: Fri, 20 May 2016 23:19:36 +0200 Subject: [PATCH] webtrees has introduced new class constants for custom module version and website. Change our custom module definitions into webtrees defaults. --- module.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module.php b/module.php index c0a0e0d..939c16e 100644 --- a/module.php +++ b/module.php @@ -28,7 +28,6 @@ use JustCarmen\WebtreesAddOns\FancyTreeviewPdf\Template\AdminTemplate; use JustCarmen\WebtreesAddOns\FancyTreeviewPdf\Template\PdfTemplate; -define('FTV_PDF_VERSION', '1.7.5-dev'); define('FTV_COMPATIBLE_VERSION', '1.7.5-dev'); // this module works with this Fancy Treeview version or higher. /** @@ -45,7 +44,7 @@ function intVersion($version) { } } -if (!file_exists(WT_MODULES_DIR . 'fancy_treeview') || (file_exists(WT_MODULES_DIR . 'fancy_treeview') && intVersion(FTV_COMPATIBLE_VERSION) > intVersion(FTV_VERSION))) { +if (!file_exists(WT_MODULES_DIR . 'fancy_treeview') || (file_exists(WT_MODULES_DIR . 'fancy_treeview') && intVersion(FTV_COMPATIBLE_VERSION) > intVersion(FancyTreeviewModule::CUSTOM_VERSION))) { if (Auth::isAdmin()) { FlashMessages::addMessage(I18N::translate('You have installed the Fancy Treeview PDF module. This module won’t work without the correct version of the Fancy Treeview module installed and enabled. Please install and enable Fancy Treeview version %s or higher to use this module. Click here to download the latest release.', FTV_COMPATIBLE_VERSION)); } @@ -61,6 +60,9 @@ function intVersion($version) { } class FancyTreeviewPdfModule extends FancyTreeviewModule { + + const CUSTOM_VERSION = '1.7.5-dev'; + const CUSTOM_WEBSITE = 'http://www.justcarmen.nl/fancy-modules/fancy-treeview-pdf/'; /** {@inheritdoc} */ public function __construct() { @@ -85,7 +87,7 @@ public function getTitle() { /** {@inheritdoc} */ public function getDescription() { - return /* I18N: Description of the module */ I18N::translate('Fancy Treeview module extension: offer your users to download a Fancy Treeview page as PDF.') . '
' . I18N::translate('Version') . ' ' . FTV_PDF_VERSION . ' | by JustCarmen | ' . I18N::translate('Show details') . ''; + return /* I18N: Description of the module */ I18N::translate('Fancy Treeview module extension: offer your users to download a Fancy Treeview page as PDF.'); } /** {@inheritdoc} */