From a26c2cbcdb345889a57a99983c6b45980241697c Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 28 Jul 2020 10:46:25 +0200 Subject: [PATCH 1/6] :memo: Add phpdoc on DBObjectSearch method --- core/dbobjectsearch.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/dbobjectsearch.class.php b/core/dbobjectsearch.class.php index ddf88be2a..ed54e4f5a 100644 --- a/core/dbobjectsearch.class.php +++ b/core/dbobjectsearch.class.php @@ -859,10 +859,14 @@ class DBObjectSearch extends DBSearch } /** - * @param DBObjectSearch $oFilter - * @param $sExtKeyAttCode + * Add a link to another filter, using an extkey already present in current filter + * + * @param DBObjectSearch $oFilter filter to join to + * @param string $sExtKeyAttCode extkey present in current filter, that allows to points to $oFilter * @param int $iOperatorCode - * @param null $aRealiasingMap array of => , for each alias that has changed + * @param array $aRealiasingMap array of => , for each alias that has changed. + * Doesn't change existing alias, use {@link \DBObjectSearch::RenameAlias()} for that. + * * @throws CoreException * @throws CoreWarning */ From 90b60f90ae79ac67a2c38057292fc4f7e9fd4f02 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 28 Jul 2020 11:40:07 +0200 Subject: [PATCH 2/6] Update files version to 2.8.0 --- core/config.class.inc.php | 2 +- css/css-variables.scss | 2 +- datamodels/2.x/authent-cas/module.authent-cas.php | 2 +- datamodels/2.x/authent-external/module.authent-external.php | 2 +- datamodels/2.x/authent-ldap/module.authent-ldap.php | 2 +- datamodels/2.x/authent-local/module.authent-local.php | 2 +- datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php | 2 +- datamodels/2.x/itop-attachments/module.itop-attachments.php | 2 +- datamodels/2.x/itop-backup/module.itop-backup.php | 2 +- .../module.itop-bridge-virtualization-storage.php | 2 +- .../2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php | 2 +- datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php | 2 +- datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php | 2 +- datamodels/2.x/itop-config/module.itop-config.php | 2 +- datamodels/2.x/itop-core-update/module.itop-core-update.php | 2 +- .../2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php | 2 +- .../2.x/itop-endusers-devices/module.itop-endusers-devices.php | 2 +- .../itop-files-information/module.itop-files-information.php | 2 +- datamodels/2.x/itop-full-itil/module.itop-full-itil.php | 2 +- datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php | 2 +- .../itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php | 2 +- .../2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php | 2 +- datamodels/2.x/itop-portal-base/module.itop-portal-base.php | 2 +- datamodels/2.x/itop-portal/module.itop-portal.php | 2 +- datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php | 2 +- datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php | 2 +- .../itop-request-mgmt-itil/module.itop-request-mgmt-itil.php | 2 +- datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php | 2 +- .../module.itop-service-mgmt-provider.php | 2 +- datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php | 2 +- .../2.x/itop-sla-computation/module.itop-sla-computation.php | 2 +- datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php | 2 +- datamodels/2.x/itop-tickets/module.itop-tickets.php | 2 +- .../module.itop-virtualization-mgmt.php | 2 +- datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php | 2 +- datamodels/2.x/version.xml | 2 +- 36 files changed, 36 insertions(+), 36 deletions(-) diff --git a/core/config.class.inc.php b/core/config.class.inc.php index f6677e43e..c007c5548 100644 --- a/core/config.class.inc.php +++ b/core/config.class.inc.php @@ -22,7 +22,7 @@ define('ITOP_APPLICATION', 'iTop'); define('ITOP_APPLICATION_SHORT', 'iTop'); -define('ITOP_VERSION', '2.7.0-dev'); +define('ITOP_VERSION', '2.8.0-dev'); define('ITOP_REVISION', 'svn'); define('ITOP_BUILD_DATE', '$WCNOW$'); define('ITOP_VERSION_FULL', ITOP_VERSION.'-'.ITOP_REVISION); diff --git a/css/css-variables.scss b/css/css-variables.scss index 1df379aca..8a752928f 100644 --- a/css/css-variables.scss +++ b/css/css-variables.scss @@ -17,7 +17,7 @@ */ // Beware the version number MUST be enclosed with quotes otherwise v2.3.0 becomes v2 0.3 .0 -$version: "v2.7.1"; +$version: "v2.8.0"; $approot-relative: "../../../../../" !default; // relative to env-***/branding/themes/***/main.css // Base colors diff --git a/datamodels/2.x/authent-cas/module.authent-cas.php b/datamodels/2.x/authent-cas/module.authent-cas.php index b0cf2aa1d..39c70f50a 100644 --- a/datamodels/2.x/authent-cas/module.authent-cas.php +++ b/datamodels/2.x/authent-cas/module.authent-cas.php @@ -5,7 +5,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-cas/2.7.0', + 'authent-cas/2.8.0', array( // Identification // diff --git a/datamodels/2.x/authent-external/module.authent-external.php b/datamodels/2.x/authent-external/module.authent-external.php index 3b64a078c..e0a0cd6c5 100755 --- a/datamodels/2.x/authent-external/module.authent-external.php +++ b/datamodels/2.x/authent-external/module.authent-external.php @@ -27,7 +27,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-external/2.7.0', + 'authent-external/2.8.0', array( // Identification // diff --git a/datamodels/2.x/authent-ldap/module.authent-ldap.php b/datamodels/2.x/authent-ldap/module.authent-ldap.php index 33bcf5303..4a3d5cdc4 100755 --- a/datamodels/2.x/authent-ldap/module.authent-ldap.php +++ b/datamodels/2.x/authent-ldap/module.authent-ldap.php @@ -9,7 +9,7 @@ if (function_exists('ldap_connect')) SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-ldap/2.7.0', + 'authent-ldap/2.8.0', array( // Identification // diff --git a/datamodels/2.x/authent-local/module.authent-local.php b/datamodels/2.x/authent-local/module.authent-local.php index 3afea00b6..1dd520fbf 100755 --- a/datamodels/2.x/authent-local/module.authent-local.php +++ b/datamodels/2.x/authent-local/module.authent-local.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'authent-local/2.7.1', + 'authent-local/2.8.0', array( // Identification // diff --git a/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php b/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php index f71a05de1..c95e85d9c 100644 --- a/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php +++ b/datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php @@ -24,7 +24,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'combodo-db-tools/2.7.1', + 'combodo-db-tools/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-attachments/module.itop-attachments.php b/datamodels/2.x/itop-attachments/module.itop-attachments.php index 86e13fb5c..19593f0b7 100644 --- a/datamodels/2.x/itop-attachments/module.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/module.itop-attachments.php @@ -19,7 +19,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-attachments/2.7.1', + 'itop-attachments/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-backup/module.itop-backup.php b/datamodels/2.x/itop-backup/module.itop-backup.php index e20b00359..ca0c58182 100644 --- a/datamodels/2.x/itop-backup/module.itop-backup.php +++ b/datamodels/2.x/itop-backup/module.itop-backup.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-backup/2.7.1', + 'itop-backup/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php b/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php index 965b786ae..e3c7adba1 100644 --- a/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php +++ b/datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-bridge-virtualization-storage/2.7.0', + 'itop-bridge-virtualization-storage/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php b/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php index 5b75ee686..e7f47f384 100755 --- a/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php +++ b/datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-change-mgmt-itil/2.7.0', + 'itop-change-mgmt-itil/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php b/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php index 93383ba26..a095feebc 100755 --- a/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php +++ b/datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-change-mgmt/2.7.0', + 'itop-change-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php b/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php index 0318a61ff..6ae525f15 100755 --- a/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php +++ b/datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-config-mgmt/2.7.1', + 'itop-config-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-config/module.itop-config.php b/datamodels/2.x/itop-config/module.itop-config.php index 0f070bbcc..cddfe4c3f 100644 --- a/datamodels/2.x/itop-config/module.itop-config.php +++ b/datamodels/2.x/itop-config/module.itop-config.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-config/2.7.0', + 'itop-config/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-core-update/module.itop-core-update.php b/datamodels/2.x/itop-core-update/module.itop-core-update.php index 78f62fc5e..e3dd60013 100644 --- a/datamodels/2.x/itop-core-update/module.itop-core-update.php +++ b/datamodels/2.x/itop-core-update/module.itop-core-update.php @@ -24,7 +24,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-core-update/2.7.1', + 'itop-core-update/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php b/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php index 44b4ff158..7998563a7 100755 --- a/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php +++ b/datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php @@ -18,7 +18,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-datacenter-mgmt/2.7.0', + 'itop-datacenter-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php b/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php index af97065c8..97f31ed1d 100644 --- a/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php +++ b/datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php @@ -25,7 +25,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-endusers-devices/2.7.0', + 'itop-endusers-devices/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-files-information/module.itop-files-information.php b/datamodels/2.x/itop-files-information/module.itop-files-information.php index 75d9e211b..15080edfd 100644 --- a/datamodels/2.x/itop-files-information/module.itop-files-information.php +++ b/datamodels/2.x/itop-files-information/module.itop-files-information.php @@ -24,7 +24,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-files-information/2.7.1', + 'itop-files-information/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-full-itil/module.itop-full-itil.php b/datamodels/2.x/itop-full-itil/module.itop-full-itil.php index 5a4ed0da6..bd7e5a7d2 100644 --- a/datamodels/2.x/itop-full-itil/module.itop-full-itil.php +++ b/datamodels/2.x/itop-full-itil/module.itop-full-itil.php @@ -6,7 +6,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-full-itil/2.7.0', + 'itop-full-itil/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php b/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php index e25a4804a..6edc0d6d9 100644 --- a/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php +++ b/datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php @@ -5,7 +5,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-hub-connector/2.7.0', + 'itop-hub-connector/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php b/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php index ed4cb3c3c..8fe0ff2c7 100755 --- a/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php +++ b/datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-incident-mgmt-itil/2.7.0', + 'itop-incident-mgmt-itil/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php b/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php index 10a1c8d31..1c8217a0f 100755 --- a/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php +++ b/datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-knownerror-mgmt/2.7.0', + 'itop-knownerror-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-portal-base/module.itop-portal-base.php b/datamodels/2.x/itop-portal-base/module.itop-portal-base.php index 33300d783..35c6a6238 100644 --- a/datamodels/2.x/itop-portal-base/module.itop-portal-base.php +++ b/datamodels/2.x/itop-portal-base/module.itop-portal-base.php @@ -20,7 +20,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-portal-base/2.7.1', array( + 'itop-portal-base/2.8.0', array( // Identification 'label' => 'Portal Development Library', 'category' => 'Portal', diff --git a/datamodels/2.x/itop-portal/module.itop-portal.php b/datamodels/2.x/itop-portal/module.itop-portal.php index e4a8dbef5..7d43de806 100644 --- a/datamodels/2.x/itop-portal/module.itop-portal.php +++ b/datamodels/2.x/itop-portal/module.itop-portal.php @@ -20,7 +20,7 @@ /** @noinspection PhpUnhandledExceptionInspection */ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-portal/2.7.0', array( + 'itop-portal/2.8.0', array( // Identification 'label' => 'Enhanced Customer Portal', 'category' => 'Portal', diff --git a/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php b/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php index e583c8f00..132d0dbef 100755 --- a/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php +++ b/datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-problem-mgmt/2.7.0', + 'itop-problem-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php b/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php index 680d05238..31497e2d9 100755 --- a/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php +++ b/datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php @@ -19,7 +19,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-profiles-itil/2.7.0', + 'itop-profiles-itil/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php b/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php index 83dad511d..38c83194e 100755 --- a/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php +++ b/datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-request-mgmt-itil/2.7.0', + 'itop-request-mgmt-itil/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php b/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php index ab1f64583..74550ccb6 100755 --- a/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php +++ b/datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-request-mgmt/2.7.0', + 'itop-request-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php b/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php index 7d3cc65ca..9df9fe668 100755 --- a/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php +++ b/datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-service-mgmt-provider/2.7.1', + 'itop-service-mgmt-provider/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php b/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php index 8db4b5387..4ca0f7e42 100755 --- a/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php +++ b/datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-service-mgmt/2.7.1', + 'itop-service-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php b/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php index 35bda14e0..c1f0829c9 100755 --- a/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php +++ b/datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php @@ -18,7 +18,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-sla-computation/2.7.0', + 'itop-sla-computation/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php b/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php index 5487af8d0..a49cc7135 100644 --- a/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php +++ b/datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php @@ -25,7 +25,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-storage-mgmt/2.7.0', + 'itop-storage-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-tickets/module.itop-tickets.php b/datamodels/2.x/itop-tickets/module.itop-tickets.php index 4be3a3d22..c6fe4c42f 100755 --- a/datamodels/2.x/itop-tickets/module.itop-tickets.php +++ b/datamodels/2.x/itop-tickets/module.itop-tickets.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, - 'itop-tickets/2.7.0', + 'itop-tickets/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php b/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php index 9aa9ec868..061a5c423 100644 --- a/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php +++ b/datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php @@ -16,7 +16,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-virtualization-mgmt/2.7.0', + 'itop-virtualization-mgmt/2.8.0', array( // Identification // diff --git a/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php b/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php index 809acd622..01bf82956 100755 --- a/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php +++ b/datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php @@ -3,7 +3,7 @@ SetupWebPage::AddModule( __FILE__, // Path to the current file, all other file names are relative to the directory containing this file - 'itop-welcome-itil/2.7.1', + 'itop-welcome-itil/2.8.0', array( // Identification // diff --git a/datamodels/2.x/version.xml b/datamodels/2.x/version.xml index dc3738058..5f5ac5376 100755 --- a/datamodels/2.x/version.xml +++ b/datamodels/2.x/version.xml @@ -1,4 +1,4 @@ - 2.7.1 + 2.8.0 From 14505fc5e6dfafc8a63df88fd4334859ef3cbd35 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Wed, 29 Jul 2020 12:22:22 +0200 Subject: [PATCH 3/6] :wrench: Change SlowArrayOperationsInLoopInspection from error to warning --- .idea/inspectionProfiles/Combodo.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/.idea/inspectionProfiles/Combodo.xml b/.idea/inspectionProfiles/Combodo.xml index 763f7a53d..592c1ed95 100644 --- a/.idea/inspectionProfiles/Combodo.xml +++ b/.idea/inspectionProfiles/Combodo.xml @@ -146,6 +146,7 @@ + From ea92973e9b6e94d1a5f34ad44f8ded28bceffe5b Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Tue, 28 Jul 2020 12:20:49 +0200 Subject: [PATCH 4/6] :memo: PHPDoc for DisplayBlock --- application/displayblock.class.inc.php | 27 ++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 2114a8dfb..6159282fb 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -24,15 +24,6 @@ require_once(APPROOT.'/application/utils.inc.php'); * * Each block is actually rendered as a
tag that can be rendered synchronously * or as a piece of Javascript/JQuery/Ajax that will get its content from another page (ajax.render.php). - * The list of cmdbObjects to be displayed into the block is defined by a filter - * Right now the type of display is either: list, count, bare_details, details, csv, modify or search - * - list produces a table listing the objects - * - count produces a paragraphs with a sentence saying 'cont' objects found - * - bare_details displays just the details of the attributes of the object (best if only one) - * - details display the full details of each object found using its template (best if only one) - * - csv displays a textarea with the CSV export of the list of objects - * - modify displays the form to modify an object (best if only one) - * - search displays a search form with the criteria of the filter set */ class DisplayBlock { @@ -45,7 +36,23 @@ class DisplayBlock protected $m_aParams; protected $m_oSet; protected $m_bShowObsoleteData = null; - + + /** + * @param \DBSearch $oFilter list of cmdbObjects to be displayed into the block + * @param string $sStyle one of : + *
    + *
  • list : produces a table listing the objects
  • + *
  • count : produces a paragraphs with a sentence saying 'cont' objects found
  • + *
  • bare_details : displays just the details of the attributes of the object (best if only one)
  • + *
  • details : display the full details of each object found using its template (best if only one)
  • + *
  • csv : displays a textarea with the CSV export of the list of objects
  • + *
  • modify : displays the form to modify an object (best if only one)
  • + *
  • search : displays a search form with the criteria of the filter set
  • + *
+ * @param bool $bAsynchronous + * @param array $aParams + * @param \DBObjectSet $oSet + */ public function __construct(DBSearch $oFilter, $sStyle = 'list', $bAsynchronous = false, $aParams = array(), $oSet = null) { $this->m_oFilter = $oFilter->DeepClone(); From 5d686d733f4d72a487f7f9db47c2c3d2fcfe4127 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 30 Jul 2020 11:33:57 +0200 Subject: [PATCH 5/6] :wrench: Disable useless inspections --- .idea/inspectionProfiles/Combodo.xml | 41 ++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/.idea/inspectionProfiles/Combodo.xml b/.idea/inspectionProfiles/Combodo.xml index 592c1ed95..f28cfada7 100644 --- a/.idea/inspectionProfiles/Combodo.xml +++ b/.idea/inspectionProfiles/Combodo.xml @@ -2,6 +2,12 @@
+ @@ -168,5 +180,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From b58a084de5974713406e8553ed2e0b4e5ca26db5 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Thu, 30 Jul 2020 11:40:54 +0200 Subject: [PATCH 6/6] =?UTF-8?q?N=C2=B02334=20n:n=20relations=20:=20same=20?= =?UTF-8?q?fields=20displayed=20in=20EDIT=20and=20VIEW=20modes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before we were only showing lnk fields in VIEW, and lnk+remote in EDIT (excluding some fields, see below). Now by default (as this is customizable in VIEW mode) we have the same ! Rules to choose fields are moved from \UILinksWidget::__construct to : * \MetaModel::GetZListAttDefsFilteredForIndirectRemoteClass * \MetaModel::GetZListAttDefsFilteredForIndirectLinkClass --- application/cmdbabstract.class.inc.php | 47 ++++++++++++-- application/datatable.class.inc.php | 4 +- application/ui.linkswidget.class.inc.php | 52 +++++++--------- core/metamodel.class.php | 78 +++++++++++++++++++++++- core/ormlinkset.class.inc.php | 19 ++++-- 5 files changed, 160 insertions(+), 40 deletions(-) diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index d0298dc2c..20873b740 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -663,7 +663,30 @@ EOF { // n:n links $oLinkingAttDef = MetaModel::GetAttributeDef($sLinkedClass, $oAttDef->GetExtKeyToRemote()); + $sLinkingAttCode = $oLinkingAttDef->GetCode(); $sTargetClass = $oLinkingAttDef->GetTargetClass(); + + // N°2334 fields to display for n:n relations + $aLnkAttDefsToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectLinkClass($sClass, $sAttCode); + $aRemoteAttDefsToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectRemoteClass($sTargetClass); + $aLnkAttCodesToDisplay = array_map(function ($oLnkAttDef) { + return ormLinkSet::LINK_ALIAS.'.'.$oLnkAttDef->GetCode(); + }, + $aLnkAttDefsToDisplay + ); + if (!in_array(ormLinkSet::LINK_ALIAS.'.'.$sLinkingAttCode, $aLnkAttCodesToDisplay)) + { + // we need to display a link to the remote class instance ! + $aLnkAttCodesToDisplay[] = ormLinkSet::LINK_ALIAS.'.'.$sLinkingAttCode; + } + $aRemoteAttCodesToDisplay = array_map(function ($oRemoteAttDef) { + return ormLinkSet::REMOTE_ALIAS.'.'.$oRemoteAttDef->GetCode(); + }, + $aRemoteAttDefsToDisplay + ); + $aAttCodesToDisplay = array_merge($aLnkAttCodesToDisplay, $aRemoteAttCodesToDisplay); + $sAttCodesToDisplay = implode(',', $aAttCodesToDisplay); + $aParams = array( 'link_attr' => $oAttDef->GetExtKeyToMe(), 'object_id' => $this->GetKey(), @@ -671,8 +694,12 @@ EOF 'view_link' => false, 'menu' => false, //'menu_actions_target' => '_blank', - 'display_limit' => true, // By default limit the list to speed up the initial load & display + // By default limit the list to speed up the initial load & display + 'display_limit' => true, 'table_id' => $sClass.'_'.$sAttCode, + // N°2334 specify fields to display for n:n relations + 'zlist' => false, + 'extra_fields' => $sAttCodesToDisplay, ); } $oPage->p(MetaModel::GetClassIcon($sTargetClass)." ".$oAttDef->GetDescription()); @@ -1286,7 +1313,14 @@ HTML /** * @param \WebPage $oPage * @param \CMDBObjectSet $oSet - * @param array $aExtraParams + * @param array $aExtraParams key used : + *
    + *
  • view_link : if true then for extkey will display links with friendly name and make column sortable, default true + *
  • menu : if true prints DisplayBlock menu, default true + *
  • display_aliases : list of query aliases that will be printed, defaults to [] (displays all) + *
  • zlist : name of the zlist to use, false to disable zlist lookup, default to 'list' + *
  • extra_fields : list of . to add to the result, separator ',', defaults to empty string + *
* * @return string * @throws \CoreException @@ -1365,7 +1399,7 @@ HTML } // Filter the list to removed linked set since we are not able to display them here - foreach($aList[$sAlias] as $index => $sAttCode) + foreach ($aList[$sAlias] as $index => $sAttCode) { $oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode); if ($oAttDef instanceof AttributeLinkedSet) @@ -1374,6 +1408,11 @@ HTML unset($aList[$sAlias][$index]); } } + + if (empty($aList[$sAlias])) + { + unset($aList[$sAlias], $aAuthorizedClasses[$sAlias]); + } } $sSelectMode = 'none'; @@ -3111,7 +3150,7 @@ EOF $this->GetOwnershipJSHandler($oPage, $sOwnershipToken); } - // Note: This part (inline images activation) is duplicated in self::DisplayModifyForm and several other places. Maybe it should be refactored so it automatically activates when an HTML field is present, or be an option of the attribute. See bug n°1240. + // Note: This part (inline images activation) is duplicated in self::DisplayModifyForm and several other places. Maybe it should be refactored so it automatically activates when an HTML field is present, or be an option of the attribute. See bug N°1240. $sTempId = utils::GetUploadTempId($iTransactionId); $oPage->add_ready_script(InlineImage::EnableCKEditorImageUpload($this, $sTempId)); } diff --git a/application/datatable.class.inc.php b/application/datatable.class.inc.php index adbeaecae..226e1d614 100644 --- a/application/datatable.class.inc.php +++ b/application/datatable.class.inc.php @@ -971,13 +971,13 @@ class DataTableSettings implements Serializable * @throws \CoreException * @throws \DictExceptionMissingString */ - static public function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists) + public static function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists) { $oSettings = new DataTableSettings($aClassAliases); // Retrieve the class specific settings for each class/alias based on the 'list' ZList //TODO let the caller pass some other default settings (another Zlist, extre fields...) $aColumns = array(); - foreach($aClassAliases as $sAlias => $sClass) + foreach ($aClassAliases as $sAlias => $sClass) { if ($aDefaultLists == null) { diff --git a/application/ui.linkswidget.class.inc.php b/application/ui.linkswidget.class.inc.php index 2d709ae94..02804fc5d 100644 --- a/application/ui.linkswidget.class.inc.php +++ b/application/ui.linkswidget.class.inc.php @@ -46,7 +46,7 @@ class UILinksWidget * UILinksWidget constructor. * * @param string $sClass - * @param string $sAttCode + * @param string $sAttCode AttributeLinkedSetIndirect attcode * @param int $iInputId * @param string $sNameSuffix * @param bool $bDuplicatesAllowed @@ -73,41 +73,35 @@ class UILinksWidget /** @var AttributeExternalKey $oLinkingAttDef */ $oLinkingAttDef = MetaModel::GetAttributeDef($this->m_sLinkedClass, $this->m_sExtKeyToRemote); $this->m_sRemoteClass = $oLinkingAttDef->GetTargetClass(); - $sExtKeyToMe = $oAttDef->GetExtKeyToMe(); - $sStateAttCode = MetaModel::GetStateAttributeCode($this->m_sClass); - $sDefaultState = MetaModel::GetDefaultState($this->m_sClass); $this->m_aEditableFields = array(); $this->m_aTableConfig = array(); - $this->m_aTableConfig['form::checkbox'] = array( 'label' => "m_sAttCode}{$this->m_sNameSuffix} .selection', this.checked); oWidget".$this->m_iInputId.".OnSelectChange();\">", 'description' => Dict::S('UI:SelectAllToggle+')); + $this->m_aTableConfig['form::checkbox'] = array( + 'label' => "m_sAttCode}{$this->m_sNameSuffix} .selection', this.checked); oWidget".$this->m_iInputId.".OnSelectChange();\">", + 'description' => Dict::S('UI:SelectAllToggle+'), + ); - foreach(MetaModel::FlattenZList(MetaModel::GetZListItems($this->m_sLinkedClass, 'list')) as $sAttCode) + $aLnkAttDefsToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectLinkClass($sClass, $sAttCode); + foreach ($aLnkAttDefsToDisplay as $oLnkAttDef) { - $oAttDef = MetaModel::GetAttributeDef($this->m_sLinkedClass, $sAttCode); - if ($sStateAttCode == $sAttCode) - { - // State attribute is always hidden from the UI - } - else if ($oAttDef->IsWritable() && ($sAttCode != $sExtKeyToMe) && ($sAttCode != $this->m_sExtKeyToRemote) && ($sAttCode != 'finalclass')) - { - $iFlags = MetaModel::GetAttributeFlags($this->m_sLinkedClass, $sDefaultState, $sAttCode); - if ( !($iFlags & OPT_ATT_HIDDEN) && !($iFlags & OPT_ATT_READONLY) ) - { - $this->m_aEditableFields[] = $sAttCode; - $this->m_aTableConfig[$sAttCode] = array( 'label' => $oAttDef->GetLabel(), 'description' => $oAttDef->GetDescription()); - } - } + $sLnkAttCode = $oLnkAttDef->GetCode(); + $this->m_aEditableFields[] = $sLnkAttCode; + $this->m_aTableConfig[$sLnkAttCode] = array('label' => $oLnkAttDef->GetLabel(), 'description' => $oLnkAttDef->GetDescription()); } - - $this->m_aTableConfig['static::key'] = array( 'label' => MetaModel::GetName($this->m_sRemoteClass), 'description' => MetaModel::GetClassDescription($this->m_sRemoteClass)); - foreach(MetaModel::GetZListItems($this->m_sRemoteClass, 'list') as $sFieldCode) + + $this->m_aTableConfig['static::key'] = array( + 'label' => MetaModel::GetName($this->m_sRemoteClass), + 'description' => MetaModel::GetClassDescription($this->m_sRemoteClass), + ); + + $aRemoteAttDefsToDisplay = MetaModel::GetZListAttDefsFilteredForIndirectRemoteClass($this->m_sRemoteClass); + foreach ($aRemoteAttDefsToDisplay as $oRemoteAttDef) { - // TO DO: check the state of the attribute: hidden or visible ? - if ($sFieldCode != 'finalclass') - { - $oAttDef = MetaModel::GetAttributeDef($this->m_sRemoteClass, $sFieldCode); - $this->m_aTableConfig['static::'.$sFieldCode] = array( 'label' => $oAttDef->GetLabel(), 'description' => $oAttDef->GetDescription()); - } + $sRemoteAttCode = $oRemoteAttDef->GetCode(); + $this->m_aTableConfig['static::'.$sRemoteAttCode] = array( + 'label' => $oRemoteAttDef->GetLabel(), + 'description' => $oRemoteAttDef->GetDescription(), + ); } } diff --git a/core/metamodel.class.php b/core/metamodel.class.php index be80e20a9..0c8cdbd98 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -1848,7 +1848,7 @@ abstract class MetaModel * @param string $sClass * @param string $sListCode * - * @return array + * @return array list of attribute codes */ public static function GetZListItems($sClass, $sListCode) { @@ -1868,6 +1868,82 @@ abstract class MetaModel return self::GetZListItems($sParentClass, $sListCode); } + /** + * @param string $sRemoteClass + * + * @return \AttributeDefinition[] list of attdefs to display by default for the remote class + * + * @since 2.8.0 N°2334 + */ + public static function GetZListAttDefsFilteredForIndirectRemoteClass($sRemoteClass) + { + $aAttCodesToPrint = []; + + foreach (MetaModel::GetZListItems($sRemoteClass, 'list') as $sFieldCode) + { + //TODO: check the state of the attribute: hidden or visible ? + if ($sFieldCode == 'finalclass') + { + continue; + } + + $oRemoteAttDef = MetaModel::GetAttributeDef($sRemoteClass, $sFieldCode); + $aAttCodesToPrint[] = $oRemoteAttDef; + } + + return $aAttCodesToPrint; + } + + /** + * @param string $sClass left class + * @param string $sAttCode AttributeLinkedSetIndirect attcode + * + * @return \AttributeDefinition[] list of attdefs to display by default for lnk class + * + * @throws \CoreException + * @since 2.8.0 N°2334 + */ + public static function GetZListAttDefsFilteredForIndirectLinkClass($sClass, $sAttCode) + { + $aAttCodesToPrint = []; + + $oLinkedSetAttDef = MetaModel::GetAttributeDef($sClass, $sAttCode); + $sLinkedClass = $oLinkedSetAttDef->GetLinkedClass(); + $sExtKeyToRemote = $oLinkedSetAttDef->GetExtKeyToRemote(); + $sExtKeyToMe = $oLinkedSetAttDef->GetExtKeyToMe(); + + $sStateAttCode = MetaModel::GetStateAttributeCode($sClass); + $sDefaultState = MetaModel::GetDefaultState($sClass); + + foreach (MetaModel::FlattenZList(MetaModel::GetZListItems($sLinkedClass, 'list')) as $sLnkAttCode) + { + $oLnkAttDef = MetaModel::GetAttributeDef($sLinkedClass, $sLnkAttCode); + if ($sStateAttCode == $sLnkAttCode) + { + // State attribute is always hidden from the UI + continue; + } + if (($sLnkAttCode == $sExtKeyToMe) + || ($sLnkAttCode == $sExtKeyToRemote) + || ($sLnkAttCode == 'finalclass')) + { + continue; + } + if (!($oLnkAttDef->IsWritable())) + { + continue; + } + + $iFlags = MetaModel::GetAttributeFlags($sLinkedClass, $sDefaultState, $sLnkAttCode); + if (!($iFlags & OPT_ATT_HIDDEN) && !($iFlags & OPT_ATT_READONLY)) + { + $aAttCodesToPrint[] = $oLnkAttDef; + } + } + + return $aAttCodesToPrint; + } + /** * @param string $sClass * @param string $sListCode diff --git a/core/ormlinkset.class.inc.php b/core/ormlinkset.class.inc.php index 7de3624fa..afd0dec02 100644 --- a/core/ormlinkset.class.inc.php +++ b/core/ormlinkset.class.inc.php @@ -30,6 +30,9 @@ require_once('dbobjectiterator.php'); class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator { + public const LINK_ALIAS = 'Link'; + public const REMOTE_ALIAS = 'Remote'; + protected $sHostClass; // subclass of DBObject protected $sAttCode; // xxxxxx_list protected $sClass; // class of the links @@ -786,11 +789,13 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator /** * @param bool $bShowObsolete * - * @return \DBObjectSet + * @return \DBObjectSet indirect relations will get `SELECT L,R ...` (l = lnk class, R = remote) * @throws \CoreException * @throws \CoreWarning * @throws \MySQLException * @throws \Exception + * + * @since 2.8.0 N°2334 returns both lnk and remote classes for indirect relations */ public function ToDBObjectSet($bShowObsolete = true) { @@ -802,7 +807,11 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator $sExtKeyToRemote = $oAttDef->GetExtKeyToRemote(); /** @var \AttributeExternalKey $oLinkingAttDef */ $oLinkingAttDef = MetaModel::GetAttributeDef($this->sClass, $sExtKeyToRemote); + + // N°2334 add pointed class (SELECT L,R) to have all fields (lnk + remote) in display + // the pointed class is always present in the search, as generated by \AttributeLinkedSet::GetDefaultValue $sTargetClass = $oLinkingAttDef->GetTargetClass(); + $oRemoteClassSearch = new DBObjectSearch($sTargetClass); if (!$bShowObsolete && MetaModel::IsObsoletable($sTargetClass)) { $oNotObsolete = new BinaryExpression( @@ -810,10 +819,12 @@ class ormLinkSet implements iDBObjectSetIterator, Iterator, SeekableIterator '=', new ScalarExpression(0) ); - $oNotObsoleteRemote = new DBObjectSearch($sTargetClass); - $oNotObsoleteRemote->AddConditionExpression($oNotObsolete); - $oLinkSearch->AddCondition_PointingTo($oNotObsoleteRemote, $sExtKeyToRemote); + $oRemoteClassSearch->AddConditionExpression($oNotObsolete); } + $oLinkSearch->AddCondition_PointingTo($oRemoteClassSearch, $sExtKeyToRemote); + $oLinkSearch->RenameAlias($oLinkSearch->GetClassAlias(), self::LINK_ALIAS); + $oLinkSearch->RenameAlias($sTargetClass, self::REMOTE_ALIAS); + $oLinkSearch->SetSelectedClasses([self::LINK_ALIAS, self::REMOTE_ALIAS]); } $oLinkSet = new DBObjectSet($oLinkSearch); $oLinkSet->SetShowObsoleteData($bShowObsolete);