Compare commits

...

53 Commits

Author SHA1 Message Date
odain
18c52f1a71 enhance/fix recursive deps computation 2025-09-19 16:57:58 +02:00
odain
045a9c5658 fix class renaming 2025-09-19 16:32:57 +02:00
odain
4367bb2868 ci : fix path check 2025-09-19 16:00:02 +02:00
odain
5f1765504c fix folder not existing (ie production-modules) 2025-09-19 15:45:32 +02:00
odain
bca79a1a06 mv ModulesDependencyValidationServiceTest to run it at commit 2025-09-19 15:37:34 +02:00
odain
8c30199e9f cleanup after rebasing 2025-09-19 15:10:41 +02:00
odain
996b98c4c7 refactoring: code cleanup/standardization/remove all prototype stuffs 2025-09-15 14:32:48 +02:00
odain
5dea3c7ce2 refactoring: code cleanup/standardization/remove all prototype stuffs 2025-09-15 11:14:14 +02:00
odain
609215857b add deps validation to extension ci job 2025-09-11 22:07:04 +02:00
odain
ae83d677a3 fix ci 2025-09-11 19:00:59 +02:00
odain
8a017b6e95 fix ci: test broken when dir to scan did not exist like production-modules 2025-09-11 17:32:06 +02:00
odain
dda99616a5 fix tests 2025-09-11 16:49:17 +02:00
odain
e37322e631 module dependency validation moved in a core folder + cleanup dedicated unit/integration tests 2025-09-11 12:09:24 +02:00
odain
64bec2181f forget dependency computation optimization seen as too risky + keep only user friendly sort in case of setup error 2025-09-11 12:08:11 +02:00
odain
6ed0f8ef3a rebase on develop + split new sort computation apart from modulediscovery 2025-09-09 23:12:18 +02:00
odain
b194a0b17c revert to previous legacy order + gather new module computation classes in a dedicated folder 2025-09-09 21:59:25 +02:00
odain
4207b25bde make validation work (dirty way) + cleanup 2025-09-09 21:57:57 +02:00
odain
9f2da19da0 make setup deterministic: complete dependency order with alphabetical one when 2 module elements are at same position 2025-09-09 21:57:57 +02:00
odain
21c4ffa9e3 final deps validation bases on DM and PHP classes 2025-09-09 21:57:57 +02:00
odain
b31a7fac54 init in beforeclass + read defined classes/interfaces by module 2025-09-09 21:57:57 +02:00
odain
46d8591761 module discovery classes renaming to avoid collision with customer DM definitions 2025-09-09 21:57:57 +02:00
odain
18a66e6884 read module file data apart from ModuleDiscovery 2025-09-09 21:57:57 +02:00
odain
6c13464011 cleanup 2025-09-09 21:57:57 +02:00
odain
809d1a5f7d cleanup 2025-09-09 21:57:57 +02:00
odain
217e890650 fix inconsistent module dependencies 2025-09-09 21:57:57 +02:00
odain
d7e02d3859 fix integration check 2025-09-09 21:57:57 +02:00
odain
1d7e776f6d save tmp work before trying to fetch other wml deps 2025-09-09 21:57:57 +02:00
odain
6319d0a9cb fix module dependencies 2025-09-09 21:57:57 +02:00
odain
5c051a30d3 fix DM filename typo 2025-09-09 21:57:57 +02:00
odain
78e13fffb4 rename ModuleXXX classes by iTopCoreModuleXXX to reduce collisions with extensions 2025-09-09 21:57:57 +02:00
odain
bb16108f04 add phpdoc + add more tests 2025-09-09 21:57:57 +02:00
odain
460a3e356e module dependency optimization - refacto + dependency new sort order 2025-09-09 21:57:57 +02:00
odain
dd68017020 module dependency optimization - stop computation when no new dependency is resolved 2025-09-09 21:56:26 +02:00
odain
0281721638 enhance module dependency computation for optimization and admin feedback 2025-09-09 21:56:26 +02:00
odain-cbd
15103dc49f N°4789 - Parse datamodel module.xxx.php files instead of interpreting them (#746)
* N°4789 - Parse datamodel module.xxx.php files instead of interpreting them - refactoring all in a dedicated service first

* N°4789 - fix broken setup + tests

* N°4789 - replace legacy eval by module file parsing

* N°4789 - handle constants and if conditional structures

* N°4789 - compute boolean expressions

* N°4789 - make autoselect and dependencies work as well

* cleanup

* N°4789 - fix BeforeWritingConfig calls during setup

* N°4789 - refactor and split in ModuleDiscoveryEvaluationService + handle ModuleInstallerAPI methods calls during setup

* N°4789 - PR review changes with Romain

* PR review + code cleanup + added usecases and test cover

* temp evaluation work

* replace eval by iTop custom evaluation classes

* move PhpParser/Evaluation classes in a specific namespave + composer dumpautoload

* fix broken setup

* fix broken setup

* complete Evaluators list + autoload

* cleanup useless testing resources

* cleanup + replace last eval call in VariableEvaluator

* fix few Evaluators code

* enhance nikic evaluators + test with/without nikic lib

* Evaluator fixes/enhancements + tests

* bump to nikic fork temporarly

* bump nikic-parser fork + use only nikic fork  evaluation + cleanup itop redondant evaluators

* review with Romain: use distinct whitelists in setup time/runtime + move ModuleFileParser internal logic into ModuleFileReader

* PhpExpressionEvaluator used via constructor and not as a service

* dumpautoload again after rebase
2025-09-09 17:54:18 +02:00
jf-cbd
2ee68ff819 Merge remote-tracking branch 'origin/support/3.2' into develop
# Conflicts:
#	sources/SessionTracker/iSessionHandlerExtension.php
2025-09-05 15:19:38 +02:00
Benjamin Dalsass
44972f34e5 N°8210 - Remove iApplicationObjectExtension (#737) 2025-09-05 09:27:55 +02:00
jf-cbd
65c9145b10 N°8570 - Allow @ as part of url - add test 2025-09-04 17:04:21 +02:00
Stephen Abello
a104310379 N°8579 - Fix calls to Twig "spaceless" deprecated filter 2025-09-04 14:57:24 +02:00
Anne-Cath
f5cce23bb4 Revert "N°8579 - remove "spaceless" in twig files"
This reverts commit ee993ef80a.
2025-09-03 10:37:26 +02:00
Stephen Abello
0f39106b56 N°7761 - De-hardcode SCSS values 2025-09-02 16:30:20 +02:00
Anne-Cath
ee993ef80a N°8579 - remove "spaceless" in twig files 2025-08-29 17:15:47 +02:00
Anne-Cath
0a4180f7fc N°7257 - Check and migrate old Combodo JS functions 2025-08-29 16:15:31 +02:00
Anne-Cath
b56113aada N°8190 - Userrights management override is deprecated - add deprecated 2025-08-29 15:12:36 +02:00
Anne-Cath
c82c150411 N°7257 - Check and migrate old Combodo JS functions 2025-08-29 14:27:38 +02:00
Anne-Cath
00818f411f N°3817 - Audit and fix calls to deprecated jQuery method - rollback change on caselog-entry-form.js 2025-08-29 11:07:44 +02:00
Timmy38
a6a459967e N°6759 factorize config (#738)
* N°6759 - Factorize code in config
2025-08-28 11:04:49 +02:00
Stephen Abello
437296eab9 N°8634 - Newsroom providers are hardly visible if there's more than 2 2025-08-20 16:00:14 +02:00
Stephen Abello
7cf6f65265 Fix typo thanks to @jbostoen 2025-08-06 09:04:36 +02:00
Björn Rudner
491f55c7bd 🐛 Allow @ as part of url (#729) 2025-08-01 15:27:37 +02:00
Stephen Abello
7b44ec23a1 Fix return type in PHPDoc thanks to @jbostoen 2025-07-28 16:14:13 +02:00
BenGrenoble
f00b8d529c N°8286 - Be able to add additional data in iTop session files via custom classes
Change to fit convention.
2025-07-24 10:59:48 +02:00
BenGrenoble
af44ffd0ad N°8286 - Be able to add additional data in iTop session files via custom classes
Experimental warning
2025-07-24 10:28:15 +02:00
149 changed files with 6453 additions and 2805 deletions

View File

@@ -57,12 +57,6 @@ require_once(APPROOT.'application/applicationextension/backoffice/SeparatorPopup
require_once(APPROOT.'application/applicationextension/backoffice/URLButtonItem.php');
require_once(APPROOT.'application/applicationextension/backoffice/URLPopupMenuItem.php');
//deprecated class and interface
require_once(APPROOT.'application/applicationextension/backoffice/iApplicationObjectExtension.php');
require_once(APPROOT.'application/applicationextension/backoffice/AbstractApplicationObjectExtension.php');
require_once(APPROOT.'application/applicationextension/iBackupExtraFilesExtension.php');
require_once(APPROOT.'application/applicationextension/iKPILoggerExtension.php');
require_once(APPROOT.'application/applicationextension/iModuleExtension.php');

View File

@@ -1,58 +0,0 @@
<?php
/**
* Extend this class instead of iApplicationObjectExtension if you don't need to overload all methods
*
* @api
* @deprecated 3.1.0 N°4756 use the new event service instead, see {@see DBObject::FireEvent()} method
* @package ORMExtensibilityAPI
* @since 2.7.0
*/
abstract class AbstractApplicationObjectExtension implements iApplicationObjectExtension
{
/**
* @inheritDoc
*/
public function OnIsModified($oObject)
{
return false;
}
/**
* @inheritDoc
*/
public function OnCheckToWrite($oObject)
{
return array();
}
/**
* @inheritDoc
*/
public function OnCheckToDelete($oObject)
{
return array();
}
/**
* @inheritDoc
*/
public function OnDBUpdate($oObject, $oChange = null)
{
}
/**
* @inheritDoc
*/
public function OnDBInsert($oObject, $oChange = null)
{
}
/**
* @inheritDoc
*/
public function OnDBDelete($oObject, $oChange = null)
{
}
}

View File

@@ -1,111 +0,0 @@
<?php
/**
* Implement this interface to perform specific operations when objects are manipulated
*
* Note that those methods will be called when objects are manipulated, either in a programmatic way
* or through the GUI.
*
* @api
* @deprecated 3.1.0 N°4756 use the new event service instead, see {@see DBObject::FireEvent()} method. More details on each method PHPDoc.
* @package ORMExtensibilityAPI
*/
interface iApplicationObjectExtension
{
/**
* Invoked to determine whether an object has been modified in memory
*
* The GUI calls this verb to determine the message that will be displayed to the end-user.
* Anyhow, this API can be called in other contexts such as the CSV import tool.
*
* If the extension returns false, then the framework will perform the usual evaluation.
* Otherwise, the answer is definitively "yes, the object has changed".
*
* @param /cmdbAbstractObject $oObject The target object
*
* @return boolean True if something has changed for the target object
* @api
* @deprecated 3.1.0 N°4756 No alternative available, this API was unstable and is abandoned
*/
public function OnIsModified($oObject);
/**
* Invoked to determine whether an object can be written to the database
*
* The GUI calls this verb and reports any issue.
* Anyhow, this API can be called in other contexts such as the CSV import tool.
*
* @param \cmdbAbstractObject $oObject The target object
*
* @return string[] A list of errors message. An error message is made of one line and it can be displayed to the end-user.
* @api
* @deprecated 3.1.0 N°4756 Use EVENT_DB_CHECK_TO_WRITE event instead
*/
public function OnCheckToWrite($oObject);
/**
* Invoked to determine wether an object can be deleted from the database
*
* The GUI calls this verb and stops the deletion process if any issue is reported.
*
* Please not that it is not possible to cascade deletion by this mean: only stopper issues can be handled.
*
* @param \cmdbAbstractObject $oObject The target object
*
* @return string[] A list of errors message. An error message is made of one line and it can be displayed to the end-user.
* @api
* @deprecated 3.1.0 N°4756 Use EVENT_DB_CHECK_TO_DELETE event instead
*/
public function OnCheckToDelete($oObject);
/**
* Invoked when an object is updated into the database. The method is called right <b>after</b> the object has been written to the
* database.
*
* Useful methods you can call on $oObject :
*
* * {@see DBObject::ListPreviousValuesForUpdatedAttributes()} : list of changed attributes and their values before the change
* * {@see DBObject::Get()} : for a given attribute the new value that was persisted
*
* @param \cmdbAbstractObject $oObject The target object
* @param CMDBChange|null $oChange A change context. Since 2.0 it is fine to ignore it, as the framework does maintain this information
* once for all the changes made within the current page
*
* @return void
*
* @deprecated 3.1.0 N°4756 Use EVENT_DB_AFTER_WRITE event instead
* @api
* @since 2.7.0 N°2293 can access object changes by calling {@see DBObject::ListPreviousValuesForUpdatedAttributes()} on $oObject
*/
public function OnDBUpdate($oObject, $oChange = null);
/**
* Invoked when an object is created into the database
*
* The method is called right <b>after</b> the object has been written to the database.
*
* @param \cmdbAbstractObject $oObject The target object
* @param CMDBChange|null $oChange A change context. Since 2.0 it is fine to ignore it, as the framework does maintain this information
* once for all the changes made within the current page
*
* @return void
* @deprecated 3.1.0 N°4756 Use EVENT_DB_AFTER_WRITE event instead
* @api
*/
public function OnDBInsert($oObject, $oChange = null);
/**
* Invoked when an object is deleted from the database
*
* The method is called right <b>before</b> the object will be deleted from the database.
*
* @param \cmdbAbstractObject $oObject The target object
* @param CMDBChange|null $oChange A change context. Since 2.0 it is fine to ignore it, as the framework does maintain this information
* once for all the changes made within the current page
*
* @return void
* @deprecated 3.1.0 N°4756 Use EVENT_DB_AFTER_DELETE event instead
* @api
*/
public function OnDBDelete($oObject, $oChange = null);
}

View File

@@ -214,6 +214,15 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
*/
protected static bool $bBlockEventDBLinksChanged = false;
/**
* If set to true, the object is considered as modified, whatever the actual state is.
* This is used when an object is modified indirectly (eg. through a linked set)
*
* @var bool
*
* @since 3.3.0 N°8210 - Remove iApplicationObjectExtension
*/
private bool $bIsMarkedAsModified = false;
/**
* Constructor from a row of data (as a hash 'attcode' => value)
@@ -4542,21 +4551,6 @@ HTML;
return $res;
}
protected function PostInsertActions(): void
{
parent::PostInsertActions();
// Invoke extensions after insertion (the object must exist, have an id, etc.)
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach (MetaModel::EnumPlugins(iApplicationObjectExtension::class) as $oExtensionInstance) {
$sExtensionClass = get_class($oExtensionInstance);
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBInsert()");
$oKPI = new ExecutionKPI();
$oExtensionInstance->OnDBInsert($this, self::GetCurrentChange());
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBInsert');
}
}
/**
* @inheritdoc
* Attaches InlineImages to the current object
@@ -4589,21 +4583,6 @@ HTML;
return $res;
}
protected function PostUpdateActions(array $aChanges): void
{
parent::PostUpdateActions($aChanges);
// Invoke extensions after the update (could be before)
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach (MetaModel::EnumPlugins(iApplicationObjectExtension::class) as $oExtensionInstance) {
$sExtensionClass = get_class($oExtensionInstance);
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBUpdate()");
$oKPI = new ExecutionKPI();
$oExtensionInstance->OnDBUpdate($this, self::GetCurrentChange());
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBUpdate');
}
}
/**
* @param string $sMessageIdPrefix
*
@@ -4639,21 +4618,6 @@ HTML;
return $oDeletionPlan;
}
final protected function PreDeleteActions(): void
{
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$sExtensionClass = get_class($oExtensionInstance);
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBDelete()");
$oKPI = new ExecutionKPI();
$oExtensionInstance->OnDBDelete($this, self::GetCurrentChange());
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBDelete');
}
parent::PreDeleteActions();
}
final protected function PostDeleteActions(): void
{
parent::PostDeleteActions();
@@ -4666,25 +4630,20 @@ HTML;
return true;
}
// Plugins
//
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$sExtensionClass = get_class($oExtensionInstance);
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnIsModified()");
$oKPI = new ExecutionKPI();
$bIsModified = $oExtensionInstance->OnIsModified($this);
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnIsModified');
if ($bIsModified) {
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnIsModified() -> true");
return true;
} else {
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnIsModified() -> false");
}
}
return $this->bIsMarkedAsModified;
}
return false;
/**
* Override the default modification state of the object.
*
* The object is considered as modified, whatever the actual state is.
* This is used when an object is modified indirectly (eg. through a linked set)
*
* @return void
*/
public function MarkObjectAsModified(): void
{
$this->bIsMarkedAsModified = true;
}
/**
@@ -4698,7 +4657,7 @@ HTML;
}
/**
* Whether to bypass the checks of user rights when writing this object, could be used in {@link \iApplicationObjectExtension::OnCheckToWrite()}
* Whether to bypass the checks of user rights when writing this object
*
* @return bool
*/
@@ -4727,22 +4686,6 @@ HTML;
{
parent::DoCheckToWrite();
// Plugins
//
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$sExtensionClass = get_class($oExtensionInstance);
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnCheckToWrite()");
$oKPI = new ExecutionKPI();
$aNewIssues = $oExtensionInstance->OnCheckToWrite($this);
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnCheckToWrite');
if (is_array($aNewIssues) && (count($aNewIssues) > 0)) // Some extensions return null instead of an empty array
{
$this->m_aCheckIssues = array_merge($this->m_aCheckIssues, $aNewIssues);
}
}
// User rights
//
if (!$this->bAllowWrite)
@@ -4779,22 +4722,6 @@ HTML;
{
parent::DoCheckToDelete($oDeletionPlan);
// Plugins
//
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$sExtensionClass = get_class($oExtensionInstance);
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnCheckToDelete()");
$oKPI = new ExecutionKPI();
$aNewIssues = $oExtensionInstance->OnCheckToDelete($this);
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnCheckToDelete');
if (is_array($aNewIssues) && count($aNewIssues) > 0)
{
$this->m_aDeleteIssues = array_merge($this->m_aDeleteIssues, $aNewIssues);
}
}
// User rights
//
if (! $this->bAllowDelete)
@@ -5809,7 +5736,7 @@ JS
{
$this->NotifyAttachedObjectsOnLinkClassModification();
$this->RemoveObjectAwaitingEventDbLinksChanged(get_class($this), $this->GetKey());
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges, 'stimulus_applied' => $sStimulusBeingApplied]);
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges, 'stimulus_applied' => $sStimulusBeingApplied, 'cmdb_change' => self::GetCurrentChange()]);
}
//////////////
@@ -5847,7 +5774,7 @@ JS
final protected function FireEventAfterDelete(): void
{
$this->NotifyAttachedObjectsOnLinkClassModification();
$this->FireEvent(EVENT_DB_AFTER_DELETE);
$this->FireEvent(EVENT_DB_AFTER_DELETE, ['cmdb_change' => self::GetCurrentChange()]);
}
/**

View File

@@ -18,7 +18,7 @@
"laminas/laminas-mail": "^2.11",
"laminas/laminas-servicemanager": "^3.5",
"league/oauth2-google": "^4.0.1",
"nikic/php-parser": "~5.6.0",
"nikic/php-parser": "dev-master",
"pear/archive_tar": "~1.4.14",
"pelago/emogrifier": "^7.2.0",
"psr/log": "^3.0.0",
@@ -41,6 +41,10 @@
"symfony/stopwatch": "~6.4.0",
"symfony/web-profiler-bundle": "~6.4.0"
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/Combodo/PHP-Parser"
}],
"suggest": {
"ext-libsodium": "Required to use the AttributeEncryptedString.",
"ext-openssl": "Can be used as a polyfill if libsodium is not installed",

30
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "a0021a80fcc9bccc3f577530893e2974",
"content-hash": "be4951ced82be6e0ac8c18fa6ddaafc9",
"packages": [
{
"name": "apereo/phpcas",
@@ -1020,16 +1020,16 @@
},
{
"name": "nikic/php-parser",
"version": "v5.6.0",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56"
"url": "https://github.com/Combodo/PHP-Parser.git",
"reference": "8ffc1239ff48ed2476b2672dbcc939fcdc5b0f7a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56",
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56",
"url": "https://api.github.com/repos/Combodo/PHP-Parser/zipball/8ffc1239ff48ed2476b2672dbcc939fcdc5b0f7a",
"reference": "8ffc1239ff48ed2476b2672dbcc939fcdc5b0f7a",
"shasum": ""
},
"require": {
@@ -1042,13 +1042,14 @@
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^9.0"
},
"default-branch": true,
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
"dev-master": "5.x-dev"
}
},
"autoload": {
@@ -1056,7 +1057,11 @@
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"autoload-dev": {
"psr-4": {
"PhpParser\\": "test/PhpParser/"
}
},
"license": [
"BSD-3-Clause"
],
@@ -1071,10 +1076,9 @@
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0"
"source": "https://github.com/Combodo/PHP-Parser/tree/master"
},
"time": "2025-07-27T20:03:57+00:00"
"time": "2025-09-09T09:14:16+00:00"
},
{
"name": "paragonie/random_compat",
@@ -5243,7 +5247,9 @@
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {},
"stability-flags": {
"nikic/php-parser": 20
},
"prefer-stable": false,
"prefer-lowest": false,
"platform": {

View File

@@ -8161,7 +8161,7 @@ class AttributeURL extends AttributeString
* @since 3.0.3 moved from Config to AttributeURL constant
*/
public const DEFAULT_VALIDATION_PATTERN = /** @lang RegExp */
'(https?|ftp)\://([a-zA-Z0-9+!*(),;?&=\$_.-]+(\:[a-zA-Z0-9+!*(),;?&=\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\:[0-9]{2,5})?(/([a-zA-Z0-9:%+\$_-]\.?)+)*/?(\?[a-zA-Z+&\$_.-][a-zA-Z0-9;:[\]@&%=+/\$_.,-]*)?(#[a-zA-Z0-9_.-][a-zA-Z0-9+\$_.-]*)?';
'(https?|ftp)\://([a-zA-Z0-9+!*(),;?&=\$_.-]+(\:[a-zA-Z0-9+!*(),;?&=\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\:[0-9]{2,5})?(/([a-zA-Z0-9:%@+\$_-]\.?)+)*/?(\?[a-zA-Z+&\$_.-][a-zA-Z0-9;:[\]@&%=+/\$_.,-]*)?(#[a-zA-Z0-9_.-][a-zA-Z0-9+\$_.-]*)?';
/**
* Useless constructor, but if not present PHP 7.4.0/7.4.1 is crashing :( (N°2329)

View File

@@ -20,6 +20,9 @@
*/
use Combodo\iTop\Config\Validator\iTopConfigAstValidator;
use Combodo\iTop\Config\Validator\iTopConfigSyntaxValidator;
define('ITOP_APPLICATION', 'iTop');
define('ITOP_APPLICATION_SHORT', 'iTop');
@@ -1816,6 +1819,7 @@ class Config
return (array_key_exists($sPropCode, $this->m_aSettings));
}
/**
* @return string identifier that can be used for example to name WebStorage/SessionStorage keys (they
* are related to a whole domain, and a domain can host multiple itop)
@@ -2255,6 +2259,9 @@ class Config
$this->m_aModuleSettings[$sModule][$sProperty] = $value;
}
/**
* @deprecated 3.3.0 N°8190
*/
public function GetAddons()
{
if (array_key_exists("user rights", $this->m_aAddons)) {
@@ -2264,6 +2271,9 @@ class Config
}
}
/**
* @deprecated 3.3.0 N°8190
*/
public function SetAddons($aAddons)
{
$this->m_aAddons = $aAddons;
@@ -2842,20 +2852,8 @@ class Config
}
}
}
if (isset($aModuleInfo['installer']))
{
$sModuleInstallerClass = $aModuleInfo['installer'];
if (!class_exists($sModuleInstallerClass))
{
throw new Exception("Wrong installer class: '$sModuleInstallerClass' is not a PHP class - Module: ".$aModuleInfo['label']);
}
if (!is_subclass_of($sModuleInstallerClass, 'ModuleInstallerAPI'))
{
throw new Exception("Wrong installer class: '$sModuleInstallerClass' is not derived from 'ModuleInstallerAPI' - Module: ".$aModuleInfo['label']);
}
$aCallSpec = array($sModuleInstallerClass, 'BeforeWritingConfig');
call_user_func_array($aCallSpec, array($this));
}
RunTimeEnvironment::CallInstallerHandler($aModuleInfo, "BeforeWritingConfig", [$this]);
}
}
$this->SetAddOns($aAddOns);
@@ -3023,4 +3021,6 @@ class ConfigPlaceholdersResolver
IssueLog::Error($sErrorMessage, self::class, array($sSourceName, $sKey, $sDefault, $sWholeMask));
throw new ConfigException($sErrorMessage);
}
}

