Compare commits

...

680 Commits

Author SHA1 Message Date
odain
851fe5abfb N°7673 - Oauth for webhook - datamodel 2024-08-13 11:30:29 +02:00
Anne-Cath
244ae33ad6 N°7745 - Portal: Fix js error in firefox when leaving object modal form with ckeditor form 2024-08-12 14:36:32 +02:00
jf-cbd
c1eb605195 Merge remote-tracking branch 'refs/remotes/origin/support/3.2.0' into support/3.2 2024-08-07 17:59:57 +02:00
jf-cbd
0ee1818f12 N°7732 - CSRF protection generating error when cancelling the creation of an object
N°7741 - PDF export on impact analysis not working
2024-08-07 17:56:34 +02:00
Benjamin Dalsass
31758cbe2b Merge remote-tracking branch 'origin/support/3.2.0' into support/3.2 2024-08-07 08:32:59 +02:00
Benjamin Dalsass
a4a1fa4ec9 N°7734 - Date time picker button show html icon 2024-08-07 08:32:06 +02:00
Benjamin Dalsass
c32e186133 Merge remote-tracking branch 'origin/support/3.2.0' into support/3.2 2024-08-07 07:55:50 +02:00
Benjamin Dalsass
3d325caa06 N°7734 - Date time picker button show html icon 2024-08-07 07:54:40 +02:00
Molkobain
22141aba7b Merge remote-tracking branch 'origin/support/3.2.0' into support/3.2 2024-08-05 16:10:49 +02:00
Molkobain
9b066b3b88 N°7410 - Add hyperlinks to news features 2024-08-05 09:17:51 +02:00
Romain Quetiez
7ea7f5a967 N°7728 Stop flooding error.log with low probability issues, and do not confuse the root cause and the fact that the API is deprecated. 2024-08-02 10:33:00 +02:00
Eric Espie
38041b25fb N°7722 - Fatal error if xml entry "redefine" doesn't exist 2024-07-31 14:42:08 +02:00
Molkobain
3adeea8172 N°7565 - Newsroom: Fix image being too big since latest CSS fixes 2024-07-31 10:38:16 +02:00
Molkobain
10c3641307 N°7720 - PHP 8.1: Fix usage of trim() with null parameter throwing deprecated notice during setup 2024-07-30 16:59:32 +02:00
Molkobain
af9b03cfa5 N°7565 - Fix typo in english entry 2024-07-30 08:59:35 +02:00
DudekArtur
806a2f0597 N°7693 - Update polish translations (#660)
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
2024-07-26 14:38:54 +02:00
vdumas
0cb9f7ab4f Fix dico typo on "decreasing" 2024-07-25 11:50:19 +02:00
Molkobain
dc6c894cb8 N°7697 - Remove unit test corrupting DB 2024-07-25 10:22:22 +02:00
Molkobain
3fa9b68882 N°7703 - Add reconciliation keys to newsroom action classes 2024-07-25 10:21:06 +02:00
Stephen Abello
0514f889d3 Update portal compiled stylesheet 2024-07-25 09:21:32 +02:00
vdumas
890841a818 N°7565 - Newsroom - dico tooltip 2024-07-24 17:55:09 +02:00
Anne-Catherine
aed71a6335 N°7146 - Fix style not applied in list in the end-users portal in iTop 3.0+ (#635)
* N°7146 - Fix style not applied in list in the end-users portal in iTop 3.0+ - Add Markup in search list in order to use style

* N°7146 - Fix style not applied in list in the end-users portal in iTop 3.0+

* WIP

* Fix link on external Key

* Add new markup

* Update datamodels/2.x/itop-portal-base/portal/src/Controller/ObjectController.php

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>

---------

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>
2024-07-24 17:20:13 +02:00
Benjamin Dalsass
c910d35e25 N°7646 - Check performances compared to beginning of 3.2 development
- use highlight js lib minified version
2024-07-24 15:15:23 +02:00
vdumas
0586a77043 Align untranslated dictionnary entries with english 2024-07-24 14:49:25 +02:00
Stephen Abello
b4b032693a Recompile setup css file 2024-07-24 14:24:37 +02:00
Stephen Abello
054fd8798b N°7552 - Move CKEditor from to npm dependencies 2024-07-24 14:20:18 +02:00
vdumas
35a7d907cd N°7685 - Align Calendar invitation presentation to Email and add tooltip 2024-07-24 13:09:58 +02:00
Molkobain
4c66cfe6e3 N°7697 - Fix unit test 2024-07-24 12:18:22 +02:00
Stephen Abello
4360ad6502 N°7698 - Fix plain text value in HTML field being seen empty 2024-07-24 12:01:19 +02:00
Lars Kaltefleiter
841a2474af N°7687 - Update German translations for iTop 3.2 (#656)
* German translations iTop 3.2

* restore deleted entries
2024-07-24 11:54:03 +02:00
DudekArtur
33b6f2cbc4 N°7693 - Update polish translations (#658) 2024-07-24 11:37:19 +02:00
Stephen Abello
4680b6a497 N°7655 - Handle highlightjs styles in fronts styles and force it to apply over inlined styles 2024-07-24 11:22:00 +02:00
Molkobain
c5727d366f Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-07-24 11:01:30 +02:00
Thomas Casteleyn
a749a4654e N°7697 - Add method to rename DB table during setup (#623) 2024-07-24 10:51:07 +02:00
Benjamin Dalsass
3c8a71f39f N°7646 - Check performances compared to beginning of 3.2 development (#659)
- Improve OQL calls in portal services list pages with a cached private key for encoding rules
2024-07-24 10:43:29 +02:00
Timothee
ed7411294e N°7647 exclude fatal error image from build 2024-07-24 10:05:31 +02:00
Molkobain
aaecce7574 N°7686 - Fix typo in dictionary entry 2024-07-24 10:04:20 +02:00
Molkobain
480e2a0fb5 N°7686 - Fix typo in dictionary entry 2024-07-24 09:57:15 +02:00
Thomas Casteleyn
a3a0f33ad4 N°7686 - Update Dutch translations (#657) 2024-07-24 09:01:12 +02:00
Molkobain
089da40941 N°7552 - CKEditor: Fix error message not disappearing when mandatory field is filled 2024-07-23 23:14:47 +02:00
Molkobain
ce0d17e042 N°7552 - CKEditor: Cleanup remains of previous mentions overloads 2024-07-23 22:06:21 +02:00
Molkobain
aba737ab48 N°7552 - CKEditor: Cleanup in portal.scss 2024-07-23 16:06:09 +02:00
Molkobain
a7c5d9e92a N°7552 - CKEditor: Fix rendering in the portal 2024-07-23 16:04:46 +02:00
Molkobain
b2a377d7f1 N°7611 - CKEditor: Harmonize table alignments 2024-07-23 13:56:17 +02:00
Molkobain
1d65234073 N°7552 - CKEditor: Fix unit tests for email notifications 2024-07-23 13:26:35 +02:00
Molkobain
38065791da N°7552 - CKEditor: Harmonize HTML content rendering in edit, read and emails 2024-07-23 11:53:22 +02:00
Molkobain
086d2f0ba4 N°7552 - CKEditor: Include CKE styles in the backoffice theme and emails style 2024-07-23 11:52:39 +02:00
Molkobain
377e06d99a N°7552 - CKEditor: Make style generate in a CSS file instead of an inline tag 2024-07-23 11:50:03 +02:00
vdumas
37cf1b2901 N°6992 - Fix "add lnk" popup title: use label instead of class name 2024-07-23 10:10:32 +02:00
Eric Espie
d9f280dc56 N°7679 - Debug output when licence read-only 2024-07-23 09:48:33 +02:00
vdumas
b207f9ea02 N°7131 - Allow Data Synchro to change the Org of a Person regardless of its Users 2024-07-22 15:18:42 +02:00
vdumas
2690f8171e N°7131 - Allow Data Synchro to change the Org of a Person regardless of its Users 2024-07-22 15:10:41 +02:00
Benjamin Dalsass
7136ac38d6 N°7678 - Bulk modify of objects with HTML field broken
- build ckeditor dist
2024-07-22 14:58:51 +02:00
Benjamin Dalsass
d4b5e98514 N°7678 - Bulk modify of objects with HTML field broken
- file have been restored from its previous version due to a wrong merge conflict resolution
2024-07-22 14:58:06 +02:00
Stephen Abello
0ede0719c5 N°7552 - Fix CKEditor sources not being scrollable in fullscreen 2024-07-22 11:00:54 +02:00
Benjamin Dalsass
06124a0d94 N°7552 - Polishing CKeditor
- remove list properties plugin
- remove unused plugins
2024-07-22 10:22:05 +02:00
Timothee
d19d88e5dc N°7647 Removing unused fonts 2024-07-19 16:39:05 +02:00
Timothee
b2d8b0bfe4 N°7647 Removing needless font format for font-awesome 2024-07-19 16:37:04 +02:00
Timothee
095ac3dfa5 N°7647 Refactoring to allow files blacklist 2024-07-19 15:20:40 +02:00
Stephen Abello
a86edc69ac N°7655 - Make code blocks edition closer to its readonly counterpart 2024-07-19 10:54:06 +02:00
Stephen Abello
21bc4cdc9b Remove unwanted default table configuration for CKEditor 2024-07-19 10:52:49 +02:00
Molkobain
b682ed7ad9 N°7410 - Change acknowledge button label 2024-07-19 10:14:06 +02:00
Molkobain
5e823d1f16 N°7565 - Add description to details and list zlists 2024-07-19 09:46:55 +02:00
Molkobain
d32949d1d3 N°7410 - Fix typo in template path 2024-07-18 16:06:12 +02:00
Molkobain
06c26c99bb N°7565 - Make visual adjustments on the newsroom
- New messages indicator next to the news providers removed as it was confusing and not bringing relevant information
- Add hand cursor on hover of the news
- News content now restricted to a certain height / width to avoid content overflowing everywhere
- Limit message height in the "view all" page
2024-07-18 15:54:32 +02:00
jf-cbd
22e599598a 💬 Fix translations 2024-07-18 10:49:26 +02:00
jf-cbd
d666050e0c 💬 Fix translations 2024-07-18 10:27:16 +02:00
jf-cbd
8018c586cd 💬 Improved translations 2024-07-18 09:48:52 +02:00
Molkobain
e73911c458 N°7611 - Remove table reset / unset CSS rules as overflow from HTML attribute has been fixed 2024-07-18 09:32:09 +02:00
Molkobain
7e79b27823 N°6543 - Fix AttributeHTML field not respecting column constraint due to typo in CSS selector 2024-07-17 21:44:51 +02:00
jf-cbd
5fa9ef05a6 💬 Improved translations 2024-07-17 17:36:20 +02:00
Stephen Abello
f239b658e6 Fix CKEditor change detector being misled by insert carriage plugin 2024-07-17 14:53:13 +02:00
jf-cbd
141c22ff67 Fix selectize bug when multiple selectize fields exist on the same page 2024-07-17 14:17:09 +02:00
Stephen Abello
23651ae510 N°2523 - Align CKEditor and HtmlDomSanitizer denied and allowed lists 2024-07-17 11:45:55 +02:00
Molkobain
45a1efe2ae N°7565 - Update TriggerOnReachingState action message 2024-07-17 11:12:45 +02:00
Molkobain
06c135aab1 N°7565 - Newsroom: Polishing last details
- Force subscription policy on existing mention triggers
- Add news action to all mention triggers
- Add action (not linked to any trigger) for TriggerOnPortalLogUpdate
- Add action (not linked to any trigger) for TriggerOnReachingState for assigned
2024-07-17 10:47:01 +02:00
Molkobain
2203694b3f N°7565 - Fix news icon/timestamp not aligned depending on message length 2024-07-17 10:40:41 +02:00
Molkobain
f7ab9646d0 N°7552 - Fix mentions during object creation 2024-07-17 10:30:28 +02:00
Molkobain
a4959cad15 N°7397 - Fix missing space in dictionaries 2024-07-17 09:52:19 +02:00
Timothee
1c0a7e9bd9 N°7589 pushing menu position down 2024-07-16 17:26:33 +02:00
jf-cbd
cc46761e34 ✏️ Fix typos + fix French translation 2024-07-16 15:39:32 +02:00
Romain Quetiez
e1c3e7a3a6 🦺 N°7629 Remove refactoring protection tests 2024-07-16 10:25:14 +02:00
Romain Quetiez
baf85e7a80 N°7629 Deprecate utils::GetClassesForInterface in favor of InterfaceDiscovery::FindItopClasses
Improve caching strategy and robustness
2024-07-16 10:13:13 +02:00
Eric Espie
147aad9221 N°7631 - hardening code 2024-07-16 09:55:49 +02:00
Stephen Abello
41e0d39a5a Fix selectize element color when active 2024-07-16 09:29:12 +02:00
Timothee
91496b08bd N°7589 - Move oauth client menu under Integration and revert general configuration 2024-07-15 18:04:37 +02:00
Timothee
b3d20effd6 N°7589 - Move oauth client menu under Integration and revert general configuration 2024-07-15 17:51:25 +02:00
Molkobain
2e0b9bd6b4 Revert "N°7630 - Fix wrong enum/ext. key value selected when clicking on drop down list in modal"
No longer necessary as of 4b3e9432df

This reverts commit f0c37bd69e.
2024-07-15 17:01:39 +02:00
Molkobain
e497304b9d N°7630 N°7623 - Update SCSS to match new Selectize version 2024-07-15 16:32:44 +02:00
Molkobain
4b3e9432df N°7630 N°7623 - Fix visual glitches with selectize.js
Mind that as there is no released version of the necessary fixes yet, we upgraded the files based on e6ca6d3

More information on the issue resolving the matter: https://github.com/selectize/selectize.js/issues/1926
2024-07-15 16:24:45 +02:00
Molkobain
1d67d50a20 N°7397 - Update welcome popup content for iTop 3.2 (#648)
* N°7397 - Update welcome popup content for iTop 3.2

* N°7397 - Display illustrations as restylable SVG, add extension to twig to support absolute url in source function

* N°7397 - Update 3.2 welcome messages dictionaries, add French translations and set up other languages files

---------

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
2024-07-15 16:12:12 +02:00
Benjamin Dalsass
f0c37bd69e N°7630 - Fix wrong enum/ext. key value selected when clicking on drop down list in modal 2024-07-15 10:18:33 +02:00
Stephen Abello
21513f8df0 N°7552 - Fix CKEditors table, hyperlinks, and other options inputs not working in iTop portal 2024-07-12 10:49:20 +02:00
jf-cbd
eb73b6b2f5 N°7552 - Polishing CKeditor (Maximize/full screen mode) - built minified files 2024-07-11 17:17:01 +02:00
jf-cbd
504378261b N°7552 - Polishing CKeditor (Maximize/full screen mode) - built JS files 2024-07-11 17:11:05 +02:00
jf-cbd
a5ceddc40a N°7552 - Polishing CKeditor (Maximize/full screen mode) - remove maximize hybrid mode 2024-07-11 15:09:27 +02:00
jf-cbd
0fb23c4e5b N°7552 - Polishing CKeditor (Maximize/full screen mode) 2024-07-11 15:04:03 +02:00
DarkNight97boss
40c7559905 N°7652 - Update italian translations thanks to @DarkNight97boss (#653) 2024-07-11 13:17:44 +02:00
Benjamin Dalsass
edda622060 N°7443 - url in read-only attribute are displayed different between console and portal 2024-07-11 07:41:55 +02:00
Molkobain
f1694707ee N°7644 - Update french dictionary 2024-07-10 11:36:33 +02:00
Eric Espie
97ec9666ed N°7620 - Changing height of multiple selection combo between 1 and 8 according to allowed values 2024-07-10 10:33:27 +02:00
Thomas Casteleyn
7b91e9e164 N°7644 - Add Brand logo and Model picture (#646)
* Add Brand logo and Model picture

* Add dictionary items for new attributes

* Add Model picture to summary card
2024-07-10 10:29:11 +02:00
Molkobain
ff0f1d8ce9 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-07-10 10:09:43 +02:00
Thomas Casteleyn
1e3c425e81 N°7645 - PHP 8.1: Fix usage of strpos() & str_replace() with null value when compiling empty dictionary (#600)
* fix(compiler): provide empty string instead of null value

* Apply review suggestions
2024-07-10 10:07:12 +02:00
Molkobain
b2b5aeb08b Revert "N°7559 - Fix radio buttons in template fields"
This reverts commit dc8f676f75.
This reverts commit e9ef48b79c.
2024-07-09 11:30:12 +02:00
Stephen Abello
01ab3be8d3 N°7593 - Add robustness to scrollable tabs when the first tab is an Ajax tab 2024-07-09 10:36:39 +02:00
Molkobain
0d7ca88cc2 N°7606 - Improve log form entry robustness by ensuring CKEditor instance is loading before doing anything 2024-07-08 13:34:27 +02:00
Molkobain
4fee774fe5 N°7635 - Upgrade CKEditor dependency "ws" to v7.5.10 2024-07-08 10:40:49 +02:00
jf-cbd
0d9f348e93 🎨 Reformatting log channels name 2024-07-05 12:05:51 +02:00
Molkobain
1ea0018a50 N°7565 - Fix newsroom element's date time alignment 2024-07-05 10:03:44 +02:00
Benjamin Dalsass
3bec8fe7d2 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-07-05 09:24:45 +02:00
Benjamin Dalsass
b2e3fb6354 N°7024 - Fix opening an object with abstract class indirect linked set in Portal 2024-07-05 09:10:19 +02:00
Molkobain
7cedc501f7 N°7565 - Add button in notifications center to access the "all news" page 2024-07-04 23:59:39 +02:00
Molkobain
296c5bd3d2 N°7565 - Refactor "other actions" tab to display action class name on the panel 2024-07-04 23:42:17 +02:00
Molkobain
a2bddea1e2 N°7565 - Forbid disabling internal newsroom provider 2024-07-04 23:33:38 +02:00
Molkobain
53cd9f8b5f N°7565 - Fix newsroom display limit not following user preferences 2024-07-04 23:23:40 +02:00
Molkobain
b344826c44 N°7565 - Increase default mention newsroom notification to priority "Important" instead of "Standard" 2024-07-04 23:07:41 +02:00
Molkobain
a0dc68ab9a N°7565 - Generate newsroom action for Person mention on installation/upgrade 2024-07-04 22:43:37 +02:00
Molkobain
22f2b5d0e5 N°7565 - Fix dictionaries counter-parts in other languages 2024-07-04 18:10:47 +02:00
Stephen Abello
c411900efd N°7552 - Fix CKEditor tables being impossible to resize 2024-07-04 16:17:59 +02:00
Molkobain
592aa93c40 N°7565 - Update newsroom dictionaries with tooltips 2024-07-04 15:59:26 +02:00
Stephen Abello
6c02dd75fa N°7552 - Correctly define custom z-index for CKEditor 2024-07-04 15:57:23 +02:00
Stephen Abello
39853d4949 N°7552 - Keep style from Word/Excel content 2024-07-04 15:11:11 +02:00
Stephen Abello
2404f5d00f N°7552 - Remove unused library masterminds/html5 2024-07-04 14:59:21 +02:00
jf-cbd
f84746274f Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-07-04 13:55:59 +02:00
jf-cbd
45ce68e16e Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1 2024-07-04 13:55:11 +02:00
jf-cbd
1aef576403 N°7604 - Security hardening 2024-07-04 13:52:19 +02:00
Molkobain
c3582f0aff N°7552 - Fix mentions not taking triggers filter into account 2024-07-04 11:30:51 +02:00
Molkobain
8c4c0ff5e1 N°7552 - Adjust linkedset display as tag endpoint to return only necessary data 2024-07-04 11:30:51 +02:00
jf-cbd
7b6334d447 Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-07-04 11:01:16 +02:00
jf-cbd
bfd9be8280 Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1 2024-07-04 10:59:57 +02:00
jf-cbd
96e1388dde N°7603 - Security hardening + UI blocks examples updated 2024-07-04 10:56:08 +02:00
Timothee
fd64be1dcd N°7490 Upgrade tcpdf version 2024-07-04 10:41:18 +02:00
Stephen Abello
64974a2c54 N°7530 - Fix selectize results not stylized properly in other themes 2024-07-04 10:11:47 +02:00
Timothee
e363692822 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-07-04 09:45:56 +02:00
Stephen Abello
d5d93ed147 N°7530 - Fix quickcreate autocomplete results not displaying properly 2024-07-04 09:43:55 +02:00
Romain Quetiez
c3547f29d0 Cosmetics on the test framework 2024-07-04 09:38:35 +02:00
Benjamin Dalsass
989ba7bbe7 N°7615 - Edition of a n-n link in edit mode not working
- Register input listeners on page ready
2024-07-04 07:55:30 +02:00
Eric Espie
ac90d8036f N°7516 - hardening code 2024-07-03 18:03:34 +02:00
Timothee
644da707d2 Fix merge conflit resolution d3b9965283 2024-07-03 17:13:47 +02:00
Timothee
86b48b8980 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-07-03 17:00:22 +02:00
Timothee
69c8791fc5 Fix merge conflit resolution d3b9965283 2024-07-03 16:48:08 +02:00
jf-cbd
8b35679fcf N°7124 - Security hardening 2024-07-03 15:51:43 +02:00
Stephen Abello
cb8af0a02b N°7602 - Fix issue when displaying CKEditor sources while CKEditor is maximized 2024-07-03 15:47:29 +02:00
Stephen Abello
0b442a2e1a N°7622 - Add carriage return after a block elements in ckeditor 5 2024-07-03 15:26:26 +02:00
Molkobain
f98e92b255 Restore documentation comment 2024-07-03 15:19:55 +02:00
Stephen Abello
eca1836bd8 N°7595 - Fix body text color variable being used before it's declared 2024-07-03 14:47:25 +02:00
Stephen Abello
17e8cad005 N°7595 - Fix CKEditor 5 font color in dark themes 2024-07-03 14:24:52 +02:00
Romain Quetiez
48e89dd27e N°7621 Fix extensibility point introduced in N°4498, JS code included via iBackofficeScriptExtension must be executed after the JS files have been loaded 2024-07-03 09:42:41 +02:00
Eric Espie
e9ef48b79c N°7559 - Fix radio buttons in template fields 2024-07-03 09:28:18 +02:00
Romain Quetiez
ab9df22e76 📝 Reinforce the documentation of WebPage JS inclusion API 2024-07-02 17:18:32 +02:00
jf-cbd
84f2ecd80f Merge branch 'refs/heads/feature/N°7124-CSRF-in-several-iTop-pages' into support/3.2 2024-07-02 17:16:23 +02:00
jf-cbd
98f946c871 N°7124 - [SECU] Cross-Site Request Forgery (CSRF) in several iTop pages (finalize implementation) 2024-07-02 17:14:55 +02:00
odain
452d97f2d0 N°7584 - fix log 2024-07-02 16:00:42 +02:00
odain
3f0e46230f N°7584 - authentication error log only when unescapable login_mode 2024-07-02 14:10:31 +02:00
Eric Espie
fad3259290 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-07-02 10:42:28 +02:00
Eric Espie
5fd8678a3a N°7619 - Object deletion not cascaded to legacy extensions 2024-07-02 10:38:25 +02:00
Eric Espie
86df9ac035 N°7619 - Object deletion not cascaded to legacy extensions 2024-07-02 10:37:36 +02:00
Romain Quetiez
d4b342a35d Simplify for the sake of readability 2024-06-28 23:58:10 +02:00
Romain Quetiez
8c87f5a384 Merge branch 'refs/heads/feature/TestsGivenObjectInDB' into support/3.2 2024-06-28 17:04:35 +02:00
Eric Espie
984f676d6e GivenObjectInDB() and additional improvements in the tests suite to address false positive and slow tests
Rewrite tests on impact analysis to make them readable in the first place, then simplifiy the tests to focus on risk reduction, then complete with some edge case
Rewrite tests on impact graph build when the current user has restricted access to some parts of the graph
2024-06-28 15:24:13 +02:00
Molkobain
0f213b08a6 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-06-28 15:02:46 +02:00
Molkobain
3f997b416f N°7313 - Revert "fix" as it breaks grouping on ext. keys, OQL functions and more
We keep the enhancements to the test framework though.
2024-06-28 14:54:51 +02:00
Molkobain
f88e231780 N°7610 - Fix inline images in log being displayed above the transition buttons 2024-06-28 12:20:46 +02:00
Molkobain
fff95fcebd N°7601 - Avoid image to float along side text when editing, which will render differently in read-only / notifications 2024-06-27 22:16:53 +02:00
Molkobain
de17664c49 N°7601 - Remove image alignment buttons from CKEditor toolbar 2024-06-27 22:07:39 +02:00
Molkobain
2b1826d2e6 N°7606 - Fix lost of submitted log entry when using the grouped stimuli buttons in creation/edit mode 2024-06-27 10:15:48 +02:00
Romain Quetiez
b8d8ec640d Cleanup of legacy tests (sending emails) 2024-06-25 15:41:50 +02:00
Romain Quetiez
e2c01e9e5d 🎉 Releasing 3.0.2-beta1 2024-06-25 15:34:30 +02:00
Molkobain
a55efdff18 N°7315 - Migrate usages of WebPage::add_linked_xxx() for LoginTwigRenderer class 2024-06-25 15:02:20 +02:00
Eric Espie
3c1af200f8 💄 better page consistency 2024-06-24 17:28:27 +02:00
Eric Espie
dc8f676f75 N°7559 - Fix radio buttons in template fields 2024-06-24 17:11:39 +02:00
Anne-Cath
a160f2e212 N°4342 - Improve generic bulk deletion function with memory limit handling - add tests 2024-06-24 14:55:36 +02:00
Eric Espie
c1ce4f9a9f Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-06-24 14:30:28 +02:00
Eric Espie
cceb6809e7 Fix CI 2024-06-24 14:20:33 +02:00
Eric Espie
48b559472e Merge remote-tracking branch 'origin/support/3.0' into support/3.1
# Conflicts:
#	tests/php-unit-tests/src/BaseTestCase/ItopTestCase.php
2024-06-24 14:02:04 +02:00
Eric Espie
cddc452693 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-06-24 13:55:29 +02:00
Eric Espie
0904a21e3f Cleanup ItopTestCase 2024-06-24 11:50:37 +02:00
Eric Espie
e800946898 N°7454 - Add dedicated menu entry for config file edition 2024-06-21 14:13:46 +02:00
Eric Espie
e189034436 N°7454 - Add dedicated menu entry for config file edition 2024-06-21 14:05:05 +02:00
Timothee
4590013adc N°7581 Improve error message readability during object creation/modification in the portal (regression introduced with N°7545) 2024-06-21 12:48:43 +02:00
Timothee
66230199f8 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-06-21 12:41:17 +02:00
Timothee
1f1a2b660f N°7581 Improve error message readability during object creation/modification in the portal (regression introduced with N°7545) 2024-06-21 12:36:52 +02:00
Molkobain
b8b35194c9 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-06-21 11:34:11 +02:00
Molkobain
4f36369ea1 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-06-21 11:32:21 +02:00
Molkobain
33a906f11a Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-06-21 11:29:18 +02:00
Molkobain
82d11eeb47 N°7127 - Upgrade handlebars.js to v4.7.8 2024-06-21 11:19:39 +02:00
Molkobain
fdef394070 N°7127 - Upgrade handlebars.js to v4.7.8 2024-06-21 11:14:21 +02:00
Timothee
a3a5630e88 N°7581 Improve error message readability during object creation/modification in the portal (regression introduced with N°7545) 2024-06-21 10:37:25 +02:00
Eric Espie
9f7fd6a3a1 N°7465 - Code hardening 2024-06-20 17:42:24 +02:00
Molkobain
112a6f9942 N°7588 - Fix .env.local not working for the portal since Symfony 5.4 migration 2024-06-20 17:09:50 +02:00
odain
60110a4302 N°7584 - Login mode with special characters are not supported 2024-06-20 16:41:50 +02:00
Eric Espie
4426e2adfe N°7516 - Code hardening 2024-06-20 16:28:38 +02:00
vdumas
0028b3cf17 N°7565 - Polishing Newsroom 2024-06-20 16:00:07 +02:00
Eric Espie
4867810ebe N°7516 - Code hardening 2024-06-20 15:36:19 +02:00
Eric Espie
6b2476d220 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-06-20 11:08:23 +02:00
Eric Espie
b8bf66031b Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-06-20 11:07:57 +02:00
Eric Espie
2596a150bf Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-06-20 11:07:36 +02:00
Eric Espie
142d6c8993 N°7533 - Detect and warns on Galera clusters 2024-06-20 11:06:57 +02:00
Eric Espie
a3309365fc N°7533 - Prevent installation of iTop on Galera clusters 2024-06-20 10:50:50 +02:00
Eric Espie
9dcdb1bc8c N°7533 - Prevent installation of iTop on Galera clusters 2024-06-20 10:47:20 +02:00
Eric Espie
2275daf3b0 N°7533 - Prevent installation of iTop on Galera clusters 2024-06-20 09:49:41 +02:00
Molkobain
d145cb508a N°7552 - Fix regression from previous merge (f63abd9b)
Can't submit HTML field in the backoffice
2024-06-20 09:08:32 +02:00
Eric Espie
7028fd21bc N°7571 - fix warning due to the new version of Html2Text lib 2024-06-19 11:23:08 +02:00
Molkobain
51adfd0254 N°7565 - Refactor way of retrieving user's picture 2024-06-19 11:05:46 +02:00
Eric Espie
6e2ed188eb Merge branch 'support/3.2-beta' into support/3.2 2024-06-19 10:57:27 +02:00
Timothee
2a3516d593 Reapply "Merge remote-tracking branch 'origin/support/3.1' into support/3.2"
This reverts commit 3233b9776f.
2024-06-19 09:47:48 +02:00
Molkobain
c2d984d470 N°7552 - Fix implicit float to int conversion when uploading inline images 2024-06-19 09:08:00 +02:00
Molkobain
1de2502fe9 N°7552 - Fix CKEditor not following datamodel width/height in the backoffice 2024-06-18 23:20:42 +02:00
Molkobain
6647575965 N°7552 - Fix CKEditor overflowing on next column in the backoffice 2024-06-18 23:09:31 +02:00
Eric Espie
e5a60beba0 🚨 Fix autoload files 2024-06-18 17:54:12 +02:00
Eric Espie
2804076bf6 N°7514 - hardening code
(cherry picked from commit b8b9423aa85c65b25f7fb3d9c5ba0933317474d7)
2024-06-18 17:40:20 +02:00
Molkobain
f63abd9b6f Merge remote-tracking branch 'origin/feature/3.2-post-beta' into support/3.2
# Conflicts:
#	js/ckeditor/build/ckeditor.js
#	js/ckeditor/build/ckeditor.js.map
2024-06-18 17:33:13 +02:00
Eric Espie
4ebdc9d6ed fix unit tests 2024-06-18 16:15:35 +02:00
Eric Espie
6e364a0ab9 N°7514 - hardening code 2024-06-18 16:00:08 +02:00
Timothee
3233b9776f Revert "Merge remote-tracking branch 'origin/support/3.1' into support/3.2"
This reverts commit 905bbf9118, reversing
changes made to 1c00461f4d.
2024-06-17 18:03:12 +02:00
Timothee
905bbf9118 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-06-17 17:04:05 +02:00
Timothee
d70e5dff45 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-06-17 16:55:26 +02:00
Timothee
c4fc0ed982 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-06-17 16:51:30 +02:00
Timothee
320922a13d N°7545 Correctly display error message 2024-06-17 16:49:33 +02:00
odain
9514977ce2 ci bug investigation 2024-06-17 16:48:09 +02:00
Eric Espie
62d08dce56 ⬆️ fix composer filters 2024-06-17 15:06:06 +02:00
Eric Espie
71e36d264e fix unit tests 2024-06-17 14:52:55 +02:00
Eric Espie
7dc1672b24 Add logs to unit tests 2024-06-17 11:55:36 +02:00
Eric Espie
50e40879de N°7571 - HTML2Text lib 2024-06-13 18:16:26 +02:00
Romain Quetiez
1c00461f4d Allow more modules to be compatible with LTS 2.7 dictionary format spec 2024-06-13 17:58:29 +02:00
Eric Espie
6cc24e475a N°7571 - HTML2Text lib 2024-06-13 17:28:08 +02:00
Benjamin Dalsass
6c0dfd13eb N°7552 - Polishing CKeditor
- set an editor height to prevent editor growing
2024-06-13 16:21:58 +02:00
Eric Espie
4232284dae N°7571 - HTML2Text lib 2024-06-13 15:33:54 +02:00
jf-cbd
b8c4be7a3d N°7552 - Polishing CKeditor (maximized mode, focus impossible if editor in a modal)
Fullscreen mode for portal (native browser method)
Windowed mode for console (JS method)
portal.css not minified
2024-06-13 15:30:57 +02:00
Benjamin Dalsass
6958fd0965 Merge remote-tracking branch 'origin/feature/3.2-post-beta' into feature/3.2-post-beta 2024-06-13 14:49:46 +02:00
Benjamin Dalsass
1f8726669b N°7567 - Error message on bulk modify on object with different values in a an HTML field 2024-06-13 14:48:06 +02:00
Eric Espie
47d65931e6 N°7571 - ⬆️ Bump HTML2Text library version 2024-06-13 14:45:06 +02:00
Romain Quetiez
b8a9ea452f Fix interferences between tests on dictionaries 2024-06-13 11:32:17 +02:00
jf-cbd
c8a1f7f534 Update licenses for 3.2 release 2024-06-13 11:01:42 +02:00
Romain Quetiez
cbb78056c3 Enable tests on french dictionaries completion (continuous integration) 2024-06-13 10:53:13 +02:00
jf-cbd
bfbb046b10 N°7552 - Polishing CKeditor (maximized mode, focus impossible if editor in a modal)
Fullscreen mode for portal (native browser method)
Windowed mode for console (JS method)
portal.css not minified
2024-06-13 10:32:08 +02:00
Romain Quetiez
c34dc34e3e Complete french translations (reviewed with Vincent) 2024-06-12 18:08:54 +02:00
Vincent Dumas
a1e48cc438 Fix FR missing translations 2024-06-12 17:31:11 +02:00
Eric Espie
8b256caa6c Merge remote-tracking branch 'origin/support/3.1' into feature/3.2-post-beta 2024-06-12 16:49:13 +02:00
Eric Espie
f96d28a0a8 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-06-12 16:48:39 +02:00
Eric Espie
d3b9965283 Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	core/cmdbsource.class.inc.php
2024-06-12 16:48:06 +02:00
Eric Espie
f03d731b1d N°7533 - Prevent installation of iTop on Galera clusters 2024-06-12 16:14:23 +02:00
Timothee
d4b41d892c Automated dictionaries synchronization with english reference 2024-06-11 17:43:44 +02:00
Timothee
09a5d7a35f Automated dictionaries synchronization with english reference 2024-06-11 16:38:40 +02:00
Timothee
ae83a11a8c Future phpunit tests for french dictionaries 2024-06-11 15:45:14 +02:00
jf-cbd
291c513d3b Remove balloon remaining in full screen (on Firefox) 2024-06-11 09:36:21 +02:00
jf-cbd
8935de0809 Dev command to improve development 2024-06-11 09:36:21 +02:00
Benjamin Dalsass
4c0a55dbbb N°5298 - Upgrade CKEditor to version 5
- PrepareCKEditorValueTextEncodingForTextarea: allow null value
2024-06-10 16:13:45 +02:00
Benjamin Dalsass
6080e456c5 N°5298 - Upgrade CKEditor to version 5
- correct textarea encoding for ckeditor
https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/getting-and-setting-data.html#automatic-integration-with-html-forms
2024-06-10 10:07:20 +02:00
Timothee
cd065cc0db N°7565 - Polishing Newsroom - Add subtitle and user icon (fix SK dictionary) 2024-06-07 15:34:21 +02:00
jf-cbd
46929ce43f Remove header check in ajax.render.php 2024-06-07 10:03:49 +02:00
Benjamin Dalsass
bda7f58ddd N°5298 - Upgrade CKEditor to version 5
- remove text transformation plugin
2024-06-07 08:54:50 +02:00
Benjamin Dalsass
c940295663 N°7529 - Choose which button to keep in CKeditor5 2024-06-07 08:18:58 +02:00
Benjamin Dalsass
8d2adfbbd2 N°5298 - Upgrade CKEditor to version 5
- fix portal issue when choosing a text color, text area value is replaced by hexadecimal color text input
2024-06-07 08:17:38 +02:00
Benjamin Dalsass
d3b39048d8 N°5298 - Upgrade CKEditor to version 5
- remove fired event UPDATE in plugin update-input-on-change
effect: alert dialog on portal when adding image
known impact: validation on portal not triggered on textarea modification
2024-06-07 08:16:29 +02:00
vdumas
02a5630f62 N°7565 - Polishing Newsroom - Add subtitle and user icon 2024-06-06 17:42:02 +02:00
jf-cbd
9d1c66296b N°7124 - [SECU] Cross-Site Request Forgery (CSRF) in several iTop pages 2024-06-06 17:10:49 +02:00
vdumas
be3e55acee N°7565 - Polishing Newsroom - FR entries 2024-06-06 12:15:28 +02:00
vdumas
3fd6f47f8b N°7425 - Add Warning when a user has no contact or no allow org 2024-06-06 12:08:20 +02:00
Eric Espie
bbebca7951 N°7556 - Cross-Site Request Forgery (CSRF) protection 2024-06-05 17:38:51 +02:00
vdumas
07702379c3 N°7560 - Improve help message on Event methods (2) 2024-06-05 15:41:06 +02:00
vdumas
7c8fa10be9 N°7560 - Improve help message on Event methods 2024-06-05 15:06:34 +02:00
jf-cbd
ffcc8ff32a N°7459 optimize memory consumption during compilation with php 8.1+ (#650)
N°7459 optimize memory consumption during compilation with PHP 8.1+
2024-06-05 11:03:43 +02:00
jf-cbd
6f42b4aafc Fix selectize bug when multiple selectize fields exist on the same page 2024-06-05 10:26:26 +02:00
Romain Quetiez
ecd8890c0b List explicitely the modules when finding inconsistencies in installation.xml 2024-06-04 21:56:03 +02:00
vdumas
f568aaf732 N°6303 - Add search ticket bricks in portal 2024-06-04 11:40:59 +02:00
Benjamin Dalsass
fbf98aa4d9 N°5298 - Upgrade CKEditor to version 5
- remove unused object-shortcut toolbar item
2024-06-04 10:58:47 +02:00
vdumas
0f5ee780bc N°7551 - ActionNewsroom Message mandatory 2024-06-03 17:05:02 +02:00
Benjamin Dalsass
12ccbd48b9 N°7467 - Fix column selection broken in CSV export 2024-06-03 15:48:42 +02:00
Eric Espie
67762458e4 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-05-30 12:08:11 +02:00
Eric Espie
3e3ac0d83f N°7542 - code hardening 2024-05-30 12:04:36 +02:00
Benjamin Dalsass
fa43aaba49 N°5298 - Upgrade CKEditor to version 5
- set a minimum editor height (180px) in portal
2024-05-30 09:17:40 +02:00
Benjamin Dalsass
12fc7fbfd9 N°5298 - Upgrade CKEditor to version 5
- set a minimum editor height (180px) in portal
2024-05-30 09:16:39 +02:00
Eric Espie
6969013439 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-05-29 18:20:13 +02:00
Eric Espie
32835f70b9 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-05-29 18:19:48 +02:00
Eric Espie
63cf78f64d Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	pages/preferences.php
2024-05-29 18:18:55 +02:00
Eric Espie
8be7628668 N°7548 - Code hardening 2024-05-29 18:11:36 +02:00
Eric Espie
37f0a7e6d9 N°7548 - Code hardening 2024-05-29 18:08:40 +02:00
Benjamin Dalsass
e750ad8755 N°5298 - Upgrade CKEditor to version 5
- adjust plugin update-input-on-change to prevent emitting event when data has no change
2024-05-28 16:07:00 +02:00
Benjamin Dalsass
22882e35b4 N°5298 - Upgrade CKEditor to version 5
- restore WebResourcesHelper ckeditor for extension compatibility (ex customer survey)
2024-05-28 15:53:52 +02:00
Molkobain
afc40d9cca N°2039 - Fix newsroom menu not opening due to regression in a642ad6d 2024-05-28 13:50:55 +02:00
Benjamin Dalsass
7cf607c34e N°5298 - Upgrade CKEditor to version 5
- restore portal highlight js import
2024-05-28 11:28:46 +02:00
Benjamin Dalsass
e6c3744aaa N°5298 - Upgrade CKEditor to version 5
- restore broken test for CKEditor resources check
2024-05-28 08:29:40 +02:00
Benjamin Dalsass
7769e5e116 N°5298 - Upgrade CKEditor to version 5
- update ckeditor plugin update-input-on-change by removing the event fired
2024-05-28 08:16:21 +02:00
Eric Espie
11502d2e92 N°7478 - Users (except admins) are not allowed to manage their own allowed org list 2024-05-27 14:55:37 +02:00
Molkobain
fc428eeb2b N°6167 - Fix welcome popup opening with collapsed content 2024-05-26 23:03:34 +02:00
Molkobain
a956627187 N°5298 - Merge work from 9bf0addc9c with changes from the WIP CKEditor build repo 2024-05-24 23:35:36 +02:00
Molkobain
c178fa4677 N°5298 - Remove unnecessary SCSS variables 2024-05-24 22:55:34 +02:00
Molkobain
25af60d8df N°5298 - Add class HTML attribute to most HTML tags in the HTMLDOMSanitizer 2024-05-24 22:53:30 +02:00
Benjamin Dalsass
9bf0addc9c N°5298 - Upgrade CKEditor to version 5 (#647) 2024-05-24 16:13:20 +02:00
Eric Espie
094a9ed82f Merge remote-tracking branch 'origin/support/3.1' into support/3.2
# Conflicts:
#	tests/php-unit-tests/unitary-tests/core/CRUDEventTest.php
#	tests/php-unit-tests/unitary-tests/core/DBObject/MockDBObjectWithCRUDEventListener.php
2024-05-24 10:04:40 +02:00
Eric Espie
5e64be8580 N°7491 - Fix unit tests 2024-05-24 09:48:07 +02:00
Eric Espie
a0b76a25be N°7491 - Fix Events during DBObject CRUD 2024-05-24 09:35:00 +02:00
Molkobain
4764553e08 N°5298 - Fix HTML attribute name always empty in RichText block 2024-05-24 09:30:24 +02:00
Romain Quetiez
f87b4f6154 Make sure that tests use valid input data 2024-05-23 09:14:42 +02:00
Molkobain
4ccec53e8d N°5298 - Improve CKEditor fullscreen style in the backoffice 2024-05-22 21:55:16 +02:00
Molkobain
e7728ee7dd N°5298 - Downsize CKEditor buttons / components for better integration with our UIs 2024-05-22 21:54:27 +02:00
Molkobain
c06aa66854 N°5298 - Fix CKEditor not using width/height from the datamodel since upgrade to v5 in the backoffice 2024-05-22 15:13:40 +02:00
Molkobain
7dd913b0dd N°5298 - Fix CKEditor fullscreen style and theme integration in the backoffice 2024-05-22 15:12:37 +02:00
Molkobain
6fb1afaa2f N°5298 - Fix CKEditor fullscreen style in the end-users portal 2024-05-22 13:24:16 +02:00
Molkobain
8cb92e3bd3 N°7494 - Update highlight.js to v11.9.0
Mind that this lib is not maintained through NPM yet as its sources alone don't allow to be used in CKEditor out of the box, it needs extra steps to be built/used. And as we are already struggling with the CKEditor integration, we rather make baby steps.
2024-05-22 13:24:16 +02:00
vdumas
d9fcde8dbb N°7484 - "autoresolve" Parent-Child now supports Friendlyname customization 2024-05-22 12:41:27 +02:00
Eric Espie
2389a5d720 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-05-21 15:08:07 +02:00
Eric Espie
e2f2afad54 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-05-21 15:07:28 +02:00
Eric Espie
f632cf3155 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-05-21 15:07:08 +02:00
Eric Espie
bc77c6589d Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-05-21 14:29:56 +02:00
Eric Espie
13dfdc3d9d Merge remote-tracking branch 'origin/support/2.7' into support/3.1 2024-05-21 14:29:10 +02:00
Eric Espie
62caf16153 N°7364 - Code hardening 2024-05-21 14:20:30 +02:00
Romain Quetiez
1de179f683 N°4459 Make sure that every test will pass even if the CI provides an invalid configuration file. Also allow encryption mecanism to be fully controlled by the tests 2024-05-18 17:49:07 +02:00
Romain Quetiez
8823068608 N°4459 - Sodium default encrypted key invalid in the CI (workaround) 2024-05-17 16:56:55 +02:00
Romain Quetiez
48857631a4 Test that any kind of attribute can be written and read, both directly and through an external field 2024-05-17 16:56:55 +02:00
jf-cbd
fd6796aae3 Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2
# Conflicts:
#	.make/composer/rmDeniedTestDir.php
#	application/utils.inc.php
2024-05-17 11:16:56 +02:00
jf-cbd
020a37ead9 N°7526 - Profile input unfocus: Previously entered value still filters 2024-05-17 10:58:29 +02:00
Romain Quetiez
b9b28e31f4 Fix false positive when there is a data/production-modules folder 2024-05-17 09:51:16 +02:00
vdumas
0489235c67 N°7477 - Log execution result on DataSynchro made without administrator profile 2024-05-17 09:48:08 +02:00
Romain Quetiez
365d948a59 Merge branch 'support/3.1' into support/3.2
# Conflicts:
#	tests/php-unit-tests/src/Hook/TestsRunStartHook.php
2024-05-16 19:05:03 +02:00
vdumas
5bc8717d2b N°7480 - Setup theme compilation warning 2024-05-16 17:06:44 +02:00
jf-cbd
912b6b4a0d N°7479 - Profile filter unusable 2024-05-16 16:52:22 +02:00
odain
163a3afc0f N°7426 - no session created - replace php_sapi_name() by PHP_SAPI in unattended 2024-05-16 15:31:08 +02:00
Eric Espie
fb96184401 N°7468 - SQL error on MTP and DBTools on 3.2-dev 2024-05-16 14:50:52 +02:00
odain
35265718c1 Merge branch 'support/3.0' into support/3.1 2024-05-16 14:37:41 +02:00
odain
d98e35d918 Merge branch 'support/2.7' into support/3.0 2024-05-16 14:13:24 +02:00
odain
f8b54be896 N°7426 - no session created - replace php_sapi_name() by PHP_SAPI 2024-05-16 14:10:54 +02:00
Romain Quetiez
a88ce075cc Merge branch 'support/3.0' into support/3.1
# Conflicts:
#	tests/php-unit-tests/src/BaseTestCase/ItopTestCase.php
2024-05-16 14:07:36 +02:00
Romain Quetiez
c6f3e36451 Merge branch 'support/2.7' into support/3.0
# Conflicts:
#	tests/php-unit-tests/src/BaseTestCase/ItopTestCase.php
#	tests/php-unit-tests/unitary-tests/core/iTopConfigParserTest.php
2024-05-16 10:09:11 +02:00
Romain Quetiez
53dc452d61 Avoid unnecessary custom test environment compilations (base compilation of file modification time) 2024-05-16 09:53:04 +02:00
Romain Quetiez
ccaf2dc5b7 Make the tests compatible with windows (and linux) 2024-05-16 09:53:04 +02:00
vdumas
d2c7b13454 N°7484 - UserRequest/Incident solution field supports HTML 2024-05-15 10:38:16 +02:00
Molkobain
1366acd001 N°2039 - Fix modal flex direction to column 2024-05-15 10:10:11 +02:00
vdumas
bdd2e9ab4d N°7484 - UserRequest/Incident solution field supports HTML 2024-05-14 17:57:45 +02:00
vdumas
08b8be1ab2 N°7484 - UserRequest/Incident solution field supports HTML 2024-05-14 17:57:24 +02:00
Molkobain
5c46cb7c9b Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-05-07 10:42:18 +02:00
Molkobain
d9581a083d Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-05-07 10:41:04 +02:00
Molkobain
46738d4ba4 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-05-07 10:38:50 +02:00
Molkobain
5d5df5ad1a N°7255 - Fix misc. stylesheets not working in portal since N°7047 2024-05-07 10:37:39 +02:00
Molkobain
ad36066126 📝 Copyright year bump 2024-05-06 18:35:31 +02:00
Molkobain
a642ad6db9 N°2039 - Refresh messages without waiting for the providers TTL to avoid news not being visible even though they have been created 2024-05-02 17:44:25 +02:00
Molkobain
e680259728 N°2039 - Add test recipient for newsroom action 2024-05-02 17:17:53 +02:00
Molkobain
7b8887a9c8 N°2039 - Rename AsyncSendiTopNotifications into AsyncSendNewsroom 2024-05-02 17:15:14 +02:00
Molkobain
1ce81fe466 N°2039 - Fix information modal flex direction to column 2024-05-02 15:52:24 +02:00
Molkobain
3cf3159469 N°2039 - Fix visual glitches with set input and "+" icon 2024-05-02 15:28:49 +02:00
Molkobain
188a3fe3cc N°2039 - Improve title / message for set input with a minimum item constraint 2024-05-02 13:46:51 +02:00
Molkobain
848c4bb979 N°2039 - Fix autoloaders 2024-05-02 09:45:30 +02:00
Molkobain
b6ea73747d N°2039 - Rename ActioniTopNotification into ActionNewsroom 2024-05-02 09:33:51 +02:00
Molkobain
635c1bda6e N°2039 - Rename iTopNewsroom into NewsroomNotification 2024-05-02 09:30:47 +02:00
Molkobain
0d1c3aa464 N°2039 - Rework actions / events class labels 2024-05-01 20:17:05 +02:00
Stephen Abello
e1246ad375 N°7496 - Missing French translations for toasts preferences 2024-04-30 16:21:29 +02:00
jf-cbd
8305cfed24 Merge branch 'refs/heads/support/3.1' into support/3.2 2024-04-30 15:11:36 +02:00
jf-cbd
8c46c99ecc N°7313 - Bad display of single quotes in charts 2024-04-30 15:04:28 +02:00
Molkobain
f7bbbbbe87 N°2039 - Send news only to Person with at least 1 active user which has access to the backoffice 2024-04-30 11:26:42 +02:00
Molkobain
7b35692ce6 N°2039 - Fix notification not send if Person linked to more than 1 User 2024-04-30 11:26:26 +02:00
Molkobain
22fbb0ca13 N°7264 - Fix selectize background in transition forms 2024-04-30 11:26:26 +02:00
jf-cbd
3dccf9ee3f Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-04-30 10:57:46 +02:00
jf-cbd
02be397e8f Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1 2024-04-30 10:57:06 +02:00
jf-cbd
61469a28b9 N°7445 - Invalid Unicode escape sequence on dashlet Header with statistics 2024-04-30 10:56:09 +02:00
jf-cbd
24cf28f09a Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-04-30 08:15:15 +02:00
jf-cbd
9ff54cead8 Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1 2024-04-30 08:14:11 +02:00
jf-cbd
dbcbb187b2 N°7445 - Invalid Unicode escape sequence on dashlet Header with statistics 2024-04-30 08:13:37 +02:00
jf-cbd
71b4d672d4 Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1
# Conflicts:
#	pages/ajax.render.php
2024-04-30 08:04:45 +02:00
jf-cbd
93bba66323 N°7445 - Invalid Unicode escape sequence on dashlet Header with statistics 2024-04-30 08:03:14 +02:00
Molkobain
0a95aa385a Merge remote-tracking branch 'origin/support/3.0' into support/3.1
# Conflicts:
#	tests/php-unit-tests/unitary-tests/application/applicationextension/Delta/application-extension-usages-in-snippets.xml
2024-04-29 14:03:16 +02:00
Molkobain
cab6394cba Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-29 13:58:13 +02:00
Molkobain
32140b360f Cherry pick fixes from 59a955f4 2024-04-29 11:45:09 +02:00
Stephen Abello
b1290072b5 N°6167 - Fix high contrast theme for new welcome popup 2024-04-29 11:09:41 +02:00
Stephen Abello
c82f169248 N°6167 - Fix darkmoon theme for new welcome popup 2024-04-29 10:51:59 +02:00
Benjamin Dalsass
06a8481511 N°7279 - AttributeClass defined in XML datamodel compilation issue 2024-04-25 11:39:54 +02:00
Benjamin Dalsass
a481992c8e N°7279 - AttributeClass defined in XML datamodel compilation issue 2024-04-25 09:16:30 +02:00
jf-cbd
0434579ef5 Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-04-24 17:11:19 +02:00
jf-cbd
59a955f491 🐛 N°7313 - Bad display of single quotes in charts (#627)
* 🐛 N°7313 - Bad display of single quotes in charts
* Fix and improve ItopCustomDatamodelTestCase
2024-04-24 17:03:47 +02:00
Molkobain
d1ff87c0e6 N°2039 - Add default search criteria for EventiTopNotification 2024-04-24 15:38:31 +02:00
vdumas
47248bf0b7 N°7474 - Setup crash when a profile is removed 2024-04-24 15:35:45 +02:00
Molkobain
0f49154b5d N°2039 - Fix unit test about dictionaries 2024-04-24 15:33:41 +02:00
Molkobain
0507f95971 N°2039 - Add line about newsroom action in the notifications configuration hint 2024-04-24 14:21:47 +02:00
jf-cbd
82220c801b Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-04-24 12:01:40 +02:00
jf-cbd
2ffcfd2f57 Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1 2024-04-24 12:00:47 +02:00
jf-cbd
e657052d17 Merge remote-tracking branch 'refs/remotes/origin/support/2.7' into support/3.0 2024-04-24 11:58:13 +02:00
jf-cbd
d85767a838 Update test to run only on commmunity builds 2024-04-24 11:14:40 +02:00
Eric Espie
e409ee8337 N°6438 - Reloading all displayed tickets when display the ticket list 2024-04-24 10:34:44 +02:00
Molkobain
973a716481 N°2039 - Add "list" zlist for EventiTopNotification class 2024-04-23 19:30:27 +02:00
Molkobain
cfbc75b564 N°2039 - Add descending order on date for EventiTopNotification 2024-04-23 19:23:26 +02:00
Molkobain
78215439ee N°2039 - Add complementary name on child classes to avoid empty summary cards in iTop 3.1+ 2024-04-23 19:14:44 +02:00
jf-cbd
028c7f0604 Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-04-23 14:45:23 +02:00
jf-cbd
e56d5ed3aa Merge remote-tracking branch 'refs/remotes/origin/support/3.0' into support/3.1
# Conflicts:
#	datamodels/2.x/itop-hub-connector/launch.php
#	setup/wizardsteps.class.inc.php
2024-04-23 14:13:40 +02:00
jf-cbd
e5a8bd61b0 Merge remote-tracking branch 'refs/remotes/origin/support/2.7' into support/3.0
# Conflicts:
#	datamodels/2.x/itop-hub-connector/launch.php
2024-04-23 14:03:15 +02:00
jf-cbd
eeec57536b Security hardening 2024-04-23 11:55:39 +02:00
jf-cbd
e3173810fd Merge branch 'refs/heads/support/3.1' into support/3.2
# Conflicts:
#	pages/ajax.render.php
2024-04-19 15:30:48 +02:00
jf-cbd
3b7f26d794 Revert "Merge branch 'refs/heads/support/3.1' into support/3.2"
This reverts commit 6ff60080a1, reversing
changes made to 9d195d6fa0.
2024-04-19 15:26:15 +02:00
jf-cbd
7fba61ff35 N°7445 - Invalid Unicode escape sequence on dashlet Header with statistics 2024-04-19 15:21:48 +02:00
jf-cbd
1bf156bdda Revert "Merge branch 'refs/heads/support/3.0' into support/3.1"
This reverts commit 1164e757de, reversing
changes made to 1235452a1b.
2024-04-19 15:16:57 +02:00
jf-cbd
6ff60080a1 Merge branch 'refs/heads/support/3.1' into support/3.2
# Conflicts:
#	pages/ajax.render.php
2024-04-19 11:27:32 +02:00
jf-cbd
1164e757de Merge branch 'refs/heads/support/3.0' into support/3.1
# Conflicts:
#	pages/ajax.render.php
2024-04-19 11:24:56 +02:00
jf-cbd
514e0b80a5 N°7445 - Invalid Unicode escape sequence on dashlet Header with statistics 2024-04-19 11:17:09 +02:00
Molkobain
9d195d6fa0 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-04-19 09:25:42 +02:00
Molkobain
1235452a1b Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-19 09:24:21 +02:00
Molkobain
35f4ab4941 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-19 09:22:32 +02:00
Molkobain
16ff6341d0 N°7455 - Fix regression from 4c784886, wrong class tested 2024-04-19 09:14:53 +02:00
Molkobain
e669f0e6b9 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-04-18 18:50:29 +02:00
Molkobain
12ad3c2732 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-18 18:49:08 +02:00
Molkobain
ac826cb9f1 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-18 18:48:24 +02:00
Molkobain
9dab8679d6 N°7448 - Update dictionary entry 2024-04-18 18:44:20 +02:00
Molkobain
d9c0c3cdbe Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-04-18 18:18:44 +02:00
Molkobain
4f3b25aa46 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-18 18:17:41 +02:00
Molkobain
f737bcb9a0 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-18 18:16:24 +02:00
Molkobain
4c78488644 N°7455 - Ensure form renderer class extends FormRenderer 2024-04-18 18:15:02 +02:00
Denis
3a8ad59e6c N°6167 - Introduce API for the content of the Welcome Popup (#505)
* API for the content of the Welcome Popup

* Apply suggestions from code review

* N°7410 - Refactor code to match conventions

* N°7410 - Refactor to new design

* N°7410 - Review adjustments

* N°7410 - Review adjustments

* N°7410 - Update translations

* N°7410 - Update setup complied file

* Update sources/Application/WelcomePopup/Provider/DefaultProvider.php

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2024-04-18 16:57:07 +02:00
Stephen Abello
62f5f2c942 N°5298 -When opening CKEditor4 data with CKEditor5, if no change has been made return initial data instead of transformed data 2024-04-18 14:51:44 +02:00
Benjamin Dalsass
c56aeb08f5 N°2443 - Boolean don't accept yes/no value (#645)
AttributeBoolean form field edition is now handled by list or radio
2024-04-17 16:04:07 +02:00
Anne-Cath
ddc004a147 N°7461 - Portal: import user photo don't like some pictures with PHP>=8.1 2024-04-17 15:44:52 +02:00
Anne-Catherine
e4a3a7d0ca N°6962 - Impact analysis does not fully take into account the user rights with sharing base (#572) 2024-04-17 14:38:33 +02:00
vdumas
6ae813221e N°2572 - Improve error message "Nowhere to go??" with root cause 2024-04-15 13:52:46 +02:00
Stephen Abello
dc553ca83c N°5298 - Update CKEditor to version 5 2024-04-15 12:53:21 +02:00
vdumas
14c637c7f3 N°7428 - Fix spelling mistake on FR dictionary (lnkxxxToFunctionalCI) 2024-04-15 12:27:56 +02:00
odain
3ce6c8b7cf Merge branch 'support/3.1' into support/3.2 2024-04-15 10:23:37 +02:00
odain
b4cdf5cf6d Merge branch 'support/3.0' into support/3.1 2024-04-15 10:23:22 +02:00
odain
77cc4672b0 Merge branch 'support/2.7' into support/3.0 2024-04-15 10:20:49 +02:00
vdumas
331e66e594 N°7447 - Ease User Dashboard clean-up for iTop administrator 2024-04-15 10:11:39 +02:00
odain
b65e931c4c N°7439 - setup wizard broken on essential targets after fresh install via unattended CLI 2024-04-15 09:57:54 +02:00
odain
de5a9261df Merge branch 'support/3.1' into support/3.2 2024-04-12 17:19:25 +02:00
odain
46b0dabb1d Merge branch 'support/3.0' into support/3.1 2024-04-12 17:18:44 +02:00
odain
dfbfab7005 N°7407 - adapt test to 3.0 test SDK evolutions 2024-04-12 17:17:03 +02:00
odain
aa831b632c Merge branch 'support/2.7' into support/3.0 2024-04-12 17:16:22 +02:00
odain
6cb3519308 N°7407 - test readability 2024-04-12 16:59:56 +02:00
odain
cfb9fae648 N°7407 - fix previous commit 2024-04-12 16:49:11 +02:00
odain
f4e791734f N°7407 - remove phpunit annotation 2024-04-12 14:49:20 +02:00
odain
6653ab0668 N°7407 - fix missing extension installation via unattended from production-modules or extension folder 2024-04-12 13:25:40 +02:00
odain
7ab258ba03 N°7439 - setup wizard broken on essential targets 2024-04-12 11:32:04 +02:00
odain
b5af30a93f N°7407 - refactor unattended tests to make work anywhere 2024-04-12 11:32:04 +02:00
Molkobain
dad406d208 N°6964 - Improve PHPDoc and method name to explicit that paths are relative 2024-04-12 10:50:59 +02:00
Molkobain
a6d01739ba N°6964 - Fix unit test data not compliant with tested API 2024-04-12 10:45:56 +02:00
Molkobain
e3501447ad Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-04-12 10:12:04 +02:00
Molkobain
2294fce5da Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-12 10:06:27 +02:00
Molkobain
ce5c05234d Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-12 10:02:19 +02:00
Molkobain
bbfa601ab1 N°7446 - Add temporary workaround to fix an issue due to DB views creation. 2024-04-12 09:59:14 +02:00
Lars Kaltefleiter
93e1f6ae03 N°6964 - Add API to allow modules to register files to include in the backup (#547)
* Allow to include backup extra file via interface

* Update application/applicationextension.inc.php

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>

* Add iBackupExtraFilesExtension to plugin list

* decouple extra_files via config and interface

* Add unit tests for iBackupExtraFilesExtension

* Enable recursive creation of destination directories

* Update application/applicationextension.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update setup/backup.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update tests/php-unit-tests/unitary-tests/application/applicationextension/ApplicationExtensionTest.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update application/applicationextension.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update core/metamodel.class.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Update setup/backup.class.inc.php

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

---------

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2024-04-12 09:17:17 +02:00
odain
2a9add241e Merge branch 'support/3.1' into support/3.2 2024-04-11 18:55:50 +02:00
odain
c9a9ec2fed Merge branch 'support/3.0' into support/3.1 2024-04-11 18:55:25 +02:00
odain
83764deedb Merge branch 'support/2.7' into support/3.0 2024-04-11 18:55:00 +02:00
odain
172b1cb1ff N°7407 - add phpunit annotation to exclude tests on top of targets 2024-04-11 18:54:43 +02:00
Molkobain
8a4e144725 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-04-11 17:00:40 +02:00
Molkobain
5f35effad9 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-11 16:58:02 +02:00
Molkobain
e1374a0e6b Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-11 16:56:25 +02:00
Molkobain
ca356859a3 N°7446 - Add comment for better understanding 2024-04-11 16:55:48 +02:00
Molkobain
5efe294895 N°7446 - Fix custom datamodel test class not creating DB tables correctly 2024-04-11 16:50:27 +02:00
odain
6a6dacc8ce N°7407 - fix ci test adapt to 3.2 DM 2024-04-10 15:35:01 +02:00
odain
28feddb6c9 Merge branch 'support/3.1' into support/3.2 2024-04-10 14:26:29 +02:00
odain
e6fa589412 Merge branch 'support/3.0' into support/3.1 2024-04-10 14:14:28 +02:00
odain
18d0b88531 N°7407 - fix merge 2024-04-10 14:11:58 +02:00
odain
3139a0b610 Merge branch 'support/2.7' into support/3.0 2024-04-10 14:06:41 +02:00
odain
e0170ccc7e N°7407 - InstallationFileServiceTest relies on local installation.xml to reduce maintenance 2024-04-10 14:05:39 +02:00
jf-cbd
c24e7ef318 Merge branch 'refs/heads/support/3.1' into support/3.2 2024-04-10 10:34:50 +02:00
jf-cbd
ffefa5495a Adding CSRF protection to simulation step in CSV import 2024-04-10 10:34:06 +02:00
odain
3f773539fe Merge branch 'support/3.1' into support/3.2 2024-04-09 21:29:11 +02:00
odain
a371b7f03b N°7407 - fix ci itop installation 2024-04-09 21:21:46 +02:00
odain
de97a6263f N°7407 - fix test and itop install in ci envt 2024-04-09 16:52:06 +02:00
odain
233bbebd93 Merge branch 'support/3.1' into support/3.2 2024-04-09 11:06:54 +02:00
odain
f0c5264fc8 Merge branch 'support/3.0' into support/3.1 2024-04-09 11:06:38 +02:00
odain
367aac3e04 Merge branch 'support/2.7' into support/3.0 2024-04-09 11:06:17 +02:00
odain
3b78885f38 N°7407 - unattended test cleanup for PHP 8.x deprecations 2024-04-09 11:06:03 +02:00
odain
793f5c7cbe N°7407 - adapt unattended test to 3.2 installation.xml choices 2024-04-09 11:02:05 +02:00
odain
1d4cb6034d Merge branch 'support/3.1' into support/3.2 2024-04-09 10:55:29 +02:00
odain
e6814d6860 N°7407 - adapt unattended test to 3.1 installation.xml choices 2024-04-09 10:55:05 +02:00
Molkobain
79198f51a3 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-09 10:52:00 +02:00
odain
f14b4c32be N°7407 - adapt unattended test to 3.0 installation.xml choices 2024-04-09 10:46:44 +02:00
Molkobain
6be5264fe9 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-09 10:41:08 +02:00
Molkobain
6a30d6caa9 N°7438 - Dashboard: Fix crash when closing the editor modal 2024-04-09 10:40:06 +02:00
odain
628a7319d1 Merge branch 'support/3.1' into support/3.2
# Conflicts:
#	setup/applicationinstaller.class.inc.php
2024-04-09 10:12:29 +02:00
odain
bc8543d88c Merge branch 'support/3.0' into support/3.1
# Conflicts:
#	setup/modulediscovery.class.inc.php
#	setup/runtimeenv.class.inc.php
#	setup/unattended-install/unattended-install.php
#	tests/setup_params/default-params.xml
2024-04-09 10:11:06 +02:00
odain
a51242dc36 N°7407 - remove 2.7 requires in unattended service 2024-04-09 10:08:43 +02:00
odain
64ba706083 Merge branch 'support/2.7' into support/3.0
# Conflicts:
#	setup/applicationinstaller.class.inc.php
#	setup/modulediscovery.class.inc.php
#	setup/runtimeenv.class.inc.php
#	setup/unattended-install/unattended-install.php
#	tests/setup_params/default-params.xml
2024-04-09 10:07:40 +02:00
odain
ed562c9f73 N°7407 - fix unattended test enhancement 2024-04-09 10:02:06 +02:00
odain-cbd
85c576a986 N°7407 - N°7306 - Ease iTop installation via unattended CLI by using installation.xml choices (#641)
* N°7306 - Use iTop configuration settings to run unattended installation (instead of XML file settings)

* 7306 - fix infinite loop with db_tls.ca null

* 7306 - complete fields to use from itop configuration instead of XML setup

* fix using default language from conf

* 6365 - temp work

* 6365 - add option to select modules from installation.xml

* 6365-select modules option in unattended install

* 6365 - pass env to service + debug failed test

* 6365 - debug ci again + separate process annotation

* 6365 - fix test + cleanup

* 6365 - ci using use_installation_xml mode

* 6365 - ci using use_installation_xml mode

* 6365 - pass selected_modules to unattended

* N°6365 - Compute selected modules based on selected extensions coming from XML setup

* switch constr parameters and fix call from unattended cli

* 6365 - use use_installation_xml for unattended install only when no selected modules already provided

* test ci XML setup including selected extensions but no modules

* test ci installing iTop without selected modules/extenesions: guess via installation.xml

* same but without even providing XML setup - comment it in ci_description.ini

* 7306 - cleanup requires

* use infra master

* N°6365 - make current unattended CLI work with any iTop version (CLIPage compatibility)

* N°6365 - log which modules will be installed during setup

* N°6365 - unattended documentation + bash helper

* 6365- fix warning due to copies index access

* 6365 - enhance traces feedback to understant which and how modules are computes

* 6365 - enhance bash CLI + doc

* 6365 - fix require clipage compatibility

* 6365 - add return for better cli ouput

* 6365 - enhance ouput messages

* Document the usage and harmonize argument names (still not perfect)

* 6365 - fix use of new param param-file

* 6365 - fix test + vardump cleanup

* N°6365 - use underscore for unattended install options as advices in the PR

* 6365 -enhance test by using PHP_BINARY

---------

Co-authored-by: Romain Quetiez <romain.quetiez@combodo.com>
2024-04-09 10:00:58 +02:00
Molkobain
3deb74a4d1 N°6964 - Allow folder creation to be recursive 2024-04-08 21:46:02 +02:00
jf-cbd
b9dd891aac Merge branch 'refs/heads/support/3.1' into support/3.2 2024-04-08 17:26:14 +02:00
jf-cbd
1f2469e1e4 Remove mixed type uses in itop 3.1 2024-04-08 17:24:51 +02:00
jf-cbd
8fa56a6f3f Add namespace for 3.2 2024-04-08 17:12:48 +02:00
jf-cbd
22af1a8787 Remove namespace for 3.1 2024-04-08 17:10:05 +02:00
Molkobain
5e15fbec45 N°7312 - Dashboard: Fix JS crash on custom version creation of UserRequest Overview page on Windows server 2024-04-08 17:03:02 +02:00
Molkobain
3a6a5ca49d N°7416 - Fix typo in composer.json 2024-04-08 15:11:28 +02:00
jf-cbd
3d6509e246 Merge remote-tracking branch 'refs/remotes/origin/support/3.1' into support/3.2 2024-04-08 14:09:54 +02:00
jf-cbd
cd34f8b5eb Removed namespaces in 3.1 2024-04-08 12:19:43 +02:00
jf-cbd
8357c86361 🐛 Fix php 7.4 compatibility in bulkchange.class.inc.php (for itop 3.1) 2024-04-08 11:10:12 +02:00
Molkobain
d48b5d7d21 N°7416 - Setup: Add warning for optionnal PHP extension "APCu" 2024-04-08 10:51:19 +02:00
vdumas
efe61201e5 N°7417 - Improve error message when a Root Menu is not a MenuGroup 2024-04-05 18:20:19 +02:00
vdumas
a458d98688 N°7399 - Remove deprecated datamodel methods 2024-04-05 15:59:00 +02:00
jf-cbd
a3553202d9 Merge remote-tracking branch 'origin/support/3.1' into support/3.2
# Conflicts:
#	pages/csvimport.php
2024-04-05 14:56:38 +02:00
jf-cbd
b10d381dda N°7374 - Security hardening 2024-04-05 14:40:56 +02:00
Eric Espie
9dc7b6dc0c N°7405 - Fix unit tests 2024-04-05 11:29:41 +02:00
Eric Espie
1be67f349f N°7405 - Cache error message 2024-04-05 11:08:47 +02:00
Molkobain
4ca92affcf N°7264 - Fix visual glitches due to seletize.js upgrade 2024-04-04 15:01:57 +02:00
Stephen Abello
3f401e4de0 N°7391 N°7392 - Add themes for accessibility (#639)
* N°7391 - Add color blind friendly themes

* N°7392 - Add high contrast theme

* Add modules to installation.xml
2024-04-04 11:17:14 +02:00
Molkobain
9b198bc76e N°7264 - Fix regression from ff130516 2024-04-04 09:43:24 +02:00
Molkobain
f7230de6d6 N°7264 - Improve async load of CSS files to avoid duplicates in the webpage.
Based on the same mechanism that was made for JS files.
2024-04-03 16:16:10 +02:00
odain
a4aa494e5d Merge branch 'support/3.1' into support/3.2 2024-04-02 15:06:36 +02:00
odain
8647414a33 N°5120 - PR merge adaptation to CLIPage 3.0 2024-04-02 15:05:35 +02:00
odain
a58f0bfc0b Merge branch 'support/3.0' into support/3.1 2024-04-02 15:02:26 +02:00
odain
ff1305165e N°5120 - PR merge adaptation to CLIPage 2024-04-02 14:42:21 +02:00
Molkobain
d9b87064a1 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-04-02 10:39:59 +02:00
Molkobain
a468bf8f7e Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-04-02 10:38:30 +02:00
Molkobain
65c706fdfe Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-04-02 10:37:08 +02:00
Molkobain
0853645264 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-04-02 10:26:27 +02:00
Molkobain
e6162fe958 N°7402 - Fix JS error when trying to add two or more items on an indirect linkset when updating the source object 2024-04-02 10:22:44 +02:00
Stephen Abello
25f266ef66 N°4631 - Update fullscreen class 2024-04-02 10:13:28 +02:00
Stephen Abello
fee07960ca Update stickers preview 2024-03-29 11:17:54 +01:00
odain-cbd
5a34c76cc4 N°5120 - Unattended install : use cty toolkit version (#624)
* N°5120 - Unattended install : use cty toolkit version

* N°5120 - CLI mode validation

* 5120 - bring CI enhancements

* 5120 - bring back saas use-itop-config option: to read db settings from conf directly

* 5120 - move unattended script in setup folder/unattended-install

* 5120 - use-itop-config option: take db_tls_enabled and db_tls_ca into account

* 5120 - move test

* 5120 - put ci enhancements back - logs and conf preservation with install mode

* 5120 - keep PR simple - remove saas use-itop-config option for now

* 5120 - remove ci enhancement to preserve configuration

* Update setup/unattended-install/README.md

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>

* 5120 - documentation

* 5120 - fix log level

* 5120 - fix test

* fix phpunit test comment

---------

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>
2024-03-29 11:09:27 +01:00
Stephen Abello
5efb1a0872 N°4631 - Fix a display issue when description field is fullscreen white using vertical tabs 2024-03-28 17:01:45 +01:00
Eric Espie
2c68f78027 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-28 13:32:33 +01:00
Eric Espie
7f9b60d66f N°5913 - Add Event Listener methods & enhance methods management 2024-03-28 11:02:55 +01:00
Eric Espie
816df1b551 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-27 11:29:32 +01:00
Eric Espie
1278c4b196 N°7165 - Error message on application upgrade fatal Error due to CSS compilation 2024-03-27 11:11:55 +01:00
Eric Espie
a7f3bf9a56 N°7294 - EVENT_ADD_ATTACHMENT_TO_OBJECT not triggered 2024-03-27 10:34:48 +01:00
Eric Espie
4eed5bdeb9 N°7165 - Error message on application upgrade fatal Error due to CSS compilation 2024-03-27 10:12:21 +01:00
Molkobain
739afdb1ec Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-26 13:00:25 +01:00
Molkobain
75a01db959 N°7194 - Remove "external link" icon in the tooltip 2024-03-26 12:04:59 +01:00
Stephen Abello
c29bff4d91 N°7355 - Fix deprecated jQuery call 2024-03-26 11:58:17 +01:00
Eric Espie
7b999cef50 Compilation issue 2024-03-26 11:57:08 +01:00
Anne-Catherine
69e481dbc1 Improve Clear function in ExtKeyWidget (#519) 2024-03-26 11:49:14 +01:00
Anne-Catherine
279b29a98c N°7194 - Add link to datamodel class schema on object details (#613) 2024-03-26 11:35:44 +01:00
Molkobain
12b30c1531 N°7355 - Upgrade datatables.net to 1.13.11 (and plugins) 2024-03-26 11:02:46 +01:00
Molkobain
bcfbacc625 N°7355 - Fix deprecated usage of .bind() due to jQuery migrate upgrade 2024-03-26 10:59:48 +01:00
Molkobain
36d6c13941 N°7355 - Fix deprecated usage of .offset() due to jQuery migrate upgrade 2024-03-26 10:46:04 +01:00
Stephen Abello
4952fc5575 Fix deprecated jQuery call to bind 2024-03-26 10:44:58 +01:00
Stephen Abello
7b8634e9e7 Fix deprecated jQuery call 2024-03-26 10:41:24 +01:00
Molkobain
c86ebba60d N°7355 - Update jQuery-contextmenu to 2.9.2 2024-03-22 16:40:50 +01:00
Molkobain
db4c70cea3 N°7355 - Update jQuery-migrate to 3.4.1 2024-03-22 16:35:41 +01:00
Molkobain
e8c4c45c5c N°7355 - Update jQuery to 3.7.1 2024-03-22 16:32:43 +01:00
Molkobain
a3d5712087 N°7355 - Update showdown to 2.1.0 2024-03-22 16:27:46 +01:00
Molkobain
5b8a3459f5 N°7331 - Update Composer cleanup script with existing questionable folders 2024-03-22 15:59:48 +01:00
Molkobain
8a983ecbb7 N°7355 - Update magnific-popup to 1.1.0 2024-03-22 15:55:44 +01:00
Molkobain
e62473d4e9 N°7355 - Update clipboard to 2.0.11 2024-03-22 15:53:21 +01:00
Molkobain
054520cdac N°7355 - Update ace-builds to 1.32.7 2024-03-22 15:48:41 +01:00
Molkobain
b38a7c8ab6 N°7331 - Update cleanup script to remove denied folders no matter if they seem questionable 2024-03-22 15:47:25 +01:00
Molkobain
3588a50597 N°7355 - Update blueimp-file-upload to 10.32.0 and remove optional dependencies 2024-03-22 14:36:05 +01:00
Molkobain
babdd9f163 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-22 14:23:00 +01:00
Molkobain
5d8a0f8e9f N°7355 - Update @popperjs to 2.11.8 2024-03-22 14:22:43 +01:00
Molkobain
52106fe48c N°7331 - Remove unnecessary files 2024-03-22 14:21:44 +01:00
Molkobain
e7a04e0e70 N°7331 - Fix cleanup script to remove all denied folders 2024-03-22 11:55:16 +01:00
Eric Espie
90458f6048 N°6974 - Flatten classes in datamodel - Allow _delta="merge" in strict mode 2024-03-22 10:11:25 +01:00
Molkobain
3a990f46d3 N°7157 - Add 'subscription_policy' to remaning Trigger zlists 2024-03-22 09:46:31 +01:00
Molkobain
673b01585d Merge remote-tracking branch 'origin/support/3.1' into support/3.2
# Conflicts:
#	css/setup.css
#	setup/setuppage.class.inc.php
2024-03-21 17:38:49 +01:00
Molkobain
3653a4bc90 Merge remote-tracking branch 'origin/support/3.0' into support/3.1
# Conflicts:
#	css/setup.css
2024-03-21 15:52:57 +01:00
Molkobain
bdfd956825 Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	css/setup.css
#	setup/setuppage.class.inc.php
2024-03-21 15:37:33 +01:00
Molkobain
da99a250bf N°7075 - Add check for Content Security Policies (CSP) in the setup 2024-03-21 14:20:22 +01:00
Molkobain
d57fd05552 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-21 14:06:14 +01:00
Molkobain
5554241877 N°7122 N°4164 - Fix wrong merge in b08b5297 2024-03-21 14:04:18 +01:00
vdumas
d9232a645d N°7379 - Default search for Workorder, lnkContactToTicket & Contact 2024-03-20 16:47:46 +01:00
Molkobain
def10a9877 Add log channel for data integrity 2024-03-20 10:09:10 +01:00
Benjamin Dalsass
b29597110e N°6937 - Symfony 6.4 - Handle Symfony configuration files 2024-03-19 20:58:00 +01:00
Eric Espie
c7a8d90364 Fix XML version 2024-03-19 15:29:49 +01:00
Molkobain
86489dbbe1 N°6974 - Fix autoloaders 2024-03-19 14:51:24 +01:00
Eric Espie
6098842d9f Merge remote-tracking branch 'origin/support/3.1' into support/3.2
# Conflicts:
#	core/designdocument.class.inc.php
#	lib/composer/autoload_files.php
#	lib/composer/autoload_static.php
2024-03-19 14:06:24 +01:00
Eric Espié
2f30a0146e N°6974 - Flatten classes in datamodel (#603)
* N°6974 - Flatten classes in datamodel

* N°6882 - LoadDelta() in lax/strict mode

* N°6974 - Flatten classes in datamodel

* N°6882 - LoadDelta() in lax/strict mode

* N°7186 - Code hardening

* N°6974 - Flatten classes in datamodel

* N°6660 and N°7318 - Support delete_if_exists and define_if_not_exists in XML injection

* N°6974 - Flatten classes in datamodel

* Apply suggestions from code review

* Update core/designdocument.class.inc.php

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2024-03-19 13:53:14 +01:00
Pierre Goiffon
193af6c759 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-18 18:20:07 +01:00
Pierre Goiffon
1de9e704fc Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-18 18:19:52 +01:00
Pierre Goiffon
f4b9a9a5fe N°6455 Fix datepicker widget icon on button
The buttonText is now escaped

(cherry picked from commit fa5d03fc6e)
2024-03-18 18:19:30 +01:00
Pierre Goiffon
561e743fc3 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-18 18:15:52 +01:00
Pierre Goiffon
fa5d03fc6e N°6455 Fix datepicker widget icon on button
The buttonText is now escaped
2024-03-18 18:15:39 +01:00
Molkobain
7b5fa0a912 N°7122 - Fix wrongfully merged JS inclusion in b08b5297 2024-03-15 11:05:08 +01:00
Molkobain
5f88391935 N°7122 - Fix wrongfully merged JS inclusion 2024-03-15 09:36:15 +01:00
Pierre Goiffon
29300fd91e N°7264 Update selectize.js from 0.12.4 to 0.15.2
Source https://github.com/selectize/selectize.js/releases/tag/v0.15.2
2024-03-14 17:14:51 +01:00
Pierre Goiffon
2c8b2f6c71 N°7264 Update raphael-min.js from 2.1.2 to 2.3.0 2024-03-14 17:14:51 +01:00
Pierre Goiffon
4cde461876 N°7264 Update jquery-ui-timepicker-addon.js from 1.6.1 to 1.6.3
Source https://github.com/trentrichardson/jQuery-Timepicker-Addon/tags
2024-03-14 17:14:51 +01:00
Pierre Goiffon
5a3bfa8043 N°7264 Update jquery.blockUI.js from 2.59.0-2013.04.05 to 2.70
Source https://github.com/malsup/blockui
2024-03-14 17:13:12 +01:00
jf-cbd
c5544a7a1e Merge branch 'support/3.1' into support/3.2 2024-03-14 17:02:52 +01:00
jf-cbd
8ffcb01c43 Merge branch 'support/3.0' into support/3.1 2024-03-14 17:00:20 +01:00
jf-cbd
5c46b4ef4a Added modules to GetLtsCompatibleModulesList (Dictionnarie tests) 2024-03-14 16:59:32 +01:00
Pierre Goiffon
912c7fa956 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-14 09:14:30 +01:00
Pierre Goiffon
79cdb837b5 Merge remote-tracking branch 'origin/support/3.0' into support/3.1
# Conflicts:
#	core/log.class.inc.php
2024-03-14 09:13:56 +01:00
Molkobain
db2ea617d3 N°7331 - Fix wrong method call due to previous refactoring 2024-03-13 16:30:59 +01:00
Pierre Goiffon
7499e41e40 N°7351 Fix name in package.json 2024-03-13 16:23:20 +01:00
Pierre Goiffon
a97935ca01 N°7336 DeprecatedCallsLog robustness (#632)
Was creating PHP notices when deprecated method caller wasn't a class/method
Found in iTop 3.2.0-dev with itop-object-copier copy.php : it is calling WebPage::add_linked_script directly inside the copy.php script (no class nor function)

Co-authored-by: odain <olivier.dain@combodo.com>
2024-03-13 15:38:21 +01:00
Molkobain
dc6ea37f23 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-13 15:29:22 +01:00
Molkobain
87181669d1 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-13 15:18:33 +01:00
Molkobain
efd7fb0f59 N°7331 - Fix wrong file extension in .htaccess file 2024-03-13 15:16:46 +01:00
Molkobain
c2f72f713a N°7331 - Refactor for better understanding 2024-03-13 15:07:47 +01:00
Molkobain
700c4d0b04 N°7331 - Remove "example" (single) as well 2024-03-13 15:07:47 +01:00
Molkobain
43a8152de1 N°7331 - Remove unnecessary files from node_modules 2024-03-13 15:07:47 +01:00
Molkobain
8c1d986a03 N°7331 - Ensure to keep folder browsing protection files after install/update command 2024-03-13 15:07:47 +01:00
Molkobain
f3dd414a51 N°7331 - Add NPM cleanup scripts 2024-03-13 15:07:47 +01:00
Molkobain
d1a4d333eb N°7331 - Refactor Composer cleanup scripts to be used by other dependencies managers as well 2024-03-13 15:07:47 +01:00
Pierre Goiffon
b934cbe89e Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-13 10:08:28 +01:00
Pierre Goiffon
71a0f8b87d Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-13 10:03:48 +01:00
Pierre Goiffon
a4edf8cb21 Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	tests/php-unit-tests/unitary-tests/setup/SetupUtilsTest.php
2024-03-13 09:59:28 +01:00
Pierre Goiffon
dbd5ba0377 N°7302 Fix SetupUtilsTest::testHumanReadableSize 2024-03-13 09:56:31 +01:00
Pierre Goiffon
5d6f293956 N°7302 Report SetupUtilsTest::testHumanReadableSize in the 2.7 branch 2024-03-13 09:48:46 +01:00
Pierre Goiffon
65e6c84477 N°7302 Fix SetupUtilsTest::testHumanReadableSize 2024-03-13 09:37:34 +01:00
Pierre Goiffon
61e04c5a73 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-13 09:27:53 +01:00
Pierre Goiffon
9cc7ccb1cd Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-13 09:27:39 +01:00
Pierre Goiffon
a337ef3d88 Merge remote-tracking branch 'origin/support/2.7' into support/3.0
# Conflicts:
#	setup/modelfactory.class.inc.php
#	setup/setuputils.class.inc.php
2024-03-13 09:27:06 +01:00
Pierre Goiffon
27ac1fe276 N°7345 Accept DateTime objects for DBObject::Set() calls on AttributeDateTime and children (#618) 2024-03-12 18:29:55 +01:00
Pierre Goiffon
986c24d777 N°7302 Fix unit name in \SetupUtils::HumanReadableSize (#626) 2024-03-12 18:09:29 +01:00
Pierre Goiffon
763112c179 N°7344 rest.php core/get : add try/catch around query execution (#622)
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>
Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2024-03-12 18:08:04 +01:00
Pierre Goiffon
a5efd981d8 N°7343 Catch ParseError when loading dict files in setup (#615) 2024-03-12 18:05:38 +01:00
Pierre Goiffon
6450b52697 Merge remote-tracking branch 'origin/support/3.1' into support/3.2
# Conflicts:
#	core/dbobject.class.php
#	tests/php-unit-tests/unitary-tests/core/DBObjectTest.php
2024-03-12 17:44:33 +01:00
Pierre Goiffon
c0e4d04a1c Merge remote-tracking branch 'origin/support/3.0' into support/3.1
# Conflicts:
#	tests/php-unit-tests/unitary-tests/core/DBObjectTest.php
2024-03-12 17:36:04 +01:00
Pierre Goiffon
289ca7b505 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-03-12 17:34:51 +01:00
Pierre Goiffon
2922b22478 \DBObject::GetSearchForUniquenessRule remove wrong @api 2024-03-12 17:34:28 +01:00
Pierre Goiffon
2af05a437e N°4314 - Fix Uniqueness rules not working with Silo
(cherry picked from commit e8c11f38d2)
2024-03-12 17:32:56 +01:00
vdumas
71d9536bc4 N°7268 Method SetComputedDate fails on Date only attribute
(cherry picked from commit b6caa51552)
(cherry picked from commit c8810708ef)
2024-03-12 17:29:04 +01:00
Molkobain
b1e1a66496 N°7157 - Remove dict entries for advanced mode in notifications center 2024-03-12 11:34:31 +01:00
Molkobain
d7270c56cd N°7315 - Migrate usages in TwigBase::Controller to use new API if possible 2024-03-12 11:22:03 +01:00
Benjamin Dalsass
7a7b7381c9 N°2732 - DataSynchro : process stopped when memory peak usage exceeds 2 2024-03-12 09:48:01 +01:00
Molkobain
da32362ef6 N°7157 - Remove advanced mode in notifications center 2024-03-12 09:12:02 +01:00
Molkobain
5569df5950 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-11 21:59:10 +01:00
Molkobain
b08b5297cf N°7122 N°4164 - Adjustment to Symfony 5.4 2024-03-11 21:57:37 +01:00
Molkobain
3e6e096f62 Merge remote-tracking branch 'origin/support/3.0' into support/3.1
# Conflicts:
#	datamodels/2.x/itop-portal-base/portal/templates/layout.html.twig
2024-03-11 21:27:59 +01:00
Molkobain
6377a738c5 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-03-11 21:18:53 +01:00
Molkobain
a9f8dcc5e8 N°7122 N°4164 - Portal: Hide log off button when user can't actually log off (eg. SSO using SAML or other providers) (#599)
* N°7122 N°4164 - Portal: Hide log off button when user can't actually log off (eg. SSO using SAML or other providers)

* N°7122 - Fix typo

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>

---------

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@super-visions.com>
2024-03-11 21:13:09 +01:00
Pierre Goiffon
9470d9b9ec Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-11 16:40:26 +01:00
Pierre Goiffon
9750fec959 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-11 16:40:14 +01:00
Pierre Goiffon
969a301cbb Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-03-11 16:40:01 +01:00
Pierre Goiffon
c325294e17 N°6599 Update moment from 2.22.2 to 2.30.1 2024-03-11 16:39:05 +01:00
Pierre Goiffon
8588757da9 N°6599 Update moment from 2.22.2 to 2.30.1 2024-03-11 16:31:24 +01:00
Pierre Goiffon
f894cb24c6 N°6599 Move moment.js 2.22.2 to NPM 2024-03-11 16:27:44 +01:00
Stephen Abello
722765c0aa N°7130 - When moving data in the setup from multiple columns, prevent later data from erasing previous data when it's NULL 2024-03-11 16:11:30 +01:00
Benjamin Dalsass
5e9b4da68c Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-11 16:04:48 +01:00
Benjamin Dalsass
af2c6d9ab8 N°7279 - AttributeClass defined in XML datamodel compilation issue
- make more_values property optional
2024-03-11 16:03:38 +01:00
Stephen Abello
0176905c20 N°2039 - Fix button margins in view all notifications page 2024-03-11 10:09:21 +01:00
Stephen Abello
5e4f76bde9 N°2039 - Fix button margins in view all notifications page 2024-03-11 09:25:17 +01:00
Molkobain
0c3e839381 N°7303 - Fix failure to add attachment in portal due to regression from e830c903 2024-03-08 17:18:32 +01:00
Thomas Casteleyn
5be386d03e N°4894 - Improve AttributeDecimal validation during CSV import (#248)
* Update AttributeDecimal validation pattern

* Update phpdoc

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>

* Reduce unneeded sprintf flags

---------

Co-authored-by: Molkobain <lajarige.guillaume@free.fr>
2024-03-08 17:03:51 +01:00
Molkobain
2ced460ec6 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-08 16:05:35 +01:00
Pierre Goiffon
ae9bda8bbb N°7328 Deprecate js/jquery.autocomplete.js
This lib isn't used since iTop 3.0.0 (replaced by JQuery UI autocomplete widget)
2024-03-08 15:54:50 +01:00
Molkobain
9566963835 N°7157 - Fix unit test when using symlinks 2024-03-08 15:49:47 +01:00
Eric Espie
cf6e8ab22a N°6974 - Add unit tests for compatibility validation 2024-03-08 13:29:04 +01:00
Molkobain
2aa1385958 N°7157 - Add unit test for subscription mechanism and refactor repository methods 2024-03-08 12:22:29 +01:00
Pierre Goiffon
509df0939e Merge remote-tracking branch 'origin/support/3.1' into support/3.2
# Conflicts:
#	js/jquery-ui.custom.min.js
2024-03-08 11:14:51 +01:00
Pierre Goiffon
9032dac314 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-08 11:13:43 +01:00
Pierre Goiffon
a29b0a8e33 N°6455 Update JQuery-UI from 1.12.1 to 1.13.2 2024-03-08 11:13:32 +01:00
Stephen Abello
fee1897932 N°7157 - Add link to notifications center in view all newsroom page 2024-03-08 10:46:03 +01:00
Stephen Abello
093a4cec75 N°7157 - Add more information to notifications center table 2024-03-08 10:33:21 +01:00
Stephen Abello
892a7fa95f N°7327 - Allows to differentiate newsroom priorities 2024-03-08 09:53:23 +01:00
Pierre Goiffon
48f7ae8476 N°6455 Update JQuery-UI to 1.13.2 2024-03-08 09:16:27 +01:00
Pierre Goiffon
10ef277982 N°6455 Add jquery-ui NPM package
We need jquery-ui-dist for inclusion in our web pages, but there are no security returned on this package :/
So we are adding jquery-ui, ignoring the corresponding files (only add it to package.json).
2024-03-08 09:16:27 +01:00
Molkobain
ebe7da7acb N°7157 - Fix URI passed to scandir() function in user's image placeholder selection 2024-03-07 17:26:56 +01:00
Pierre Goiffon
9fa036df7e N°5621 Move jquery-migrate 3.1.0 to NPM 2024-03-07 15:27:38 +01:00
Molkobain
c24c1ba73c N°7157 - Fix Selectize plugin error due to file being loaded twice due to slightly different URIs 2024-03-07 15:26:10 +01:00
Stephen Abello
3650cf761d N°2039 - Correctly pass context arguments to recipients OQL 2024-03-07 15:06:53 +01:00
Benjamin Dalsass
34c4d753d3 N°797 - Delete of DataSynchro incomplete 2024-03-07 14:05:50 +01:00
Molkobain
4d1f8e5704 N°7157 - Fix ValueSetEnum values as array must conserve keys 2024-03-07 11:17:35 +01:00
Pierre Goiffon
7ac283bffb Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-07 11:11:48 +01:00
Pierre Goiffon
c1efad7556 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-07 11:11:34 +01:00
Pierre Goiffon
f78b57521a Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-03-07 11:11:19 +01:00
Pierre Goiffon
da490739be 💡 Fix \CMDBSource::Query phpdoc block 2024-03-07 11:10:53 +01:00
Molkobain
8e8d586dcc N°7157 - Add support for backed-enum in \ValueSetEnum constructor 2024-03-07 11:02:23 +01:00
Molkobain
e05b4e772c N°7157 - Fix usage of Enum case value 2024-03-06 23:05:16 +01:00
Molkobain
02efea4e55 N°7157 - Migrate enum values from strings to PHP Enum 2024-03-06 19:31:17 +01:00
Molkobain
17bab06ff5 N°7157 - Migrate enum values from strings to PHP Enum 2024-03-06 18:40:47 +01:00
Molkobain
ab4f224a00 N°7315 - Fix regression from previous commit 2024-03-06 16:26:13 +01:00
Molkobain
fe6ee083f6 N°7315 - Migrate deprecated usages of WebPage::add_linked_stylesheet() 2024-03-05 23:06:44 +01:00
Molkobain
655539c289 N°7315 - Introduce WebPage::LinkStylesheetXXX() methods to replace WebPage::add_linked_stylesheet() 2024-03-05 22:58:59 +01:00
Molkobain
33ba754277 N°7315 - Migrate deprecated usages of WebPage::add_linked_script() 2024-03-05 22:58:57 +01:00
Molkobain
7948793674 N°7315 - Introduce WebPage::LinkScriptXXX() methods to replace WebPage::add_linked_script() 2024-03-05 22:58:28 +01:00
Molkobain
8c7b33fb06 N°7315 - Migrate relative images URLs to absolute ones in order to support pages on different depth levels 2024-03-05 21:55:00 +01:00
Molkobain
db4dfe1ba3 N°7315 - Migrate usages of WebPage::add_linked_script() to absolute URIs to ensure they are correctly loaded no matter the endpoint location 2024-03-05 21:53:04 +01:00
Stephen Abello
e00112d6e1 N°2039 - Empty newsroom cache when modifying notifications from view all page 2024-03-04 15:24:36 +01:00
Stephen Abello
3404306de8 N°2039 - Update event zlist detail 2024-03-04 15:24:36 +01:00
Stephen Abello
ff7e4d3db6 N°2039 - Display actions as independent icon buttons 2024-03-04 15:24:36 +01:00
Pierre Goiffon
e371db846a N°5621 Move showdown 2.0.0-alpha1 to NPM
Current file header is : /*! showdown v 2.0.0-alpha1 - 25-09-2018 */

Official 2.0.0-alpha doesn't match neither on content nor date :(
Considering date we would be at 1.8.7, but it is also quite different (and has vulnerabilities)
In consequence switching to 2.0.0.
2024-03-04 10:31:27 +01:00
Pierre Goiffon
5bbf3c9c35 N°5621 Move jquery.magnific-popup.js 1.0.0 to NPM 2024-03-04 10:31:27 +01:00
Pierre Goiffon
fe4233e218 N°5621 Move jquery.fileupload.js 9.22.0 (?) to NPM
Update to 9.22.1 to fix https://github.com/advisories/GHSA-4cj8-g9cp-v5wr
2024-03-04 10:31:27 +01:00
Pierre Goiffon
8490c2a22f N°5621 Move jquery.contextMenu 1.6.7 (?) to NPM 2024-03-04 10:31:27 +01:00
Pierre Goiffon
e758527ca9 N°5621 Move clipboard 2.0.4 to NPM 2024-03-04 10:31:27 +01:00
Pierre Goiffon
3e9f4df1bf N°5621 Move D3 3.5.16 to NPM 2024-03-04 10:31:26 +01:00
Pierre Goiffon
f3fbce7459 N°5621 Move C3 0.4.11 to NPM 2024-03-04 10:31:26 +01:00
Pierre Goiffon
ff079f7d01 N°5621 Move mousetrap 1.6.5 to NPM 2024-03-04 10:31:26 +01:00
Pierre Goiffon
d4c54b6e1c N°5621 Move ace 1.2.8 to NPM
As the package sizes 37.5MB (!!!!), we are keeping only the directory we are using (src-min).
The rest (demo, src, src-min-noconflict, src-noconflict) is added in the root .gitignore and not present in the index.
Description of those directories content is available in the GitHub repo README : https://github.com/ajaxorg/ace-builds
2024-03-04 10:31:26 +01:00
Pierre Goiffon
39d1ddeab8 N°5621 Move JQuery 3.5.1 to NPM 2024-03-04 10:31:26 +01:00
Pierre Goiffon
fada9793f0 N°5621 Move JQuery UI 1.12.1 to NPM 2024-03-04 10:31:25 +01:00
Pierre Goiffon
45a8e6d1c8 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-04 08:41:54 +01:00
Pierre Goiffon
bf4b07a366 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-04 08:41:25 +01:00
Pierre Goiffon
48de13b5cf Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-03-04 08:32:59 +01:00
Pierre Goiffon
b867faa355 Fix DBObjectTest
Error was "Class 'Combodo\iTop\Test\UnitTest\Core\DBObjectSet' not found"
2024-03-04 08:09:35 +01:00
Molkobain
1848b5f231 N°7314 - Add some PHPDoc about new recommendations 2024-03-01 21:27:19 +01:00
Molkobain
9fa53d43ab N°7314 - Add Symfony Response alternative to Webpage::output() 2024-03-01 21:10:37 +01:00
Molkobain
646e86b207 N°7314 - Remove danger zone from iTopWebPage as it was only kept to ensure we didn't a miss in 3.0.0 2024-03-01 21:10:26 +01:00
Pierre Goiffon
e93c9b8537 Merge remote-tracking branch 'origin/support/3.1' into support/3.2 2024-03-01 17:26:39 +01:00
Pierre Goiffon
849c495093 Merge remote-tracking branch 'origin/support/3.0' into support/3.1 2024-03-01 17:26:19 +01:00
Pierre Goiffon
e878938e25 Merge remote-tracking branch 'origin/support/2.7' into support/3.0 2024-03-01 17:26:05 +01:00
jf-cbd
7453cc184f ✏️ fix a typo 2024-03-01 17:25:08 +01:00
5319 changed files with 405502 additions and 212581 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

View File

@@ -79,6 +79,12 @@ gitGraph
commit id: "2023-08-10" tag: "2.7.9"
checkout support/3.1
commit id: "2023-12-20" tag: "3.1.1"
checkout support/2.7
commit id: "2024-01-17" tag: "2.7.10"
checkout develop
commit id: "2024-06-25" tag: "3.2.0-beta1" type: HIGHLIGHT
branch support/3.2 order: 830
checkout support/3.2
```
To learn more, check the [iTop community versions history on the official wiki](https://www.itophub.io/wiki/page?id=latest:release:start).

View File

@@ -65,7 +65,7 @@ Don't remove these lines, check them once done.
- [ ] I have performed a self-review of my code
- [ ] I have tested all changes I made on an iTop instance
- [ ] I have added a unit test, otherwise I have explained why I couldn't
- [ ] Is the PR clear and detailled enough so anyone can understand digging in the code?
- [ ] Is the PR clear and detailed enough so anyone can understand digging in the code?
## Checklist of things to do before PR is ready to merge
<!--

6
.gitignore vendored
View File

@@ -47,6 +47,12 @@ tests/*/vendor/*
!/log/index.php
!/log/web.config
# NPM: `jquery-ui` package is just there for vulnerability scans, so we don't want to version its files (only `jquery-ui-dist` is used within the code base)
/node_modules/jquery-ui/**
# Symfony: Local env file
/resources/symfony/.env.local
# PHPUnit: Cache file, local XML working copies
/tests/php-unit-tests/.phpunit.result.cache
/tests/php-unit-tests/phpunit.xml

View File

@@ -4,7 +4,7 @@ $iBeginTime = time();
chdir(__DIR__);
$aCommands = [
'php composer/rmDeniedTestDir.php',
'php composer/rmUnnecessaryFolders.php',
'php build/commands/setupCssCompiler.php',
// 'bash /tmp/gabuzomeu.sh',
];

View File

@@ -1,7 +1,7 @@
<?php
/**
* Copyright (C) 2010-2023 Combodo SARL
* Copyright (C) 2010-2024 Combodo SAS
*
* This file is part of iTop.
*
@@ -27,7 +27,7 @@ $iTopFolder = __DIR__."/../../../";
require_once("$iTopFolder/approot.inc.php");
require_once(APPROOT."/application/utils.inc.php");
if (php_sapi_name() !== 'cli')
if (PHP_SAPI !== 'cli')
{
throw new \Exception('This script can only run from CLI');
}
@@ -48,4 +48,4 @@ if (!file_exists($sCssFile))
{
fwrite(STDERR, "Failed to compile $sCssFile, exiting.");
exit(1);
}
}

View File

@@ -1,73 +0,0 @@
<?php
/**
* Copyright (C) 2010-2023 Combodo SARL
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
*
*/
use Combodo\iTop\Composer\iTopComposer;
$iTopFolder = __DIR__ . "/../../" ;
require_once ("$iTopFolder/approot.inc.php");
require_once (APPROOT."/setup/setuputils.class.inc.php");
if (php_sapi_name() !== 'cli')
{
throw new \Exception('This script can only run from CLI');
}
clearstatcache();
$oiTopComposer = new iTopComposer();
$aDeniedButStillPresent = $oiTopComposer->ListDeniedButStillPresent();
echo "\n";
foreach ($aDeniedButStillPresent as $sDir)
{
if (false === iTopComposer::IsTestDir($sDir))
{
echo "ERROR found INVALID denied test dir: '$sDir'\n";
throw new \Exception("$sDir must end with /Test/ or /test/");
}
if (false === file_exists($sDir)) {
echo "INFO $sDir is in denied list, but not existing on disk => skipping !\n";
continue;
}
try {
SetupUtils::rrmdir($sDir);
echo "OK Remove denied test dir: '$sDir'\n";
}
catch (\Exception $e) {
echo "\nFAILED to remove denied test dir: '$sDir'\n";
}
}
$aAllowedAndDeniedDirs = array_merge(
$oiTopComposer->ListAllowedTestDir(),
$oiTopComposer->ListDeniedTestDir()
);
$aExistingDirs = $oiTopComposer->ListAllTestDir();
$aMissing = array_diff($aExistingDirs, $aAllowedAndDeniedDirs);
if (false === empty($aMissing)) {
echo "Some new tests dirs exists !\n"
.' They must be declared either in the allowed or denied list in '.iTopComposer::class." (see N°2651).\n"
.' List of dirs:'."\n".var_export($aMissing, true);
}

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2010-2023 Combodo SARL
* Copyright (C) 2010-2024 Combodo SAS
*
* This file is part of iTop.
*
@@ -26,7 +26,7 @@
* @link https://getcomposer.org/doc/03-cli.md#show
*/
$iTopFolder = __DIR__."/../../";
$iTopFolder = __DIR__."/../../../";
require_once("$iTopFolder/approot.inc.php");
$sApproot = APPROOT;

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -13,7 +13,7 @@
* @link https://github.com/tecnickcom/TCPDF?tab=readme-ov-file#note TCPDF is in support only mode
*/
$sItopRootFolder = realpath(__DIR__ . "/../../../");
$sItopRootFolder = realpath(__DIR__ . "/../../../../");
$sCurrentScriptFileName = basename(__FILE__);

View File

@@ -0,0 +1,51 @@
<?php
/**
* Copyright (C) 2010-2024 Combodo SAS
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
*
*/
/**
* Ensure that the files for folder browsing protection (.htaccess, web.config) are kept after an "npm install/update" command
*/
$iTopFolder = __DIR__."/../../../";
require_once("$iTopFolder/approot.inc.php");
$sDependenciesRootFolderAbsPath = APPROOT . "node_modules/";
$aFilesToCheck = [
".htaccess",
"web.config",
];
echo "This command aims at ensuring that folder browsing protection files (.htaccess, web.config) are present in the dependencies folder even after an install/upgrade command\n";
echo "Checking files:\n";
foreach($aFilesToCheck as $sFileToCheck) {
if (file_exists($sDependenciesRootFolderAbsPath . $sFileToCheck)) {
echo "✔️ $sFileToCheck is present\n";
continue;
}
// If missing, copy the one from /lib as it contains the necessary allow/deny directives for third-parties
copy(APPROOT . "lib/$sFileToCheck", $sDependenciesRootFolderAbsPath . $sFileToCheck);
echo "✔️ $sFileToCheck was missing and has been re-created\n";
}
// Ensure separation with following scripts
echo "\n";

View File

@@ -0,0 +1,100 @@
<?php
/**
* Copyright (C) 2010-2024 Combodo SAS
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with iTop. If not, see <http: *www.gnu.org/licenses/>
*
*/
$iTopFolder = __DIR__ . "/../../" ;
require_once ("$iTopFolder/approot.inc.php");
require_once (APPROOT."/setup/setuputils.class.inc.php");
if (php_sapi_name() !== 'cli')
{
throw new \Exception('This script can only run from CLI');
}
clearstatcache();
// Read params
$key = array_search("--manager", $argv);
if (false === $key || false === isset($argv[$key + 1]) ) {
throw new \InvalidArgumentException("Usage: " . __FILE__ . " --manager composer|npm");
}
$sDependenciesHandlerCode = $argv[$key + 1];
switch ($sDependenciesHandlerCode) {
case "composer":
$sDependenciesHandlerFQCN = \Combodo\iTop\Dependencies\Composer\iTopComposer::class;
break;
case "npm":
$sDependenciesHandlerFQCN = \Combodo\iTop\Dependencies\NPM\iTopNPM::class;
break;
default:
throw new \Exception("Invalid dependencies handler code, $sDependenciesHandlerCode given, expected composer|npm");
}
// Start handler
$oDependenciesHandler = new $sDependenciesHandlerFQCN();
$aDeniedButStillPresent = $oDependenciesHandler->ListDeniedButStillPresentFilesAbsPaths();
echo "\n";
foreach ($aDeniedButStillPresent as $sDir)
{
if (false === $oDependenciesHandler::IsQuestionnableFile($sDir))
{
echo "ERROR found INVALID denied test dir: '$sDir'\n";
throw new \RuntimeException("$sDir is in the denied list but doesn't comply with the rule (see IsQuestionnableFolder method)");
}
if (false === file_exists($sDir)) {
echo "INFO $sDir is in denied list, but not existing on disk => skipping !\n";
continue;
}
try {
if(is_dir($sDir)){
SetupUtils::rrmdir($sDir);
}
else{
unlink($sDir);
}
echo "✔️ Remove denied test dir: '$sDir'\n";
}
catch (\Exception $e) {
echo "\n❌ FAILED to remove denied test dir: '$sDir'\n";
}
}
$aAllowedAndDeniedDirs = array_merge(
$oDependenciesHandler->ListAllowedFilesAbsPaths(),
$oDependenciesHandler->ListDeniedFilesAbsPaths()
);
$aExistingDirs = $oDependenciesHandler->ListAllFilesAbsPaths();
$aMissing = array_diff($aExistingDirs, $aAllowedAndDeniedDirs);
if (false === empty($aMissing)) {
echo "Some new tests dirs exists !\n"
." They must be declared either in the allowed or denied list in {$sDependenciesHandlerFQCN}\n"
.' List of dirs:'."\n".var_export($aMissing, true)."\n";
}
// Ensure separation with following scripts
echo "\n";

View File

@@ -159,6 +159,6 @@ We have one sticker per contribution type. You might get multiple stickers with
* Beta tester: Test and give feedback on beta releases
* Extension developer: Develop and publish an extension
Here is the design of each stickers for year 2022:
Here is the design of each stickers for year 2024:
![iTop stickers 2023](.doc/contributing-guide/2023.contributing-stickers-side-by-side.png)
![iTop stickers 2024](.doc/contributing-guide/2024.contributing-stickers-side-by-side.png)

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -19,7 +19,7 @@
/**
* UserRightsMatrix (User management Module)
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -20,7 +20,7 @@
* UserRightsNull
* User management Module - say Yeah! to everything
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,331 +0,0 @@
<?php
namespace Html2Text;
if (!function_exists('mb_split'))
{
function mb_split($pattern, $subject, $limit = -1)
{
return preg_split('/'.$pattern.'/', $subject, $limit);
}
}
/**
* Replace all occurrences of the search string with the replacement string.
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.
* @license http://creativecommons.org/publicdomain/zero/1.0/
* @link http://php.net/manual/function.str-replace.php
*
* @param mixed $search
* @param mixed $replace
* @param mixed $subject
* @param int $count
* @return mixed
*/
function mb_str_replace($search, $replace, $subject, &$count = 0) {
if (!is_array($subject)) {
// Normalize $search and $replace so they are both arrays of the same length
$searches = is_array($search) ? array_values($search) : array($search);
$replacements = is_array($replace) ? array_values($replace) : array($replace);
$replacements = array_pad($replacements, count($searches), '');
foreach ($searches as $key => $search) {
$parts = mb_split(preg_quote($search), $subject);
if (is_array($parts))
{
$count += count($parts) - 1;
$subject = implode($replacements[$key], $parts);
}
}
} else {
// Call mb_str_replace for each subject in array, recursively
foreach ($subject as $key => $value) {
$subject[$key] = mb_str_replace($search, $replace, $value, $count);
}
}
return $subject;
}
/******************************************************************************
* Copyright (c) 2010 Jevon Wright and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* or
*
* LGPL which is available at http://www.gnu.org/licenses/lgpl.html
*
*
* Contributors:
* Jevon Wright - initial API and implementation
* Denis Flaven - some fixes for properly handling UTF-8 characters
****************************************************************************/
class Html2Text {
/**
* Tries to convert the given HTML into a plain text format - best suited for
* e-mail display, etc.
*
* <p>In particular, it tries to maintain the following features:
* <ul>
* <li>Links are maintained, with the 'href' copied over
* <li>Information in the &lt;head&gt; is lost
* </ul>
*
* @param string html the input HTML
* @return string the HTML converted, as best as possible, to text
* @throws Html2TextException if the HTML could not be loaded as a {@link DOMDocument}
*/
static function convert($html) {
// replace &nbsp; with spaces
$html = str_replace("&nbsp;", " ", $html);
$html = mb_str_replace("\xc2\xa0", " ", $html); // DO NOT USE str_replace since it breaks the "à" character which is \xc3 \xa0 in UTF-8
$html = static::fixNewlines($html);
$doc = new \DOMDocument();
if (!@$doc->loadHTML('<?xml encoding="UTF-8">'.$html)) // Forces the UTF-8 character set for HTML fragments
{
throw new Html2TextException("Could not load HTML - badly formed?", $html);
}
$output = static::iterateOverNode($doc);
// remove leading and trailing spaces on each line
$output = preg_replace("/[ \t]*\n[ \t]*/im", "\n", $output);
$output = preg_replace("/ *\t */im", "\t", $output);
// remove unnecessary empty lines
$output = preg_replace("/\n\n\n*/im", "\n\n", $output);
// remove leading and trailing whitespace
$output = trim($output);
return $output;
}
/**
* Unify newlines; in particular, \r\n becomes \n, and
* then \r becomes \n. This means that all newlines (Unix, Windows, Mac)
* all become \ns.
*
* @param string text text with any number of \r, \r\n and \n combinations
* @return string the fixed text
*/
static function fixNewlines($text) {
// replace \r\n to \n
$text = str_replace("\r\n", "\n", $text);
// remove \rs
$text = str_replace("\r", "\n", $text);
return $text;
}
static function nextChildName($node) {
// get the next child
$nextNode = $node->nextSibling;
while ($nextNode != null) {
if ($nextNode instanceof \DOMElement) {
break;
}
$nextNode = $nextNode->nextSibling;
}
$nextName = null;
if ($nextNode instanceof \DOMElement && $nextNode != null) {
$nextName = strtolower($nextNode->nodeName);
}
return $nextName;
}
static function prevChildName($node) {
// get the previous child
$nextNode = $node->previousSibling;
while ($nextNode != null) {
if ($nextNode instanceof \DOMElement) {
break;
}
$nextNode = $nextNode->previousSibling;
}
$nextName = null;
if ($nextNode instanceof \DOMElement && $nextNode != null) {
$nextName = strtolower($nextNode->nodeName);
}
return $nextName;
}
static function iterateOverNode($node) {
if ($node instanceof \DOMText) {
// Replace whitespace characters with a space (equivilant to \s)
return preg_replace("/[\\t\\n\\f\\r ]+/im", " ", $node->wholeText);
}
if ($node instanceof \DOMDocumentType) {
// ignore
return "";
}
$nextName = static::nextChildName($node);
$prevName = static::prevChildName($node);
$name = strtolower($node->nodeName);
// start whitespace
switch ($name) {
case "hr":
return "---------------------------------------------------------------\n";
case "style":
case "head":
case "title":
case "meta":
case "script":
// ignore these tags
return "";
case "h1":
case "h2":
case "h3":
case "h4":
case "h5":
case "h6":
case "ol":
case "ul":
// add two newlines, second line is added below
$output = "\n";
break;
case "td":
case "th":
// add tab char to separate table fields
$output = "\t";
break;
case "tr":
case "p":
case "div":
// add one line
$output = "\n";
break;
case "li":
$output = "- ";
break;
default:
// print out contents of unknown tags
$output = "";
break;
}
// debug
//$output .= "[$name,$nextName]";
if (isset($node->childNodes)) {
for ($i = 0; $i < $node->childNodes->length; $i++) {
$n = $node->childNodes->item($i);
$text = static::iterateOverNode($n);
$output .= $text;
}
}
// end whitespace
switch ($name) {
case "h1":
case "h2":
case "h3":
case "h4":
case "h5":
case "h6":
$output .= "\n";
break;
case "p":
case "br":
// add one line
if ($nextName != "div")
$output .= "\n";
break;
case "div":
// add one line only if the next child isn't a div
if ($nextName != "div" && $nextName != null)
$output .= "\n";
break;
case "a":
// links are returned in [text](link) format
$href = $node->getAttribute("href");
$output = trim($output);
// remove double [[ ]] s from linking images
if (substr($output, 0, 1) == "[" && substr($output, -1) == "]") {
$output = substr($output, 1, strlen($output) - 2);
// for linking images, the title of the <a> overrides the title of the <img>
if ($node->getAttribute("title")) {
$output = $node->getAttribute("title");
}
}
// if there is no link text, but a title attr
if (!$output && $node->getAttribute("title")) {
$output = $node->getAttribute("title");
}
if ($href == null) {
// it doesn't link anywhere
if ($node->getAttribute("name") != null) {
$output = "[$output]";
}
} else {
if ($href == $output || $href == "mailto:$output" || $href == "http://$output" || $href == "https://$output") {
// link to the same address: just use link
$output;
} else {
// replace it
if ($output) {
$output = "[$output]($href)";
} else {
// empty string
$output = $href;
}
}
}
// does the next node require additional whitespace?
switch ($nextName) {
case "h1": case "h2": case "h3": case "h4": case "h5": case "h6":
$output .= "\n";
break;
}
break;
case "img":
if ($node->getAttribute("title")) {
$output = "[" . $node->getAttribute("title") . "]";
} elseif ($node->getAttribute("alt")) {
$output = "[" . $node->getAttribute("alt") . "]";
} else {
$output = "";
}
break;
case "li":
$output .= "\n";
break;
default:
// do nothing
}
return $output;
}
}

View File

@@ -1,28 +0,0 @@
<?php
/******************************************************************************
* Copyright (c) 2010 Jevon Wright and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* or
*
* LGPL which is available at http://www.gnu.org/licenses/lgpl.html
*
*
* Contributors:
* Jevon Wright - initial API and implementation
****************************************************************************/
namespace Html2Text;
class Html2TextException extends \Exception {
var $more_info;
public function __construct($message = "", $more_info = "") {
parent::__construct($message);
$this->more_info = $more_info;
}
}

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/AjaxPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
// cannot notify depreciation for now as this is still load in autoloader

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -20,7 +20,7 @@
/**
* Class ApplicationContext
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,7 +1,7 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*
@@ -31,7 +31,7 @@ require_once(APPROOT.'application/newsroomprovider.class.inc.php');
* Definition of interfaces that can be implemented to customize iTop.
* You may implement such interfaces in a module file (e.g. main.mymodule.php)
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
* @since 2.7.0
*/
@@ -2099,8 +2099,16 @@ class RestUtils
elseif (is_string($key))
{
// OQL
$oSearch = DBObjectSearch::FromOQL($key);
}
try {
$oSearch = DBObjectSearch::FromOQL($key);
} catch (Exception $e) {
throw new CoreOqlException('Query failed to execute', [
'query' => $key,
'exception_class' => get_class($e),
'exception_message' => $e->getMessage(),
]);
}
}
else
{
throw new Exception("Wrong format for key");
@@ -2273,4 +2281,91 @@ interface iKPILoggerExtension
* @return mixed
*/
public function LogOperation($oKpiLogData);
}
/**
* Implement this interface to add files to the backup
*
* @api
* @since 3.2.0
*/
interface iBackupExtraFilesExtension
{
/**
* @api
* @return string[] Array of relative paths (from app root) for files and directories to be included in the backup
*/
public function GetExtraFilesRelPaths(): array;
}
/**
* Interface to provide messages to be displayed in the "Welcome Popup"
*
* @api
* @since 3.2.0
*/
interface iWelcomePopupExtension
{
// Importance for ordering messages
// Just two levels since less important messages have nothing to do in the welcome popup
public const ENUM_IMPORTANCE_CRITICAL = 0;
public const ENUM_IMPORTANCE_HIGH = 1;
public const DEFAULT_IMPORTANCE = self::ENUM_IMPORTANCE_HIGH;
/**
* Overload this method if you need to display an icon representing the provider (eg. your own company logo, module icon, ...)
*
* @api
* @return string Relative path (from app. root) of the icon representing the provider
*/
public function GetIconRelPath(): string;
/**
* @api
* @return \Combodo\iTop\Application\WelcomePopup\Message[]
*/
public function GetMessages(): array;
/**
* Overload this method if the provider needs to do some additional processing after the message ($sMessageId) has been acknowledged by the current user
*
* @param string $sMessageId
* @api
*/
public function AcknowledgeMessage(string $sMessageId): void;
}
/**
* Inherit from this class to provide messages to be displayed in the "Welcome Popup"
*
* @api
* @since 3.2.0
*/
abstract class AbstractWelcomePopupExtension implements iWelcomePopupExtension
{
/**
* @inheritDoc
*/
public function GetIconRelPath(): string
{
return \Combodo\iTop\Application\Branding::$aLogoPaths[\Combodo\iTop\Application\Branding::ENUM_LOGO_TYPE_MAIN_LOGO_COMPACT]['default'];
}
/**
* @inheritDoc
*/
public function GetMessages(): array
{
return [];
}
/**
* @inheritDoc
*/
public function AcknowledgeMessage(string $sMessageId): void
{
// No need to process the acknowledgment notice by default
return;
}
}

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -22,7 +22,7 @@
* to check and is linked to a set of rules that determine the valid or invalid objects
* inside the set
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -22,7 +22,7 @@
* to check and is linked to a set of rules that determine the valid or invalid objects
* inside the set
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -23,7 +23,7 @@
* or the "bad" ones. The core audit engines computes the complement to the definition
* set when needed to obtain either the valid objects, or the ones with an error
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CaptureWebPage.php, now loadable using autoloader');

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CLIPage.php, now loadable using autoloader');

View File

@@ -1,9 +1,10 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
use Combodo\iTop\Application\Helper\CKEditorHelper;
use Combodo\iTop\Application\Helper\FormHelper;
use Combodo\iTop\Application\Helper\Session;
use Combodo\iTop\Application\Helper\WebResourcesHelper;
@@ -1060,11 +1061,6 @@ HTML
}
}
// Fields with CKEditor need to have the highlight.js lib loaded even if they are in read-only, as it is needed to format code snippets
if ($bHasFieldsWithRichTextEditor) {
WebResourcesHelper::EnableCKEditorToWebPage($oPage);
}
return $aFieldsMap;
}
@@ -2307,7 +2303,7 @@ JS
$sHidden = "<input type=\"hidden\" id=\"{$iId}_count\" value=\"$iEntriesCount\"/>"; // To know how many entries the case log already contains
$sHTMLValue = "$sHeader<div class=\"ibo-caselog-entry-form--text-input\" $sStyle data-role=\"ibo-caselog-entry-form--text-input\">";
$sHTMLValue .= "<textarea class=\"htmlEditor ibo-input-richtext-placeholder\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">".utils::EscapeHtml($sEditValue)."</textarea>";
$sHTMLValue .= "<textarea class=\"htmlEditor ibo-input-richtext-placeholder\" style=\"border:0;width:100%\" title=\"$sHelpText\" name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" rows=\"8\" cols=\"40\" id=\"$iId\">".CKEditorHelper::PrepareCKEditorValueTextEncodingForTextarea($sEditValue)."</textarea>";
$sHTMLValue .= "$sPreviousLog</div>{$sValidationSpan}{$sReloadSpan}$sHidden";
// Note: This should be refactored for all types of attribute (see at the end of this function) but as we are doing this for a maintenance release, we are scheduling it for the next main release in to order to avoid regressions as much as possible.
@@ -2319,39 +2315,10 @@ JS
$oPage->add_ready_script("$('#$iId').on('keyup change validate', function(evt, sFormId) { return ValidateCaseLogField('$iId', $bMandatory, sFormId, $sNullValue, $sOriginalValue) } );"); // Custom validation function
// Replace the text area with CKEditor
// To change the default settings of the editor,
// a) edit the file /js/ckeditor/config.js
// b) or override some of the configuration settings, using the second parameter of ckeditor()
$aConfig = utils::GetCkeditorPref();
$aConfig['placeholder'] = Dict::S('UI:CaseLogTypeYourTextHere');
// - Final config
$sConfigJS = json_encode($aConfig);
WebResourcesHelper::EnableCKEditorToWebPage($oPage);
$oPage->add_ready_script("$('#$iId').ckeditor(function() { /* callback code */ }, $sConfigJS);"); // Transform $iId into a CKEdit
$oPage->add_ready_script(
<<<EOF
$('#$iId').on('update', function(evt){
BlockField('cke_$iId', $('#$iId').attr('disabled'));
//Delayed execution - ckeditor must be properly initialized before setting readonly
var retryCount = 0;
var oMe = $('#$iId');
var delayedSetReadOnly = function () {
if (oMe.data('ckeditorInstance').editable() == undefined && retryCount++ < 10) {
setTimeout(delayedSetReadOnly, retryCount * 100); //Wait a while longer each iteration
}
else
{
oMe.data('ckeditorInstance').setReadOnly(oMe.prop('disabled'));
}
};
setTimeout(delayedSetReadOnly, 50);
});
EOF
);
// configure CKEditor
CKEditorHelper::ConfigureCKEditorElementForWebPage($oPage, $iId, $sOriginalValue, true, [
'placeholder' => Dict::S('UI:CaseLogTypeYourTextHere'),
]);
break;
case 'HTML':
@@ -2429,7 +2396,7 @@ HTML;
$sInputType = self::ENUM_INPUT_TYPE_IMAGE;
$aEventsList[] = 'validate';
$aEventsList[] = 'change';
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/edit_image.js');
$oPage->LinkScriptFromAppRoot('js/edit_image.js');
$oDocument = $value; // Value is an ormDocument objectm
$sDefaultUrl = $oAttDef->Get('default_image');
if (is_object($oDocument) && !$oDocument->IsEmpty()) {
@@ -2545,11 +2512,11 @@ HTML;
$sHTMLValue .= '</div></div>';
$sHTMLValue .= '<div>'.$sReloadSpan.'</div>'; // No validation span for this one: it does handle its own validation!
$sHTMLValue .= "<input name=\"attr_{$sFieldPrefix}{$sAttCode}{$sNameSuffix}\" type=\"hidden\" id=\"$iId\" value=\"\"/>\n";
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/form_handler.js');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/console_form_handler.js');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_set.js');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/form_field.js');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/subform_field.js');
$oPage->LinkScriptFromAppRoot('js/form_handler.js');
$oPage->LinkScriptFromAppRoot('js/console_form_handler.js');
$oPage->LinkScriptFromAppRoot('js/field_set.js');
$oPage->LinkScriptFromAppRoot('js/form_field.js');
$oPage->LinkScriptFromAppRoot('js/subform_field.js');
$oPage->add_ready_script(
<<<JS
$('#{$iId}_field_set').field_set($sFieldSetOptions);
@@ -2575,9 +2542,9 @@ JS
case 'Set':
case 'TagSet':
$sInputType = self::ENUM_INPUT_TYPE_TAGSET;
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/selectize.min.js');
$oPage->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/selectize.default.css');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.itop-set-widget.js');
$oPage->LinkScriptFromAppRoot('js/selectize.min.js');
$oPage->LinkStylesheetFromAppRoot('css/selectize.default.css');
$oPage->LinkScriptFromAppRoot('js/jquery.itop-set-widget.js');
$oPage->add_dict_entry('Core:AttributeSet:placeholder');
@@ -2608,6 +2575,13 @@ JS
$iFieldSize = $oAttDef->GetMaxSize();
if ($aAllowedValues !== null)
{
// convert AttributeBoolean value due to issue with radio style when value is false
// @see N°2443 - Boolean don't accept yes/no value
if($oAttDef instanceof AttributeBoolean){
$value = $value === false ? 0 : 1;
}
// Discrete list of values, use a SELECT or RADIO buttons depending on the config
$sDisplayStyle = $oAttDef->GetDisplayStyle();
switch ($sDisplayStyle)
@@ -3452,7 +3426,7 @@ EOF
// Dummy collapsible section created in order to get JS files
$oCollapsibleSection = new CollapsibleSection('');
foreach ($oCollapsibleSection->GetJsFilesUrlRecursively(true) as $sJSFile) {
$oPage->add_linked_script($sJSFile);
$oPage->LinkScriptFromURI($sJSFile);
}
}
$aAllowedValues = MetaModel::GetAllowedValues_att($sClass, $sAttCode, $aArgs);
@@ -4596,6 +4570,8 @@ HTML;
/** @var \iApplicationObjectExtension $oExtensionInstance */
foreach(MetaModel::EnumPlugins('iApplicationObjectExtension') as $oExtensionInstance)
{
$sExtensionClass = get_class($oExtensionInstance);
$this->LogCRUDDebug(__METHOD__, "Calling $sExtensionClass::OnDBInsert()");
$oKPI = new ExecutionKPI();
$oExtensionInstance->OnDBInsert($oNewObj, self::GetCurrentChange());
$oKPI->ComputeStatsForExtension($oExtensionInstance, 'OnDBInsert');
@@ -4677,7 +4653,22 @@ HTML;
return $oDeletionPlan;
}
protected function PostDeleteActions(): void
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();
}
@@ -4691,6 +4682,8 @@ HTML;
/** @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');
@@ -4712,6 +4705,7 @@ HTML;
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');
@@ -4771,6 +4765,8 @@ HTML;
/** @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');
@@ -4821,6 +4817,8 @@ HTML;
/** @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');
@@ -5947,7 +5945,7 @@ JS
final protected function FireEventAfterWrite(array $aChanges, bool $bIsNew): void
{
$this->NotifyAttachedObjectsOnLinkClassModification();
$this->FireEventDbLinksChangedForCurrentObject();
$this->RemoveObjectAwaitingEventDbLinksChanged(get_class($this), $this->GetKey());
$this->FireEvent(EVENT_DB_AFTER_WRITE, ['is_new' => $bIsNew, 'changes' => $aChanges]);
}
@@ -6060,31 +6058,6 @@ JS
}
}
/**
* Fire the EVENT_DB_LINKS_CHANGED event if current object is registered
*
* @return void
* @throws \ArchivedObjectException
* @throws \CoreException
*
* @since 3.1.0 N°5906
*/
final protected function FireEventDbLinksChangedForCurrentObject(): void
{
if (true === static::IsEventDBLinksChangedBlocked()) {
return;
}
$sClass = get_class($this);
$sId = $this->GetKey();
$bIsObjectAwaitingEventDbLinksChanged = self::RemoveObjectAwaitingEventDbLinksChanged($sClass, $sId);
if (false === $bIsObjectAwaitingEventDbLinksChanged) {
return;
}
self::FireEventDbLinksChangedForObject($this);
self::RemoveObjectAwaitingEventDbLinksChanged($sClass, $sId);
}
/**
* Fire the EVENT_DB_LINKS_CHANGED event if given object is registered, and unregister it
*
@@ -6123,9 +6096,9 @@ JS
self::SetEventDBLinksChangedBlocked(true);
// N°6408 The object can have been deleted
if (!is_null($oObject)) {
MetaModel::StartReentranceProtection($oObject);
$oObject->FireEvent(EVENT_DB_LINKS_CHANGED);
MetaModel::StopReentranceProtection($oObject);
// Update the object if needed
if (count($oObject->ListChanges()) !== 0) {
$oObject->DBUpdate();
}

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/CSVPage.php, now loadable using autoloader');

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -480,7 +480,7 @@ abstract class Dashboard
CombodoTooltip.InitTooltipFromMarkup($("#attr_auto_reload_sec"));
$("#attr_auto_reload_sec").prop('disabled', !$('#attr_auto_reload').is(':checked'));
$('#attr_auto_reload').change( function(ev) {
$('#attr_auto_reload').on('change', function(ev) {
$("#attr_auto_reload_sec").prop('disabled', !$(this).is(':checked'));
} );
@@ -563,8 +563,8 @@ JS
}
if (!$bEditMode) {
$oPage->add_linked_script('../js/dashlet.js');
$oPage->add_linked_script('../js/dashboard.js');
$oPage->LinkScriptFromAppRoot('js/dashlet.js');
$oPage->LinkScriptFromAppRoot('js/dashboard.js');
}
return $oDashboard;
@@ -1118,8 +1118,8 @@ JS
*/
protected function RenderEditionTools(WebPage $oPage, DashboardLayoutUIBlock $oDashboard, $aExtraParams)
{
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.iframe-transport.js');
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.fileupload.js');
$oPage->LinkScriptFromAppRoot('node_modules/blueimp-file-upload/js/jquery.iframe-transport.js');
$oPage->LinkScriptFromAppRoot('node_modules/blueimp-file-upload/js/jquery.fileupload.js');
$sId = utils::Sanitize($this->GetId(), '', 'element_identifier');
$sMenuTogglerId = "ibo-dashboard-menu-toggler-{$sId}";
@@ -1272,6 +1272,7 @@ EOF
$sAutoReloadSec = (string) $this->iAutoReloadSec;
$sTitle = utils::HtmlEntities($this->sTitle);
$sFile = utils::HtmlEntities($this->GetDefinitionFile());
$sFileForJS = json_encode($this->GetDefinitionFile());
$sUrl = utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php';
$sReloadURL = $this->GetReloadURL();
@@ -1333,9 +1334,9 @@ $('#dashboard_editor .ui-layout-center').runtimedashboard({
auto_reload: $sAutoReload,
auto_reload_sec: $sAutoReloadSec,
submit_to: '$sUrl',
submit_parameters: {operation: 'save_dashboard', file: '$sFile', extra_params: $sJSExtraParams, reload_url: '$sReloadURL'},
submit_parameters: {operation: 'save_dashboard', file: {$sFileForJS}, extra_params: $sJSExtraParams, reload_url: '$sReloadURL'},
render_to: '$sUrl',
render_parameters: {operation: 'render_dashboard', file: '$sFile', extra_params: $sJSExtraParams, reload_url: '$sReloadURL'},
render_parameters: {operation: 'render_dashboard', file: {$sFileForJS}, extra_params: $sJSExtraParams, reload_url: '$sReloadURL'},
new_dashlet_parameters: {operation: 'new_dashlet'}
});

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -24,7 +24,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
/**
* Dashboard presentation
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
abstract class DashboardLayout

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2012-2023 Combodo SARL
// Copyright (C) 2012-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -30,7 +30,7 @@ require_once(APPROOT.'application/forms.class.inc.php');
/**
* Base class for all 'dashlets' (i.e. widgets to be inserted into a dashboard)
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
abstract class Dashlet

View File

@@ -40,6 +40,36 @@
<presentation/>
<methods/>
</class>
<class id="WelcomePopupAcknowledge" _delta="define">
<parent>DBObject</parent>
<properties>
<comment>/** Acknowledge welcome popup messages */</comment>
<abstract>false</abstract>
<category></category>
<key_type>autoincrement</key_type>
<db_table>priv_welcome_popup_acknowledge</db_table>
</properties>
<fields>
<field id="message_uuid" xsi:type="AttributeString">
<sql>message_uuid</sql>
<default_value/>
<is_null_allowed>false</is_null_allowed>
</field>
<field id="user_id" xsi:type="AttributeExternalKey">
<sql>user_id</sql>
<target_class>User</target_class>
<is_null_allowed>false</is_null_allowed>
<on_target_delete>DEL_SILENT</on_target_delete>
</field>
<field id="acknowledge_date" xsi:type="AttributeDateTime">
<sql>acknowledge_date</sql>
<default_value/>
<is_null_allowed>false</is_null_allowed>
</field>
</fields>
<presentation/>
<methods/>
</class>
</classes>
<portals>
<portal id="backoffice" _delta="define">
@@ -155,6 +185,11 @@
<decoration_classes>fas fa-cog</decoration_classes>
</style>
</menu>
<menu id="Integrations" xsi:type="TemplateMenuNode" _delta="define">
<rank>50</rank>
<parent>ConfigurationTools</parent>
<template_file/>
</menu>
<menu id="DataSources" xsi:type="OQLMenuNode" _delta="define">
<rank>20</rank>
<parent>ConfigurationTools</parent>
@@ -187,7 +222,9 @@
</menus>
<events>
<event id="EVENT_DB_BEFORE_WRITE" _delta="define">
<description>An object is about to be written into the database. The object can be modified.</description>
<name>Before create or update</name>
<description><![CDATA[An object is about to be written into the database.
The object can be modified.]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -208,7 +245,11 @@
</event_data>
</event>
<event id="EVENT_DB_CHECK_TO_WRITE" _delta="define">
<description>Check an object before it is written into the database (no change possible). Call DBObject::AddCheckIssue() to signal an issue</description>
<name>Check to write</name>
<description><![CDATA[Check an object before it is written into the database (no change possible).
Call $this->AddCheckIssue($sErrorMessage) to report a blocking issue.
Call $this->AddCheckWarning($sWarningMessage) to display a warning.
]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -229,7 +270,9 @@
</event_data>
</event>
<event id="EVENT_DB_AFTER_WRITE" _delta="define">
<description>An object has been written into the database. The modifications can be propagated to other objects.</description>
<name>After create or update</name>
<description><![CDATA[An object has been written into the database.
The modifications can be propagated to other objects.]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -244,7 +287,7 @@
<type>boolean</type>
</event_datum>
<event_datum id="changes">
<description>For updates, the list of changes done during this operation</description>
<description><![CDATA[For updates, the list of changes done during this operation]]></description>
<type>array</type>
</event_datum>
<event_datum id="debug_info">
@@ -254,7 +297,9 @@
</event_data>
</event>
<event id="EVENT_DB_CHECK_TO_DELETE" _delta="define">
<description>Check an object before it is deleted from the database. Call DBObject::AddDeleteIssue() to signal an issue</description>
<name>Check to delete</name>
<description><![CDATA[Check an object before it is deleted from the database.
Call $this->AddDeleteIssue($sIssueMessage) to signal an issue.]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -271,7 +316,8 @@
</event_data>
</event>
<event id="EVENT_DB_ABOUT_TO_DELETE" _delta="define">
<description>An object is about to be deleted from the database</description>
<name>Before delete</name>
<description><![CDATA[An object is about to be deleted from the database]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -288,7 +334,8 @@
</event_data>
</event>
<event id="EVENT_DB_AFTER_DELETE" _delta="define">
<description>An object has been deleted into the database</description>
<name>After delete</name>
<description><![CDATA[An object has been deleted into the database]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -305,7 +352,9 @@
</event_data>
</event>
<event id="EVENT_ENUM_TRANSITIONS" _delta="define">
<description>Manage the allowed transitions in current object state. The only action allowed is to deny transitions with DBObject::DenyTransition()</description>
<name>Enum transitions</name>
<description><![CDATA[Manage the allowed transitions in current object state.
The only action allowed is to deny transitions with $this->DenyTransition($sTransitionCode)]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -325,7 +374,8 @@
</event_data>
</event>
<event id="EVENT_DB_LINKS_CHANGED" _delta="define">
<description>At least one link class was changed</description>
<name>Links on object have changed</name>
<description><![CDATA[At least one link class was changed]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -341,7 +391,9 @@
</event_data>
</event>
<event id="EVENT_DB_OBJECT_RELOAD" _delta="define">
<description>An object has been re-loaded from the database</description>
<name>Object reload</name>
<internal>true</internal>
<description><![CDATA[An object has been re-loaded from the database]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -357,7 +409,8 @@
</event_data>
</event>
<event id="EVENT_DB_COMPUTE_VALUES" _delta="define">
<description>An object needs to be recomputed after changes</description>
<name>Recompute object values</name>
<description><![CDATA[An object needs to be recomputed after changes]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -374,7 +427,8 @@
</event_data>
</event>
<event id="EVENT_DB_ARCHIVE" _delta="define">
<description>An object has been archived</description>
<name>Object archived</name>
<description><![CDATA[An object has been archived]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -390,7 +444,8 @@
</event_data>
</event>
<event id="EVENT_DB_UNARCHIVE" _delta="define">
<description>An object has been unarchived</description>
<name>Object unarchived</name>
<description><![CDATA[An object has been unarchived]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -406,7 +461,9 @@
</event_data>
</event>
<event id="EVENT_DB_SET_ATTRIBUTES_FLAGS" _delta="define">
<description>Set object attributes flags. Call cmdbAbstractObject::AddAttributeFlags() for all the attributes to be set for this target state.</description>
<name>Set attributes flags</name>
<description><![CDATA[Set object attributes flags.
Call $this->AddAttributeFlags($sAttCode, $iFlags) for all the attributes to be set for this target state.]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -417,7 +474,7 @@
</event_datum>
<event_datum id="target_state">
<description>The target state in which to evaluate the flags</description>
<type>array</type>
<type>string</type>
</event_datum>
<event_datum id="debug_info">
<description>Debug string</description>
@@ -426,7 +483,9 @@
</event_data>
</event>
<event id="EVENT_DB_SET_INITIAL_ATTRIBUTES_FLAGS" _delta="define">
<description>Set object initial attributes flags. Call cmdbAbstractObject::AddInitialAttributeFlags() for all the initial attributes to be set initially.</description>
<name>Set initial attributes flags</name>
<description><![CDATA[Set object initial attributes flags.
Call $this->AddInitialAttributeFlags($sAttCode, $iFlags) for all the initial attributes to be set initially.]]></description>
<sources>
<source id="cmdbAbstractObject">cmdbAbstractObject</source>
</sources>
@@ -442,7 +501,8 @@
</event_data>
</event>
<event id="EVENT_DOWNLOAD_DOCUMENT" _delta="define">
<description>A document has been downloaded from the GUI</description>
<name>Document downloaded</name>
<description><![CDATA[A document has been downloaded from the GUI]]></description>
<sources>
<source id="Document">Document</source>
</sources>
@@ -470,7 +530,9 @@
</event_data>
</event>
<event id="EVENT_LOGIN" _delta="define">
<description>Inform the listeners about the connection states</description>
<name>Login</name>
<internal>true</internal>
<description><![CDATA[Inform the listeners about the connection states]]></description>
<event_data>
<event_datum id="code">
<description>The login step result code (LoginWebPage::EXIT_CODE_...) </description>

View File

@@ -5,7 +5,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
use Combodo\iTop\Renderer\Console\ConsoleBlockRenderer;
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*
@@ -326,6 +326,7 @@ class DataTable
$sPagesLinks = implode('', $aPagesToDisplay);
$sPagesList = '['.implode(',', array_keys($aPagesToDisplay)).']';
$sAppRootUrl = utils::GetAbsoluteUrlAppRoot();
$sSelectionMode = ($iNbPages == 1) ? '' : 'positive';
$sHtml =
<<<EOF
@@ -333,11 +334,11 @@ class DataTable
<div $sPagerStyle>
<table id="pager{$this->iListId}" class="pager"><tr>
<td>$sPages</td>
<td><img src="../images/first.png" class="first"/></td>
<td><img src="../images/prev.png" class="prev"/></td>
<td><img src="{$sAppRootUrl}images/first.png" class="first"/>AAAA</td>
<td><img src="{$sAppRootUrl}images/prev.png" class="prev"/></td>
<td><span id="index">$sPagesLinks</span></td>
<td><img src="../images/next.png" class="next"/></td>
<td><img src="../images/last.png" class="last"/></td>
<td><img src="{$sAppRootUrl}images/next.png" class="next"/></td>
<td><img src="{$sAppRootUrl}images/last.png" class="last"/></td>
<td>$sPageSizeCombo</td>
<td><span id="loading">&nbsp;</span><input type="hidden" name="selectionMode" value="$sSelectionMode"></input>
</td>
@@ -565,7 +566,7 @@ EOF;
{
if (is_object($aObjects[$sAlias]))
{
$sHilightClass = $aObjects[$sAlias]->GetHilightClass();
$sHilightClass = MetaModel::GetHilightClass($sClassName, $aObjects[$sAlias]);
if ($sHilightClass != '')
{
$aRow['@class'] = $sHilightClass;

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -570,7 +570,7 @@ class DisplayBlock
} else {
// render it as an Ajax (asynchronous) call
$oHtml->AddCSSClass("loading");
$oHtml->AddHtml("<p><img src=\"../images/indicator_arrows.gif\"> ".Dict::S('UI:Loading').'</p>');
$oHtml->AddHtml("<p><img src=\"".utils::GetAbsoluteUrlAppRoot()."images/indicator_arrows.gif\"> ".Dict::S('UI:Loading').'</p>');
$oPage->add_script('
$.post("ajax.render.php?style='.$this->m_sStyle.'",
{ operation: "ajax", filter: "'.$sFilter.'", extra_params: "'.$sExtraParams.'" },

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/ErrorPage.php, now loadable using autoloader');

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -60,6 +60,24 @@ class CoreCannotSaveObjectException extends CoreException
return $sContent;
}
public function getTextMessage()
{
$sTitle = Dict::S('UI:Error:SaveFailed');
$sContent = utils::HtmlEntities($sTitle);
if (count($this->aIssues) == 1) {
$sIssue = reset($this->aIssues);
$sContent .= utils::HtmlEntities($sIssue);
} else {
foreach ($this->aIssues as $sError) {
$sContent .= " ".utils::HtmlEntities($sError).", ";
}
}
return $sContent;
}
public function getIssues()
{
return $this->aIssues;

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/**
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -21,7 +21,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
* Helper class to build interactive forms to be used either in stand-alone
* modal dialog or in "property-sheet" panes.
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
class DesignerForm
@@ -209,7 +209,7 @@ class DesignerForm
public function RenderAsPropertySheet($oP, $bReturnHTML = false, $sNotifyParentSelector = null)
{
$sReturn = '';
$sActionUrl = addslashes($this->sSubmitTo);
$sActionUrl = addslashes($this->sSubmitTo ?? '');
$sJSSubmitParams = json_encode($this->aSubmitParams);
$sFormId = $this->GetFormId();
if ($this->oParentForm == null) {
@@ -1330,7 +1330,8 @@ class DesignerComboField extends DesignerFormField
{
if ($this->bMultipleSelection)
{
$sHtml = "<span><select $sCSSClasses multiple size=\"8\"id=\"$sId\" name=\"$sName\">";
$iSize = max(1, min(8, count($this->aAllowedValues)));
$sHtml = "<span><select $sCSSClasses multiple size=\"$iSize\" id=\"$sId\" name=\"$sName\">";
}
else
{

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -20,7 +20,7 @@
/**
* Persistent class InputOutputTask
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWebPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
// cannot notify depreciation for now as this is still MASSIVELY used in iTop core !

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/iTopWizardWebPage.php, now loadable using autoloader');

View File

@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
/**
* Class LoginBasic
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/**
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -53,6 +53,12 @@ class LoginDefaultBefore extends AbstractLoginFSMExtension
{
// Force login mode
LoginWebPage::SetLoginModeAndReload($sProposedLoginMode);
} else {
$sRawLoginMode = utils::ReadParam('login_mode', '', false, utils::ENUM_SANITIZATION_FILTER_RAW_DATA);
if ($sProposedLoginMode !== $sRawLoginMode) {
IssueLog::Error("Authentication issue due to login_mode parameter sanitization. Please avoid special characters", null, ['sRawLoginMode' => $sRawLoginMode]);
//IssueLog::Error("Authentication issue due to login_mode parameter sanitization. Please avoid special characters", null, ['sRawLoginMode' => utils::HtmlEntities($sRawLoginMode)]);
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}

View File

@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
/**
* Class LoginExternal
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,7 +1,7 @@
<?php
/**
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -2,7 +2,7 @@
/**
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -52,12 +52,13 @@ class LoginTwigContext
/**
* Set the absolute path on disk of the folder containing the twig templates
*
* @param string $sPath absolute path of twig templates directory
* @api
*
*@param string $sAbsPath Absolute path of twig templates directory
*/
public function SetLoaderPath($sPath)
public function SetLoaderPath($sAbsPath)
{
$this->sTwigLoaderPath = $sPath;
$this->sTwigLoaderPath = $sAbsPath;
}
/**
@@ -84,24 +85,27 @@ class LoginTwigContext
}
/**
* Add the URL of a CSS file to link to the login screen
* Add the absolute URL of a CSS file to link to the login screen
*
* @param string $sFile URL of the CSS file to link
* @api
*
* @param string $sFileAbsURL Absolute URL of the CSS file to link
*/
public function AddCSSFile($sFile)
public function AddCSSFile($sFileAbsURL)
{
$this->aCSSFiles[] = $sFile;
$this->aCSSFiles[] = $sFileAbsURL;
}
/**
* Add the URL of a javascript file to link to the login screen
* @param string $sFile URL of the javascript file to link
* Add the absolute URL of a javascript file to link to the login screen
*
* @api
*
* @param string $sFileAbsURL Absolute URL of the javascript file to link
*/
public function AddJsFile($sFile)
public function AddJsFile($sFileAbsURL)
{
$this->aJsFiles[] = $sFile;
$this->aJsFiles[] = $sFileAbsURL;
}
/**
@@ -133,7 +137,7 @@ class LoginTwigContext
}
/**
* @return array
* @return array Absolute URLs of the CSS files
*/
public function GetCSSFiles()
{
@@ -141,7 +145,7 @@ class LoginTwigContext
}
/**
* @return array
* @return array Absolute URLs of the JS files
*/
public function GetJsFiles()
{
@@ -274,12 +278,12 @@ class LoginTwigRenderer
$aCSSFiles = $oFormData->GetCSSFiles();
foreach ($aCSSFiles as $sCSSFile)
{
$oPage->add_linked_stylesheet($sCSSFile);
$oPage->LinkStylesheetFromURI($sCSSFile);
}
$aJsFiles = $oFormData->GetJsFiles();
foreach ($aJsFiles as $sJsFile)
{
$oPage->add_linked_script($sJsFile);
$oPage->LinkScriptFromURI($sJsFile);
}
}

View File

@@ -5,7 +5,7 @@ use Combodo\iTop\Application\Helper\Session;
/**
* Class LoginURL
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -20,7 +20,7 @@
/**
* Class LoginWebPage
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -97,8 +97,8 @@ class LoginWebPage extends NiceWebPage
public function SetStyleSheet()
{
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/login.css');
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/font-awesome/css/all.min.css');
$this->LinkStylesheetFromAppRoot('css/login.css');
$this->LinkStylesheetFromAppRoot('css/font-awesome/css/all.min.css');
}
/**
@@ -971,7 +971,7 @@ class LoginWebPage extends NiceWebPage
}
else if($ret === false)
{
throw new Exception('Nowhere to go??');
throw new Exception('Nowhere to go: Your combination of user Profiles denies you access to any '.ITOP_APPLICATION_SHORT.' portal. Please contact your administrator');
}
else
{

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -1,6 +1,6 @@
<?php
/*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -125,9 +125,7 @@ class ApplicationMenu
*/
public static function CheckMenuIdEnabled($sMenuId)
{
self::LoadAdditionalMenus();
$oMenuNode = self::GetMenuNode(self::GetMenuIndexById($sMenuId));
if (is_null($oMenuNode) || !$oMenuNode->IsEnabled())
if (self::IsMenuIdEnabled($sMenuId) === false)
{
require_once(APPROOT.'/setup/setuppage.class.inc.php');
$oP = new ErrorPage(Dict::S('UI:PageTitle:FatalError'));
@@ -138,6 +136,19 @@ class ApplicationMenu
}
}
/**
* @param $sMenuId
*
* @return bool true if the menu exists and current user is allowed to see the menu
* @since 3.2.0
*/
public static function IsMenuIdEnabled($sMenuId):bool
{
self::LoadAdditionalMenus();
$oMenuNode = self::GetMenuNode(self::GetMenuIndexById($sMenuId));
return is_null($oMenuNode) === false && $oMenuNode->IsEnabled();
}
/**
* Main function to add a menu entry into the application, can be called during the definition
* of the data model objects
@@ -269,9 +280,11 @@ class ApplicationMenu
$oMenuNode = static::GetMenuNode($sMenuGroupIdx);
if (!($oMenuNode instanceof MenuGroup)) {
IssueLog::Error('Menu node was not displayed as a menu group as it is actually not a menu group', LogChannels::CONSOLE, [
IssueLog::Error('Menu node without parent (root menu) must be of type menu group. Parent menu is missing or not visible to user.', LogChannels::CONSOLE, [
'menu_node_class' => get_class($oMenuNode),
'menu_node_id' => $oMenuNode->GetMenuID(),
'menu_node_label' => $oMenuNode->GetLabel(),
'current_user_id' => UserRights::GetUserId(),
]);
continue;
}

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/NiceWebPage.php, now loadable using autoloader');

View File

@@ -2,7 +2,7 @@
/**
* @deprecated 3.0.0 will be removed in 3.1.0 - moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader
* @license http://opensource.org/licenses/AGPL-3.0
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
*/
DeprecatedCallsLog::NotifyDeprecatedFile('moved to sources/Application/WebPage/PDFPage.php, now loadable using autoloader');

View File

@@ -9,11 +9,17 @@ class PortalDispatcher
$this->sPortalid = $sPortalId;
$this->aData = PortalDispatcherData::GetData($sPortalId);
}
public function IsUserAllowed()
/**
* @param \User|null $oUser
*
* @return bool
* @since 3.2.0 N°2039 Add $oUser parameter
*/
public function IsUserAllowed(?User $oUser = null)
{
$bRet = true;
$aProfiles = UserRights::ListProfiles();
$aProfiles = UserRights::ListProfiles($oUser);
foreach($this->aData['deny'] as $sDeniedProfile)
{

View File

@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2010-2023 Combodo SARL
* Copyright (C) 2010-2024 Combodo SAS
*
* This file is part of iTop.
*

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -23,7 +23,7 @@ use Combodo\iTop\Application\WebPage\WebPage;
* Persistent class Shortcut and derived
* Shortcuts of any kind
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -293,7 +293,7 @@ $("#attr_auto_reload_sec").attr('data-tooltip-content', '$sRateTitle');
CombodoTooltip.InitTooltipFromMarkup($("#attr_auto_reload_sec"));
$("#attr_auto_reload_sec").prop('disabled', !$('#attr_auto_reload').is(':checked'));
$('#attr_auto_reload').change( function(ev) {
$('#attr_auto_reload').on('change', function(ev) {
$("#attr_auto_reload_sec").prop('disabled', !$(this).is(':checked'));
} );

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2023 Combodo SARL
// Copyright (C) 2010-2024 Combodo SAS
//
// This file is part of iTop.
//
@@ -27,7 +27,7 @@ require_once(APPROOT.'setup/setuputils.class.inc.php');
/**
* File to include to initialize the datamodel in memory
*
* @copyright Copyright (C) 2010-2023 Combodo SARL
* @copyright Copyright (C) 2010-2024 Combodo SAS
* @license http://opensource.org/licenses/AGPL-3.0
*/

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*
@@ -232,12 +232,13 @@ class DisplayTemplate
static public function UnitTest()
{
require_once(APPROOT.'/application/startup.inc.php');
$sAppRootUrl = utils::GetAbsoluteUrlAppRoot();
$sTemplate = '<div class="page_header">
<div class="actions_details"><a href="#"><span>Actions</span></a></div>
<h1>$class$: <span class="hilite">$name$</span></h1>
</div>
<img src="../../images/connect_to_network.png" style="margin-top:-10px; margin-right:10px; float:right">
<img src="'.$sAppRootUrl.'images/connect_to_network.png" style="margin-top:-10px; margin-right:10px; float:right">
<itoptabs>
<itoptab name="Interfaces">
<itopblock blockclass="DisplayBlock" type="list" encoding="text/oql">SELECT Interface AS i WHERE i.device_id = $id$</itopblock>
@@ -350,7 +351,8 @@ class ObjectDetailsTemplate extends DisplayTemplate
if ($iFlags & OPT_ATT_SLAVE)
{
$iSynchroFlags = $this->m_oObj->GetSynchroReplicaFlags($sAttCode, $aReasons);
$sSynchroIcon = "&nbsp;<img id=\"synchro_$iInputId\" src=\"../images/transp-lock.png\" style=\"vertical-align:middle\"/>";
$sAppRooturl = utils::GetAbsoluteUrlAppRoot();
$sSynchroIcon = "&nbsp;<img id=\"synchro_$iInputId\" src=\"{$sAppRooturl}images/transp-lock.png\" style=\"vertical-align:middle\"/>";
$sTip = '';
foreach($aReasons as $aRow)
{

View File

@@ -1,29 +0,0 @@
<div style="width:100%;background: #fff url(../images/welcome.jpg) top left no-repeat;">
<style>
.welcome_popup_cell {
vertical-align:top;
width:50%;
border:0px solid #000;
-moz-border-radius:10px;
padding:5px;
text-align:left;
}
tr td.welcome_popup_cell, tr td.welcome_popup_cell ul {
font-size:10pt;
}
</style>
<p></p>
<p></p>
<p style="text-align:left; font-size:32px;padding-left:400px;padding-top:40px;margin-bottom:30px;margin-top:0;color:#FFFFFF;"><itopstring>UI:WelcomeMenu:Title</itopstring></p>
<p></p>
<table border="0" style="padding:10px;border-spacing: 10px;width:100%">
<tr>
<td class="welcome_popup_cell">
<itopstring>UI:WelcomeMenu:LeftBlock</itopstring>
</td>
<td class="welcome_popup_cell">
<itopstring>UI:WelcomeMenu:RightBlock</itopstring>
</td>
</tr>
</table>
</div>

View File

@@ -1,6 +1,6 @@
<?php
/**
* Copyright (C) 2013-2023 Combodo SARL
* Copyright (C) 2013-2024 Combodo SAS
*
* This file is part of iTop.
*

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