From 7183bfeb940878e64eafc4e8262c40f1de4db134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 09:15:35 +0100 Subject: [PATCH] fix new boxes add --- htdocs/core/boxes/box_members_last_modified.php | 6 +++--- htdocs/core/boxes/box_members_last_subscriptions.php | 6 +++--- htdocs/core/modules/modAdherent.class.php | 8 ++++---- htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 5 +++++ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/htdocs/core/boxes/box_members_last_modified.php b/htdocs/core/boxes/box_members_last_modified.php index 9ec1bf70558..1315ac9895b 100644 --- a/htdocs/core/boxes/box_members_last_modified.php +++ b/htdocs/core/boxes/box_members_last_modified.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/boxes/box_last_modified_members.php + * \file htdocs/core/boxes/box_members_last_modified.php * \ingroup adherent * \brief Module to show box of members */ @@ -30,9 +30,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** * Class to manage the box to show last modofied members */ -class box_last_modified_members extends ModeleBoxes +class box_members_last_modified extends ModeleBoxes { - public $boxcode = "box_last_modified_members"; + public $boxcode = "box_members_last_modified"; public $boximg = "object_user"; public $boxlabel = "BoxLastModifiedMembers"; public $depends = array("adherent"); diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php index 0b2cb02d920..6da20bf28d0 100644 --- a/htdocs/core/boxes/box_members_last_subscriptions.php +++ b/htdocs/core/boxes/box_members_last_subscriptions.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/boxes/box_last_members_subscriptions.php + * \file htdocs/core/boxes/box_members_last_subscriptions.php * \ingroup adherent * \brief Module to show box of members */ @@ -30,9 +30,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** * Class to manage the box to show last modofied members */ -class box_last_members_subscriptions extends ModeleBoxes +class box_members_last_subscriptions extends ModeleBoxes { - public $boxcode = "box_last_members_subscriptions"; + public $boxcode = "box_members_last_subscriptions"; public $boximg = "object_user"; public $boxlabel = "BoxLastMembersSubscriptions"; public $depends = array("adherent"); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 74c67d217d6..57ec76e319d 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -194,10 +194,10 @@ class modAdherent extends DolibarrModules $this->boxes = array( 0 => array('file'=>'box_members.php', 'enabledbydefaulton'=>'Home'), 2 => array('file'=>'box_birthdays_members.php', 'enabledbydefaulton'=>'Home'), - 3 => array('file'=>'box_members_last_modified', 'enabledbydefaulton'=>'membersindex'), - 4 => array('file'=>'box_members_last_subscriptions', 'enabledbydefaulton'=>'membersindex'), - 5 => array('file'=>'box_members_subscriptions_by_year', 'enabledbydefaulton'=>'membersindex'), - 6 => array('file'=>'box_members_by_type', 'enabledbydefaulton'=>'membersindex'), + 3 => array('file'=>'box_members_last_modified.php', 'enabledbydefaulton'=>'membersindex'), + 4 => array('file'=>'box_members_last_subscriptions.php', 'enabledbydefaulton'=>'membersindex'), + 5 => array('file'=>'box_members_subscriptions_by_year.php', 'enabledbydefaulton'=>'membersindex'), + 6 => array('file'=>'box_members_by_type.php', 'enabledbydefaulton'=>'membersindex'), ); // Permissions diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 2e60f214c77..0f1706f011e 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -77,6 +77,11 @@ ALTER TABLE llx_facture MODIFY COLUMN date_valid DATETIME NULL DEFAULT NULL; -- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_dolibarr_state_board.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_dolibarr_state_board.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_modified.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_modified.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_subscriptions.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_subscriptions.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_subscriptions_by_year.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_subscriptions_by_year.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_by_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_by_type.php' AND entity = 1); + ALTER TABLE llx_website ADD COLUMN lastaccess datetime NULL; ALTER TABLE llx_website ADD COLUMN pageviews_month BIGINT UNSIGNED DEFAULT 0;