View File

@@ -7027,7 +7027,7 @@ abstract class MetaModel
* @param array $aParams
* @param bool $bAllowAllData
*
* @return \DBObject
* @return \DBObject|null
* @throws \OQLException
*/
public static function GetObjectFromOQL($sQuery, $aParams = null, $bAllowAllData = false)
@@ -7709,7 +7709,6 @@ abstract class MetaModel
'iLoginUIExtension',
'iPreferencesExtension',
'iApplicationUIExtension',
'iApplicationObjectExtension',
'iPopupMenuExtension',
'iPageUIBlockExtension',
'iBackofficeLinkedScriptsExtension',

View File

@@ -39,6 +39,23 @@
//
// .site-nav a { color:#BADA55!important; }
$ibo-shame--switch--width: 36px !default;
$ibo-shame--switch--height: 20px !default;
$ibo-shame--slider--background-color: $ibo-color-secondary-600 !default;
$ibo-shame--slider--before--height: 15px !default;
$ibo-shame--slider--before--width: 15px !default;
$ibo-shame--slider--before--background-color: $ibo-color-secondary-300 !default;
$ibo-shame--slider--is-checked--background-color: $ibo-color-primary-600 !default;
$ibo-shame--slider--is-focus--box-shadow: 0 0 1px $ibo-color-primary-600 !default;
$ibo-shame--slider--is-round--border-radius: 20px !default;
$ibo-shame--slider--is-round--before--border-radius: 7px !default;
// N°2847 - Recolor svg illustrations with iTop's primary color
.ibo-svg-illustration--container > svg *[fill="#6c63ff"]{
fill: $ibo-svg-illustration--fill;
@@ -56,8 +73,8 @@
.switch {
position: relative;
display: inline-block;
width: 36px;
height: 20px;
width: $ibo-shame--switch--width;
height: $ibo-shame--switch--height;
vertical-align: baseline;
}
@@ -74,27 +91,27 @@
left: 0;
right: 0;
bottom: 0;
background-color: $ibo-color-secondary-600;
background-color: $ibo-shame--slider--background-color;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 15px;
width: 15px;
height: $ibo-shame--slider--before--height;
width: $ibo-shame--slider--before--width;
left: 3px;
bottom: 3px;
background-color: $ibo-color-secondary-300;
background-color: $ibo-shame--slider--before--background-color;
transition: .4s;
}
input:checked + .slider {
background-color: $ibo-color-primary-600;
background-color: $ibo-shame--slider--is-checked--background-color;
}
input:focus + .slider {
box-shadow: 0 0 1px $ibo-color-primary-600;
box-shadow: $ibo-shame--slider--is-focus--box-shadow;
}
input:checked + .slider:before {
@@ -103,9 +120,9 @@ input:checked + .slider:before {
/* Rounded sliders */
.slider.round {
border-radius: 20px;
border-radius: $ibo-shame--slider--is-round--border-radius;
}
.slider.round:before {
border-radius: 7px;
border-radius: $ibo-shame--slider--is-round--before--border-radius;
}

View File

@@ -3,12 +3,14 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
.ibo-bulk--bulk-modify--incompatible-attribute {
$ibo-bulk--bulk-modify--incompatible-attribute--color--margin-right: $ibo-vendors-selectize--item--icon--margin-right !default;
$ibo-bulk--bulk-modify--incompatible-attribute--color: $ibo-color-information-500 !default;
.ibo-bulk--bulk-modify--incompatible-attribute {
&:before{
margin-right: $ibo-vendors-selectize--item--icon--margin-right;
margin-right: $ibo-bulk--bulk-modify--incompatible-attribute--color--margin-right;
@extend %fa-solid-base;
content: '\f05a';
color: $ibo-color-information-500;
color: $ibo-bulk--bulk-modify--incompatible-attribute--color;
}
}

View File

@@ -3,12 +3,16 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-linked-set--bulk-tooltip-info--content: '\f05a' !default;
$ibo-linked-set--bulk-tooltip-info--color: $ibo-color-information-500 !default;
$ibo-linked-set--bulk-tooltip-info--margin-right: $ibo-vendors-selectize--item--icon--margin-right !default;
.ibo-linked-set--bulk-tooltip-info {
font-size: $ibo-font-size-100;
@extend %ibo-font-ral-nor-100;
&:before{
margin-right: $ibo-vendors-selectize--item--icon--margin-right;
margin-right: $ibo-linked-set--bulk-tooltip-info--margin-right;
@extend %fa-solid-base;
content: '\f05a';
color: $ibo-color-information-500;
content: $ibo-linked-set--bulk-tooltip-info--content;
color: $ibo-linked-set--bulk-tooltip-info--color;
}
}

View File

@@ -16,7 +16,7 @@
@import "panel/all";
@import "pill/all";
@import "dashlet/all";
@import "add-to-dashboard";
@import "prop-within-details";
@import "caselog-entry-form-within-activity-panel";
@import "tab-container-within-panel";
@import "medallion-with-blocklist";

View File

@@ -3,13 +3,17 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-medallion-with-blocklist--icon--image--margin-x: auto !default;
$ibo-medallion-with-blocklist--icon--image--margin-y: 0 !default;
$ibo-medallion-with-blocklist--icon--description--margin-top: $ibo-spacing-400 !default;
.ibo-block-list--medallion{
flex-direction: column;
align-items: center;
> .ibo-medallion-icon--image{
margin: 0 auto;
margin: $ibo-medallion-with-blocklist--icon--image--margin-y $ibo-medallion-with-blocklist--icon--image--margin-x;
~ .ibo-medallion-icon--description{
margin-top: 12px;
margin-top: $ibo-medallion-with-blocklist--icon--description--margin-top;
}
}
> .ibo-medallion-icon--description{

View File

@@ -9,8 +9,4 @@
.ibo-details .ibo-prop--apply {
display: table-column;
}
.ibo-details {
margin-top: 5px;
}

View File

@@ -15,6 +15,13 @@ $ibo-panel-with-tab-container--margin-bottom: -1 * $ibo-panel--body--padding-bot
$ibo-panel-with-tab-container--tab-toggler--font-size--is-sticking: $ibo-font-size-100 !default;
$ibo-tab-container-within-panel--tabs-list--padding-top: $ibo-spacing-800 !default;
// I'm not sure where these values come from, might need to be replaced by variables
$ibo-tab-container-within-panel--tabs-list--min-width: calc(32px + 90px + 32px) !default;
$ibo-tab-container-within-panel--tabs-header--height: $ibo-spacing-800 !default;
$ibo-tab-container-within-panel--tabs--list--is-sticking--z-index: 10 !default;
$ibo-tab-container-within-panel--tabs--list--is-sticking--is-not-vertical--padding-left: $ibo-spacing-0 !default;
// Note: We use the child ">" selector to ensure this applies only to the child tab container, not another one that would be nested
.ibo-panel {
> .ibo-panel--body {
@@ -35,15 +42,15 @@ $ibo-panel-with-tab-container--tab-toggler--font-size--is-sticking: $ibo-font-si
flex-direction: row;
> .ibo-tab-container--tabs-list {
padding-top: 50px;
padding-top: $ibo-tab-container-within-panel--tabs-list--padding-top;
flex-direction: column;
height: auto;
padding-left: unset;
margin-right: unset;
min-width: calc(32px + 90px + 32px);
min-width: $ibo-tab-container-within-panel--tabs-list--min-width;
> .ibo-tab-container--tab-header {
height: 50px;
height: $ibo-tab-container-within-panel--tabs-header--height;
width: 100%;
justify-content: left;
@@ -68,12 +75,12 @@ $ibo-panel-with-tab-container--tab-toggler--font-size--is-sticking: $ibo-font-si
> .ibo-tab-container {
> .ibo-tab-container--tabs-list.ibo-is-sticking {
position: fixed;
z-index: 10;
z-index: $ibo-tab-container-within-panel--tabs--list--is-sticking--z-index;
}
&:not(.ibo-is-vertical){
> .ibo-tab-container--tabs-list.ibo-is-sticking {
padding-left: 0;
padding-left: $ibo-tab-container-within-panel--tabs--list--is-sticking--is-not-vertical--padding-left;
.ibo-tab-container--tab-toggler,
.ibo-tab-container--extra-tabs-list-toggler {

View File

@@ -3,8 +3,11 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-datatable-within-panel--panel-body--width: 100% !default;
.ibo-panel .ibo-panel--body{
.ibo-datatable{
width: 100%
width: $ibo-datatable-within-panel--panel-body--width;
}
}

View File

@@ -3,6 +3,8 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-object-details-with-tab-container--tab-list--padding-left: calc(#{$ibo-object-details--icon--spacing--as-medallion} + #{$ibo-object-details--icon--size} + #{$ibo-object-details--icon--spacing--as-medallion} - #{$ibo-tab-container--tab-toggler--padding-x}) !default;
// Note: We use the child ">" selector to ensure this applies only the child tab container, not another one that would be nested
.ibo-object-details.ibo-has-medallion-icon {
> .ibo-panel--body {
@@ -10,7 +12,7 @@
> .ibo-tab-container:not(.ibo-is-vertical) {
> .ibo-tab-container--tabs-list {
// Align tab toggler's title with the panel's title
padding-left: calc(#{$ibo-object-details--icon--spacing--as-medallion} + #{$ibo-object-details--icon--size} + #{$ibo-object-details--icon--spacing--as-medallion} - #{$ibo-tab-container--tab-toggler--padding-x});
padding-left: $ibo-object-details-with-tab-container--tab-list--padding-left;
}
}
}

View File

@@ -9,6 +9,12 @@ $ibo-dashlet--width--is-inline: auto !default;
$ibo-dashlet--elements-spacing-x: $ibo-spacing-600 !default;
$ibo-dashlet--elements-spacing-y: $ibo-spacing-600 !default;
$ibo-dashlet-blocker--z-index: 9 !default; /* To be above calendar links & all, but below .close-box (9) */
$ibo-dashlet-blocker--top: 0 !default;
$ibo-dashlet-blocker--left: 0 !default;
$ibo-dashlet-blocker--width: 100% !default;
$ibo-dashlet-blocker--height: 100% !default;
/* Rules */
.ibo-dashlet {
position: relative;
@@ -23,18 +29,13 @@ $ibo-dashlet--elements-spacing-y: $ibo-spacing-600 !default;
.ibo-dashlet--is-inline {
width: $ibo-dashlet--width--is-inline;
}
.ibo-details > .ibo-prop--apply {
display: table-column;
}
.ibo-details{
margin-top: 5px;
}
.ibo-dashlet-blocker{
position: absolute;
z-index: 9; /* To be above calendar links & all, but below .close-box (9) */
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: $ibo-dashlet-blocker--z-index;
top: $ibo-dashlet-blocker--top;
left: $ibo-dashlet-blocker--left;
width: $ibo-dashlet-blocker--width;
height: $ibo-dashlet-blocker--height;
cursor: not-allowed;
}

View File

@@ -24,6 +24,8 @@ $ibo-datatable--sort-order--color: $ibo-color-primary-600 !default;
$ibo-fieldsorter--selected--background-color: $ibo-color-blue-200 !default;
$ibo-datatable--selected-result-count--padding-right: 0.2em !default;
$ibo-datatable--selected-result-count--padding-left: 0.1em !default;
/* CSS variables (can be changed directly from the browser) */
:root {
@@ -134,8 +136,8 @@ $ibo-fieldsorter--selected--background-color: $ibo-color-blue-200 !default;
}
.ibo-datatable--selected-count, .ibo-datatable--result-count{
padding-right: 0.2em;
padding-left: 0.1em;
padding-right: $ibo-datatable--selected-result-count--padding-right;
padding-left: $ibo-datatable--selected-result-count--padding-left;
}
//

View File

@@ -3,7 +3,7 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-input-image--image-view--min-height: 96px !default;
$ibo-input-image--image-view--min-height: $ibo-size-500 !default;
$ibo-input-image--image-view--background-color: $ibo-color-grey-200 !default;
$ibo-input-image--image-view--border-radius: $ibo-border-radius-500 !default;

View File

@@ -1,5 +1,14 @@
/*
* @copyright Copyright (C) 2010-2025 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-input-richtext-placeholder--height: $ibo-size-600 !default;
$ibo-input-richtext-placeholder--width: 100% !default;
.ibo-input-richtext-placeholder{
height: 200px;
width: 100%;
height: $ibo-input-richtext-placeholder--height;
width: $ibo-input-richtext-placeholder--width;
visibility: hidden;
}

View File

@@ -3,6 +3,8 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-input-select-icon--menu--icon--max-height: 100% !default;
$ibo-input-select-icon--menu--icon--max-width: 100% !default;
$ibo-input-select-icon--icon--padding-right: $ibo-spacing-200 !default;
$ibo-input-select-icon--menu--z-index: 21 !default;
@@ -16,8 +18,8 @@ $ibo-input-select-icon--menu--icon--margin-right: 10px !default;
display: inline-flex;
text-align: left;
>img{
max-height: 100%;
max-width: 100%;
max-height: $ibo-input-select-icon--menu--icon--max-height;
max-width: $ibo-input-select-icon--menu--icon--max-width;
padding-right: $ibo-input-select-icon--icon--padding-right;
}
>span{

View File

@@ -20,6 +20,7 @@ $ibo-input-select-selectize--item--active--background-color: $ibo-color-blue-100
$ibo-input-select-wrapper--width: 100% !default;
$ibo-input-select-wrapper--after--content: "\f0d7" !default;
$ibo-input-select-wrapper--after--right: 8px !default;
$ibo-input-select-wrapper--after--height: 28px !default;
$ibo-input-select-wrapper--after--margin-left: -16px !default;
@@ -32,6 +33,7 @@ $ibo-input-select--action-button--height: 28px !default;
$ibo-input-select--action-button--width: 23px !default;
$ibo-input-select--action-button--margin-top: $ibo-spacing-0 !default;
$ibo-input-select--action-button--margin-right: 3px !default;
$ibo-input-select--action-button--font-size: $ibo-font-size-100 !default;
$ibo-input-select--action-button--background-color: inherit !default;
$ibo-input-select--action-button--color: $ibo-color-grey-800 !default;
$ibo-input-select--action-button--padding-x: $ibo-spacing-100 !default;
@@ -57,7 +59,7 @@ $ibo-input-select--autocomplete-item-image--border: 1px solid $ibo-color-grey-60
min-width: $ibo-input-select-selectize--value--min-midth !important;
input {
border-width: 0px;
border-width: 0;
color: inherit;
border-color: $ibo-color-white-100;
padding-left: $ibo-input-select--padding-x;
@@ -121,7 +123,7 @@ $ibo-input-select--autocomplete-item-image--border: 1px solid $ibo-color-grey-60
.ibo-input-select-wrapper::after{
position: absolute;
z-index: 1;
content: "\f0d7";
content: $ibo-input-select-wrapper--after--content;
font-family: "Font Awesome 5 Free";
font-weight: 600;
@@ -145,7 +147,7 @@ $ibo-input-select--autocomplete-item-image--border: 1px solid $ibo-color-grey-60
.ibo-input-select-wrapper--with-buttons:not(.ibo-input-select-autocomplete-wrapper)::after {
position: absolute;
z-index: 1;
content: "\f0d7";
content: $ibo-input-select-wrapper--after--content;
font-family: "Font Awesome 5 Free";
font-weight: 600;
cursor: pointer;
@@ -168,7 +170,7 @@ $ibo-input-select--autocomplete-item-image--border: 1px solid $ibo-color-grey-60
margin-top: $ibo-input-select--action-button--margin-top;
margin-right: $ibo-input-select--action-button--margin-right;
font-size: $ibo-font-size-100;
font-size: $ibo-input-select--action-button--font-size;
background-color: $ibo-input-select--action-button--background-color;
color: $ibo-input-select--action-button--color;
padding: $ibo-input-select--action-button--padding-y $ibo-input-select--action-button--padding-x;

View File

@@ -8,6 +8,9 @@ $ibo-input-text--min-height: 12rem !default;
$ibo-input-text--padding-x: $ibo-spacing-400 !default;
$ibo-input-text--padding-y: 10px !default;
$ibo-input-text--export--width: 100% !default;
$ibo-input-text--export--min-height: 15em !default;
.ibo-input-text {
width: $ibo-input-text--width;
min-height: $ibo-input-text--min-height;
@@ -23,6 +26,6 @@ $ibo-input-text--padding-y: 10px !default;
}
.ibo-input-text--export {
width: 100%;
min-height: 15em;
width: $ibo-input-text--export--width;
min-height: $ibo-input-text--export--min-height;
}

View File

@@ -9,6 +9,8 @@ $ibo-toggler--wrapper--height: 20px !default;
$ibo-toggler--slider--border-radius: $ibo-border-radius-900 !default;
$ibo-toggler--slider--background-color: $ibo-color-secondary-600 !default;
$ibo-toggler--slider--before--left: 3px !default;
$ibo-toggler--slider--before--bottom: 3px !default;
$ibo-toggler--slider--before--height: 15px !default;
$ibo-toggler--slider--before--width: 15px !default;
$ibo-toggler--slider--before--border-radius: $ibo-border-radius-full !default;
@@ -46,8 +48,8 @@ $ibo-toggler--label--margin-left: 4px !default;
.ibo-toggler--slider:before {
content: "";
position: absolute;
left: 3px;
bottom: 3px;
left: $ibo-toggler--slider--before--left;
bottom: $ibo-toggler--slider--before--bottom;
height: $ibo-toggler--slider--before--height;
width: $ibo-toggler--slider--before--width;
border-radius: $ibo-toggler--slider--before--border-radius;

View File

@@ -27,6 +27,9 @@ $ibo-input--disabled--background-color: $ibo-color-grey-300 !default;
$ibo-input--placeholder--color: $ibo-color-grey-700 !default;
$ibo-input-wrapper--is-error--border-color: $ibo-color-red-600 !default;
$ibo-input-wrapper--vanilla--is-error--border: 0 !default;
$ibo-input-wrapper--vanilla--is-error--background-color: $ibo-color-transparent !default;
$ibo-field-validation: $ibo-color-red-700 !default;
$ibo-input--margin-x: $ibo-spacing-200 !default;
@@ -62,8 +65,8 @@ textarea.ibo-input{
border-color: $ibo-input-wrapper--is-error--border-color;
}
.ibo-input-vanilla input{
border: 0;
background-color: #11ffee00;
border: $ibo-input-wrapper--vanilla--is-error--border;
background-color: $ibo-input-wrapper--vanilla--is-error--background-color;
}
}
input.ibo-input-vanilla{

View File

@@ -10,6 +10,10 @@ $ibo-popover-menu--padding: $ibo-spacing-0 !default;
$ibo-popover-menu--toggler-visual-hint--margin-left: 0.5rem !default;
$ibo-popover-menu--section--height: 100% !default;
$ibo-popover-menu--section--margin-x: $ibo-spacing-0 !default;
$ibo-popover-menu--section--margin-y: $ibo-spacing-0 !default;
$ibo-popover-menu--section-border-radius: $ibo-popover-menu--border-radius !default;
.ibo-popover-menu {
@@ -35,8 +39,8 @@ $ibo-popover-menu--section-border-radius: $ibo-popover-menu--border-radius !defa
display: flex;
flex-direction: column;
align-self: flex-start;
margin: $ibo-spacing-0 $ibo-spacing-0;
width: 100%;
margin: $ibo-popover-menu--section--margin-y $ibo-popover-menu--section--margin-x;
width: $ibo-popover-menu--section--height;
white-space: nowrap;
overflow: hidden; /* To avoid first/last entries of the menu to have no border-radius on hover */

View File

@@ -6,6 +6,7 @@
@import "navigation-menu";
@import "top-bar";
@import "content";
@import "details";
@import "tab-container/tab-container";
@import "tab-container/tab";
@import "multi-column/multi-column";

View File

@@ -2,6 +2,9 @@
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-v-spacer--padding-top: 1em !default;
$ibo-side-content--background-color: $ibo-content-block--background-color !default;
$ibo-side-content--border-left: $ibo-content-block--border !default;
/* Note: We have to wrap it in the ID in order to overload its rules, otherwise, the ID takes over the simple CSS class... */
#ibo-center-container {
@@ -16,10 +19,10 @@
}
.ibo-v-spacer {
padding-top: 1em;
padding-top: $ibo-v-spacer--padding-top;
}
#ibo-side-content {
background-color: $ibo-content-block--background-color;
border-left: $ibo-content-block--border;
background-color: $ibo-side-content--background-color;
border-left: $ibo-side-content--border-left;
}

View File

@@ -0,0 +1,9 @@
/*
* @copyright Copyright (C) 2010-2025 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-details--margin-top: 5px !default;
.ibo-details {
margin-top: $ibo-details--margin-top;
}

View File

@@ -218,7 +218,8 @@ $ibo-navigation-menu--user-info--height--is-expanded: 100% !default;
.ibo-navigation-menu--body{
width: $ibo-navigation-menu--body--width-expanded;
.ibo-navigation-menu--toggler-bar{
/* Values are hardcoded to ease the animation and there's no point in overloading them */
.ibo-navigation-menu--toggler-bar{
&:nth-child(1){
top: 4px;
left: 7px;
@@ -412,6 +413,7 @@ $ibo-navigation-menu--user-info--height--is-expanded: 100% !default;
transition: all 0.2s linear;
background-color: $ibo-navigation-menu--body--text-color;
/* Values are hardcoded to ease the animation and there's no point in overloading them */
&:nth-child(1){
top: 0;
}

View File

@@ -18,6 +18,7 @@ $ibo-activity-entry--medallion--has-no-image--background-color: $ibo-color-blue-
$ibo-activity-entry--medallion--has-no-image--text-color: $ibo-color-white-100 !default;
$ibo-activity-entry--medallion--has-no-image--border: 1px solid $ibo-color-grey-200 !default;
$ibo-activity-entry--information--margin-to-side: $ibo-spacing-0 !default;
$ibo-activity-entry--information--margin-to-other-side: $ibo-activity-entry--medallion--diameter + $ibo-activity-entry--medallion--margin-with-information !default;
$ibo-activity-entry--main-information--padding-x: $ibo-spacing-500 !default;
@@ -88,7 +89,7 @@ $ibo-activity-panel--load-all-entries--is-hover--margin-left: ($ibo-activity-pan
margin-left: $ibo-activity-entry--medallion--margin-with-information;
}
.ibo-activity-entry--information{
margin-right: 0;
margin-right: $ibo-activity-entry--information--margin-to-side;
margin-left: $ibo-activity-entry--information--margin-to-other-side;
}
.ibo-activity-entry--main-information{
@@ -109,7 +110,7 @@ $ibo-activity-panel--load-all-entries--is-hover--margin-left: ($ibo-activity-pan
&:not(.ibo-is-current-user){
.ibo-activity-entry--information{
margin-right: $ibo-activity-entry--information--margin-to-other-side;
margin-left: 0;
margin-left: $ibo-activity-entry--information--margin-to-side;
}
/* Bubble tip on the left for last entry of the group */
&:last-child{

View File

@@ -104,6 +104,7 @@ $ibo-activity-panel--add-caselog-entry-button--icon--line-height: 33px !default;
$ibo-activity-panel--entry-forms-confirmation-explanation--spacing: $ibo-spacing-500 !default;
$ibo-activity-panel--entry-forms-confirmation-preference-input--spacing: 0.5rem !default;
$ibo-activity-panel--closed-cover--z-index: 2 !default;
$ibo-activity-panel--closed-cover--background-color: $ibo-activity-panel--header--background-color !default;
$ibo-activity-panel--open-icon--margin-left: 0.75rem !default;
@@ -433,14 +434,12 @@ $ibo-activity-panel--open-icon--margin-left: 0.75rem !default;
.ibo-activity-panel--closed-cover {
display: none;
position: absolute;
z-index: 2; // Above the compose button and all
// padding-top: 64px;
z-index: $ibo-activity-panel--closed-cover--z-index; // Above the compose button and all
top: 0;
bottom: 0;
left: 0;
right: 0;
@extend %ibo-fully-centered-content;
// align-items: flex-start;
background-color: $ibo-activity-panel--closed-cover--background-color;
cursor: pointer;
}

View File

@@ -11,7 +11,7 @@ $ibo-caselog-entry-form--actions--margin-top: $ibo-spacing-300 !default;
$ibo-caselog-entry-form--actions--margin-bottom: $ibo-caselog-entry-form--actions--margin-top !default;
$ibo-caselog-entry-form--lock-indicator--margin-top: $ibo-caselog-entry-form--padding-bottom !default;
$ibo-caselog-entry-form--lock-icon--size: 32px !default;
$ibo-caselog-entry-form--lock-icon--size: $ibo-size-350 !default;
$ibo-caselog-entry-form--lock-icon--text-color: $ibo-color-grey-50 !default;
$ibo-caselog-entry-form--lock-icon--background-color: $ibo-color-grey-800 !default;
$ibo-caselog-entry-form--lock-icon--border-radius: $ibo-border-radius-full !default;

View File

@@ -25,6 +25,10 @@ $ibo-dashboard-editor--delete-dashlet-icon--right: 9px !default;
$ibo-dashboard-editor--delete-dashlet-icon--padding: $ibo-spacing-100 6px !default;
$ibo-dashboard-editor--delete-dashlet-icon--z-index: 21 !default;
$ibo-dashlet--properties--padding-bottom: 20px !default;
$ibo-dashlet--properties--table--width: 100% !default;
$ibo-dashlet--properties--table--cell--margin-bottom: 14px !default;
.ibo-dashboard-editor--pane{
flex-grow: 1;
@@ -47,13 +51,13 @@ $ibo-dashboard-editor--delete-dashlet-icon--z-index: 21 !default;
.ibo-dashlet--properties{
display: flex;
flex-direction: column;
padding-bottom: 20px;
padding-bottom: $ibo-dashlet--properties--padding-bottom;
table{
width: 100%;
width: $ibo-dashlet--properties--table--width;
text-align: left;
td, th {
margin-bottom: 14px;
margin-bottom: $ibo-dashlet--properties--table--cell--margin-bottom;
.ibo-field {
@extend %ibo-font-size-100;

View File

@@ -7,8 +7,38 @@
$ibo-dashboard--grid--width: 100% !default;
$ibo-dashboard--grid--elements-spacing-x: $ibo-dashlet--elements-spacing-x !default;
$ibo-dashboard--grid--elements-spacing-y: $ibo-dashlet--elements-spacing-y !default;
$ibo-dashboard--grid--edit-mode--margin: 1px !default;
$ibo-dashboard--grid--edit-mode--border-color: $ibo-color-grey-400 !default;
$ibo-dashboard--grid--edit-mode--border: 2px $ibo-dashboard--grid--edit-mode--border-color dashed !default;
$ibo-dashboard--grid--edit-mode--width: 100% !default;
$ibo-dashboard--grid--edit-mode--min-height: 40px !default;
$ibo-dashboard--top-bar-padding-bottom: 20px !default;
$ibo-dashboard--selector--margin-left: $ibo-spacing-400 !default;
$ibo-dashboard--selector--margin-right: 1 !default;
$ibo-dashboard--selector--hover--background-color: $ibo-color-secondary-100 !default;
$ibo-dashboard--selector--hover--border-radius: $ibo-button--border-radius !default;
$ibo-dashboard--selector--selector-label--margin-x: 10px !default;
$ibo-dashboard--switch--width: 30px !default;
$ibo-dashboard--switch--height: $ibo-size-300 !default;
$ibo-dashboard--slider--before--content: "\f007" !default;
$ibo-dashboard--slider--before--font-size: $ibo-font-size-50 !default;
$ibo-dashboard--slider--before--color: $ibo-color-secondary-800 !default;
$ibo-dashboard--slider--before--right: 5px !default;
$ibo-dashboard--slider--before--bottom: 3px !default;
$ibo-dashboard--slider--after--content: "\f1ad" !default;
$ibo-dashboard--slider--after--font-size: $ibo-font-size-150 !default;
$ibo-dashboard--slider--after--color: $ibo-color-primary-600 !default;
$ibo-dashboard--slider--after--left: 6px !default;
$ibo-dashboard--slider--after--bottom: 1px !default;
/* Rules */
.ibo-dashboard--top-bar {
@extend %ibo-full-height-content;
@@ -30,18 +60,18 @@ $ibo-dashboard--top-bar-padding-bottom: 20px !default;
.ibo-dashboard--selector {
display: flex;
align-items: center;
margin-left: 12px;
margin-right: 1px;
margin-left: $ibo-dashboard--selector--margin-left;
margin-right: $ibo-dashboard--selector--margin-right;
&:hover {
background-color: $ibo-color-secondary-100;
border-radius: $ibo-button--border-radius;
background-color: $ibo-dashboard--selector--hover--background-color;
border-radius: $ibo-dashboard--selector--hover--border-radius;
}
.selector-label {
display: inline-block;
margin-left: 10px;
margin-right: 10px;
margin-left: $ibo-dashboard--selector--selector-label--margin-x;
margin-right: $ibo-dashboard--selector--selector-label--margin-x;
vertical-align: super;
}
}
@@ -75,7 +105,7 @@ $ibo-dashboard--top-bar-padding-bottom: 20px !default;
margin: calc(-1 * #{$ibo-dashboard--grid--elements-spacing-y} / 2) calc(-1 * #{$ibo-dashboard--grid--elements-spacing-x} / 2); /* Because of the margin all around the dashlets, we need to compensate it */
min-width: 0;
/* Compensate negative margin on inner borders to simulate egal dashlets spacing between columns */
/* Compensate negative margin on inner borders to simulate equal dashlets spacing between columns */
&:not(:last-child) {
margin-right: 0;
}
@@ -85,10 +115,10 @@ $ibo-dashboard--top-bar-padding-bottom: 20px !default;
}
&.edit_mode {
margin: 1px;
border: 2px #ccc dashed;
width: 100%;
min-height: 40px;
margin: $ibo-dashboard--grid--edit-mode--margin;
border: $ibo-dashboard--grid--edit-mode--border;
width: $ibo-dashboard--grid--edit-mode--width;
min-height: $ibo-dashboard--grid--edit-mode--min-height;
}
}
@@ -98,8 +128,8 @@ $ibo-dashboard--top-bar-padding-bottom: 20px !default;
.ibo-dashboard--switch {
position: relative;
display: inline-block;
width: 30px;
height: 24px;
width: $ibo-dashboard--switch--width;
height: $ibo-dashboard--switch--height;
vertical-align: baseline;
}
@@ -119,31 +149,29 @@ $ibo-dashboard--top-bar-padding-bottom: 20px !default;
}
.ibo-dashboard--slider:before {
@extend %fa-solid-base;
content: $ibo-dashboard--slider--before--content;
font-size: $ibo-dashboard--slider--before--font-size;
color: $ibo-dashboard--slider--before--color;
position: absolute;
right: 5px;
bottom: 3px;
color: $ibo-color-secondary-800;
content: "\f007";
font-family: "Font Awesome 5 Free", serif;
font-size: $ibo-font-size-50;
font-weight: 900;
right: $ibo-dashboard--slider--before--right;
bottom: $ibo-dashboard--slider--before--bottom;
}
.ibo-dashboard--slider:after {
@extend %fa-solid-base;
content: $ibo-dashboard--slider--after--content;
font-size: $ibo-dashboard--slider--after--font-size;
color: $ibo-dashboard--slider--after--color;
position: absolute;
left: 6px;
bottom: 1px;
color: $ibo-color-primary-600;
content: "\f1ad";
font-family: "Font Awesome 5 Free", serif;
font-size: $ibo-font-size-150;
font-weight: 900;
left: $ibo-dashboard--slider--after--left;
bottom: $ibo-dashboard--slider--after--bottom;
}
input:checked + .ibo-dashboard--slider:before {
content: "\f1ad";
content: $ibo-dashboard--slider--after--content;
}
input:checked + .ibo-dashboard--slider:after {
content: "\f007";
content: $ibo-dashboard--slider--before--content;
}

View File

@@ -4,10 +4,15 @@
*/
$ibo-column--min-width: 300px !default;
$ibo-mini-column--min-width: 30px !default;
$ibo-column--padding-x: abs($ibo-multi-column--margin-x) !default;
$ibo-column--padding-y: $ibo-spacing-0 !default;
$ibo-mini-column--min-width: 30px !default;
$ibo-mini-column--padding-x: $ibo-column--padding-x !default;
$ibo-mini-column--padding-y: $ibo-column--padding-y !default;
$ibo-mini-column--button-margin-left: $ibo-spacing-0 !default;
$ibo-mini-column--button-margin-right: $ibo-spacing-0 !default;
$ibo-column--margin-bottom--is-last-element: $ibo-spacing-800 !default;
.ibo-column {
@@ -26,14 +31,14 @@ $ibo-column--margin-bottom--is-last-element: $ibo-spacing-800 !default;
min-width: $ibo-mini-column--min-width;
flex-grow: 1;
flex-shrink: 1;
padding: $ibo-column--padding-y $ibo-column--padding-x;
padding: $ibo-mini-column--padding-y $ibo-mini-column--padding-x;
flex-basis: 10%;
display: flex;
flex-direction: column;
>.ibo-button{
margin-left: 0;
margin-right: 0;
margin-left: $ibo-mini-column--button-margin-left;
margin-right: $ibo-mini-column--button-margin-right;
}
&:not(:last-child) {
margin-bottom: $ibo-column--margin-bottom--is-last-element;

View File

@@ -3,7 +3,7 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-multi-column--margin-x: -16px !default; /* This is to compensate columns padding and make the whole multicolumn align with the parent borders (cf. Bootstrap rows / cols) */
$ibo-multi-column--margin-x: -$ibo-spacing-500 !default; /* This is to compensate columns padding and make the whole multicolumn align with the parent borders (cf. Bootstrap rows / cols) */
$ibo-multi-column--margin-y: $ibo-spacing-0 !default;
.ibo-multi-column {

View File

@@ -16,6 +16,8 @@ $ibo-object-details--icon--spacing--as-medallion--is-sticking: $ibo-object-detai
$ibo-object-details--status-dot--size: 10px !default;
$ibo-object-details--status-dot--spacing: $ibo-spacing-300 !default;
$ibo-object-details--status-dot--border-radius: $ibo-border-radius-full !default;
$ibo-object-details--status--class--before--content: "(" !default;
$ibo-object-details--status--class--after--content: ")" !default;
$ibo-object-details--tag--sibling-spacing: $ibo-spacing-400 !default;
$ibo-object-details--tag--color: $ibo-panel--subtitle--color !default;
@@ -86,11 +88,11 @@ $ibo-object-details--header-right--padding-right--is-sticking: $ibo-spacing-300
display: inline-flex; /* To avoid having spaces around the class name due to the indentation */
&::before {
content: "(";
content: $ibo-object-details--status--class--before--content;
}
&::after {
content: ")";
content: $ibo-object-details--status--class--after--content;
}
}

View File

@@ -5,12 +5,13 @@
$ibo-wizard-container--padding: 10px $ibo-spacing-500 !default;
$ibo-wizard-container--background-color: $ibo-color-blue-200 !default;
$ibo-wizard-container--border-radius: $ibo-border-radius-300 !default;
$ibo-wizard-container--border-color: $ibo-color-blue-600 !default;
$ibo-wizard-container--border-width: 3px !default;
.ibo-wizard-container {
padding: $ibo-wizard-container--padding;
background: $ibo-wizard-container--background-color;
border-radius: $ibo-border-radius-300;
border-radius: $ibo-wizard-container--border-radius;
border-left: $ibo-wizard-container--border-width solid $ibo-wizard-container--border-color;
}

View File

@@ -63,11 +63,10 @@ $ibo-attachment--tab-header--drop-in--icon--color: $ibo-color-blue-600 !default;
background-color: $ibo-attachment--tab-header--drop-in--background-color;
color: $ibo-attachment--tab-header--drop-in--color;
> a::after{
padding-left: $ibo-attachment--tab-header--drop-in--icon--padding-left;
font-family: "Font Awesome 5 Free";
content: $ibo-attachment--tab-header--drop-in--icon--content;
font-weight: 900;
color: $ibo-color-blue-600;
@extend %fa-solid-base;
padding-left: $ibo-attachment--tab-header--drop-in--icon--padding-left;
color: $ibo-attachment--tab-header--drop-in--icon--color;
}
}
}

View File

@@ -19,18 +19,19 @@ $ibo-audit--audit-line--csv-download--height: 2.5em !default;
$ibo-audit--audit-line--status-indicator--diameter: 12px !default;
$ibo-audit--audit-line--status-indicator--margin-right: 5px !default;
/* Use semantic colors to ease accessibility */
$ibo-audit--status--color: (
'red': (
$ibo-color-red-700,
$ibo-color-danger-700,
),
'orange': (
$ibo-color-orange-700,
$ibo-color-warning-700,
),
'green': (
$ibo-color-green-800,
$ibo-color-success-800,
),
);
@each $sColor, $aAttributes in $ibo-audit--status--color {
$bg-color: nth($aAttributes, 1);
.ibo-audit--audit-category--panel .ibo-panel--body {

View File

@@ -7,6 +7,7 @@ $ibo-csv-import--cell-message--padding-top: 3px !default;
$ibo-csv-import--cell-modified--color: $ibo-color-blue-700 !default;
$ibo-csv-import--cell-error--color: $ibo-color-red-700 !default;
$ibo-csv-import--row--border-color: $ibo-color-grey-400 !default;
$ibo-csv-import--row--border: 1px $ibo-csv-import--row--border-color solid !default;
$ibo-csv-import--row-error--background-color: $ibo-color-red-200 !default;
$ibo-csv-import--download-file--color: $ibo-color-primary-400 !default;
$ibo-csv-import--download-file--font-size: 4em !default;
@@ -31,20 +32,20 @@ div.ibo-csv-import--cell-message {
}
tr.ibo-csv-import--row-unchanged td {
border-bottom: 1px $ibo-csv-import--row--border-color solid;
border-bottom: $ibo-csv-import--row--border;
}
.wizContainer table tr.ibo-csv-import--row-error td {
border-bottom: 1px $ibo-csv-import--row--border-color solid;
border-bottom: $ibo-csv-import--row--border;
background-color: $ibo-csv-import--row-error--background-color;
}
tr.ibo-csv-import--row-modified td {
border-bottom: 1px $ibo-csv-import--row--border-color solid;
border-bottom: $ibo-csv-import--row--border;
}
tr.ibo-csv-import--row-added td {
border-bottom: 1px $ibo-csv-import--row--border-color solid;
border-bottom: $ibo-csv-import--row--border;
}
.ibo-csv-import--download-file {

View File

@@ -11,6 +11,9 @@ $ibo-data-synchro-source--replicas-table--cell--arrow--min-width: 100px !default
$ibo-data-synchro-source--replicas-status--warning--margin: $ibo-spacing-0 5px $ibo-spacing-0 $ibo-spacing-300 !default;
$ibo-data-synchro-source--replicas-status-separator--border-color: $ibo-color-white-100 !default;
$ibo-data-synchro-source--replicas-status-separator--border: 2px solid $ibo-data-synchro-source--replicas-status-separator--border-color !default;
$ibo-data-synchro-source--replicas-status--color: (
'grey': (
$ibo-color-grey-400,
@@ -42,6 +45,10 @@ $ibo-data-synchro-source--replicas-status--color: (
),
) !default;
$ibo-data-synchro-source--synoptics--cell--arrow--border-color: $ibo-color-grey-50 !default;
$ibo-data-synchro-source--synoptics--cell--arrow--border: 2px solid $ibo-data-synchro-source--synoptics--cell--arrow--border-color !default;
@each $sColor, $aAttributes in $ibo-data-synchro-source--replicas-status--color {
$bg-color: nth($aAttributes, 1);
$color: nth($aAttributes, 2);
@@ -50,8 +57,9 @@ $ibo-data-synchro-source--replicas-status--color: (
background-color: $bg-color;
}
}
.ibo-data-synchro-source--replicas-status-separator {
border-top: 2px solid $ibo-color-white-100;
border-top: $ibo-data-synchro-source--replicas-status-separator--border-color;
}
.ibo-data-synchro-source--replicas-status.ibo-is-light{
@@ -67,7 +75,7 @@ $ibo-data-synchro-source--replicas-status--color: (
text-align: center;
&.arrow {
min-width: $ibo-data-synchro-source--replicas-table--cell--arrow--min-width;
border-top: 2px solid $ibo-color-grey-50;
border-top: $ibo-data-synchro-source--synoptics--cell--arrow--border;
}
}
.ibo-data-synchro-source--replicas-status--warning{

View File

@@ -29,12 +29,14 @@ $ibo-datamodel-viewer--schema--self-referencing--hover--fill: $ibo-datamodel-vie
$ibo-datamodel-viewer--schema--tooltip--fill: $ibo-color-white-100 !default;
$ibo-datamodel-viewer--schema--tooltip--background-color: $ibo-color-grey-900 !default;
$ibo-datamodel-viewer--schema--tooltip--border-color: $ibo-color-grey-700 !default;
$ibo-datamodel-viewer--schema--tooltip--border: 1px solid $ibo-datamodel-viewer--schema--tooltip--border-color !default;
$ibo-datamodel-viewer--schema--tooltip--border-radius: $ibo-border-radius-300 !default;
$ibo-datamodel-viewer--schema--tooltip--icon--font-size: $ibo-font-size-100 !default;
$ibo-datamodel-viewer--schema--tooltip--span--margin: 3px !default;
$ibo-datamodel-viewer--schema--tooltip-top--border-color: $ibo-color-grey-700 !default;
$ibo-datamodel-viewer--schema--tooltip-top--border: 1px solid $ibo-datamodel-viewer--schema--tooltip-top--border-color !default;
$ibo-datamodel-viewer--schema--tooltip-top--padding: 3px !default;
$ibo-datamodel-viewer--lifecycle-image--margin-bottom: $ibo-spacing-500 !default;
@@ -116,7 +118,7 @@ $ibo-datamodel-viewer--lifecycle-image--margin-bottom: $ibo-spacing-500 !default
position: fixed;
text-align: center;
background: $ibo-datamodel-viewer--schema--tooltip--fill;
border: 1px solid $ibo-datamodel-viewer--schema--tooltip--border-color;
border: $ibo-datamodel-viewer--schema--tooltip--border;
border-radius: $ibo-datamodel-viewer--schema--tooltip--border-radius;
pointer-events: none;
fill: $ibo-datamodel-viewer--schema--tooltip--background-color;
@@ -132,7 +134,7 @@ $ibo-datamodel-viewer--lifecycle-image--margin-bottom: $ibo-spacing-500 !default
#tooltipD3_top {
@extend %ibo-font-ral-bol-100;
border-bottom: 1px solid $ibo-datamodel-viewer--schema--tooltip-top--border-color;
border-bottom: $ibo-datamodel-viewer--schema--tooltip-top--border;
padding: $ibo-datamodel-viewer--schema--tooltip-top--padding;
}

View File

@@ -22,6 +22,10 @@ $ibo-display-graph--search-box--criterion--content--padding-x: 15px !default;
$ibo-display-graph--search-box--criterion--content--checkbox--margin-right: 10px !default;
$ibo-display-graph--graph-grouping-threshold--padding-right: $ibo-spacing-0 !default;
$ibo-display-graph--impacted-placeholder-height: $ibo-size-650 !default;
.itop-simple-graph {
margin-top: $ibo-simple-graph--margin-top;
border: 1px dotted transparent;
@@ -83,7 +87,7 @@ $ibo-display-graph--search-box--criterion--content--checkbox--margin-right: 10px
}
#graph_grouping_threshold{
width: auto;
padding-right: 0;
padding-right: $ibo-display-graph--graph-grouping-threshold--padding-right;
}
.ibo-display-graph--search-box {
.sf_criterion_area{
@@ -121,5 +125,5 @@ $ibo-display-graph--search-box--criterion--content--checkbox--margin-right: 10px
}
}
#impacted_objects_lists_placeholder, #impacted_groups_placeholder{
height: 250px;
height: $ibo-display-graph--impacted-placeholder-height;
}

View File

@@ -2,6 +2,7 @@
* @copyright Copyright (C) 2010-2024 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-input-select--notification-item--mixed-value--font-size: $ibo-font-size-100 !default;
$ibo-input-select--notification-item--mixed-value--color: $ibo-color-primary-800 !default;
$ibo-input-select--notification-item--mixed-value--margin-left: 4px !default;
@@ -12,7 +13,7 @@ $ibo-input-select--notification-item--mixed-value--margin-left: 4px !default;
}
.ibo-input-select--notification-item--mixed-value{
font-size: $ibo-font-size-100;
font-size: $ibo-input-select--notification-item--mixed-value--font-size;
color: $ibo-input-select--notification-item--mixed-value--color;
margin-left: $ibo-input-select--notification-item--mixed-value--margin-left;
}

View File

@@ -4,11 +4,15 @@
*/
$ibo-notifications--view-all--container--grid-gap: $ibo-spacing-600 !default;
$ibo-notifications--view-all--container--object-summary--title--font-size: $ibo-font-size-250 !default;
$ibo-notifications--view-all--container--object-summary--toolbar--min-width: $ibo-size-500 !default;
$ibo-notifications--view-all--container--object-summary--panel--body--max-height: 400px !default;
$ibo-notifications--view-all--item--unread--highlight--background-color: $ibo-color-red-600 !default;
$ibo-notifications--view-all--item--read--highlight--background-color: $ibo-color-grey-200 !default;
$ibo-notifications--view-all--container--read-unread--action--margin-left: $ibo-spacing-0 !default;
$ibo-notifications--view-all--container--large--grid-template-columns: repeat(3, 1fr) !default;
$ibo-notifications--view-all--container--medium--grid-template-columns: repeat(2, 1fr) !default;
$ibo-notifications--view-all--container--small--grid-template-columns: repeat(1, 1fr) !default;
@@ -20,10 +24,10 @@ $ibo-notifications--view-all--empty--svg--max-width: 30% !default;
display: grid;
grid-gap: $ibo-notifications--view-all--container--grid-gap;
.ibo-object-summary .ibo-panel--title{
font-size: $ibo-font-size-250;
font-size: $ibo-notifications--view-all--container--object-summary--title--font-size;
}
.ibo-object-summary .ibo-panel--toolbar{
min-width: 102px;
min-width: $ibo-notifications--view-all--container--object-summary--toolbar--min-width;
}
.ibo-object-summary > .ibo-panel--body{
box-shadow: none;
@@ -59,7 +63,7 @@ $ibo-notifications--view-all--empty--svg--max-width: 30% !default;
.ibo-notifications--view-all--container {
.ibo-notifications--view-all--read-action, .ibo-notifications--view-all--unread-action {
margin-left: 0 !important;
margin-left: $ibo-notifications--view-all--container--read-unread--action--margin-left !important;
}
}

View File

@@ -1,3 +1,9 @@
/*
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-oauth-wizard--illustration--svg--max-height: $ibo-size-700 !default;
.ibo-oauth-wizard .ibo-panel--body{
.ibo-oauth-wizard--form--container{
display: flex;
@@ -8,7 +14,7 @@
}
.ibo-oauth-wizard--illustration svg{
max-height: 400px;
max-height: $ibo-oauth-wizard--illustration--svg--max-height;
}
}
#ibo-oauth-wizard--conf--result{

View File

@@ -9,6 +9,8 @@ $ibo-preferences--user-preferences--picture-placeholder--image--diameter: 54px !
$ibo-preferences--user-preferences--picture-placeholder--image--border-radius: $ibo-border-radius-full !default;
$ibo-preferences--user-preferences--picture-placeholder--image--margin: $ibo-spacing-400 !default;
$ibo-preferences--user-preferences--picture-placeholder--image--background-color: $ibo-color-grey-300 !default;
$ibo-preferences--user-preferences--picture-placeholder--image--border-color: $ibo-preferences--user-preferences--picture-placeholder--image--background-color !default;
$ibo-preferences--user-preferences--picture-placeholder--image--border: solid 3px $ibo-preferences--user-preferences--picture-placeholder--image--border-color !default;
$ibo-preferences--user-preferences--picture-placeholder--image--active--border-color: $ibo-color-blue-800;
$ibo-preferences--user-preferences--picture-placeholder--image--hover--border-color: $ibo-color-blue-600;
@@ -18,6 +20,8 @@ $ibo-keyboard-shortcut--shortcut--width: 30% !default;
$ibo-keyboard-shortcut--input--color: $ibo-color-grey-800 !default;
$ibo-keyboard-shortcut--input--background-color: transparent !default;
$ibo-keyboard-shortcut--input--border-color: $ibo-color-grey-500 !default;
$ibo-keyboard-shortcut--input--border: 1px solid $ibo-keyboard-shortcut--input--border-color !default;
$ibo-keyboard-shortcut--input--border-bottom: 2px solid $ibo-keyboard-shortcut--input--border-color !default;
$ibo-keyboard-shortcut--input--border-radius: $ibo-border-radius-300 !default;
$ibo-keyboard-shortcut--input--padding-y: $ibo-spacing-100 !default;
$ibo-keyboard-shortcut--input--padding-x: $ibo-spacing-200 !default;
@@ -26,6 +30,8 @@ $ibo-keyboard-shortcut--input--margin-bottom: 5px !default;
$ibo-keyboard-shortcut--input--is-focus--color: $ibo-color-primary-800 !default;
$ibo-keyboard-shortcut--input--is-focus--border-color: $ibo-color-primary-600 !default;
$ibo-favorite-organizations--toolbar--padding-top: $ibo-button--padding-y/2 !default;
#ibo-main-content >.ibo-panel{
margin-left: $ibo-preferences--panel--margin-x;
margin-right: $ibo-preferences--panel--margin-x;
@@ -41,7 +47,7 @@ $ibo-keyboard-shortcut--input--is-focus--border-color: $ibo-color-primary-600 !d
width: $ibo-preferences--user-preferences--picture-placeholder--image--diameter;
border-radius: $ibo-preferences--user-preferences--picture-placeholder--image--border-radius;
margin: $ibo-preferences--user-preferences--picture-placeholder--image--margin;
border: solid 3px $ibo-preferences--user-preferences--picture-placeholder--image--background-color;
border: $ibo-preferences--user-preferences--picture-placeholder--image--border;
> img{
border-radius: $ibo-preferences--user-preferences--picture-placeholder--image--border-radius;
@@ -72,8 +78,8 @@ $ibo-keyboard-shortcut--input--is-focus--border-color: $ibo-color-primary-600 !d
color: $ibo-keyboard-shortcut--input--color;
background-color: $ibo-keyboard-shortcut--input--background-color;
border: 1px solid $ibo-keyboard-shortcut--input--border-color;
border-bottom: 2px solid $ibo-keyboard-shortcut--input--border-color;
border: $ibo-keyboard-shortcut--input--border;
border-bottom: $ibo-keyboard-shortcut--input--border-bottom;
border-radius: $ibo-keyboard-shortcut--input--border-radius;
padding: $ibo-keyboard-shortcut--input--padding-y $ibo-keyboard-shortcut--input--padding-x;
@@ -92,5 +98,5 @@ $ibo-keyboard-shortcut--input--is-focus--border-color: $ibo-color-primary-600 !d
}
#ibo-favorite-organizations .ibo-datatable--toolbar {
padding-top: $ibo-button--padding-y/2;
padding-top: $ibo-favorite-organizations--toolbar--padding-top;
}

View File

@@ -6,14 +6,15 @@
$ibo-page-banner--background-color: $ibo-color-red-600 !default;
$ibo-page-banner--text-color: $ibo-color-red-100 !default;
$ibo-page-banner--text-content: "THIS IS NOT PRODUCTION INSTANCE" !default;
$ibo-page-banner--padding: 0.2 !default;
$ibo-page-banner--font-size: 1rem !default;
#ibo-page-banner::before {
display: block;
width: 100%;
padding: 0.2rem;
padding: $ibo-page-banner--padding;
text-align: center;
font-size: 1rem;
font-size: $ibo-page-banner--font-size;
background: $ibo-page-banner--background-color;
color: $ibo-page-banner--text-color;
content: $ibo-page-banner--text-content;

View File

@@ -19,6 +19,9 @@ $ibo-hyperlink-text-decoration--on-hover: $common-hyperlink-text-decoration--on-
$ibo-hyperlink-color--on-active: $common-hyperlink-color--on-active !default;
$ibo-hyperlink-text-decoration--on-active: $common-hyperlink-text-decoration--on-active !default;
$ibo-paragraph--spacing-top: 0.25em !default;
$ibo-paragraph--spacing-bottom: 0.25em !default;
$ibo-figure--spacing-x: $common-figure--spacing-x !default; /* Mind that this matches Bulma rule for figure */
$ibo-figure--spacing-y: $common-figure--spacing-y !default;
@@ -122,8 +125,8 @@ $ibo-figure--spacing-y: $common-figure--spacing-y !default;
}
p {
margin-top: 0.25em;
margin-bottom: 0.25em;
margin-top: $ibo-paragraph--spacing-top;
margin-bottom: $ibo-paragraph--spacing-bottom;
}
figure {

View File

@@ -3,12 +3,15 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
$ibo-selectable--content: ' ' !default;
$ibo-selectable--background-color: $common-selectable--background-color !default;
$ibo-selectable--hover--content: '\f058' !default;
$ibo-selectable--hover--color: $common-selectable--hover--color !default;
$ibo-selectable--hover--background-color: $common-selectable--hover--background-color !default;
$ibo-selectable--hover--background-opacity: $common-selectable--hover--background-opacity !default;
$ibo-selected--content: '\f058' !default;
$ibo-selected--color: $common-selected--color !default;
$ibo-selected--background-color: $common-selected--background-color !default;
$ibo-selected--background-opacity: $common-selected--background-opacity !default;
@@ -17,21 +20,21 @@ $ibo-selected--hover--background-color: $common-selected--hover--background-colo
$ibo-selected--hover--background-opacity: $common-selected--hover--background-opacity !default;
@mixin ibo-selectable {
content: ' ';
content: $ibo-selectable--content;
@extend %fa-solid-base;
background-color: $ibo-selectable--background-color;
cursor: pointer;
}
@mixin ibo-selectable-hover {
@extend %fa-regular-base;
content: '\f058';
content: $ibo-selectable--hover--content;
color: $ibo-selectable--hover--color;
background-color: transparentize($ibo-selectable--hover--background-color, $ibo-selectable--hover--background-opacity);
}
@mixin ibo-selected {
@extend %fa-solid-base;
content: '\f058';
content: $ibo-selected--content;
color: $ibo-selected--color;
background-color: transparentize($ibo-selected--background-color, $ibo-selected--background-opacity);
}

View File

@@ -5,15 +5,16 @@
*/
use Combodo\iTop\Application\WebPage\WebPage;
use Combodo\iTop\Service\Events\EventData;
use Combodo\iTop\Service\Events\EventService;
use Combodo\iTop\Service\Events\iEventServiceSetup;
class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExtension
class AttachmentPlugIn implements iApplicationUIExtension, iEventServiceSetup
{
const ENUM_GUI_ALL = 'all';
const ENUM_GUI_BACKOFFICE = 'backoffice';
const ENUM_GUI_PORTALS = 'portals';
protected static $m_bIsModified = false;
public function OnDisplayProperties($oObject, WebPage $oPage, $bEditMode = false)
{
if ($this->GetAttachmentsPosition() == 'properties')
@@ -158,45 +159,39 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
return array();
}
public function OnIsModified($oObject)
public function RegisterEventsAndListeners() : void
{
return self::$m_bIsModified;
EventService::RegisterListener(EVENT_DB_AFTER_WRITE, [$this, 'OnDBAfterWrite']);
EventService::RegisterListener(EVENT_DB_AFTER_DELETE, [$this, 'OnDBAfterDelete']);
}
public function OnCheckToWrite($oObject)
public function OnDBAfterWrite(EventData $oEventData)
{
return array();
}
$oObject = $oEventData->Get('object');
$oCMDBChange = $oEventData->Get('cmdb_change');
$bIsNew = $oEventData->Get('is_new');
public function OnCheckToDelete($oObject)
{
return array();
}
public function OnDBUpdate($oObject, $oChange = null)
{
if ($this->IsTargetObject($oObject))
{
// Get all current attachments
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
$oSet = new DBObjectSet($oSearch, array(), array('class' => get_class($oObject), 'item_id' => $oObject->GetKey()));
while ($oAttachment = $oSet->Fetch())
{
$oAttachment->SetItem($oObject, true /*updateonchange*/);
if($bIsNew){
self::UpdateAttachments($oObject, $oCMDBChange);
}
else{
// Get all current attachments
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
$oSet = new DBObjectSet($oSearch, array(), array('class' => get_class($oObject), 'item_id' => $oObject->GetKey()));
while ($oAttachment = $oSet->Fetch())
{
$oAttachment->SetItem($oObject, true /*updateonchange*/);
}
}
}
}
public function OnDBInsert($oObject, $oChange = null)
public function OnDBAfterDelete(EventData $oEventData)
{
if ($this->IsTargetObject($oObject))
{
self::UpdateAttachments($oObject, $oChange);
}
}
$oObject = $oEventData->Get('object');
public function OnDBDelete($oObject, $oChange = null)
{
if ($this->IsTargetObject($oObject))
{
$oSearch = DBObjectSearch::FromOQL("SELECT Attachment WHERE item_class = :class AND item_id = :item_id");
@@ -291,7 +286,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
* @see ObjectFormManager::FinalizeAttachments() for the portal version
*
* @param $oObject
* @param $oChange
* @param $oCMDBChange
*
* @return void
* @throws \ArchivedObjectException
@@ -303,10 +298,8 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
* @throws \MySQLHasGoneAwayException
* @throws \OQLException
*/
protected static function UpdateAttachments($oObject, $oChange = null)
protected static function UpdateAttachments($oObject, $oCMDBChange = null)
{
self::$m_bIsModified = false;
if (utils::ReadParam('attachment_plugin', 'not-in-form') == 'not-in-form')
{
// Workaround to an issue in iTop < 2.0
@@ -363,9 +356,10 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
{
foreach ($aActions as $oChangeOp)
{
self::RecordHistory($oChange, $oObject, $oChangeOp);
self::RecordHistory($oCMDBChange, $oObject, $oChangeOp);
}
self::$m_bIsModified = true;
$oObject->MarkObjectAsModified();
}
}
}
@@ -556,11 +550,11 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
}
/////////////////////////////////////////////////////////////////////////
private static function RecordHistory($oChange, $oTargetObject, $oMyChangeOp)
private static function RecordHistory($oCMDBChange, $oTargetObject, $oMyChangeOp)
{
if (!is_null($oChange))
if (!is_null($oCMDBChange))
{
$oMyChangeOp->Set("change", $oChange->GetKey());
$oMyChangeOp->Set("change", $oCMDBChange->GetKey());
}
$oMyChangeOp->Set("objclass", get_class($oTargetObject));
$oMyChangeOp->Set("objkey", $oTargetObject->GetKey());
@@ -648,6 +642,8 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
return $bReadonly;
}
}
/**

View File

@@ -4,362 +4,20 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
use Combodo\iTop\Application\UI\Base\Component\Alert\Alert;
use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\Button\ButtonUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\Form\Form;
use Combodo\iTop\Application\UI\Base\Component\Html\Html;
use Combodo\iTop\Application\UI\Base\Component\Input\InputUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\Title\TitleUIBlockFactory;
use Combodo\iTop\Application\WebPage\iTopWebPage;
use Combodo\iTop\Config\Validator\iTopConfigAstValidator;
use Combodo\iTop\Config\Validator\iTopConfigSyntaxValidator;
use Combodo\iTop\Config\Controller\ConfigEditorController;
use Combodo\iTop\Config\Validator\iTopConfigValidator;
require_once(APPROOT.'application/startup.inc.php');
const CONFIG_ERROR = 0;
const CONFIG_WARNING = 1;
const CONFIG_INFO = 2;
/**
* @param $sContents
* @param $oP
*
* @throws \Exception
*/
function TestConfig($sContents, $oP)
{
/// 1- first check if there is no malicious code
$oiTopConfigValidator = new iTopConfigAstValidator();
$oiTopConfigValidator->Validate($sContents);
/// 2 - only after we are sure that there is no malicious cade, we can perform a syntax check!
$oiTopConfigValidator = new iTopConfigSyntaxValidator();
$oiTopConfigValidator->Validate($sContents);
}
/**
* @param $sSafeContent
*
* @return bool
*/
function DBPasswordInNewConfigIsOk($sSafeContent)
{
$bIsWindows = (array_key_exists('WINDIR', $_SERVER) || array_key_exists('windir', $_SERVER));
if ($bIsWindows && (preg_match("@'db_pwd' => '[^%!\"]+',@U", $sSafeContent) === 0)) {
return false;
}
return true;
}
function CheckAsyncTasksRetryConfig(Config $oTempConfig, iTopWebPage $oP)
{
$iWarnings = 0;
foreach (get_declared_classes() as $sPHPClass) {
$oRefClass = new ReflectionClass($sPHPClass);
if ($oRefClass->isSubclassOf('AsyncTask') && !$oRefClass->isAbstract()) {
$aMessages = AsyncTask::CheckRetryConfig($oTempConfig, $oRefClass->getName());
if (count($aMessages) !== 0) {
foreach ($aMessages as $sMessage) {
$oAlert = AlertUIBlockFactory::MakeForWarning('', $sMessage);
$oP->AddUiBlock($oAlert);
$iWarnings++;
}
}
}
}
return $iWarnings;
}
/**
* @param \Exception $e
*
* @return \Combodo\iTop\Application\UI\Base\Component\Alert\Alert
*/
function GetAlertFromException(Exception $e): Alert
{
switch ($e->getCode()) {
case CONFIG_WARNING:
$oAlert = AlertUIBlockFactory::MakeForWarning('', $e->getMessage());
break;
case CONFIG_INFO:
$oAlert = AlertUIBlockFactory::MakeForInformation('', $e->getMessage());
break;
case CONFIG_ERROR:
default:
$oAlert = AlertUIBlockFactory::MakeForDanger('', $e->getMessage());
}
return $oAlert;
}
/////////////////////////////////////////////////////////////////////
// Main program
//
LoginWebPage::DoLogin(); // Check user rights and prompt if needed
ApplicationMenu::CheckMenuIdEnabled('ConfigEditor');
//$sOperation = utils::ReadParam('operation', 'menu');
//$oAppContext = new ApplicationContext();
$oP = new iTopWebPage(Dict::S('config-edit-title'));
$oP->set_base(utils::GetAbsoluteUrlAppRoot().'pages/');
$sAceDir = 'node_modules/ace-builds/src-min/';
$oP->LinkScriptFromAppRoot($sAceDir.'ace.js');
$oP->LinkScriptFromAppRoot($sAceDir.'mode-php.js');
$oP->LinkScriptFromAppRoot($sAceDir.'theme-eclipse.js');
$oP->LinkScriptFromAppRoot($sAceDir.'ext-searchbox.js');
$oConfigEditorController = new ConfigEditorController();
$oConfigEditorController->SetDefaultOperation('Edit');
$oConfigEditorController->HandleOperation();
try {
$sOperation = utils::ReadParam('operation', '');
$iEditorTopMargin = 2;
if (UserRights::IsAdministrator() && ExecutionKPI::IsEnabled()) {
$iEditorTopMargin += 6;
}
$oP->AddUiBlock(TitleUIBlockFactory::MakeForPage(Dict::S('config-edit-title')));
if (MetaModel::GetConfig()->Get('demo_mode')) {
throw new Exception(Dict::S('config-not-allowed-in-demo'), CONFIG_INFO);
}
if (MetaModel::GetModuleSetting('itop-config', 'config_editor', '') == 'disabled') {
throw new Exception(Dict::S('config-interactive-not-allowed'), CONFIG_WARNING);
}
$sConfigFile = APPROOT.'conf/'.utils::GetCurrentEnvironment().'/config-itop.php';
$iEditorTopMargin += 9;
$sConfigContent = file_get_contents($sConfigFile);
$sConfigChecksum = md5($sConfigContent);
$sConfig = str_replace("\r\n", "\n", $sConfigContent);
$sOriginalConfig = $sConfig;
if (!empty($sOperation)) {
$iEditorTopMargin += 5;
$sConfig = utils::ReadParam('new_config', '', false, 'raw_data');
}
try {
if ($sOperation == 'revert') {
throw new Exception(Dict::S('config-reverted'), CONFIG_WARNING);
}
if ($sOperation == 'save') {
$sTransactionId = utils::ReadParam('transaction_id', '', false, 'transaction_id');
if (!utils::IsTransactionValid($sTransactionId, true)) {
throw new Exception(Dict::S('config-error-transaction'), CONFIG_ERROR);
}
$sChecksum = utils::ReadParam('checksum');
if ($sChecksum !== $sConfigChecksum) {
throw new Exception(Dict::S('config-error-file-changed'), CONFIG_ERROR);
}
if ($sConfig === $sOriginalConfig) {
throw new Exception(Dict::S('config-no-change'), CONFIG_INFO);
}
TestConfig($sConfig, $oP); // throws exceptions
@chmod($sConfigFile, 0770); // Allow overwriting the file
$sTmpFile = tempnam(SetupUtils::GetTmpDir(), 'itop-cfg-');
// Don't write the file as-is since it would allow to inject any kind of PHP code.
// Instead, write the interpreted version of the file
// Note:
// The actual raw PHP code will anyhow be interpreted exactly twice: once in TestConfig() above
// and a second time during the load of the Config object below.
// If you are really concerned about an iTop administrator crafting some malicious
// PHP code inside the config file, then turn off the interactive configuration
// editor by adding the configuration parameter:
// 'itop-config' => array(
// 'config_editor' => 'disabled',
// )
file_put_contents($sTmpFile, $sConfig);
$oTempConfig = new Config($sTmpFile, true);
$oTempConfig->WriteToFile($sConfigFile);
@unlink($sTmpFile);
@chmod($sConfigFile, 0440); // Read-only
if (DBPasswordInNewConfigIsOk($sConfig)) {
$oAlert = AlertUIBlockFactory::MakeForSuccess('', Dict::S('config-saved'));
} else {
$oAlert = AlertUIBlockFactory::MakeForInformation('', Dict::S('config-saved-warning-db-password'));
}
$oP->AddUiBlock($oAlert);
$iWarnings = CheckAsyncTasksRetryConfig($oTempConfig, $oP);
// Read the config from disk after save
$sConfigContent = file_get_contents($sConfigFile);
$sConfigChecksum = md5($sConfigContent);
$sConfig = str_replace("\r\n", "\n", $sConfigContent);
$sOriginalConfig = $sConfig;
}
}
catch (Exception $e) {
$oAlert = GetAlertFromException($e);
$oP->AddUiBlock($oAlert);
}
// (remove EscapeHtml) N°5914 - Wrong encoding in modules configuration editor
$oP->AddUiBlock(new Html('<p>'.Dict::S('config-edit-intro').'</p>'));
$oForm = new Form();
$oForm->AddSubBlock(InputUIBlockFactory::MakeForHidden('operation', 'save', 'operation'));
$oForm->AddSubBlock(InputUIBlockFactory::MakeForHidden('transaction_id', utils::GetNewTransactionId()));
$oForm->AddSubBlock(InputUIBlockFactory::MakeForHidden('checksum', $sConfigChecksum));
//--- Cancel button
$oCancelButton = ButtonUIBlockFactory::MakeForCancel(Dict::S('config-cancel'), 'cancel_button', null, true, 'cancel_button');
$oCancelButton->SetOnClickJsCode("return ResetConfig();");
$oForm->AddSubBlock($oCancelButton);
//--- Submit button
$oSubmitButton = ButtonUIBlockFactory::MakeForPrimaryAction(Dict::S('config-apply'), null, Dict::S('config-apply'), true, 'submit_button');
$oForm->AddSubBlock($oSubmitButton);
//--- Config editor
$oForm->AddSubBlock(InputUIBlockFactory::MakeForHidden('prev_config', $sOriginalConfig, 'prev_config'));
$oForm->AddSubBlock(InputUIBlockFactory::MakeForHidden('new_config', $sOriginalConfig));
$oForm->AddHtml("<div id =\"new_config\" style=\"position: absolute; top: ".$iEditorTopMargin."em; bottom: 0; left: 5px; right: 5px;\"></div>");
$oP->AddUiBlock($oForm);
$oP->add_script(
<<<'JS'
var EditorUtils = (function() {
var STORAGE_RANGE_KEY = 'cfgEditorRange';
var STORAGE_LINE_KEY = 'cfgEditorFirstline';
var _editorSavedRange = null;
var _editorSavedFirstLine = null;
var saveEditorDisplay = function(editor) {
_initObjectValues(editor);
_persistObjectValues();
};
var _initObjectValues = function(editor) {
_editorSavedRange = editor.getSelectionRange();
_editorSavedFirstLine = editor.renderer.getFirstVisibleRow();
};
var _persistObjectValues = function() {
sessionStorage.setItem(EditorUtils.STORAGE_RANGE_KEY, JSON.stringify(_editorSavedRange));
sessionStorage.setItem(EditorUtils.STORAGE_LINE_KEY, _editorSavedFirstLine);
};
var restoreEditorDisplay = function(editor) {
_restoreObjectValues();
_setEditorDisplay(editor);
};
var _restoreObjectValues = function() {
if ((sessionStorage.getItem(STORAGE_RANGE_KEY) == null)
|| (sessionStorage.getItem(STORAGE_LINE_KEY) == null)) {
return;
}
_editorSavedRange = JSON.parse(sessionStorage.getItem(EditorUtils.STORAGE_RANGE_KEY));
_editorSavedFirstLine = sessionStorage.getItem(EditorUtils.STORAGE_LINE_KEY);
sessionStorage.removeItem(STORAGE_RANGE_KEY);
sessionStorage.removeItem(STORAGE_LINE_KEY);
};
var _setEditorDisplay = function(editor) {
if ((_editorSavedRange == null) || (_editorSavedFirstLine == null)) {
return;
}
editor.selection.setRange(_editorSavedRange);
editor.renderer.scrollToRow(_editorSavedFirstLine);
};
var getEditorForm = function(editor) {
var editorContainer = $(editor.container);
return editorContainer.closest("form");
};
var updateConfigEditorButtonState = function(editor) {
var isSameContent = (editor.getValue() == $('#prev_config').val());
var hasNoError = $.isEmptyObject(editor.getSession().getAnnotations());
$('#cancel_button').prop('disabled', isSameContent);
$('#submit_button').prop('disabled', isSameContent || !hasNoError);
};
return {
STORAGE_RANGE_KEY: STORAGE_RANGE_KEY,
STORAGE_LINE_KEY : STORAGE_LINE_KEY,
saveEditorDisplay : saveEditorDisplay,
restoreEditorDisplay : restoreEditorDisplay,
getEditorForm : getEditorForm,
updateConfigEditorButtonState : updateConfigEditorButtonState
};
})();
JS
);
$oP->add_ready_script(<<<'JS'
var editor = ace.edit("new_config");
var configurationSource = $('input[name="new_config"]');
editor.getSession().setValue(configurationSource.val());
editor.getSession().on('change', function()
{
configurationSource.val(editor.getSession().getValue());
EditorUtils.updateConfigEditorButtonState(editor);
});
editor.getSession().on("changeAnnotation", function()
{
EditorUtils.updateConfigEditorButtonState(editor);
});
editor.setTheme("ace/theme/eclipse");
editor.getSession().setMode("ace/mode/php");
editor.commands.addCommand({
name: 'save',
bindKey: {win: "Ctrl-S", "mac": "Cmd-S"},
exec: function(editor) {
var editorForm = EditorUtils.getEditorForm(editor);
var submitButton = $('#submit_button');
if (submitButton.is(":enabled")) {
editorForm.trigger('submit');
}
}
});
var editorForm = EditorUtils.getEditorForm(editor);
editorForm.on('submit', function() {
EditorUtils.saveEditorDisplay(editor);
});
EditorUtils.restoreEditorDisplay(editor);
editor.focus();
JS
);
$sConfirmCancel = addslashes(Dict::S('config-confirm-cancel'));
$oP->add_script(<<<JS
function ResetConfig()
{
$("#operation").attr('value', 'revert');
if (confirm('$sConfirmCancel'))
{
$('input[name="new_config"]').val(prevConfig.val());
return true;
}
return false;
}
JS
);
} catch (Exception $e) {
$oAlert = GetAlertFromException($e);
$oP->AddUiBlock($oAlert);
}
$oP->output();

View File

@@ -22,6 +22,8 @@ SetupWebPage::AddModule(
'src/Validator/ConfigNodesVisitor.php',
'src/Validator/iTopConfigAstValidator.php',
'src/Validator/iTopConfigSyntaxValidator.php',
'src/Validator/iTopConfigValidator.php',
'src/Controller/ConfigEditorController.php',
),
'webservice' => array(),
'dictionary' => array(

View File

@@ -0,0 +1,175 @@
<?php
/*
* @copyright Copyright (C) 2010-2025 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Config\Controller;
use Combodo\iTop\Application\TwigBase\Controller\Controller;
use Combodo\iTop\Config\Validator\iTopConfigValidator;
use Config;
use Dict;
use Exception;
use MetaModel;
use SetupUtils;
use utils;
class ConfigEditorController extends Controller
{
public const ROUTE_NAMESPACE = 'config_editor';
public const MODULE_NAME = "itop-config";
protected array $aWarnings = [];
protected array $aInfo = [];
protected array $aErrors = [];
protected array $aSuccesses = [];
public function __construct() {
parent::__construct(MODULESROOT.static::MODULE_NAME.'/templates', static::MODULE_NAME);
}
public function OperationEdit() : void
{
$bShowEditor = true;
$sConfigChecksum = '';
$sCurrentConfig = '';
try {
$sOperation = utils::ReadParam('edit_operation');
if (MetaModel::GetConfig()->Get('demo_mode')) {
throw new Exception(Dict::S('config-not-allowed-in-demo'), iTopConfigValidator::CONFIG_INFO);
}
if (MetaModel::GetModuleSetting('itop-config', 'config_editor', '') == 'disabled') {
throw new Exception(Dict::S('config-interactive-not-allowed'), iTopConfigValidator::CONFIG_WARNING);
}
$sConfigFile = APPROOT.'conf/'.utils::GetCurrentEnvironment().'/config-itop.php';
$sCurrentConfig = file_get_contents($sConfigFile);
$sConfigChecksum = md5($sCurrentConfig);
try {
if ($sOperation == 'revert') {
$this->AddAlert(Dict::S('config-reverted'), iTopConfigValidator::CONFIG_WARNING);
}
else if ($sOperation == 'save') {
$sTransactionId = utils::ReadParam('transaction_id', '', false, 'transaction_id');
if (!utils::IsTransactionValid($sTransactionId)) {
throw new Exception(Dict::S('config-error-transaction'), iTopConfigValidator::CONFIG_ERROR);
}
$sChecksum = utils::ReadParam('checksum');
if ($sChecksum !== $sConfigChecksum) {
throw new Exception(Dict::S('config-error-file-changed'), iTopConfigValidator::CONFIG_ERROR);
}
$sNewConfig = utils::ReadParam('new_config', '', false, 'raw_data');
$sNewConfig = str_replace("\r\n", "\n", $sNewConfig);
if ($sNewConfig === $sCurrentConfig) {
throw new Exception(Dict::S('config-no-change'), iTopConfigValidator::CONFIG_INFO);
}
$oValidator = new iTopConfigValidator();
$oValidator->Validate($sNewConfig);// throws exceptions
@chmod($sConfigFile, 0770); // Allow overwriting the file
$sTmpFile = tempnam(SetupUtils::GetTmpDir(), 'itop-cfg-');
// Don't write the file as-is since it would allow to inject any kind of PHP code.
// Instead, write the interpreted version of the file
// Note:
// The actual raw PHP code will anyhow be interpreted exactly twice: once in TestConfig() above
// and a second time during the load of the Config object below.
// If you are really concerned about an iTop administrator crafting some malicious
// PHP code inside the config file, then turn off the interactive configuration
// editor by adding the configuration parameter:
// 'itop-config' => array(
// 'config_editor' => 'disabled',
// )
file_put_contents($sTmpFile, $sNewConfig);
$oTempConfig = new Config($sTmpFile, true);
$oTempConfig->WriteToFile($sConfigFile);
@unlink($sTmpFile);
@chmod($sConfigFile, 0440); // Read-only
if ($oValidator->DBPasswordIsOk($oTempConfig->Get('db_pwd'))) {
$this->AddAlert(Dict::S('config-saved'), iTopConfigValidator::CONFIG_SUCCESS);
} else {
$this->AddAlert(Dict::S('config-saved-warning-db-password'), iTopConfigValidator::CONFIG_INFO);
}
$this->AddAlert($oValidator->CheckAsyncTasksRetryConfig($oTempConfig), iTopConfigValidator::CONFIG_WARNING);
// Read the config from disk after save
$sCurrentConfig = file_get_contents($sConfigFile);
$sConfigChecksum = md5($sCurrentConfig);
}
}
catch (Exception $e) {
$this->AddAlertFromException($e);
}
$this->AddAceScripts();
}
catch (Exception $e) {
$bShowEditor = false;
$this->AddAlertFromException($e);
}
// display page
$this->DisplayPage([
'aErrors' => $this->aErrors,
'aWarnings' => $this->aWarnings,
'aNotices' => $this->aInfo,
'aSuccesses' => $this->aSuccesses,
'bShowEditor' => $bShowEditor,
'sTransactionId' => utils::GetNewTransactionId(),
'sChecksum' => $sConfigChecksum,
'sPrevConfig' => $sCurrentConfig,
'sNewConfig' => $sCurrentConfig,
]);
}
/**
* @return void
* @throws \Exception
*/
protected function AddAceScripts(): void
{
$sAceDir = 'node_modules/ace-builds/src-min/';
$this->AddLinkedScript(utils::GetAbsoluteUrlAppRoot().$sAceDir.'ace.js');
$this->AddLinkedScript(utils::GetAbsoluteUrlAppRoot().$sAceDir.'mode-php.js');
$this->AddLinkedScript(utils::GetAbsoluteUrlAppRoot().$sAceDir.'theme-eclipse.js');
$this->AddLinkedScript(utils::GetAbsoluteUrlAppRoot().$sAceDir.'ext-searchbox.js');
}
public function AddAlertFromException(Exception $e): void
{
$this->AddAlert($e->getMessage(), $e->getCode());
}
public function AddAlert(array|string $sMessage, $iLevel): void
{
if (is_array($sMessage)) {
foreach ($sMessage as $sSingleMessage) {
$this->AddAlert($sSingleMessage, $iLevel);
}
return;
}
switch ($iLevel) {
case iTopConfigValidator::CONFIG_SUCCESS :
$this->aSuccesses[] = $sMessage;
break;
case iTopConfigValidator::CONFIG_WARNING :
$this->aWarnings[] = $sMessage;
break;
case iTopConfigValidator::CONFIG_INFO :
$this->aInfo[] = $sMessage;
break;
default :
$this->aErrors[] = $sMessage;
}
}
}

View File

@@ -31,10 +31,10 @@ class iTopConfigAstValidator
$aInitialNodes = $oParser->parse($sConfig);
} catch (\Error $e) {
$sMessage = 'Invalid configuration: '. \Dict::Format('config-parse-error', $e->getMessage(), $e->getLine());
throw new \Exception($sMessage, 0, $e);
throw new \Exception($sMessage, iTopConfigValidator::CONFIG_ERROR, $e);
}catch (\Exception $e) {
$sMessage = 'Invalid configuration: '. \Dict::Format('config-parse-error', $e->getMessage(), $e->getLine());
throw new \Exception($sMessage, 0, $e);
throw new \Exception($sMessage, iTopConfigValidator::CONFIG_ERROR, $e);
}
$oTraverser = new NodeTraverser();

View File

@@ -17,8 +17,7 @@ class iTopConfigSyntaxValidator
*/
public function Validate($sRawConfig)
{
try
{
try {
ini_set('display_errors', 1);
ob_start();
// in PHP < 7.0.0 syntax errors are in output
@@ -27,29 +26,24 @@ class iTopConfigSyntaxValidator
eval('if(0){'.trim($sConfig).'}');
$sNoise = trim(ob_get_contents());
}
catch (\Error $e)
{
catch (\Error $e) {
// ParseError only thrown in PHP7
throw new \Exception('Error in configuration: '.$e->getMessage().' at line '.$e->getLine());
throw new \Exception('Error in configuration: '.$e->getMessage().' at line '.$e->getLine(), iTopConfigValidator::CONFIG_ERROR);
}
finally
{
finally {
ob_end_clean();
}
if (strlen($sNoise) > 0)
{
if (preg_match("/(Error|Parse error|Notice|Warning): (.+) in \S+ : eval\(\)'d code on line (\d+)/i", strip_tags($sNoise), $aMatches))
{
if (strlen($sNoise) > 0) {
if (preg_match("/(Error|Parse error|Notice|Warning): (.+) in \S+ : eval\(\)'d code on line (\d+)/i", strip_tags($sNoise), $aMatches)) {
$sMessage = $aMatches[2];
$sLine = $aMatches[3];
$sMessage = \Dict::Format('config-parse-error', $sMessage, $sLine);
throw new \Exception($sMessage);
throw new \Exception($sMessage, iTopConfigValidator::CONFIG_ERROR);
}
else
{
else {
// Note: sNoise is an html output, but so far it was ok for me (e.g. showing the entire call stack)
throw new \Exception('Syntax error in configuration file: <tt>'.$sNoise.'</tt>');
throw new \Exception('Syntax error in configuration file: <tt>'.$sNoise.'</tt>', iTopConfigValidator::CONFIG_ERROR);
}
}
}

View File

@@ -0,0 +1,59 @@
<?php
namespace Combodo\iTop\Config\Validator;
use AsyncTask;
use ReflectionClass;
class iTopConfigValidator {
const CONFIG_ERROR = 0;
const CONFIG_WARNING = 1;
const CONFIG_INFO = 2;
const CONFIG_SUCCESS = 3;
/**
* @param $sRawConfig
*
* @throws \Exception
*/
public function Validate($sRawConfig):void
{
$oiTopConfigValidator = new iTopConfigAstValidator();
$oiTopConfigValidator->Validate($sRawConfig);
/// 2 - only after we are sure that there is no malicious code, we can perform a syntax check!
$oiTopConfigValidator = new iTopConfigSyntaxValidator();
$oiTopConfigValidator->Validate($sRawConfig);
}
function DBPasswordIsOk($sPassword):bool
{
$bIsWindows = (array_key_exists('WINDIR', $_SERVER) || array_key_exists('windir', $_SERVER));
if ($bIsWindows && (preg_match("/[%!\"]/U", $sPassword) !== 0)) {
return false;
}
return true;
}
public function CheckAsyncTasksRetryConfig(\Config $oTempConfig): array
{
$aWarnings = [];
foreach (get_declared_classes() as $sPHPClass) {
$oRefClass = new ReflectionClass($sPHPClass);
if ($oRefClass->isSubclassOf('AsyncTask') && !$oRefClass->isAbstract()) {
$aMessages = AsyncTask::CheckRetryConfig($oTempConfig, $oRefClass->getName());
if (count($aMessages) !== 0) {
foreach ($aMessages as $sMessage) {
$aWarnings[] = $sMessage;
}
}
}
}
return $aWarnings;
}
}

View File

@@ -0,0 +1,29 @@
{% for sError in aErrors %}
{% UIAlert ForDanger{sContent: sError} %}{% EndUIAlert %}
{% endfor %}
{% for sWarning in aWarnings %}
{% UIAlert ForWarning{sContent: sWarning} %}{% EndUIAlert %}
{% endfor %}
{% for sNotice in aNotices %}
{% UIAlert ForInformation{sContent: sNotice} %}{% EndUIAlert %}
{% endfor %}
{% for sSuccess in aSuccesses %}
{% UIAlert ForSuccess{sContent: sSuccess} %}{% EndUIAlert %}
{% endfor %}
{% UITitle ForPage {'sTitle':'config-edit-title'|dict_s} %}{% EndUITitle %}
{% if bShowEditor %}
<p>{{ 'config-edit-intro'|dict_s }}</p>
{% UIForm Standard {} %}
{% UIButton ForCancel { 'sLabel':'config-cancel'|dict_s, 'bIsSubmit':true, 'sId':'cancel_button', 'sName':'edit_operation', 'sValue': 'revert'} %}
{% UIButton ForPrimaryAction {'sLabel':'config-apply'|dict_s, 'bIsSubmit':true, 'sId':'submit_button', 'sName':'edit_operation', 'sValue': 'save' } %}
{% UIInput ForHidden {'sName':'transaction_id', 'sValue':sTransactionId} %}
{% UIInput ForHidden {'sName':'checksum', 'sValue':sChecksum} %}
{% UIInput ForHidden {'sName':'prev_config', 'sValue':sPrevConfig} %}
{% UIInput ForHidden {'sName':'new_config', 'sValue':sNewConfig} %}
<div id ="new_config" style="position: absolute; top: 125px; bottom: 0; left: 5px; right: 5px;"></div>
{% EndUIForm %}
{% endif %}

View File

@@ -0,0 +1,129 @@
var EditorUtils = (function() {
var STORAGE_RANGE_KEY = 'cfgEditorRange';
var STORAGE_LINE_KEY = 'cfgEditorFirstline';
var _editorSavedRange = null;
var _editorSavedFirstLine = null;
var saveEditorDisplay = function(editor) {
_initObjectValues(editor);
_persistObjectValues();
};
var _initObjectValues = function(editor) {
_editorSavedRange = editor.getSelectionRange();
_editorSavedFirstLine = editor.renderer.getFirstVisibleRow();
};
var _persistObjectValues = function() {
sessionStorage.setItem(EditorUtils.STORAGE_RANGE_KEY, JSON.stringify(_editorSavedRange));
sessionStorage.setItem(EditorUtils.STORAGE_LINE_KEY, _editorSavedFirstLine);
};
var restoreEditorDisplay = function(editor) {
_restoreObjectValues();
_setEditorDisplay(editor);
};
var _restoreObjectValues = function() {
if ((sessionStorage.getItem(STORAGE_RANGE_KEY) == null)
|| (sessionStorage.getItem(STORAGE_LINE_KEY) == null)) {
return;
}
_editorSavedRange = JSON.parse(sessionStorage.getItem(EditorUtils.STORAGE_RANGE_KEY));
_editorSavedFirstLine = sessionStorage.getItem(EditorUtils.STORAGE_LINE_KEY);
sessionStorage.removeItem(STORAGE_RANGE_KEY);
sessionStorage.removeItem(STORAGE_LINE_KEY);
};
var _setEditorDisplay = function(editor) {
if ((_editorSavedRange == null) || (_editorSavedFirstLine == null)) {
return;
}
editor.selection.setRange(_editorSavedRange);
editor.renderer.scrollToRow(_editorSavedFirstLine);
};
var getEditorForm = function(editor) {
var editorContainer = editor.container;
return editorContainer.parentElement;
};
var updateConfigEditorButtonState = function(editor) {
var isSameContent = (editor.getValue() === document.querySelector('input[name="prev_config"]').value);
var hasNoError = editor.getSession().getAnnotations().length === 0;
document.getElementById('cancel_button').disabled = isSameContent;
document.getElementById('submit_button').disabled = isSameContent || !hasNoError;
};
return {
STORAGE_RANGE_KEY: STORAGE_RANGE_KEY,
STORAGE_LINE_KEY : STORAGE_LINE_KEY,
saveEditorDisplay : saveEditorDisplay,
restoreEditorDisplay : restoreEditorDisplay,
getEditorForm : getEditorForm,
updateConfigEditorButtonState : updateConfigEditorButtonState
};
})();
editor = ace.edit("new_config");
var configurationSource = document.querySelector('input[name="new_config"]');
editor.getSession().setValue(configurationSource.value);
editor.getSession().on('change', function()
{
configurationSource.value = editor.getSession().getValue();
EditorUtils.updateConfigEditorButtonState(editor);
});
editor.getSession().on("changeAnnotation", function()
{
EditorUtils.updateConfigEditorButtonState(editor);
});
editor.setTheme("ace/theme/eclipse");
editor.getSession().setMode("ace/mode/php");
editor.commands.addCommand({
name: 'save',
bindKey: {win: "Ctrl-S", "mac": "Cmd-S"},
exec: function(editor) {
var editorForm = EditorUtils.getEditorForm(editor);
var submitButton = document.getElementById('submit_button');
if (submitButton.is(":enabled")) {
editorForm.trigger('submit');
}
}
});
var editorForm = EditorUtils.getEditorForm(editor);
editorForm.addEventListener('submit', function() {
EditorUtils.saveEditorDisplay(editor);
});
EditorUtils.restoreEditorDisplay(editor);
editor.focus();
const repositionEditor = () => {
let oSubmitButton = document.getElementById('submit_button');
let iBottomPosition = oSubmitButton.offsetTop + oSubmitButton.offsetHeight + 10;
document.getElementById('new_config').style.top = iBottomPosition+"px";
};
repositionEditor();
document.getElementById('ibo-main-content').addEventListener('click',repositionEditor);
document.getElementById('cancel_button').onclick = ()=>{
if (confirm({{ 'config-confirm-cancel'|dict_s|json_encode|raw }})) {
document.querySelector('input[name="new_config"]').value = document.querySelector('input[name="prev_config"]').value;
return true;
}
return false;
};

View File

@@ -16,6 +16,7 @@ SetupWebPage::AddModule(
//
'dependencies' => array(
'itop-welcome-itil/3.1.0,',
'itop-profiles-itil/3.1.0', //SuperUser id 117
),
'mandatory' => false,
'visible' => true,
@@ -28,7 +29,7 @@ SetupWebPage::AddModule(
'src/Service/ApplicationUIExtension.php',
),
'webservice' => array(
),
'data.struct' => array(
// add your 'structure' definition XML files here,
@@ -36,11 +37,11 @@ SetupWebPage::AddModule(
'data.sample' => array(
// add your sample data XML files here,
),
// Documentation
//
'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
'doc.more_information' => '', // hyperlink to more information, if any
'doc.more_information' => '', // hyperlink to more information, if any
// Default settings
//

View File

@@ -26,6 +26,7 @@ SetupWebPage::AddModule(
'category' => 'Portal',
// Setup
'dependencies' => array(
'itop-attachments/3.2.1', //CMDBChangeOpAttachmentRemoved
),
'mandatory' => true,
'visible' => false,

View File

@@ -14,6 +14,7 @@ SetupWebPage::AddModule(
//
'dependencies' => array(
'itop-structure/2.7.1',
'itop-portal/3.0.0' // module_design_itop_design->module_designs->itop-portal
),
'mandatory' => false,
'visible' => true,
@@ -29,7 +30,7 @@ SetupWebPage::AddModule(
),
'data.sample' => array(
),
// Documentation
//
'doc.manual_setup' => '',

View File

@@ -327,7 +327,8 @@ $(function()
oElem.popover_menu({
'toggler': '[data-role="ibo-navigation-menu--notifications-show-all-multiple"]',
'position': {
'horizontal': "(oTargetPos.left+parseInt(oTargetElem.css('marginLeft'), 10)+(oTargetElem.outerWidth() / 2)-(oElem.outerWidth() / 2))+'px'",
'horizontal': "(oTargetPos.left+parseInt(oTargetElem.css('marginLeft'), 10)+(oTargetElem.outerWidth() / 1.5)-(oElem.outerWidth() / 2))+'px'",
'vertical': 'above'
},
});

View File

@@ -179,7 +179,7 @@ $(function() {
});
// Set focus in the input
this.element.on('set_focus.caselog_entry_form.itop', function () {
CKEditorInstance.trigger('focus');
CKEditorInstance.focus();
});
},

View File

@@ -308,7 +308,9 @@ CombodoModal._BindEvents = function (oModalElem) {
// Center modal on resize
if(window.ResizeObserver) {
const oModalObs = new ResizeObserver(function(){
me._CenterModalInViewport(oModalElem);
if(oModalElem.width()>0) {
me._CenterModalInViewport(oModalElem);
}
});
oModalObs.observe(oModalElem[0]);
}

View File

@@ -10,60 +10,6 @@
*/
aTruncatedLists = {}; // To keep track of the list being loaded, each member is an ajaxRequest object
function ReloadTruncatedList(divId, sSerializedFilter, sExtraParams) {
$('#'+divId).block();
//$('#'+divId).blockUI();
if (aTruncatedLists[divId] != undefined) {
try {
aAjaxRequest = aTruncatedLists[divId];
aAjaxRequest.abort();
} catch (e) {
// Do nothing special, just continue
console.log('Uh,uh, exception !');
}
}
aTruncatedLists[divId] = $.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php?style=list',
{operation: 'ajax', filter: sSerializedFilter, extra_params: sExtraParams},
function (data) {
aTruncatedLists[divId] = undefined;
if (data.length > 0) {
$('#'+divId).html(data);
//$('#'+divId+' .listResults').tableHover(); // hover tables
$('#'+divId+' .listResults').each(function () {
var table = $(this);
var id = $(this).parent();
aTruncatedLists[divId] = undefined;
var checkbox = (table.find('th').first().find(':checkbox').length > 0);
if (checkbox) {
// There is a checkbox in the first column, don't make it sortable
table.tablesorter({headers: {0: {sorter: false}}, widgets: ['myZebra', 'truncatedList']}).tablesorterPager({container: $("#pager")}); // sortable and zebra tables
} else {
// There is NO checkbox in the first column, all columns are considered sortable
table.tablesorter({widgets: ['myZebra', 'truncatedList']}).tablesorterPager({container: $("#pager"), totalRows: 97, filter: sSerializedFilter, extra_params: sExtraParams}); // sortable and zebra tables
}
});
$('#'+divId).unblock();
}
}
);
}
/**
* Truncate a previously expanded list !
*/
function TruncateList(divId, iLimit, sNewLabel, sLinkLabel) {
$('#'+divId).block();
var iCount = 0;
$('#'+divId+' table.listResults tr:gt('+iLimit+')').each(function () {
$(this).remove();
});
$('#lbl_'+divId).html(sNewLabel);
$('#'+divId+' table.listResults tr:last td').addClass('truncated');
$('#'+divId+' table.listResults').addClass('truncated');
$('#trc_'+divId).html(sLinkLabel);
$('#'+divId+' .listResults').trigger("update"); // Reset the cache
$('#'+divId).unblock();
}
/**
* Reload any block -- used for periodic auto-reload
@@ -98,30 +44,6 @@ function ReloadBlock(divId, sStyle, sSerializedFilter, sExtraParams) {
}
}
function SaveGroupBySortOrder(sTableId, aValues) {
var sDashboardId = $('#'+sTableId).closest('.ibo-dashboard').attr('id');
var sPrefKey = 'GroupBy_'+sDashboardId+'_'+sTableId;
if (aValues.length != 0) {
$sValue = JSON.stringify(aValues);
if (GetUserPreference(sPrefKey, null) != $sValue) {
SetUserPreference(sPrefKey, $sValue, true);
}
}
}
function LoadGroupBySortOrder(sTableId) {
var sDashboardId = $('#'+sTableId).closest('.ibo-dashboard').attr('id');
var sPrefKey = 'GroupBy_'+sDashboardId+'_'+sTableId;
var sValues = GetUserPreference(sPrefKey, null);
if (sValues != null) {
aValues = JSON.parse(sValues);
window.setTimeout(function () {
$('#'+sTableId+' table.listResults').trigger('sorton', [aValues]);
}, 50);
}
}
/**
* Update the display and value of a file input widget when the user picks a new file
*/
@@ -306,18 +228,6 @@ function ToggleField(value, field_id) {
$('#'+field_id).trigger('validate');
}
/**
* For the fields that cannot be visually disabled, they can be blocked
* @return
*/
function BlockField(field_id, bBlocked) {
if (bBlocked) {
$('#'+field_id).block({message: ' ** disabled ** ', enableValidation : true});
} else {
$('#'+field_id).unblock();
}
}
/**
* Updates (enables/disables) a "duration" field
*/
@@ -352,6 +262,7 @@ function PropagateCheckBox(bCurrValue, aFieldsList, bCheck) {
}
}
//used only in designer
function FixTableSorter(table) {
if (table[0].config == undefined) {
// Table is not sort-able, let's fix it

View File

@@ -1,147 +0,0 @@
//
// Set of functions to manage the controls in a wizard
//
function UpdateObjectList(sClass, sId, sExtKeyToRemote)
{
aRelatedObjectIds = GetObjectIds(sId, sExtKeyToRemote);
if (aRelatedObjectIds.length == 0)
{
aRelatedObjectIds[0] = 0;
}
var oql = "SELECT "+sClass+" AS c WHERE c.id IN (" + aRelatedObjectIds.join(", ") + ")";
$.post(GetAbsoluteUrlAppRoot()+"ajax.render.php?style=list&encoding=oql",
{ operation: "ajax", filter: oql },
function(data){
$("#related_objects_"+sId).empty();
$("#related_objects_"+sId).append(data);
$("#related_objects_"+sId).removeClass("loading");
});
}
function AddObject(sClass, sId, sExtKeyToRemote)
{
var sCurrentObjectId = new String($('#ac_current_object_id_'+sId).val());
// Display the additional dialog
$('#LinkDlg_'+sId).dialog('open');
return;
}
function ManageObjects(sTitle, sClass, sId, sExtKeyToRemote)
{
aObjList = GetObjectIds(sId, sExtKeyToRemote);
if (aObjList.length == 0)
{
aObjList[0] = 0;
}
Manage_LoadSelect('selected_objects_'+sId, 'SELECT '+sClass+' WHERE id IN (' + aObjList.join(', ') + ')'); // id is a reserved keyword always representing the primary key
Manage_LoadSelect('available_objects_'+sId, 'SELECT '+sClass+' WHERE id NOT IN (' + aObjList.join(', ') + ')');
$('#ManageObjectsDlg_'+sId).dialog('option', {title: sTitle});
$('#ManageObjectsDlg_'+sId).dialog('open');
}
function Manage_LoadSelect(sSelectedId, sFilter)
{
$('#'+sSelectedId).addClass('loading');
$.post(GetAbsoluteUrlAppRoot()+'pages/ajax.render.php',
{ operation: 'combo_options', filter: sFilter },
function(data){
$('#'+sSelectedId).empty();
$('#'+sSelectedId).append(data);
$('#'+sSelectedId).removeClass('loading');
}
);
}
function Manage_SwapSelectedObjects(oSourceSelect, oDestinationSelect, sId)
{
j = oDestinationSelect.options.length;
for (i=oSourceSelect.length-1;i>=0;i--) // Count down because we are removing the indexes from the combo
{
if (oSourceSelect.options[i].selected)
{
var newOption = document.createElement('option');
newOption.text = oSourceSelect.options[i].text;
newOption.value = oSourceSelect.options[i].value;
oDestinationSelect.options[j++] = newOption;
oSourceSelect.remove(i);
}
}
Manage_UpdateButtons(sId);
}
function Manage_UpdateButtons(sId)
{
var oSrc = document.getElementById('available_objects_'+sId);
var oAddBtn = document.getElementById('btn_add_objects_'+sId)
var oDst = document.getElementById('selected_objects_'+sId);
var oRemoveBtn = document.getElementById('btn_remove_objects_'+sId)
if (oSrc.selectedIndex == -1)
{
oAddBtn.disabled = true;
}
else
{
oAddBtn.disabled = false;
}
if (oDst.selectedIndex == -1)
{
oRemoveBtn.disabled = true;
}
else
{
oRemoveBtn.disabled = false;
}
}
function Manage_AddObjects(sId)
{
var oSrc = document.getElementById('available_objects_'+sId);
var oDst = document.getElementById('selected_objects_'+sId);
Manage_SwapSelectedObjects(oSrc, oDst, sId);
}
function Manage_RemoveObjects(sId)
{
var oSrc = document.getElementById('selected_objects_'+sId);
var oDst = document.getElementById('available_objects_'+sId);
Manage_SwapSelectedObjects(oSrc, oDst, sId);
}
//function Manage_Ok(sClass, sExtKeyToRemote)
//{
// var objectsToAdd = document.getElementById('selected_objects');
// var aSelectedObjects = new Array();
// for (i=0; i<objectsToAdd.length;i++)
// {
// aSelectedObjects[aSelectedObjects.length] = objectsToAdd.options[i].value;
// }
// $('#related_object_ids').val(aSelectedObjects.join(' '));
// UpdateObjectList(sClass, sExtKeyToRemote);
//}
function FilterLeft(sClass)
{
alert('Not Yet Implemented');
}
function FilterRight(sClass)
{
alert('Not Yet Implemented');
}
function GetObjectIds(sInputId, sExtKeyToRemote)
{
aLinkedIds = new Array;
sLinkedSet = $('#'+sInputId).val();
//console.log('(sInputId: '+sInputId+') => sLinkedSet: '+sLinkedSet);
if (sLinkedSet != '')
{
aLinkedSet = JSON.parse(sLinkedSet);
for(i=0; i<aLinkedSet.length; i++)
{
aLinkedIds[aLinkedIds.length] = aLinkedSet[i][sExtKeyToRemote];
}
}
return aLinkedIds;
}

View File

@@ -14,7 +14,10 @@ if (PHP_VERSION_ID < 50600) {
echo $err;
}
}
throw new RuntimeException($err);
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php';

View File

@@ -1,5 +0,0 @@
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/php-parse
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
php "%BIN_TARGET%" %*

View File

@@ -26,23 +26,12 @@ use Composer\Semver\VersionParser;
*/
class InstalledVersions
{
/**
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
* @internal
*/
private static $selfDir = null;
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool
*/
private static $installedIsLocalDir;
/**
* @var bool|null
*/
@@ -320,24 +309,6 @@ class InstalledVersions
{
self::$installed = $data;
self::$installedByVendor = array();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return string
*/
private static function getSelfDir()
{
if (self::$selfDir === null) {
self::$selfDir = strtr(__DIR__, '\\', '/');
}
return self::$selfDir;
}
/**
@@ -354,9 +325,7 @@ class InstalledVersions
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = self::getSelfDir();
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
@@ -364,14 +333,11 @@ class InstalledVersions
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $required;
self::$installedIsLocalDir = true;
$copiedLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}

View File

@@ -6,14 +6,13 @@ $vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'AbstractApplicationObjectExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractApplicationUIExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractLoginFSMExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractPageUIBlockExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractPortalUIExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractPreferencesExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractApplicationUIExtension' => $baseDir . '/application/applicationextension/backoffice/AbstractApplicationUIExtension.php',
'AbstractLoginFSMExtension' => $baseDir . '/application/applicationextension/login/AbstractLoginFSMExtension.php',
'AbstractPageUIBlockExtension' => $baseDir . '/application/applicationextension/backoffice/AbstractPageUIBlockExtension.php',
'AbstractPortalUIExtension' => $baseDir . '/application/applicationextension/portal/AbstractPortalUIExtension.php',
'AbstractPreferencesExtension' => $baseDir . '/application/applicationextension/backoffice/AbstractPreferencesExtension.php',
'AbstractWeeklyScheduledProcess' => $baseDir . '/core/backgroundprocess.inc.php',
'AbstractWelcomePopupExtension' => $baseDir . '/application/applicationextension.inc.php',
'AbstractWelcomePopupExtension' => $baseDir . '/application/applicationextension/backoffice/AbstractWelcomePopupExtension.php',
'Action' => $baseDir . '/core/action.class.inc.php',
'ActionChecker' => $baseDir . '/core/userrights.class.inc.php',
'ActionEmail' => $baseDir . '/core/action.class.inc.php',
@@ -22,7 +21,7 @@ return array(
'ApplicationContext' => $baseDir . '/application/applicationcontext.class.inc.php',
'ApplicationException' => $baseDir . '/application/exceptions/ApplicationException.php',
'ApplicationMenu' => $baseDir . '/application/menunode.class.inc.php',
'ApplicationPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php',
'ApplicationPopupMenuItem' => $baseDir . '/application/applicationextension/backoffice/ApplicationPopupMenuItem.php',
'Archive_Tar' => $vendorDir . '/pear/archive_tar/Archive/Tar.php',
'ArchivedObjectException' => $baseDir . '/application/exceptions/ArchivedObjectException.php',
'AsyncSendEmail' => $baseDir . '/core/asynctask.class.inc.php',
@@ -469,6 +468,7 @@ return array(
'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => $baseDir . '/sources/Form/Validator/NotEmptyExtKeyValidator.php',
'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => $baseDir . '/sources/Form/Validator/SelectObjectValidator.php',
'Combodo\\iTop\\Kernel' => $baseDir . '/sources/Kernel.php',
'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => $baseDir . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php',
'Combodo\\iTop\\Renderer\\BlockRenderer' => $baseDir . '/sources/Renderer/BlockRenderer.php',
'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => $baseDir . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php',
'Combodo\\iTop\\Renderer\\Bootstrap\\BsFormRenderer' => $baseDir . '/sources/Renderer/Bootstrap/BsFormRenderer.php',
@@ -754,8 +754,8 @@ return array(
'InvalidPasswordAttributeOneWayPassword' => $baseDir . '/application/exceptions/InvalidPasswordAttributeOneWayPassword.php',
'IssueLog' => $baseDir . '/core/log.class.inc.php',
'ItopCounter' => $baseDir . '/core/counter.class.inc.php',
'JSButtonItem' => $baseDir . '/application/applicationextension.inc.php',
'JSPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php',
'JSButtonItem' => $baseDir . '/application/applicationextension/backoffice/JSButtonItem.php',
'JSPopupMenuItem' => $baseDir . '/application/applicationextension/backoffice/JSPopupMenuItem.php',
'KeyValueStore' => $baseDir . '/core/counter.class.inc.php',
'Laminas\\Loader\\AutoloaderFactory' => $vendorDir . '/laminas/laminas-loader/src/AutoloaderFactory.php',
'Laminas\\Loader\\ClassMapAutoloader' => $vendorDir . '/laminas/laminas-loader/src/ClassMapAutoloader.php',
@@ -1508,10 +1508,10 @@ return array(
'RelationTypeIterator' => $baseDir . '/core/simplegraph.class.inc.php',
'ReportValue' => $baseDir . '/core/bulkchange.class.inc.php',
'RestDelete' => $baseDir . '/core/restservices.class.inc.php',
'RestResult' => $baseDir . '/application/applicationextension.inc.php',
'RestResult' => $baseDir . '/application/applicationextension/rest/RestResult.php',
'RestResultWithObjects' => $baseDir . '/core/restservices.class.inc.php',
'RestResultWithRelations' => $baseDir . '/core/restservices.class.inc.php',
'RestUtils' => $baseDir . '/application/applicationextension.inc.php',
'RestUtils' => $baseDir . '/application/applicationextension/rest/RestUtils.php',
'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'RotatingLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php',
'RowStatus' => $baseDir . '/core/bulkchange.class.inc.php',
@@ -1624,7 +1624,7 @@ return array(
'ScssPhp\\ScssPhp\\Warn' => $vendorDir . '/scssphp/scssphp/src/Warn.php',
'SearchMenuNode' => $baseDir . '/application/menunode.class.inc.php',
'SecurityException' => $baseDir . '/application/exceptions/SecurityException.php',
'SeparatorPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php',
'SeparatorPopupMenuItem' => $baseDir . '/application/applicationextension/backoffice/SeparatorPopupMenuItem.php',
'SetupLog' => $baseDir . '/core/log.class.inc.php',
'Shortcut' => $baseDir . '/application/shortcut.class.inc.php',
'ShortcutContainerMenuNode' => $baseDir . '/application/menunode.class.inc.php',
@@ -3156,8 +3156,8 @@ return array(
'UIPasswordWidget' => $baseDir . '/application/ui.passwordwidget.class.inc.php',
'UISearchFormForeignKeys' => $baseDir . '/application/ui.searchformforeignkeys.class.inc.php',
'UIWizard' => $baseDir . '/application/uiwizard.class.inc.php',
'URLButtonItem' => $baseDir . '/application/applicationextension.inc.php',
'URLPopupMenuItem' => $baseDir . '/application/applicationextension.inc.php',
'URLButtonItem' => $baseDir . '/application/applicationextension/backoffice/URLButtonItem.php',
'URLPopupMenuItem' => $baseDir . '/application/applicationextension/backoffice/URLPopupMenuItem.php',
'UnaryExpression' => $baseDir . '/core/oql/expression.class.inc.php',
'UnknownClassOqlException' => $baseDir . '/core/oql/oqlinterpreter.class.inc.php',
'User' => $baseDir . '/core/userrights.class.inc.php',
@@ -3185,44 +3185,43 @@ return array(
'appUserPreferences' => $baseDir . '/application/user.preferences.class.inc.php',
'cmdbAbstractObject' => $baseDir . '/application/cmdbabstract.class.inc.php',
'cmdbDataGenerator' => $baseDir . '/core/data.generator.class.inc.php',
'iApplicationObjectExtension' => $baseDir . '/application/applicationextension.inc.php',
'iApplicationUIExtension' => $baseDir . '/application/applicationextension.inc.php',
'iApplicationUIExtension' => $baseDir . '/application/applicationextension/backoffice/iApplicationUIExtension.php',
'iAttributeNoGroupBy' => $baseDir . '/core/attributedef.class.inc.php',
'iBackgroundProcess' => $baseDir . '/core/backgroundprocess.inc.php',
'iBackofficeDictEntriesExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeDictEntriesPrefixesExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeEarlyScriptExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeInitScriptExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeLinkedScriptsExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeLinkedStylesheetsExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeReadyScriptExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeSassExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeScriptExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeStyleExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackupExtraFilesExtension' => $baseDir . '/application/applicationextension.inc.php',
'iBackofficeDictEntriesExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeDictEntriesExtension.php',
'iBackofficeDictEntriesPrefixesExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeDictEntriesPrefixesExtension.php',
'iBackofficeEarlyScriptExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeEarlyScriptExtension.php',
'iBackofficeInitScriptExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeInitScriptExtension.php',
'iBackofficeLinkedScriptsExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeLinkedScriptsExtension.php',
'iBackofficeLinkedStylesheetsExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeLinkedStylesheetsExtension.php',
'iBackofficeReadyScriptExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeReadyScriptExtension.php',
'iBackofficeSassExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeSassExtension.php',
'iBackofficeScriptExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeScriptExtension.php',
'iBackofficeStyleExtension' => $baseDir . '/application/applicationextension/backoffice/iBackofficeStyleExtension.php',
'iBackupExtraFilesExtension' => $baseDir . '/application/applicationextension/iBackupExtraFilesExtension.php',
'iCMDBChangeOp' => $baseDir . '/core/cmdbchangeop.class.inc.php',
'iDBObjectSetIterator' => $baseDir . '/core/dbobjectiterator.php',
'iDBObjectURLMaker' => $baseDir . '/application/applicationcontext.class.inc.php',
'iDisplay' => $baseDir . '/core/dbobject.class.php',
'iFieldRendererMappingsExtension' => $baseDir . '/application/applicationextension.inc.php',
'iKPILoggerExtension' => $baseDir . '/application/applicationextension.inc.php',
'iFieldRendererMappingsExtension' => $baseDir . '/application/applicationextension/backoffice/iFieldRendererMappingsExtension.php',
'iKPILoggerExtension' => $baseDir . '/application/applicationextension/iKPILoggerExtension.php',
'iLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php',
'iLoginExtension' => $baseDir . '/application/applicationextension.inc.php',
'iLoginFSMExtension' => $baseDir . '/application/applicationextension.inc.php',
'iLoginUIExtension' => $baseDir . '/application/applicationextension.inc.php',
'iLogoutExtension' => $baseDir . '/application/applicationextension.inc.php',
'iLoginExtension' => $baseDir . '/application/applicationextension/login/iLoginExtension.php',
'iLoginFSMExtension' => $baseDir . '/application/applicationextension/login/iLoginFSMExtension.php',
'iLoginUIExtension' => $baseDir . '/application/applicationextension/login/iLoginUIExtension.php',
'iLogoutExtension' => $baseDir . '/application/applicationextension/login/iLogoutExtension.php',
'iMetricComputer' => $baseDir . '/core/computing.inc.php',
'iModuleExtension' => $baseDir . '/application/applicationextension.inc.php',
'iModuleExtension' => $baseDir . '/application/applicationextension/iModuleExtension.php',
'iNewsroomProvider' => $baseDir . '/application/newsroomprovider.class.inc.php',
'iOnClassInitialization' => $baseDir . '/core/metamodelmodifier.inc.php',
'iPageUIBlockExtension' => $baseDir . '/application/applicationextension.inc.php',
'iPopupMenuExtension' => $baseDir . '/application/applicationextension.inc.php',
'iPortalUIExtension' => $baseDir . '/application/applicationextension.inc.php',
'iPreferencesExtension' => $baseDir . '/application/applicationextension.inc.php',
'iPageUIBlockExtension' => $baseDir . '/application/applicationextension/backoffice/iPageUIBlockExtension.php',
'iPopupMenuExtension' => $baseDir . '/application/applicationextension/backoffice/iPopupMenuExtension.php',
'iPortalUIExtension' => $baseDir . '/application/applicationextension/portal/iPortalUIExtension.php',
'iPreferencesExtension' => $baseDir . '/application/applicationextension/backoffice/iPreferencesExtension.php',
'iProcess' => $baseDir . '/core/backgroundprocess.inc.php',
'iQueryModifier' => $baseDir . '/core/querymodifier.class.inc.php',
'iRestInputSanitizer' => $baseDir . '/application/applicationextension.inc.php',
'iRestServiceProvider' => $baseDir . '/application/applicationextension.inc.php',
'iRestInputSanitizer' => $baseDir . '/application/applicationextension/rest/iRestInputSanitizer.php',
'iRestServiceProvider' => $baseDir . '/application/applicationextension/rest/iRestServiceProvider.php',
'iScheduledProcess' => $baseDir . '/core/backgroundprocess.inc.php',
'iSelfRegister' => $baseDir . '/core/userrights.class.inc.php',
'iTopConfigParser' => $baseDir . '/core/iTopConfigParser.php',
@@ -3231,7 +3230,7 @@ return array(
'iTopOwnershipToken' => $baseDir . '/core/ownershiplock.class.inc.php',
'iTopStandardURLMaker' => $baseDir . '/application/applicationcontext.class.inc.php',
'iTopXmlException' => $baseDir . '/application/exceptions/iTopXmlException.php',
'iWelcomePopupExtension' => $baseDir . '/application/applicationextension.inc.php',
'iWelcomePopupExtension' => $baseDir . '/application/applicationextension/backoffice/iWelcomePopupExtension.php',
'iWorkingTimeComputer' => $baseDir . '/core/computing.inc.php',
'lnkAuditCategoryToAuditDomain' => $baseDir . '/application/audit.domain.class.inc.php',
'lnkTriggerAction' => $baseDir . '/core/trigger.class.inc.php',

View File

@@ -56,7 +56,7 @@ return array(
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'Pelago\\Emogrifier\\' => array($vendorDir . '/pelago/emogrifier/src'),
'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-google/src', $vendorDir . '/league/oauth2-client/src'),
'League\\OAuth2\\Client\\' => array($vendorDir . '/league/oauth2-client/src', $vendorDir . '/league/oauth2-google/src'),
'Laminas\\Validator\\' => array($vendorDir . '/laminas/laminas-validator/src'),
'Laminas\\Stdlib\\' => array($vendorDir . '/laminas/laminas-stdlib/src'),
'Laminas\\ServiceManager\\' => array($vendorDir . '/laminas/laminas-servicemanager/src'),

View File

@@ -317,8 +317,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
),
'League\\OAuth2\\Client\\' =>
array (
0 => __DIR__ . '/..' . '/league/oauth2-google/src',
1 => __DIR__ . '/..' . '/league/oauth2-client/src',
0 => __DIR__ . '/..' . '/league/oauth2-client/src',
1 => __DIR__ . '/..' . '/league/oauth2-google/src',
),
'Laminas\\Validator\\' =>
array (
@@ -384,14 +384,13 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
);
public static $classMap = array (
'AbstractApplicationObjectExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/AbstractApplicationUIExtension.php',
'AbstractLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension/login/AbstractLoginFSMExtension.php',
'AbstractPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/AbstractPageUIBlockExtension.php',
'AbstractPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension/portal/AbstractPortalUIExtension.php',
'AbstractPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/AbstractPreferencesExtension.php',
'AbstractWeeklyScheduledProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php',
'AbstractWelcomePopupExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'AbstractWelcomePopupExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/AbstractWelcomePopupExtension.php',
'Action' => __DIR__ . '/../..' . '/core/action.class.inc.php',
'ActionChecker' => __DIR__ . '/../..' . '/core/userrights.class.inc.php',
'ActionEmail' => __DIR__ . '/../..' . '/core/action.class.inc.php',
@@ -400,7 +399,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'ApplicationContext' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php',
'ApplicationException' => __DIR__ . '/../..' . '/application/exceptions/ApplicationException.php',
'ApplicationMenu' => __DIR__ . '/../..' . '/application/menunode.class.inc.php',
'ApplicationPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'ApplicationPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/ApplicationPopupMenuItem.php',
'Archive_Tar' => __DIR__ . '/..' . '/pear/archive_tar/Archive/Tar.php',
'ArchivedObjectException' => __DIR__ . '/../..' . '/application/exceptions/ArchivedObjectException.php',
'AsyncSendEmail' => __DIR__ . '/../..' . '/core/asynctask.class.inc.php',
@@ -847,6 +846,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'Combodo\\iTop\\Form\\Validator\\NotEmptyExtKeyValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/NotEmptyExtKeyValidator.php',
'Combodo\\iTop\\Form\\Validator\\SelectObjectValidator' => __DIR__ . '/../..' . '/sources/Form/Validator/SelectObjectValidator.php',
'Combodo\\iTop\\Kernel' => __DIR__ . '/../..' . '/sources/Kernel.php',
'Combodo\\iTop\\PhpParser\\Evaluation\\PhpExpressionEvaluator' => __DIR__ . '/../..' . '/sources/PhpParser/Evaluation/PhpExpressionEvaluator.php',
'Combodo\\iTop\\Renderer\\BlockRenderer' => __DIR__ . '/../..' . '/sources/Renderer/BlockRenderer.php',
'Combodo\\iTop\\Renderer\\Bootstrap\\BsFieldRendererMappings' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/BsFieldRendererMappings.php',
'Combodo\\iTop\\Renderer\\Bootstrap\\BsFormRenderer' => __DIR__ . '/../..' . '/sources/Renderer/Bootstrap/BsFormRenderer.php',
@@ -1132,8 +1132,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'InvalidPasswordAttributeOneWayPassword' => __DIR__ . '/../..' . '/application/exceptions/InvalidPasswordAttributeOneWayPassword.php',
'IssueLog' => __DIR__ . '/../..' . '/core/log.class.inc.php',
'ItopCounter' => __DIR__ . '/../..' . '/core/counter.class.inc.php',
'JSButtonItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'JSPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'JSButtonItem' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/JSButtonItem.php',
'JSPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/JSPopupMenuItem.php',
'KeyValueStore' => __DIR__ . '/../..' . '/core/counter.class.inc.php',
'Laminas\\Loader\\AutoloaderFactory' => __DIR__ . '/..' . '/laminas/laminas-loader/src/AutoloaderFactory.php',
'Laminas\\Loader\\ClassMapAutoloader' => __DIR__ . '/..' . '/laminas/laminas-loader/src/ClassMapAutoloader.php',
@@ -1886,10 +1886,10 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'RelationTypeIterator' => __DIR__ . '/../..' . '/core/simplegraph.class.inc.php',
'ReportValue' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php',
'RestDelete' => __DIR__ . '/../..' . '/core/restservices.class.inc.php',
'RestResult' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'RestResult' => __DIR__ . '/../..' . '/application/applicationextension/rest/RestResult.php',
'RestResultWithObjects' => __DIR__ . '/../..' . '/core/restservices.class.inc.php',
'RestResultWithRelations' => __DIR__ . '/../..' . '/core/restservices.class.inc.php',
'RestUtils' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'RestUtils' => __DIR__ . '/../..' . '/application/applicationextension/rest/RestUtils.php',
'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php',
'RotatingLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php',
'RowStatus' => __DIR__ . '/../..' . '/core/bulkchange.class.inc.php',
@@ -2002,7 +2002,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'ScssPhp\\ScssPhp\\Warn' => __DIR__ . '/..' . '/scssphp/scssphp/src/Warn.php',
'SearchMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php',
'SecurityException' => __DIR__ . '/../..' . '/application/exceptions/SecurityException.php',
'SeparatorPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'SeparatorPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/SeparatorPopupMenuItem.php',
'SetupLog' => __DIR__ . '/../..' . '/core/log.class.inc.php',
'Shortcut' => __DIR__ . '/../..' . '/application/shortcut.class.inc.php',
'ShortcutContainerMenuNode' => __DIR__ . '/../..' . '/application/menunode.class.inc.php',
@@ -3534,8 +3534,8 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'UIPasswordWidget' => __DIR__ . '/../..' . '/application/ui.passwordwidget.class.inc.php',
'UISearchFormForeignKeys' => __DIR__ . '/../..' . '/application/ui.searchformforeignkeys.class.inc.php',
'UIWizard' => __DIR__ . '/../..' . '/application/uiwizard.class.inc.php',
'URLButtonItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'URLPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'URLButtonItem' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/URLButtonItem.php',
'URLPopupMenuItem' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/URLPopupMenuItem.php',
'UnaryExpression' => __DIR__ . '/../..' . '/core/oql/expression.class.inc.php',
'UnknownClassOqlException' => __DIR__ . '/../..' . '/core/oql/oqlinterpreter.class.inc.php',
'User' => __DIR__ . '/../..' . '/core/userrights.class.inc.php',
@@ -3563,44 +3563,43 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'appUserPreferences' => __DIR__ . '/../..' . '/application/user.preferences.class.inc.php',
'cmdbAbstractObject' => __DIR__ . '/../..' . '/application/cmdbabstract.class.inc.php',
'cmdbDataGenerator' => __DIR__ . '/../..' . '/core/data.generator.class.inc.php',
'iApplicationObjectExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iApplicationUIExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iApplicationUIExtension.php',
'iAttributeNoGroupBy' => __DIR__ . '/../..' . '/core/attributedef.class.inc.php',
'iBackgroundProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php',
'iBackofficeDictEntriesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeDictEntriesPrefixesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeEarlyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeInitScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeLinkedScriptsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeLinkedStylesheetsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeReadyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeSassExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeStyleExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackupExtraFilesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iBackofficeDictEntriesExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeDictEntriesExtension.php',
'iBackofficeDictEntriesPrefixesExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeDictEntriesPrefixesExtension.php',
'iBackofficeEarlyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeEarlyScriptExtension.php',
'iBackofficeInitScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeInitScriptExtension.php',
'iBackofficeLinkedScriptsExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeLinkedScriptsExtension.php',
'iBackofficeLinkedStylesheetsExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeLinkedStylesheetsExtension.php',
'iBackofficeReadyScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeReadyScriptExtension.php',
'iBackofficeSassExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeSassExtension.php',
'iBackofficeScriptExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeScriptExtension.php',
'iBackofficeStyleExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iBackofficeStyleExtension.php',
'iBackupExtraFilesExtension' => __DIR__ . '/../..' . '/application/applicationextension/iBackupExtraFilesExtension.php',
'iCMDBChangeOp' => __DIR__ . '/../..' . '/core/cmdbchangeop.class.inc.php',
'iDBObjectSetIterator' => __DIR__ . '/../..' . '/core/dbobjectiterator.php',
'iDBObjectURLMaker' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php',
'iDisplay' => __DIR__ . '/../..' . '/core/dbobject.class.php',
'iFieldRendererMappingsExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iKPILoggerExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iFieldRendererMappingsExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iFieldRendererMappingsExtension.php',
'iKPILoggerExtension' => __DIR__ . '/../..' . '/application/applicationextension/iKPILoggerExtension.php',
'iLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php',
'iLoginExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iLoginUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iLogoutExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iLoginExtension' => __DIR__ . '/../..' . '/application/applicationextension/login/iLoginExtension.php',
'iLoginFSMExtension' => __DIR__ . '/../..' . '/application/applicationextension/login/iLoginFSMExtension.php',
'iLoginUIExtension' => __DIR__ . '/../..' . '/application/applicationextension/login/iLoginUIExtension.php',
'iLogoutExtension' => __DIR__ . '/../..' . '/application/applicationextension/login/iLogoutExtension.php',
'iMetricComputer' => __DIR__ . '/../..' . '/core/computing.inc.php',
'iModuleExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iModuleExtension' => __DIR__ . '/../..' . '/application/applicationextension/iModuleExtension.php',
'iNewsroomProvider' => __DIR__ . '/../..' . '/application/newsroomprovider.class.inc.php',
'iOnClassInitialization' => __DIR__ . '/../..' . '/core/metamodelmodifier.inc.php',
'iPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iPopupMenuExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iPageUIBlockExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iPageUIBlockExtension.php',
'iPopupMenuExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iPopupMenuExtension.php',
'iPortalUIExtension' => __DIR__ . '/../..' . '/application/applicationextension/portal/iPortalUIExtension.php',
'iPreferencesExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iPreferencesExtension.php',
'iProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php',
'iQueryModifier' => __DIR__ . '/../..' . '/core/querymodifier.class.inc.php',
'iRestInputSanitizer' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iRestServiceProvider' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iRestInputSanitizer' => __DIR__ . '/../..' . '/application/applicationextension/rest/iRestInputSanitizer.php',
'iRestServiceProvider' => __DIR__ . '/../..' . '/application/applicationextension/rest/iRestServiceProvider.php',
'iScheduledProcess' => __DIR__ . '/../..' . '/core/backgroundprocess.inc.php',
'iSelfRegister' => __DIR__ . '/../..' . '/core/userrights.class.inc.php',
'iTopConfigParser' => __DIR__ . '/../..' . '/core/iTopConfigParser.php',
@@ -3609,7 +3608,7 @@ class ComposerStaticInit7f81b4a2a468a061c306af5e447a9a9f
'iTopOwnershipToken' => __DIR__ . '/../..' . '/core/ownershiplock.class.inc.php',
'iTopStandardURLMaker' => __DIR__ . '/../..' . '/application/applicationcontext.class.inc.php',
'iTopXmlException' => __DIR__ . '/../..' . '/application/exceptions/iTopXmlException.php',
'iWelcomePopupExtension' => __DIR__ . '/../..' . '/application/applicationextension.inc.php',
'iWelcomePopupExtension' => __DIR__ . '/../..' . '/application/applicationextension/backoffice/iWelcomePopupExtension.php',
'iWorkingTimeComputer' => __DIR__ . '/../..' . '/core/computing.inc.php',
'lnkAuditCategoryToAuditDomain' => __DIR__ . '/../..' . '/application/audit.domain.class.inc.php',
'lnkTriggerAction' => __DIR__ . '/../..' . '/core/trigger.class.inc.php',

View File

@@ -1053,17 +1053,17 @@
},
{
"name": "nikic/php-parser",
"version": "v5.6.0",
"version_normalized": "5.6.0.0",
"version": "dev-master",
"version_normalized": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56"
"url": "https://github.com/Combodo/PHP-Parser.git",
"reference": "8ffc1239ff48ed2476b2672dbcc939fcdc5b0f7a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/221b0d0fdf1369c71047ad1d18bb5880017bbc56",
"reference": "221b0d0fdf1369c71047ad1d18bb5880017bbc56",
"url": "https://api.github.com/repos/Combodo/PHP-Parser/zipball/8ffc1239ff48ed2476b2672dbcc939fcdc5b0f7a",
"reference": "8ffc1239ff48ed2476b2672dbcc939fcdc5b0f7a",
"shasum": ""
},
"require": {
@@ -1076,14 +1076,15 @@
"ircmaxell/php-yacc": "^0.0.7",
"phpunit/phpunit": "^9.0"
},
"time": "2025-07-27T20:03:57+00:00",
"time": "2025-09-09T09:14:16+00:00",
"default-branch": true,
"bin": [
"bin/php-parse"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
"dev-master": "5.x-dev"
}
},
"installation-source": "dist",
@@ -1092,7 +1093,11 @@
"PhpParser\\": "lib/PhpParser"
}
},
"notification-url": "https://packagist.org/downloads/",
"autoload-dev": {
"psr-4": {
"PhpParser\\": "test/PhpParser/"
}
},
"license": [
"BSD-3-Clause"
],
@@ -1107,8 +1112,7 @@
"php"
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
"source": "https://github.com/nikic/PHP-Parser/tree/v5.6.0"
"source": "https://github.com/Combodo/PHP-Parser/tree/master"
},
"install-path": "../nikic/php-parser"
},

View File

@@ -3,7 +3,7 @@
'name' => 'combodo/itop',
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '5b9e0a1d4f4751778386710eb52a1326d3c29423',
'reference' => '9436a0221b1fda281dd098b54149127a7d3d23c3',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -22,7 +22,7 @@
'combodo/itop' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'reference' => '5b9e0a1d4f4751778386710eb52a1326d3c29423',
'reference' => '9436a0221b1fda281dd098b54149127a7d3d23c3',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -143,12 +143,14 @@
'dev_requirement' => false,
),
'nikic/php-parser' => array(
'pretty_version' => 'v5.6.0',
'version' => '5.6.0.0',
'reference' => '221b0d0fdf1369c71047ad1d18bb5880017bbc56',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '8ffc1239ff48ed2476b2672dbcc939fcdc5b0f7a',
'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(),
'aliases' => array(
0 => '5.x-dev',
),
'dev_requirement' => false,
),
'paragonie/random_compat' => array(

View File

@@ -36,7 +36,8 @@ if ($issues) {
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
}
}
throw new \RuntimeException(
'Composer detected issues in your platform: ' . implode(' ', $issues)
trigger_error(
'Composer detected issues in your platform: ' . implode(' ', $issues),
E_USER_ERROR
);
}

View File

@@ -24,7 +24,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
"dev-master": "5.x-dev"
}
},
"autoload": {

View File

@@ -3,7 +3,10 @@
namespace PhpParser;
use PhpParser\Node\Expr;
use PhpParser\Node\Identifier;
use PhpParser\Node\Name;
use PhpParser\Node\Scalar;
use Exception;
use function array_merge;
@@ -30,6 +33,12 @@ class ConstExprEvaluator {
/** @var callable|null */
private $fallbackEvaluator;
/** @var array $functionsWhiteList */
private $functionsWhiteList;
/** @var array $staticCallsWhitelist */
private $staticCallsWhitelist;
/**
* Create a constant expression evaluator.
*
@@ -44,6 +53,17 @@ class ConstExprEvaluator {
"Expression of type {$expr->getType()} cannot be evaluated"
);
};
$this->functionsWhiteList = [];
$this->staticCallsWhitelist = [];
}
public function setFunctionsWhitelist(array $functionsWhiteList): void {
$this->functionsWhiteList = $functionsWhiteList;
}
public function setStaticCallsWhitelist(array $staticCallsWhitelist): void {
$this->staticCallsWhitelist = $staticCallsWhitelist;
}
/**
@@ -115,6 +135,10 @@ class ConstExprEvaluator {
return $this->evaluateArray($expr);
}
if ($expr instanceof Expr\Variable) {
return $this->evaluateVariable($expr);
}
// Unary operators
if ($expr instanceof Expr\UnaryPlus) {
return +$this->evaluate($expr->expr);
@@ -145,6 +169,38 @@ class ConstExprEvaluator {
return $this->evaluateConstFetch($expr);
}
if ($expr instanceof Expr\Isset_) {
return $this->evaluateIsset($expr);
}
if ($expr instanceof Expr\ClassConstFetch) {
return $this->evaluateClassConstFetch($expr);
}
if ($expr instanceof Expr\Cast) {
return $this->evaluateCast($expr);
}
if ($expr instanceof Expr\StaticPropertyFetch) {
return $this->evaluateStaticPropertyFetch($expr);
}
if ($expr instanceof Expr\FuncCall) {
return $this->evaluateFuncCall($expr);
}
if ($expr instanceof Expr\StaticCall) {
return $this->evaluateStaticCall($expr);
}
if ($expr instanceof Expr\NullsafePropertyFetch||$expr instanceof Expr\PropertyFetch) {
return $this->evaluatePropertyFetch($expr);
}
if ($expr instanceof Expr\NullsafeMethodCall||$expr instanceof Expr\MethodCall) {
return $this->evaluateMethodCall($expr);
}
return ($this->fallbackEvaluator)($expr);
}
@@ -175,12 +231,15 @@ class ConstExprEvaluator {
/** @return mixed */
private function evaluateBinaryOp(Expr\BinaryOp $expr) {
if ($expr instanceof Expr\BinaryOp\Coalesce
&& $expr->left instanceof Expr\ArrayDimFetch
) {
// This needs to be special cased to respect BP_VAR_IS fetch semantics
return $this->evaluate($expr->left->var)[$this->evaluate($expr->left->dim)]
?? $this->evaluate($expr->right);
if ($expr instanceof Expr\BinaryOp\Coalesce) {
try {
$var = $this->evaluate($expr->left);
} catch(\Throwable $t) {
//left expression cannot be evaluated (! isset for exeample)
return $this->evaluate($expr->right);
}
return $var ?? $this->evaluate($expr->right);
}
// The evaluate() calls are repeated in each branch, because some of the operators are
@@ -225,13 +284,272 @@ class ConstExprEvaluator {
/** @return mixed */
private function evaluateConstFetch(Expr\ConstFetch $expr) {
$name = $expr->name->toLowerString();
switch ($name) {
case 'null': return null;
case 'false': return false;
case 'true': return true;
}
try {
$name = $expr->name;
if(! is_string($name)) {
//PHP_VERSION_ID usecase
$name = $name->name;
}
if (defined($name)) {
return constant($name);
}
} catch(\Throwable $t) {}
return ($this->fallbackEvaluator)($expr);
}
/** @return bool */
private function evaluateIsset(Expr\Isset_ $expr) {
try {
foreach ($expr->vars as $var) {
$var = $this->evaluate($var);
if (! isset($var)) {
return false;
}
}
return true;
} catch(\Throwable $t) {
return false;
}
}
/** @return mixed */
private function evaluateClassConstFetch(Expr\ClassConstFetch $expr) {
try {
$classname = $expr->class->name;
$property = $expr->name->name;
if ('class' === $property) {
return $classname;
}
if (class_exists($classname)) {
$class = new \ReflectionClass($classname);
if (array_key_exists($property, $class->getConstants())) {
$oReflectionConstant = $class->getReflectionConstant($property);
if ($oReflectionConstant->isPublic()) {
return $class->getConstant($property);
}
}
}
} catch(\Throwable $t) {}
return ($this->fallbackEvaluator)($expr);
}
/** @return mixed */
private function evaluateCast(Expr\Cast $expr) {
try {
$subexpr = $this->evaluate($expr->expr);
$type = get_class($expr);
switch ($type) {
case Expr\Cast\Array_::class:
return (array) $subexpr;
case Expr\Cast\Bool_::class:
return (bool) $subexpr;
case Expr\Cast\Double::class:
switch ($expr->getAttribute("kind")) {
case Expr\Cast\Double::KIND_DOUBLE:
return (double) $subexpr;
case Expr\Cast\Double::KIND_FLOAT:
case Expr\Cast\Double::KIND_REAL:
return (float) $subexpr;
}
break;
case Expr\Cast\Int_::class:
return (int) $subexpr;
case Expr\Cast\Object_::class:
return (object) $subexpr;
case Expr\Cast\String_::class:
return (string) $subexpr;
}
} catch(\Throwable $t) {}
return ($this->fallbackEvaluator)($expr);
}
/** @return mixed */
private function evaluateStaticPropertyFetch(Expr\StaticPropertyFetch $expr) {
try {
$classname = $expr->class->name;
if ($expr->name instanceof Identifier) {
$property = $expr->name->name;
} else {
$property = $this->evaluate($expr->name);
}
if (class_exists($classname)) {
$class = new \ReflectionClass($classname);
if (array_key_exists($property, $class->getStaticProperties())) {
$oReflectionProperty = $class->getProperty($property);
if ($oReflectionProperty->isPublic()) {
return $class->getStaticPropertyValue($property);
}
}
}
}
catch (\Throwable $t) {}
return ($this->fallbackEvaluator)($expr);
}
/** @return mixed */
private function evaluateFuncCall(Expr\FuncCall $expr) {
try {
$name = $expr->name;
if ($name instanceof Name) {
$function = $name->name;
} else {
$function = $this->evaluate($name);
}
if (! in_array($function, $this->functionsWhiteList)) {
throw new Exception("FuncCall $function not supported");
}
$args=[];
foreach ($expr->args as $arg) {
/** @var \PhpParser\Node\Arg $arg */
$args[]=$arg->value->value;
}
$reflection_function = new \ReflectionFunction($function);
return $reflection_function->invoke(...$args);
}
catch (\Throwable $t) {}
return ($this->fallbackEvaluator)($expr);
}
/** @return mixed */
private function evaluateVariable(Expr\Variable $expr) {
try {
$name = $expr->name;
if (array_key_exists($name, get_defined_vars())) {
return $$name;
}
if (array_key_exists($name, $GLOBALS)) {
global $$name;
return $$name;
}
} catch (\Throwable $t) {
}
return ($this->fallbackEvaluator)($expr);
}
/** @return mixed */
private function evaluateStaticCall(Expr\StaticCall $expr) {
try {
$class = $expr->class->name;
if ($expr->name instanceof Identifier) {
$method = $expr->name->name;
} else {
$method = $this->evaluate($expr->name);
}
$static_call_description = "$class::$method";
if (! in_array($static_call_description, $this->staticCallsWhitelist)) {
throw new Exception("StaticCall $static_call_description not supported");
}
$args=[];
foreach ($expr->args as $arg) {
/** @var \PhpParser\Node\Arg $arg */
$args[]=$arg->value->value;
}
$class = new \ReflectionClass($class);
$method = $class->getMethod($method);
if ($method->isPublic()) {
return $method->invokeArgs(null, $args);
}
} catch (\Throwable $t) {}
return ($this->fallbackEvaluator)($expr);
}
/**
* @param \PhpParser\Node\Expr\NullsafePropertyFetch|\PhpParser\Node\Expr\PropertyFetch $expr
*
* @return mixed
*/
private function evaluatePropertyFetch($expr) {
try {
$var = $this->evaluate($expr->var);
} catch (\Throwable $t) {
$var = null;
}
if (! is_null($var)) {
try {
if ($expr->name instanceof Identifier) {
$name = $expr->name->name;
} else {
$name = $this->evaluate($expr->name);
}
$reflectionClass = new \ReflectionClass(get_class($var));
$property = $reflectionClass->getProperty($name);
if ($property->isPublic()) {
return $property->getValue($var);
}
}
catch (\Throwable $t) {}
} else if ($expr instanceof Expr\NullsafePropertyFetch) {
return null;
}
return ($this->fallbackEvaluator)($expr);
}
/**
* @param \PhpParser\Node\Expr\MethodCall|\PhpParser\Node\Expr\NullsafeMethodCall $expr
*
* @return mixed
*/
private function evaluateMethodCall($expr) {
try {
$var = $this->evaluate($expr->var);
} catch (\Throwable $t) {
$var = null;
}
if (! is_null($var)) {
try {
$args = [];
foreach ($expr->args as $arg) {
/** @var \PhpParser\Node\Arg $arg */
$args[] = $arg->value->value;
}
if ($expr->name instanceof Identifier) {
$name = $expr->name->name;
} else {
$name = $this->evaluate($expr->name);
}
$reflectionClass = new \ReflectionClass(get_class($var));
$method = $reflectionClass->getMethod($name);
if ($method->isPublic()) {
return $method->invokeArgs($var, $args);
}
}
catch (\Throwable $t) {}
} else if ($expr instanceof Expr\NullsafeMethodCall) {
return null;
}
return ($this->fallbackEvaluator)($expr);
}
}

View File

@@ -5,7 +5,11 @@ namespace PhpParser\Node\Expr;
require __DIR__ . '/../ArrayItem.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\ArrayItem instead.
*/
class ArrayItem extends \PhpParser\Node\ArrayItem {
}
}

View File

@@ -5,6 +5,10 @@ namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Bool_ extends Cast {
// For use in "kind" attribute
public const KIND_BOOL = 1; // "bool" syntax
public const KIND_BOOLEAN = 2; // "boolean" syntax
public function getType(): string {
return 'Expr_Cast_Bool';
}

View File

@@ -5,6 +5,10 @@ namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class Int_ extends Cast {
// For use in "kind" attribute
public const KIND_INT = 1; // "int" syntax
public const KIND_INTEGER = 2; // "integer" syntax
public function getType(): string {
return 'Expr_Cast_Int';
}

View File

@@ -5,6 +5,10 @@ namespace PhpParser\Node\Expr\Cast;
use PhpParser\Node\Expr\Cast;
class String_ extends Cast {
// For use in "kind" attribute
public const KIND_STRING = 1; // "string" syntax
public const KIND_BINARY = 2; // "binary" syntax
public function getType(): string {
return 'Expr_Cast_String';
}

View File

@@ -5,7 +5,11 @@ namespace PhpParser\Node\Expr;
require __DIR__ . '/../ClosureUse.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\ClosureUse instead.
*/
class ClosureUse extends \PhpParser\Node\ClosureUse {
}
}

View File

@@ -77,7 +77,7 @@ class Param extends NodeAbstract {
return true;
}
if ($this->hooks === []) {
if (!$this->isPromoted()) {
return false;
}

View File

@@ -5,7 +5,11 @@ namespace PhpParser\Node\Scalar;
require __DIR__ . '/Float_.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\Scalar\Float_ instead.
*/
class DNumber extends Float_ {
}
}

View File

@@ -5,7 +5,11 @@ namespace PhpParser\Node\Scalar;
require __DIR__ . '/InterpolatedString.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\Scalar\InterpolatedString instead.
*/
class Encapsed extends InterpolatedString {
}
}

View File

@@ -7,7 +7,11 @@ use PhpParser\Node\InterpolatedStringPart;
require __DIR__ . '/../InterpolatedStringPart.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\InterpolatedStringPart instead.
*/
class EncapsedStringPart extends InterpolatedStringPart {
}
}

View File

@@ -5,7 +5,11 @@ namespace PhpParser\Node\Scalar;
require __DIR__ . '/Int_.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\Scalar\Int_ instead.
*/
class LNumber extends Int_ {
}
}

View File

@@ -124,7 +124,7 @@ class String_ extends Scalar {
// If it overflowed to float, treat as INT_MAX, it will throw an error anyway.
return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX);
} else {
return chr(octdec($str));
return chr(octdec($str) & 255);
}
},
$str

View File

@@ -7,7 +7,11 @@ use PhpParser\Node\DeclareItem;
require __DIR__ . '/../DeclareItem.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\DeclareItem instead.
*/
class DeclareDeclare extends DeclareItem {
}
}

View File

@@ -7,7 +7,11 @@ use PhpParser\Node\PropertyItem;
require __DIR__ . '/../PropertyItem.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\PropertyItem instead.
*/
class PropertyProperty extends PropertyItem {
}
}

View File

@@ -5,7 +5,11 @@ namespace PhpParser\Node\Stmt;
require __DIR__ . '/../StaticVar.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\StaticVar instead.
*/
class StaticVar extends \PhpParser\Node\StaticVar {
}
}

View File

@@ -7,7 +7,11 @@ use PhpParser\Node\UseItem;
require __DIR__ . '/../UseItem.php';
if (false) {
// For classmap-authoritative support.
/**
* For classmap-authoritative support.
*
* @deprecated use \PhpParser\Node\UseItem instead.
*/
class UseUse extends UseItem {
}
}

View File

@@ -2478,7 +2478,9 @@ class Php7 extends \PhpParser\ParserAbstract
$self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
},
487 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
$attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]);
$self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs);
},
488 => static function ($self, $stackPos) {
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
@@ -2486,7 +2488,9 @@ class Php7 extends \PhpParser\ParserAbstract
$self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs);
},
489 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
$attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]);
$self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs);
},
490 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
@@ -2495,7 +2499,9 @@ class Php7 extends \PhpParser\ParserAbstract
$self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
},
492 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
$attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]);
$self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs);
},
493 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
@@ -2686,10 +2692,10 @@ class Php7 extends \PhpParser\ParserAbstract
561 => static function ($self, $stackPos) {
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG;
$self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs);
$self->createdArrays->attach($self->semValue);
$self->createdArrays->offsetSet($self->semValue);
},
562 => static function ($self, $stackPos) {
$self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue);
$self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue);
},
563 => static function ($self, $stackPos) {
$self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes());

View File

@@ -2479,7 +2479,9 @@ class Php8 extends \PhpParser\ParserAbstract
$self->semValue = new Expr\Include_($self->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
},
490 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
$attrs['kind'] = $self->getIntCastKind($self->semStack[$stackPos-(2-1)]);
$self->semValue = new Expr\Cast\Int_($self->semStack[$stackPos-(2-2)], $attrs);
},
491 => static function ($self, $stackPos) {
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
@@ -2487,7 +2489,9 @@ class Php8 extends \PhpParser\ParserAbstract
$self->semValue = new Expr\Cast\Double($self->semStack[$stackPos-(2-2)], $attrs);
},
492 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
$attrs['kind'] = $self->getStringCastKind($self->semStack[$stackPos-(2-1)]);
$self->semValue = new Expr\Cast\String_($self->semStack[$stackPos-(2-2)], $attrs);
},
493 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Array_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
@@ -2496,7 +2500,9 @@ class Php8 extends \PhpParser\ParserAbstract
$self->semValue = new Expr\Cast\Object_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
},
495 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]);
$attrs['kind'] = $self->getBoolCastKind($self->semStack[$stackPos-(2-1)]);
$self->semValue = new Expr\Cast\Bool_($self->semStack[$stackPos-(2-2)], $attrs);
},
496 => static function ($self, $stackPos) {
$self->semValue = new Expr\Cast\Unset_($self->semStack[$stackPos-(2-2)], $self->getAttributes($self->tokenStartStack[$stackPos-(2-1)], $self->tokenEndStack[$stackPos]));
@@ -2687,10 +2693,10 @@ class Php8 extends \PhpParser\ParserAbstract
564 => static function ($self, $stackPos) {
$attrs = $self->getAttributes($self->tokenStartStack[$stackPos-(4-1)], $self->tokenEndStack[$stackPos]); $attrs['kind'] = Expr\Array_::KIND_LONG;
$self->semValue = new Expr\Array_($self->semStack[$stackPos-(4-3)], $attrs);
$self->createdArrays->attach($self->semValue);
$self->createdArrays->offsetSet($self->semValue);
},
565 => static function ($self, $stackPos) {
$self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->attach($self->semValue);
$self->semValue = $self->semStack[$stackPos-(1-1)]; $self->createdArrays->offsetSet($self->semValue);
},
566 => static function ($self, $stackPos) {
$self->semValue = Scalar\String_::fromString($self->semStack[$stackPos-(1-1)], $self->getAttributes($self->tokenStartStack[$stackPos-(1-1)], $self->tokenEndStack[$stackPos]), $self->phpVersion->supportsUnicodeEscapes());

Some files were not shown because too many files have changed in this diff Show More