From 06a8481511f22a70110972419c157fd782872a81 Mon Sep 17 00:00:00 2001
From: Benjamin Dalsass <95754414+bdalsass@users.noreply.github.com>
Date: Thu, 25 Apr 2024 09:16:30 +0200
Subject: [PATCH 1/6] =?UTF-8?q?N=C2=B07279=20-=20AttributeClass=20defined?=
=?UTF-8?q?=20in=20XML=20datamodel=20compilation=20issue?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
core/attributedef.class.inc.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php
index e80d8de86..7134467b7 100644
--- a/core/attributedef.class.inc.php
+++ b/core/attributedef.class.inc.php
@@ -11508,6 +11508,11 @@ class AttributeClassAttCodeSet extends AttributeSet
}
return ''.$value.'';
}
+
+ public function IsNull($proposedValue)
+ {
+ return (empty($proposedValue));
+ }
}
class AttributeQueryAttCodeSet extends AttributeSet
From c82f169248c459e26dc14ba8b29580587538986e Mon Sep 17 00:00:00 2001
From: Stephen Abello
Date: Mon, 29 Apr 2024 10:51:59 +0200
Subject: [PATCH 2/6] =?UTF-8?q?N=C2=B06167=20-=20Fix=20darkmoon=20theme=20?=
=?UTF-8?q?for=20new=20welcome=20popup?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../scss/scss-variables.scss | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss b/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss
index 9e55c5f13..d5bb5e5f7 100644
--- a/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss
+++ b/datamodels/2.x/combodo-backoffice-darkmoon-theme/scss/scss-variables.scss
@@ -276,4 +276,9 @@ $ibo-datamodel-viewer--schema--tooltip--fill: $ibo-color-grey-600;
$ibo-csv-import--row-error--background-color: $ibo-color-red-950;
$ibo-csv-import--cell-error--color: $ibo-color-red-500;
-$ibo-csv-import--cell-modified--color: $ibo-color-blue-500;
\ No newline at end of file
+$ibo-csv-import--cell-modified--color: $ibo-color-blue-500;
+
+$ibo-welcome-popup--messages-stack--background-color: $ibo-color-grey-700;
+$ibo-welcome-popup--stack-item--background-color: $ibo-color-grey-600;
+$ibo-welcome-popup--stack-item--border-color: $ibo-color-grey-800;
+$ibo-welcome-popup--stack-item--is-active--border-color: $ibo-color-grey-900;
From b1290072b5db5f5c0713955f7c16d4107d609621 Mon Sep 17 00:00:00 2001
From: Stephen Abello
Date: Mon, 29 Apr 2024 11:09:41 +0200
Subject: [PATCH 3/6] =?UTF-8?q?N=C2=B06167=20-=20Fix=20high=20contrast=20t?=
=?UTF-8?q?heme=20for=20new=20welcome=20popup?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../scss/scss-variables.scss | 5 ++++-
.../scss/stylesheet.scss | 4 ++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/scss-variables.scss b/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/scss-variables.scss
index 8ce98a5b9..b4f660aa0 100644
--- a/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/scss-variables.scss
+++ b/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/scss-variables.scss
@@ -61,4 +61,7 @@ $ibo-popover-menu--item-separator--background-color: $ibo-color-grey-900;
$ibo-alert-colors: ('primary': ($ibo-color-primary-100, $ibo-color-primary-900, $ibo-color-primary-900),'secondary': ($ibo-color-secondary-100, $ibo-color-secondary-900, $ibo-color-secondary-900),'neutral': ($ibo-color-secondary-100, $ibo-color-secondary-900, $ibo-color-secondary-900),'information': ($ibo-color-information-100, $ibo-color-information-950, $ibo-color-information-950),'success': ($ibo-color-success-100, $ibo-color-success-950, $ibo-color-success-950),'failure': ($ibo-color-danger-100, $ibo-color-danger-950, $ibo-color-danger-950),'warning': ($ibo-color-warning-100, $ibo-color-warning-950, $ibo-color-warning-950),'danger': ($ibo-color-danger-100, $ibo-color-danger-950, $ibo-color-danger-950),'grey' : ($ibo-color-grey-100, $ibo-color-grey-900, $ibo-color-grey-900),'blue-grey': ($ibo-color-blue-grey-100, $ibo-color-blue-grey-900, $ibo-color-blue-grey-900),'blue': ($ibo-color-blue-100, $ibo-color-blue-950, $ibo-color-blue-950),'cyan': ($ibo-color-cyan-100, $ibo-color-blue-950, $ibo-color-cyan-900),'green': ($ibo-color-green-100, $ibo-color-green-950, $ibo-color-green-950),'orange' : ($ibo-color-orange-100, $ibo-color-orange-900, $ibo-color-orange-900),'red': ($ibo-color-red-100, $ibo-color-red-950, $ibo-color-red-950),'pink': ($ibo-color-pink-100, $ibo-color-pink-900, $ibo-color-pink-900),);
$ibo-button-colors: ( 'regular': ( /* Semantics */ 'neutral': ( '': ( $ibo-color-secondary-100, $ibo-color-grey-900, $ibo-button--box-shadow-bottom $ibo-color-secondary-200, $ibo-color-secondary-200, ), ':hover': ( $ibo-color-secondary-200, $ibo-color-grey-900, $ibo-button--box-shadow-bottom $ibo-color-secondary-300, $ibo-color-secondary-300, ), ':active': ( $ibo-color-secondary-200, $ibo-color-grey-900, $ibo-button--box-shadow-top $ibo-color-secondary-300 #{','} $ibo-button--box-shadow-bottom $ibo-color-secondary-200, $ibo-color-secondary-200, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ), /* Primary action does not have the colors from the primary brand color, at least not for now */ 'primary': ( '': ( $ibo-color-cyan-900, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-cyan-950, $ibo-color-cyan-900, ), ':hover': ( $ibo-color-cyan-950, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-cyan-900, $ibo-color-cyan-950, ), ':active': ( $ibo-color-cyan-950, $ibo-color-white-100, $ibo-button--box-shadow-top $ibo-color-cyan-900 #{','} $ibo-button--box-shadow-bottom $ibo-color-cyan-950, $ibo-color-cyan-950, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ), 'secondary': ( '': ( $ibo-color-secondary-100, $ibo-color-grey-900, $ibo-button--box-shadow-bottom $ibo-color-secondary-200, $ibo-color-secondary-200, ), ':hover': ( $ibo-color-secondary-200, $ibo-color-grey-900, $ibo-button--box-shadow-bottom $ibo-color-secondary-300, $ibo-color-secondary-300, ), ':active': ( $ibo-color-secondary-200, $ibo-color-grey-900, $ibo-button--box-shadow-top $ibo-color-secondary-300 #{','} $ibo-button--box-shadow-bottom $ibo-color-secondary-200, $ibo-color-secondary-200, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ), 'danger': ( '': ( $ibo-color-danger-900, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-danger-950, $ibo-color-danger-950, ), ':hover': ( $ibo-color-danger-950, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-danger-900, $ibo-color-danger-900, ), ':active': ( $ibo-color-danger-950, $ibo-color-white-100, $ibo-button--box-shadow-top $ibo-color-danger-950 #{','} $ibo-button--box-shadow-bottom $ibo-color-danger-900, $ibo-color-danger-900, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ), 'success': ( '': ( $ibo-color-success-900, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-success-950, $ibo-color-success-900, ), ':hover': ( $ibo-color-success-950, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-success-900, $ibo-color-success-950, ), ':active': ( $ibo-color-success-950, $ibo-color-white-100, $ibo-button--box-shadow-top $ibo-color-success-900 #{','} $ibo-button--box-shadow-bottom $ibo-color-success-950, $ibo-color-success-950, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ), /* Colors */ 'red': ( '': ( $ibo-color-red-900, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-red-900, $ibo-color-red-950, ), ':hover': ( $ibo-color-red-950, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-red-900, $ibo-color-red-950, ), ':active': ( $ibo-color-red-950, $ibo-color-white-100, $ibo-button--box-shadow-top $ibo-color-red-900 #{','} $ibo-button--box-shadow-bottom $ibo-color-red-950, $ibo-color-red-950, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ), 'green': ( '': ( $ibo-color-green-900, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-green-950, $ibo-color-green-950, ), ':hover': ( $ibo-color-green-950, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-green-950, $ibo-color-green-950, ), ':active': ( $ibo-color-green-950, $ibo-color-white-100, $ibo-button--box-shadow-top $ibo-color-green-950 #{','} $ibo-button--box-shadow-bottom $ibo-color-green-950, $ibo-color-green-950, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ), 'cyan': ( '': ( $ibo-color-cyan-900, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-cyan-950, $ibo-color-cyan-950, ), ':hover': ( $ibo-color-cyan-950, $ibo-color-white-100, $ibo-button--box-shadow-bottom $ibo-color-cyan-950, $ibo-color-cyan-950, ), ':active': ( $ibo-color-cyan-950, $ibo-color-white-100, $ibo-button--box-shadow-top $ibo-color-cyan-950 #{','} $ibo-button--box-shadow-bottom $ibo-color-cyan-950, $ibo-color-cyan-950, ), ':disabled': ( $ibo-color-grey-300, $ibo-color-grey-700, $ibo-button--box-shadow-top $ibo-color-grey-300, $ibo-color-grey-500, ), ) ), 'alternative': ( /* Semantics */ 'neutral': ( '': ( transparent, $ibo-color-grey-900, $ibo-button--box-shadow-bottom transparent, $ibo-color-grey-800, ), ':hover': ( $ibo-color-secondary-100, $ibo-color-grey-900, $ibo-button--box-shadow-bottom $ibo-color-secondary-100, $ibo-color-grey-800, ), ':active': ( $ibo-color-secondary-100, $ibo-color-grey-900, $ibo-button--box-shadow-top $ibo-color-secondary-200 #{','} $ibo-button--box-shadow-bottom $ibo-color-secondary-100, $ibo-color-grey-800, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), /* Primary action does not have the colors from the primary brand color, at least not for now */ 'primary': ( '': ( transparent, $ibo-color-cyan-950, $ibo-button--box-shadow-bottom transparent, $ibo-color-cyan-900, ), ':hover': ( $ibo-color-white-100, $ibo-color-grey-900, $ibo-button--box-shadow-bottom $ibo-color-white-100, $ibo-color-grey-800, ), ':active': ( $ibo-color-white-100, $ibo-color-grey-900, $ibo-button--box-shadow-top $ibo-color-white-100 #{','} $ibo-button--box-shadow-bottom $ibo-color-white-100, $ibo-color-grey-800, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), 'secondary': ( '': ( transparent, $ibo-color-grey-900, $ibo-button--box-shadow-bottom transparent, $ibo-color-grey-800, ), ':hover': ( $ibo-color-secondary-100, $ibo-color-grey-900, $ibo-button--box-shadow-bottom $ibo-color-secondary-100, $ibo-color-grey-800, ), ':active': ( $ibo-color-secondary-100, $ibo-color-grey-900, $ibo-button--box-shadow-top $ibo-color-secondary-200 #{','} $ibo-button--box-shadow-bottom $ibo-color-secondary-100, $ibo-color-grey-800, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), 'danger': ( '': ( transparent, $ibo-color-danger-950, $ibo-button--box-shadow-bottom transparent, $ibo-color-danger-600, ), ':hover': ( $ibo-color-danger-100, $ibo-color-danger-950, $ibo-button--box-shadow-bottom $ibo-color-danger-200, $ibo-color-danger-800, ), ':active': ( $ibo-color-danger-200, $ibo-color-danger-900, $ibo-button--box-shadow-top $ibo-color-danger-950 #{','} $ibo-button--box-shadow-bottom $ibo-color-danger-200, $ibo-color-danger-800, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), 'success': ( '': ( transparent, $ibo-color-success-950, $ibo-button--box-shadow-bottom transparent, $ibo-color-success-800, ), ':hover': ( $ibo-color-success-100, $ibo-color-success-950, $ibo-button--box-shadow-bottom $ibo-color-success-100, $ibo-color-success-950, ), ':active': ( $ibo-color-success-100, $ibo-color-success-900, $ibo-button--box-shadow-top $ibo-color-success-700 #{','} $ibo-button--box-shadow-bottom $ibo-color-success-100, $ibo-color-success-800, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), /* Colors */ 'red': ( '': ( transparent, $ibo-color-red-900, $ibo-button--box-shadow-bottom transparent, $ibo-color-red-600, ), ':hover': ( $ibo-color-red-200, $ibo-color-red-900, $ibo-button--box-shadow-bottom $ibo-color-red-200, $ibo-color-red-950, ), ':active': ( $ibo-color-red-200, $ibo-color-red-900, $ibo-button--box-shadow-top $ibo-color-red-900 #{','} $ibo-button--box-shadow-bottom $ibo-color-red-200, $ibo-color-red-950, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), 'green': ( '': ( transparent, $ibo-color-green-950, $ibo-button--box-shadow-bottom transparent, $ibo-color-green-900, ), ':hover': ( $ibo-color-green-100, $ibo-color-green-950, $ibo-button--box-shadow-bottom $ibo-color-green-100, $ibo-color-green-900, ), ':active': ( $ibo-color-green-100, $ibo-color-green-950, $ibo-button--box-shadow-top $ibo-color-green-700 #{','} $ibo-button--box-shadow-bottom $ibo-color-green-100, $ibo-color-green-900, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), 'cyan': ( '': ( transparent, $ibo-color-cyan-950, $ibo-button--box-shadow-bottom transparent, $ibo-color-cyan-900, ), ':hover': ( $ibo-color-cyan-100, $ibo-color-cyan-950, $ibo-button--box-shadow-bottom $ibo-color-cyan-100, $ibo-color-cyan-900, ), ':active': ( $ibo-color-cyan-100, $ibo-color-cyan-950, $ibo-button--box-shadow-top $ibo-color-cyan-900 #{','} $ibo-button--box-shadow-bottom $ibo-color-cyan-100, $ibo-color-cyan-900, ), ':disabled': ( transparent, $ibo-color-grey-600, $ibo-button--box-shadow-top transparent, $ibo-color-grey-500, ), ), )) !default;
-$ibo-panel-colors: ('primary': $ibo-color-primary-800,'secondary': $ibo-color-secondary-800,'neutral': $ibo-color-grey-800,'information': $ibo-color-information-800,'success': $ibo-color-success-800,'failure': $ibo-color-danger-800,'warning': $ibo-color-warning-800,'danger': $ibo-color-danger-800,'grey' : $ibo-color-grey-800,'blue-grey': $ibo-color-blue-grey-800,'blue': $ibo-color-blue-800,'cyan': $ibo-color-cyan-800,'green': $ibo-color-green-800,'orange' : $ibo-color-orange-800,'red': $ibo-color-red-800,'pink': $ibo-color-pink-800,);
\ No newline at end of file
+$ibo-panel-colors: ('primary': $ibo-color-primary-800,'secondary': $ibo-color-secondary-800,'neutral': $ibo-color-grey-800,'information': $ibo-color-information-800,'success': $ibo-color-success-800,'failure': $ibo-color-danger-800,'warning': $ibo-color-warning-800,'danger': $ibo-color-danger-800,'grey' : $ibo-color-grey-800,'blue-grey': $ibo-color-blue-grey-800,'blue': $ibo-color-blue-800,'cyan': $ibo-color-cyan-800,'green': $ibo-color-green-800,'orange' : $ibo-color-orange-800,'red': $ibo-color-red-800,'pink': $ibo-color-pink-800,);
+
+$ibo-welcome-popup--stack-item--border-color: $ibo-color-grey-950;
+$ibo-welcome-popup--stack-item--is-active--border-color: $ibo-color-grey-900;
\ No newline at end of file
diff --git a/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/stylesheet.scss b/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/stylesheet.scss
index e253c53b4..366647266 100644
--- a/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/stylesheet.scss
+++ b/datamodels/2.x/combodo-backoffice-fullmoon-high-contrast-theme/scss/stylesheet.scss
@@ -142,4 +142,8 @@ $ibo-toast--icon--left: $ibo-spacing-400 !default;
.ibo-popover-menu--item:not(:last-child){
border-bottom: $ibo-high-contrast--thin-border;
+}
+
+.ibo-welcome-popup--stack-item.ibo-is-active {
+ border-width: 2px;
}
\ No newline at end of file
From 32140b360f4803f3b918780f6ac6ce71c6a91d80 Mon Sep 17 00:00:00 2001
From: Molkobain
Date: Mon, 29 Apr 2024 11:45:09 +0200
Subject: [PATCH 4/6] :white_check_mark: Cherry pick fixes from 59a955f4
---
tests/php-unit-tests/composer.json | 3 +
.../Service/UnitTestRunTimeEnvironment.php | 63 +++++++++++++++++--
...plication-extension-usages-in-snippets.xml | 2 +-
3 files changed, 61 insertions(+), 7 deletions(-)
diff --git a/tests/php-unit-tests/composer.json b/tests/php-unit-tests/composer.json
index fef0397e9..36e0c7e44 100644
--- a/tests/php-unit-tests/composer.json
+++ b/tests/php-unit-tests/composer.json
@@ -4,6 +4,9 @@
"sempro/phpunit-pretty-print": "^1.4"
},
"autoload": {
+ "classmap": [
+ "unitary-tests/"
+ ],
"psr-4": {
"Combodo\\iTop\\Test\\UnitTest\\": "src/BaseTestCase/",
"Combodo\\iTop\\Test\\UnitTest\\Hook\\": "src/Hook/",
diff --git a/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php b/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php
index 63ded52c7..0c76e727f 100644
--- a/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php
+++ b/tests/php-unit-tests/src/Service/UnitTestRunTimeEnvironment.php
@@ -9,9 +9,11 @@ namespace Combodo\iTop\Test\UnitTest\Service;
use Combodo\iTop\Test\UnitTest\ItopCustomDatamodelTestCase;
use IssueLog;
+use LogChannels;
use MFCoreModule;
use ReflectionClass;
use RunTimeEnvironment;
+use utils;
/**
@@ -33,12 +35,15 @@ class UnitTestRunTimeEnvironment extends RunTimeEnvironment
/** @var string[] $aDeltaFiles Referential of loaded deltas. Mostly to avoid duplicates. */
$aDeltaFiles = [];
- foreach (get_declared_classes() as $sClass) {
- // Filter on classes derived from this \Combodo\iTop\Test\UnitTest\ItopCustomDatamodelTestCaseItopCustomDatamodelTestCase
- if (false === is_a($sClass, ItopCustomDatamodelTestCase::class, true)) {
- continue;
- }
-
+ $aRelatedClasses = $this->GetClassesExtending(
+ ItopCustomDatamodelTestCase::class,
+ array(
+ '[\\\\/]tests[\\\\/]php-unit-tests[\\\\/]vendor[\\\\/]',
+ '[\\\\/]tests[\\\\/]php-unit-tests[\\\\/]unitary-tests[\\\\/]datamodels[\\\\/]2.x[\\\\/]authent-local',
+ ));
+ //Combodo\iTop\Test\UnitTest\Application\ApplicationExtensionTest
+ //Combodo\iTop\Test\UnitTest\Application\ApplicationExtensionTest
+ foreach ($aRelatedClasses as $sClass) {
$oReflectionClass = new ReflectionClass($sClass);
$oReflectionMethod = $oReflectionClass->getMethod('GetDatamodelDeltaAbsPath');
@@ -83,4 +88,50 @@ class UnitTestRunTimeEnvironment extends RunTimeEnvironment
return $aRet;
}
+ protected function GetClassesExtending (string $sExtendedClass, array $aExcludedPath = []) : array {
+ $aMatchingClasses = [];
+
+ $aAutoloadClassMaps =[__DIR__."/../../vendor/composer/autoload_classmap.php"];
+
+ $aClassMap = [];
+ $aAutoloaderErrors = [];
+ foreach ($aAutoloadClassMaps as $sAutoloadFile) {
+ $aTmpClassMap = include $sAutoloadFile;
+ /** @noinspection SlowArrayOperationsInLoopInspection we are getting an associative array so the documented workarounds cannot be used */
+ $aClassMap = array_merge($aClassMap, $aTmpClassMap);
+ }
+ foreach ($aClassMap as $sPHPClass => $sPHPFile) {
+ $bSkipped = false;
+ if (utils::IsNotNullOrEmptyString($sPHPFile)) {
+ $sPHPFile = utils::LocalPath($sPHPFile);
+ if ($sPHPFile !== false) {
+ $sPHPFile = '/'.$sPHPFile; // for regex
+ foreach ($aExcludedPath as $sExcludedPath) {
+ // Note: We use '#' as delimiters as usual '/' is often used in paths.
+ if ($sExcludedPath !== '' && preg_match('#'.$sExcludedPath.'#', $sPHPFile) === 1) {
+ $bSkipped = true;
+ break;
+ }
+ }
+ } else {
+ $bSkipped = true; // file not found
+ }
+ }
+
+ if (!$bSkipped) {
+ try {
+ $oRefClass = new ReflectionClass($sPHPClass);
+ if ($oRefClass->isSubclassOf($sExtendedClass) &&
+ !$oRefClass->isInterface() && !$oRefClass->isAbstract() && !$oRefClass->isTrait()) {
+ $aMatchingClasses[] = $sPHPClass;
+ }
+ }
+ catch (Exception $e) {
+ }
+ }
+ }
+ return $aMatchingClasses;
+ }
+
+
}
\ No newline at end of file
diff --git a/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml b/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml
index e404ac49d..d5af912f8 100644
--- a/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml
+++ b/tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml
@@ -140,7 +140,7 @@ class ExampleFor_iQueryModifier implements \iQueryModifier
public function GetFieldExpression(QueryBuilderContext &$oBuild, $sClass, $sAttCode, $sColId, Expression $oFieldSQLExp, SQLQuery &$oSelect)
{
- // Do nothing, we just need the class to exists for the unit test
+ return $oFieldSQLExp;
}
}
]]>
From 93bba66323e087aede741856b30793bb13879ed1 Mon Sep 17 00:00:00 2001
From: jf-cbd
Date: Tue, 30 Apr 2024 08:03:14 +0200
Subject: [PATCH 5/6] =?UTF-8?q?N=C2=B07445=20-=20Invalid=20Unicode=20escap?=
=?UTF-8?q?e=20sequence=20on=20dashlet=20Header=20with=20statistics?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/ajax.render.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/pages/ajax.render.php b/pages/ajax.render.php
index d9cddaaa1..5e9a3a285 100644
--- a/pages/ajax.render.php
+++ b/pages/ajax.render.php
@@ -1155,7 +1155,6 @@ EOF
if ($oDashlet->IsFormRedrawNeeded()) {
$oForm = $oDashlet->GetForm(); // Rebuild the form since the values/content changed
$oForm->SetSubmitParams(utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php', array('operation' => 'update_dashlet_property', 'extra_params' => $aExtraParams));
- $sHtml = addslashes($oForm->RenderAsPropertySheet($oPage, true, '.itop-dashboard'));
$sHtml= json_encode($sHtml);
$oPage->add_script("$('#dashlet_$sDashletId').html({$sHtml});");
}
From dbcbb187b2bd724ad1e578fbeea76715472b992b Mon Sep 17 00:00:00 2001
From: jf-cbd
Date: Tue, 30 Apr 2024 08:13:37 +0200
Subject: [PATCH 6/6] =?UTF-8?q?N=C2=B07445=20-=20Invalid=20Unicode=20escap?=
=?UTF-8?q?e=20sequence=20on=20dashlet=20Header=20with=20statistics?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/ajax.render.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/pages/ajax.render.php b/pages/ajax.render.php
index 5e9a3a285..9e8501758 100644
--- a/pages/ajax.render.php
+++ b/pages/ajax.render.php
@@ -1155,6 +1155,7 @@ EOF
if ($oDashlet->IsFormRedrawNeeded()) {
$oForm = $oDashlet->GetForm(); // Rebuild the form since the values/content changed
$oForm->SetSubmitParams(utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php', array('operation' => 'update_dashlet_property', 'extra_params' => $aExtraParams));
+ $sHtml = $oForm->RenderAsPropertySheet($oPage, true, '.itop-dashboard');
$sHtml= json_encode($sHtml);
$oPage->add_script("$('#dashlet_$sDashletId').html({$sHtml});");
}