Compare commits

...

2407 Commits
2.5.1 ... 2.7.5

Author SHA1 Message Date
Pierre Goiffon
d90b1a3d82 🐛 N°4020 Fix syntax error for PHP < 7.1
`syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /var/www/itop274/setup/compiler.class.inc.php on line 61`
Was added in 1059befa
2021-07-02 09:26:03 +02:00
Pierre Goiffon
3694108f42 N°3870 updateLicenses : fix generating wrong product names on Windows
Was including paths fragments.

Example :
<product scope="datamodels">C:\Dev\wamp64\www\itop-dev\.make\license/../..//datamodels/2.x/authent-cas/vendor/apereo/phpcas</product>

Instead of :
<product scope="datamodels">apereo/phpcas</product>
2021-07-01 17:20:55 +02:00
Pierre Goiffon
8cf75f826f 🔨 updateLicenses : add logs and replace rm -f by unlink() 2021-07-01 15:30:33 +02:00
Pierre Goiffon
ad9726b64c 🔧 .editorConfig : restore old ij_visual_guides value
Was overwritten by mistake in 19505649
2021-06-30 10:24:19 +02:00
Pierre Goiffon
e32e275f40 🎨 Align dataprovider elements 2021-06-29 16:45:34 +02:00
Pierre Goiffon
195056492e 🔧 .editorConfig : enable var alignement 2021-06-29 16:45:18 +02:00
Pierre Goiffon
af338de17f 🔨 Changelog generation script 2021-06-29 11:05:59 +02:00
Pierre Goiffon
a6aa183e26 🔖 Prepare 2.7.5 2021-06-28 15:03:17 +02:00
Pierre Goiffon
b5074c4cee N°3806 Fix saying memory_limit isn't enough in CLI scripts and setup
This was caused by the strict comparison in \utils::IsMemoryLimitOk for the special "-1" value of memory_limit, which was added in c2f5cafa.
Fix was to change \utils::ConvertToBytes : it was returning original value when input was numeric (so if input is '-1' output was '-1')  now it always returns an int (input '-1' output -1)
2021-06-28 14:53:39 +02:00
acognet
8b9589744b N°4020 - timeout on updating the hierarchical key during setup - php 5.6 compatibility 2021-06-28 13:56:49 +02:00
Pierre Goiffon
8259a79cd2 🎨 Factorize LogAPI channels value in LogChannels class 2021-06-25 17:13:35 +02:00
acognet
a23ea9a01f N°3678 - Portal : a modification of field cannot hide another one 2021-06-24 14:11:41 +02:00
Eric
949b213f9d N°3513 - revert crud sequence 2021-06-24 13:32:43 +02:00
acognet
a940adc4ba N°3678 - Portal : a modification of field cannot hide another one 2021-06-24 10:35:01 +02:00
Pierre Goiffon
5d994edd62 N°4012 Fix debug trace syntax
Thanks @Molkobain !
2021-06-23 17:26:34 +02:00
Eric
b1ca1f2630 N°3513 - ObjectFormManager : remove transaction
* Add automatic tests
* Fix object consistency
2021-06-22 16:09:41 +02:00
acognet
58e315d7f6 N°4020 - timeout on updating the hierarchical key during setup - fix git ignore 2021-06-21 17:16:08 +02:00
acognet
1059befa39 N°4020 - timeout on updating the hierarchical key during setup 2021-06-21 16:39:58 +02:00
Eric
0f5130611d Fix log API tests 2021-06-21 16:07:36 +02:00
Eric
a1271da74a N°3513 - ObjectFormManager : remove transaction 2021-06-21 15:03:17 +02:00
Denis
0d40235791 🗃️ N°3968 Fix mutex being silently released after connection timeout (#209)
Mutex are using their own DB connection
Because the `wait_timeout` isn't specified when opening the connection, it could be closed before we released the lock : if so the lock is silently released !
We are now setting this variable directly when opening the connection to avoid such case (setting 86400s, so 1 day : this should be enough !)
2021-06-21 12:33:15 +02:00
Pierre Goiffon
dd63f2b817 N°4012 Debug trace for objects lists in portal : ManageBrick and BrowseBrick
'portal' channel, debug level
2021-06-18 10:58:04 +02:00
Pierre Goiffon
8f84c3b84b 🎨 LogAPI code formatting 2021-06-18 10:58:04 +02:00
Pierre Goiffon
00c58bb245 💡 updateLicenses.php : copy phpdoc from develop branch 2021-06-17 17:11:30 +02:00
Eric
3a876d5c75 Log complete error on Memory Limit or max execution time 2021-06-11 09:36:01 +02:00
Pierre Goiffon
147916062b 🎨 Fix local variable names
Was copy/paste and wasn't consistent with the functionnality :/
2021-06-10 16:28:17 +02:00
Pierre Goiffon
0de6f98add 🔊 When ordering objects search list, log problems due to low max_input_vars php.ini option (#211)
iTop is sending large volume of data to the server, and those data can be truncated due to this php.ini option.
Now we are checking for common issues : if the data is truncated a log is done (IssueLog, warning level, no channel) and the corresponding column is set as not selected.
User will still see an inconsistent result, but we won't have PHP notices generated anymore, and a log can tell what caused the issue.
2021-06-08 18:43:43 +02:00
Pierre Goiffon
a076792e77 ⬆️ N°3973 Update update pear/archive_tar 2021-06-08 18:16:12 +02:00
acognet
2d2a6857de N°3797 - [MariaDB] crash while converting utf8mb4 + add index 2021-06-04 09:10:28 +02:00
Pierre Goiffon
373641e01d 🎨 Code formatting 2021-06-03 17:31:34 +02:00
Eric
d11eceac62 N°4052 - OQL parser limit for huge request - fix CI 2021-06-03 17:07:17 +02:00
Eric
3965806fa0 N°4052 - OQL parser limit for huge request - add better feedback 2021-06-03 16:49:21 +02:00
Pierre Goiffon
2625d2da80 💡 PHPDoc 2021-06-03 15:29:13 +02:00
Eric
02d32a556d N°4052 - OQL parser limit for huge request 2021-06-02 15:15:00 +02:00
Eric
71fcc6f026 N°4031 - OQL Error when AttributeObjectKey is used in JOIN condition 2021-06-02 14:45:03 +02:00
Purple Grape
7168860a0b 🌐 Improved chinese for 2.7 (#218) 2021-06-02 08:06:16 +02:00
acognet
684c88e0b8 N°4038 - Pop up erreur portail utilisateur 2021-05-31 23:43:58 +02:00
Eric
84741c19f0 N°4002 - code hardening (merge from support/2.6) 2021-05-27 16:36:00 +02:00
Eric
86f649affc N°4002 - code hardening 2021-05-27 16:13:27 +02:00
Eric
4f5c987d8b N°4002 - code hardening 2021-05-27 15:57:04 +02:00
Eric
e7b5953feb documentation 2021-05-27 11:52:38 +02:00
Eric
e441e5e78a documentation 2021-05-27 11:49:32 +02:00
Eric
6be9a87c15 N°3952 - code hardening (merged from support/2.6) 2021-05-27 09:55:16 +02:00
Eric
43daa2ef08 N°3952 - code hardening 2021-05-27 09:29:50 +02:00
Pierre Goiffon
caa2a05bf4 🔧 restore .editorconfig
Was moved to /test by mistake
And also editorconfig syntax was removed :(
Those mistakes were done in 7f15eed9
Thanks Molkobain, good catch !
2021-05-26 15:19:40 +02:00
Pierre Goiffon
fc39d8aca9 💡 PHPDoc type hinting 2021-05-26 14:24:29 +02:00
Eric
cf12578289 N°3452 - DB tools : better formatting 2021-05-26 12:14:14 +02:00
Pierre Goiffon
44952d1ea0 Fix \UtilsTest::testIsMemoryLimit 2021-05-25 17:04:32 +02:00
Pierre Goiffon
7f15eed9a8 🔧 Update .editorconfig
* Preserve XML line breaks
* Add markdown
* Add editorconfig
2021-05-25 15:50:23 +02:00
BGdu38
c2f5cafaf3 Avoid setting memory_limit to lower value than the one already configured (#215)
Some scripts are setting the memory_limit PHP option : setup, csvimport and XLSX export. This was done to avoid crashing when dealing with such large amount of data.
But sometimes we were setting the value without any prior check, so we could actually lower the memory_limit value :/

Now this memory_limit change is done using \utils::SetMinMemoryLimit, which will call ini_set if and only if the current value is lower than the one to be set.

Setup calls (setup/ajax.dataloader.php and webservices/backoffice.dataloader.php) were left as is as they weren't subject to this bug, and also they are more complex (logging done on each case).
2021-05-25 12:03:19 +02:00
Pierre Goiffon
81822efa0f 💡 PHPDoc for \DBObject::ApplyStimulus 2021-05-25 10:52:12 +02:00
Pierre Goiffon
923a025f1c 🌐 N°4017 Report pt_br translations for TTO/TTR made in combodo-dispatch-incident
Those dict keys were wrongly duplicated in this module, but they are core iTop !
Original commit 75f00d993c
Thanks to @rokam !
2021-05-20 15:51:21 +02:00
Pierre Goiffon
a4b6f4e37c 👥 Add @rokam to contributors list
Thanks to him for his PT-BR translations !
2021-05-20 15:44:24 +02:00
Pierre Goiffon
f0c73451a2 🌐 N°4017 Report pt_br translations for TTO/TTR made in combodo-dispatch-userrequest
Those dict keys were wrongly duplicated in this module, but they are core iTop !
Original commit 9725897623
Thanks to @rokam !
2021-05-20 15:30:00 +02:00
acognet
db6e813cba N°3945 - Password database is visible in the setup process 2021-05-18 17:34:57 +02:00
Pierre Goiffon
d74e3e6b42 💡 ItopTestCase : some PHPDoc 2021-05-18 17:16:04 +02:00
acognet
b740cb2afd N°2540 - prevent the mysql password to appear on misconfigured servers 2021-05-12 08:17:35 +02:00
Molkobain
6ad3c40c42 Merge branch 'support/2.7.4' into support/2.7 2021-05-11 12:14:36 +02:00
Molkobain
f49c8ce188 Merge branch 'support/2.7.3' into support/2.7.4 2021-05-11 12:13:29 +02:00
Molkobain
acf828b72e N°3995 - Portal: Fix loader not displaying in BrowseBrick for tree/mosaic modes with huge amount of data 2021-05-11 12:10:31 +02:00
Pierre Goiffon
bac92716f3 📄 Update Font Awesome license
Was duplicated...
And also not the correct license !
Source for new license text : https://github.com/FortAwesome/Font-Awesome/blob/master/LICENSE.txt

(modification already committed to develop : f8f9c2d7)
2021-05-04 08:58:34 +02:00
bruno-ds
07257cc2d2 N°3671 - fix a code comment too evasive
thanks @Hipska
2021-04-21 09:25:10 +02:00
Pierre Goiffon
87ba67225a 💡 Add since phpdoc tags for \DeadLockLog::Log 2021-04-16 08:36:21 +02:00
Pierre Goiffon
2ad3b3c27e 🎨 Fix \DeadLockLog::Log parameter name + PHPDoc
Thanks @Hipska !
2021-04-15 15:03:13 +02:00
Molkobain
92a640e41a Merge branch 'support/2.7.4' into support/2.7 2021-04-15 10:37:17 +02:00
Molkobain
842df7646b Merge branch 'support/2.7.3' into support/2.7.4 2021-04-15 10:35:56 +02:00
Molkobain
01b38d2ed6 N°3869 - Portal: Fix the Notice "Undefined index: max_display_limit" 2021-04-15 10:34:46 +02:00
Molkobain
9af4846372 N°3810 - Avoid syntax highlighting that shouldn't take place 2021-03-23 16:39:22 +01:00
bruno-ds
91fc2d2e2b N°3671 - reformat tests 2021-03-17 08:46:41 +01:00
Pierre Goiffon
2432ff77a3 💡 More details in PHPDoc for \utils::RealPath 2021-03-17 08:34:25 +01:00
odain
d229e08f02 prepare iTop release 2.7.4 2021-03-16 09:00:06 +01:00
odain
b5adb2e82b N°3671: fix and make test more lisible 2021-03-15 19:01:09 +01:00
odain
386c90c601 N°3668 - URL direct error: renamed trust_proxies<-behind_reverse_proxy 2021-03-15 14:56:16 +01:00
odain
5d0c61178b N°3671 : persist absolute URL when setup context (force trustproxy enabled) 2021-03-15 14:34:56 +01:00
odain
3bcae734e5 N°3671 : persist absolute URL when setup context (force trustproxy enabled) 2021-03-15 12:27:05 +01:00
odain
842e8f9e01 php doc 2021-03-10 15:32:44 +01:00
odain
52cd4f7c5e N°3788 - timeout/excessive duration during MTP - fix PostDbCreation 2021-03-09 11:44:25 +01:00
odain
995619af9b N°3788 - timeout/excessive duration during MTP - increase timeout from 5 to 30s 2021-03-09 08:27:33 +01:00
odain
c842162fe2 N°3788 - timeout/excessive duration during MTP 2021-03-09 08:13:57 +01:00
odain
83f99642e0 N°3793 - Cleanup of orphan CMDBChange can hang the setup 2021-03-08 11:38:20 +01:00
bruno-ds
ae6a264d6d N°3671 - fix typo in HTTP header name 2021-03-05 16:57:03 +01:00
bruno-ds
a06bf6ea7c coding convention (thanks @molkobain) 2021-03-05 09:20:04 +01:00
bruno-ds
bb8d4a92cb fix an indentation problem (thanks @Hipska) 2021-03-04 09:56:05 +01:00
bruno-ds
1429792690 N°3668 - fix an improper redirection to the homepage when iTop is behind a reverse proxy 2021-03-04 09:39:48 +01:00
bruno-ds
1f26b59d90 N°3671 - add an API endpoint (it will be used by N°3668 and N°3760) + some code cleanup asked by @molkobain 2021-03-04 09:32:13 +01:00
bruno-ds
7b093a6bba N°3671 - app_root_url: handle reverse proxies during the setup and preserve existing configuration during an upgrade. 2021-03-03 11:55:18 +01:00
odain
d4607ee815 N°3065 - Failed enum comparison when values contains parenthesis : add a warning 2021-03-02 07:33:36 +01:00
odain
5c0e92d51a N°3065 - Failed enum comparison when values contains parenthesis 2021-03-01 17:06:49 +01:00
bruno-ds
cd4b3fdaab N°3764 - fix CI 2021-03-01 16:27:40 +01:00
bruno-ds
0030d5c2b8 N°3764 - add transactions_gc_threshold in order to tune CSRF token GC load 2021-03-01 15:30:40 +01:00
bruno-ds
95a0efedcf N°3728 - security hardening 2021-03-01 15:28:34 +01:00
bruno-ds
13a1d32f56 N°3453 - portal export header fields are now localized 2021-02-26 11:47:34 +01:00
Pierre Goiffon
35155e4b7a 💡 N°3065 comments modifications 2021-02-26 10:06:29 +01:00
Eric
77710f1613 Revert "#1946 Fix Twig templates logging too much"
This reverts commit 2763b991
2021-02-25 17:57:39 +01:00
Eric
2763b99142 #1946 Fix Twig templates logging too much 2021-02-25 14:44:16 +01:00
bruno-ds
db13c105ad N°3473 - PHPdoc
as requested by @piRGoif
2021-02-24 17:38:54 +01:00
bruno-ds
2276539f24 N°3430 - code cleanup 2021-02-24 16:50:14 +01:00
bruno-ds
9b7cd20d47 N°3473 - security hardening 2021-02-24 16:50:13 +01:00
bruno-ds
e1d644c33b Merge remote-tracking branch 'origin/support/2.7' into support/2.7 2021-02-24 12:06:40 +01:00
bruno-ds
c601082a5e 3548 - disable core update if a file integrity problem is detected 2021-02-24 12:05:11 +01:00
Molkobain
5836be7131 Fix unit test 2021-02-24 09:49:16 +01:00
Molkobain
6f40bb4c35 Change check level to "warning" in order to keep consistency with the others 2021-02-24 09:29:42 +01:00
bruno-ds
241bd1cdeb N°3430 - code cleanup
- during the code review @dflaven preferred the reference rather than the return alternative
 - typo
2021-02-22 09:43:42 +01:00
Molkobain
71c5f47cd8 PHPDoc 2021-02-19 09:37:53 +01:00
odain
74246a8278 N°3065 - Failed enum comparison when values contains parenthesis - enhance db model parsing used during setup comparison with expected one to generate SQL migration queries 2021-02-18 18:24:09 +01:00
bruno-ds
c450c9426c Merge remote-tracking branch 'origin/support/2.7' into support/2.7 2021-02-18 16:29:44 +01:00
odain
46f9fe743c fix ci: adapt test to make sure config date_and_time is set properly before 2021-02-18 16:27:38 +01:00
odain
c31df5fff3 fix ci: adapt test to make sure config date_and_time is set properly before 2021-02-18 16:07:37 +01:00
Pierre Goiffon
6e0af1a3b7 💡 Add variable typing 2021-02-18 13:21:06 +01:00
bruno-ds
e9e18513be N°3430 - fix preference page's warning and add missing token generation
- fix the warning (ajax call interrupted) if preference form ajax call is way faster than the one of the 2 other by adding a new timeout_duration option before the redirect.
2021-02-18 12:18:38 +01:00
Molkobain
9d2fc883b8 Fix test name 2021-02-17 10:31:59 +01:00
odain
913ea0cef2 N°3412 - Command Injection vulnerability in the Setup Wizard - renaming 2021-02-17 10:22:21 +01:00
odain
82ba7f25b0 N°3412 - Command Injection vulnerability in the Setup Wizard - do not use escapeshellcmd before execution in Windows envt 2021-02-17 10:18:28 +01:00
odain
bb877a244b N°3412 - Command Injection vulnerability in the Setup Wizard - do not use escapeshellcmd before execution in Windows envt 2021-02-17 10:09:39 +01:00
odain
a12959d60e N°3412 - Command Injection vulnerability in the Setup Wizard - handle empty path 2021-02-17 07:50:18 +01:00
bruno-ds
83434b5506 N°3430 - add translations 2021-02-16 17:42:11 +01:00
bruno-ds
dcd4abe72b N°3430 - security hardening 2021-02-16 17:33:49 +01:00
odain
571520815a N°3412 - Command Injection vulnerability in the Setup Wizard - include test to CI 2021-02-16 17:25:45 +01:00
odain
e9cff0920b N°3412 - Command Injection vulnerability in the Setup Wizard - fix test and code 2021-02-16 17:12:41 +01:00
odain
905ee19519 N°3412 - Command Injection vulnerability in the Setup Wizard 2021-02-16 15:57:12 +01:00
bruno-ds
0b95220d1b N°3466 - Add (missing) translations 2021-02-16 09:46:04 +01:00
bruno-ds
e1b2a767f5 N°3142 - fix typos 2021-02-15 17:49:25 +01:00
bruno-ds
3058b2eb00 N°3142 - Add (missing) translations 2021-02-15 17:08:47 +01:00
Molkobain
38bc2d9d58 🔧 Change max line length in .editorConfig 2021-02-15 13:49:39 +01:00
Eric
c8e8778d7b N°3468 - Fix extension.xml preventing extensions installation
(cherry picked from commit 92c8af1b19)
2021-02-11 17:48:29 +01:00
bruno-ds
656fa3208a N°3721 - revert the feature (will only be available on the 3.0) 2021-02-10 15:33:01 +01:00
bruno-ds
f647ce61c2 N°3721 - toolkit's "update iTop" with the "Create symbolic links" option checked now empty the compiled directory as expected 2021-02-10 14:34:21 +01:00
Eric
6b76e5a853 N°3618 - Count on union with different conditions fails (php doc) 2021-02-08 09:39:24 +01:00
Eric
dbb6e43751 N°3618 - Count on union with different conditions fails (Fix unit tests) 2021-02-05 11:28:40 +01:00
Eric
f07f0ba1c7 N°3618 - Count on union with different conditions fails (Fix multi-column attributes sql generation) 2021-02-05 10:15:14 +01:00
Pierre Goiffon
a5894c1a4c Rename \Combodo\iTop\Test\UnitTest\ItopTestCase::InvokeInvisible* to InvokeNonPublic* 2021-02-04 09:41:56 +01:00
Eric
e06996a2e4 N°3660 - Fix JOIN without condition on child joined table is ignored (check done in optimizer) 2021-02-03 15:58:54 +01:00
Eric
2f0e7c6d29 N°3586 - Fix login window not correctly displayed 2021-02-03 09:15:56 +01:00
Eric
7115a6ae7d N°3660 - Fix JOIN without condition on child joined table is ignored (remove unnecessary check) 2021-02-03 09:07:59 +01:00
Pierre Goiffon
765560d1f5 ItopTestCase : helpers to call invisble methods 2021-02-02 17:57:40 +01:00
Eric
bc024d9ed0 N°3660 - Fix JOIN without condition on child joined table is ignored 2021-02-02 17:30:03 +01:00
jbostoen
37a4a3eb47 🌐 Fix typo in Dutch translations (#189)
Co-authored-by: jbostoen <->
2021-02-01 16:21:10 +01:00
Pierre Goiffon
54e9bd5c8e Merge branch 'support/2.6' into support/2.7
# Conflicts:
#	.editorconfig
2021-01-25 09:13:43 +01:00
Pierre Goiffon
066a6d8b36 🔧 Use same .editorconfig in all supported branches 2021-01-25 09:12:38 +01:00
jbostoen
4123c6213d 🌐 NL : distinguish between approval (goedkeuring) <=> acceptance (acceptatie) (#182)
Co-authored-by: jbostoen <->
2020-12-21 14:08:29 +01:00
Pierre Goiffon
8265b9b034 N°3416 fix PHPDoc 2020-12-10 18:10:45 +01:00
Pierre Goiffon
c4756e8cec Upgrade version n° 2020-12-08 18:47:24 +01:00
odain
37351d6b3e N°3464: fix ci 2020-12-07 16:23:17 +01:00
odain
57a085eec1 N°3464: move fix in itop-fence + fix/enhance rest api test 2020-12-07 15:56:35 +01:00
odain
0019595923 N°3464: fix ci 2020-12-07 00:44:39 +01:00
odain
4d61c14f80 N°3464 add test in phpunit.xml.dit to validate the fix 2020-12-07 00:12:31 +01:00
odain
cf1b613923 N°3464 REST comment field not working anymore 2020-12-06 23:54:27 +01:00
Pierre Goiffon
1304e2eb2d N°3416 Updates after code review v2 :) 2020-12-04 08:51:07 +01:00
Pierre Goiffon
3cf16627c1 Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	pages/ajax.render.php
2020-12-03 18:18:36 +01:00
Pierre Goiffon
4aaa237bf9 🔖 Prepare 2.7.3 version 2020-12-03 18:15:58 +01:00
Pierre Goiffon
cece15d10c N°3416 Updates after code review
Many thanks @bruno-ds !
* add comments to explain intentions
* fix indentations
2020-12-03 17:45:44 +01:00
Pierre Goiffon
aa15e009cb 🔖 Prepare 2.7.2-2 version 2020-12-03 10:05:37 +01:00
Pierre Goiffon
b9ca2ac13d N°3416 Fix DocumentFile preview not working anymore
Was caused by X-Frame-Options http header added with N°3317

(cherry picked from commit 35d77ff642)

# Conflicts:
#	pages/ajax.render.php
2020-12-03 08:20:51 +01:00
Pierre Goiffon
80e1e0e61a N°3426 Fix no navigation menu on User object creation
Caused by a typo in js/forms-json-utils.js
Thanks @Molkobain !
2020-12-02 18:02:00 +01:00
Pierre Goiffon
ecebe4ecd5 N°3416 XFrame and cache headers optimizations
* Remove XFrame header set in \WebPage::no_cache : not this method responsability, was confusing :/
* Remove no_cache() calls when already set in page constructor (ajax_page mainly)
* Also calls everywhere the \WebPage::no_cache method instead of setting headers manually
2020-12-02 17:19:05 +01:00
Pierre Goiffon
8bfcb14d0c N°3416 XFrame-Options header is now set using a config parameter, defaults to SAMEORIGIN
Also adds an indirection (\WebPage::add_xframe_options) to set header
2020-12-02 17:17:11 +01:00
Molkobain
1cf1473d6b N°3469 - Fix variable declaration (let => var) 🤭 2020-12-02 17:01:00 +01:00
Molkobain
aa43425df3 N°3469 - Portal: Fix modal created without an ID 2020-12-02 16:59:39 +01:00
Pierre Goiffon
35d77ff642 N°3416 Fix DocumentFile preview not working anymore
Was caused by X-Frame-Options http header added with N°3317
2020-12-02 15:44:58 +01:00
acognet
539fa43503 N°3461 - Setup Broken with Chrome v87 2020-11-30 18:27:25 +01:00
acognet
eb537f45f4 N°3421 - Attributes of class Person are not accessible from :current_contact in portal anymore. Only attributes of class Contact are. 2020-11-30 09:24:35 +01:00
acognet
a2a4cd4e7a N°3426 - Wrong tab is displayed when a creation or modification form is invalidated 2020-11-27 15:20:20 +01:00
Pierre Goiffon
35215cf62f 🌐 Fix typo in comma (2 "m" !!) 2020-11-26 18:34:07 +01:00
Pierre Goiffon
66273ebd39 Merge remote-tracking branch 'origin/support/2.7.2' into support/2.7 2020-10-30 18:08:01 +01:00
Eric
eebc29d2bb N°3111 - Fix Portal export
(cherry picked from commit d3b57c3bda)
2020-10-30 14:16:57 +01:00
Pierre Goiffon
512b415bd6 N°3065 add test case in comment 2020-10-30 11:30:22 +01:00
Pierre Goiffon
906c8855b0 🔊 When error during CoreUpdate, show full file path instead of only basename 2020-10-28 18:32:49 +01:00
Pierre Goiffon
97d322a059 📝 N°3218 Add some PHPDoc on current change set/get 2020-10-27 15:17:17 +01:00
acognet
ada7f30793 N°3139 - import csv : hyperlink not clickable - replace htmlentities with utils::HtmlEntities() to ensure that the same options are used application wide. 2020-10-27 09:59:05 +01:00
Pierre Goiffon
b065d13374 Integration tests : add itop-community group 2020-10-27 09:46:03 +01:00
Pierre Goiffon
1f092f8418 🎨 Integration test code formatting 2020-10-27 09:45:26 +01:00
Pierre Goiffon
65d6947e52 🔖 Prepare 2.7.2 version 2020-10-22 15:06:48 +02:00
Pierre Goiffon
ba54b47f7d Merge remote-tracking branch 'origin/support/2.6' into support/2.7 2020-10-22 10:27:36 +02:00
Pierre Goiffon
65e43e8d04 🔧 remove .gitflow as we don't have any master branch anymore 2020-10-22 10:10:15 +02:00
Pierre Goiffon
adb4e77c8d 🎨 MetaModel : function modifiers order + little formatting 2020-10-19 15:36:56 +02:00
Pierre Goiffon
d3cf7176da 📝 MetaModel : add comment on @deprecated added in 9c75cb4537 2020-10-19 15:34:15 +02:00
Pierre Goiffon
1cfb52d220 🐛 Fix CoreException constructor generating a warning on PHP >= 7.2
In the CoreException constructor, we're using the $aContextData parameter to do a count(), a foreach(), and uses values as string.
Only a null check was done.
Now we are also checking that the value is_array().
As others checks (Countable, Iterable, __toString() impl) are quite difficult depending on the PHP version we're running, we didn't add any other checks.

The call in \MatchExpression::__construct (added in 05a0d612) was passing directly an Expression object. We could embed it in an array, but the object hierarchy isn't implementing __toString so we would have another bug.
In consequence we removed this parameter.
2020-10-19 11:57:53 +02:00
Pierre Goiffon
18d5231900 N°3332 Security hardening 2020-10-19 09:25:30 +02:00
Pierre Goiffon
e6539ccb6e 🔧 Update .editorconfig : braces on next line for classes and functions 2020-10-19 09:09:31 +02:00
acognet
96332b7885 N°3139 - import csv : hyperlink not clickable 2020-10-16 14:15:51 +02:00
acognet
557b9be795 N°3377 - Allow to get data of current user - Fix Exception when using :current_user->... for non admin users 2020-10-15 17:31:25 +02:00
Pierre Goiffon
75ebecddd5 Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	datamodels/2.x/itop-portal-base/portal/src/controllers/userprofilebrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/helpers/applicationhelper.class.inc.php
2020-10-14 09:19:07 +02:00
Pierre Goiffon
5fee2438ab Fix comments : iTop 2.8.0 renamed to 3.0.0 2020-10-14 09:06:07 +02:00
Pierre Goiffon
2d130cbba8 Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	test/core/UserRightsTest.php
#	test/setup_params/default-params.xml
2020-10-12 12:47:58 +02:00
Pierre Goiffon
8b1c20cc11 N°3332 Security hardening 2020-10-12 12:40:51 +02:00
odain
df5aacca42 💚 use new ci validation 2020-10-09 10:08:31 +02:00
Pierre Goiffon
06acac97ba Fix tests
* update datamodel XML version
* Remove \Combodo\iTop\Test\UnitTest\Core\OQLTest::testTypeErrorQueryParser
2020-10-07 16:21:36 +02:00
acognet
2d6d1132c7 N°3262 - Avoid PHP notices on DBObject core code 2020-10-07 13:26:38 +02:00
acognet
ed0e16494d N°3335 - Fix test 2020-10-05 16:23:56 +02:00
Pierre Goiffon
a765eb8725 Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	application/ajaxwebpage.class.inc.php
#	application/csvpage.class.inc.php
2020-10-05 16:12:49 +02:00
Eric
1f53757318 N°3248 - code hardening
(cherry picked from commit 6a25933744)
(cherry picked from commit f74c78d61c)
2020-10-05 14:54:17 +02:00
Pierre Goiffon
090119147c 🎨 PHP formatting 2020-10-05 14:42:03 +02:00
Pierre Goiffon
1551694198 N°3317 Security hardening 2020-10-05 14:42:03 +02:00
BenGrenoble
5d7ae38adf Merge remote-tracking branch 'origin/support/2.7' into support/2.7 2020-10-02 10:51:59 +02:00
BenGrenoble
2e08ae571a 3354 change sie by Sie 2020-10-02 10:51:25 +02:00
Pierre Goiffon
37522459a8 N°3351 restore LogKPI calls in portal index 2020-10-01 18:02:31 +02:00
Pierre Goiffon
db8c26da17 📝 update PHPDoc for \Expression::IsTrue 2020-10-01 17:02:22 +02:00
BenGrenoble
93c91c4077 3354 remove now from "Bitte bestätigen sie, dass jetzt ein Backup erstellen wollen now." 2020-10-01 15:11:07 +02:00
Pierre Goiffon
e4b3871947 📝 PHPDoc for \Expression::IsTrue 2020-10-01 14:51:28 +02:00
Pierre Goiffon
b2474d3368 N°3324 Portal fix ignore_silo when using nested query in scopes
The AllowAllData attribute wasn't updated in the nested queries.
It is now set both when calling DBObjectSearch::AllowAllData and when creating a new nested query (\DBObjectSearch::AddConditionExpression)
2020-10-01 12:15:34 +02:00
Pierre Goiffon
6cd0670d6b 🎨 Fix parameter for all DBSearch::AllowAllData impl 2020-10-01 10:09:34 +02:00
Pierre Goiffon
e9f81bd978 🔧 Update .Editorconfig for braces always at eol 2020-10-01 10:09:34 +02:00
Eric
0cc5dc0471 N°3317 - Add http headers 2020-09-30 10:18:44 +02:00
odain
20ce42b24b Reintegrate validation tests to ease iTop release management from develop
- N°3053 - Check XML conversion methods
     - N°3059 - Automatically set the documentation URLs
     - N°3052 - Check community modules XML version against latest version
     - N°3054 - Check community modules version against major version
     - N°3062 - setup.css file integrity test
     - N°3060 - Check consistency between the list of modules and installation.xml
     - N°3061 - Automatically check the installation.xml consistency
     - N°3268 Add test to check dictionary files: make sure that the Dict::Add declarations match the file name
2020-09-29 14:43:51 +02:00
Eric
d86e904e18 N°3317 - Add http headers 2020-09-29 14:11:11 +02:00
Eric
bef1832ac7 N°3317 - Add http headers 2020-09-29 14:07:24 +02:00
Eric
5a46bb8461 N°3320: Do not display empty tabs 2020-09-29 11:23:49 +02:00
acognet
05a0d61244 N°3335 - Notifications on threshold don't work when trigger is created on iTop 2.7.1 - nicer fix 2020-09-29 10:27:05 +02:00
acognet
80b3212a19 N°3335 - Notifications on threshold don't work when trigger is created on iTop 2.7.1 2020-09-29 09:12:47 +02:00
Molkobain
794d4f1e0e N°3310 - Fix corrupted backups when a file has a size which is a multiple of 512 bytes 2020-09-28 14:31:36 +02:00
Molkobain
389b61d3a8 Fix missing author information in composer.json for TCPDF lib. 2020-09-28 14:29:51 +02:00
Molkobain
0948e80060 N°3320 - Fix empty tabs being displayed (misuse of the API or user rights) 2020-09-28 14:10:19 +02:00
odain
9520d2794f 💚 fix ci Serialization of 'ReflectionClass' is not allowed 2020-09-25 10:29:48 +02:00
Pierre Goiffon
e2c67dfcc4 Merge remote-tracking branch 'origin/support/2.6' into support/2.7 2020-09-25 08:57:08 +02:00
odain
4e0eed6e13 N°3270 Notify on expiration not sending notification (trigger exception)
add boilerplate function and use it to intercept/enrich trigger exception loops
2020-09-25 07:18:14 +02:00
Pierre Goiffon
45e366745d N°3333 Security hardening 2020-09-24 17:34:57 +02:00
Pierre Goiffon
1e634a8bba N°3332 Security hardening 2020-09-23 17:17:05 +02:00
Eric
94b9a9bb75 N°3309 - Spelling mistake 2020-09-22 12:51:43 +02:00
Eric
0c90b701ea N°3283 - Spelling mistake 2020-09-22 12:45:19 +02:00
Eric
58961cd4ec N°3318 - don't display error details 2020-09-22 11:57:43 +02:00
Eric
1453558f3e N°3317 - Add http headers 2020-09-22 11:39:19 +02:00
Eric
c6df0b6d7d N°3311 - Stop capturing output before sending backup file (avoid memory problem) 2020-09-22 11:03:59 +02:00
Pierre Goiffon
7c3659d5ba 🔧 Remove versionned PHPStorm files
Those files were duplicates of the .editorconfig file

.editorconfig was pushed with ecd8f40c0f for 2.7.0 and should be the only source of the IDE / editor configuration

This generic format is implemented in PHPStorm since v2019.2 (see https://blog.jetbrains.com/idea/2019/06/managing-code-style-on-a-directory-level-with-editorconfig/)
To check if your IDE / editor supports it, check https://editorconfig.org/
2020-09-18 18:26:31 +02:00
Pierre Goiffon
dd942997cb 🎨 Fix invalid formatting introduced in 827b4b5bbe 2020-09-18 14:22:28 +02:00
Pierre Goiffon
57fea03745 🔧 Fix editorconfig for JS files 2020-09-18 14:21:47 +02:00
Pierre Goiffon
827b4b5bbe 🎨 Fix string delimiter
Thanks @jbostoen for pointing this out (see discussion in 0773660ef2)
2020-09-18 14:15:41 +02:00
Pierre Goiffon
7de59c1977 Update .editorconfig 2020-09-18 10:19:38 +02:00
Pierre Goiffon
c34c4bc09d 📝 Fix CRUD wiki page URL
was linking to Combodo private wiki :/, now is the public one \o/
Many thanks @Hipska !
2020-09-14 15:05:44 +02:00
Pierre Goiffon
bced819b3f 📝 N°2293 PHPDoc for DBObject::GetOriginal 2020-09-14 14:26:29 +02:00
acognet
23136bdf00 N°3303 - Bug on Mass update of actions (notification) 2020-09-11 09:53:23 +02:00
odain
98c371c5cf add new code style for brackets 2020-09-07 16:12:12 +02:00
acognet
1e0415e902 3234 - php 5.6 compatibility 2020-09-07 12:14:38 +02:00
Eric
dbada2f72a N°3238 - Fix multi-words search in FilterBrick and ManageBrick 2020-09-04 17:34:59 +02:00
Eric
9694e9848d N°3285 - Fix Standard Global Search: multiple words search 2020-09-04 09:27:39 +02:00
bruno-ds
fe87700135 Un-deprecate ItopExtensionsExtraRoutes::AddRoutes(...)
we had imagined it as a compatibility layer for migrating from Silex to Symfony,
but it must'nt be deprecated until we provide a new API (ideally based on a scan of yaml configuration file?)
2020-09-03 16:43:30 +02:00
Eric
7107c2f616 N°3260 - Fix rendering of an ExternalField on a Text with XML content (format transitivity) 2020-09-02 18:15:31 +02:00
Eric
92e0f101d7 N°3260 - Fix rendering of an ExternalField on a Text with XML content (format transitivity) 2020-09-02 17:58:04 +02:00
acognet
29624bc5c5 N°3163 - Portal Filters doesn't work 2020-09-01 14:16:16 +02:00
acognet
d09f3f4f83 N°3149 - Change Color of Brick Search on Portail with extension Custom 2020-09-01 10:55:48 +02:00
acognet
f774a90b7e N°3146 - Affichage des class user dans l'import CSV 2020-08-31 17:15:59 +02:00
acognet
fef8038f70 N°3261 - Configure this list : sort icon disappears when descending sort is selected 2020-08-31 15:11:47 +02:00
bruno-ds
2806a76c1d :greenheart: test readability 2020-08-31 14:47:55 +02:00
Eric
328ec52c88 N°3162 - Remove default admin phone number (can be incompatible with validation pattern) 2020-08-31 11:38:24 +02:00
Eric
70734e2b71 N°3188 - Fix LIfeCycle visualization details
Fix js broken by the fix of N°309
2020-08-28 17:28:52 +02:00
Eric
bb892cc180 N°3078 - Fix error on login while in maintenance mode 2020-08-27 17:10:37 +02:00
acognet
4618f12d8a N°3234 - Notify on expiration not sending notifications 2020-08-21 18:50:27 +02:00
odain
d12e2e592a N°3265 - Log stacktrace when cron exception raised with debug enabled 2020-08-21 10:25:05 +02:00
Eric
6a25933744 N°3248 - code hardening 2020-08-18 17:21:48 +02:00
Pierre Goiffon
208ccfe3ab N°3257 Fix cannot create objects with AttributeImage from extkey widget on PHP 7.4 2020-08-18 17:13:37 +02:00
Eric
f74c78d61c N°3248 - code hardening 2020-08-18 17:02:46 +02:00
Eric
6176af089c N°3256 - Invalid filter parameter, when using & (ampersand) in filter parameter (OQL Query) 2020-08-18 14:41:18 +02:00
odain
a35b2d83b7 Cancel functionnal changes to make sure they are ok in next release (develop/2.8) first 2020-08-07 15:17:24 +02:00
odain
8902d6e532 CI migration/automation + new test to ease iTop release management
- new Jenkinsfile and .jenkins removal to launch phpunit/behat tests
triggered on both iTop build and push.
 - N°3053 - Check XML conversion methods
 - N°3057 - New build recipe
 - N°3059 - Automatically set the documentation URLs
 - N°3052 - Check community modules XML version against latest version
 - N°3054 - Check community modules version against major version
 - N°3062 - setup.css file integrity test
 - N°3060 - Check consistency between the list of modules and installation.xml
 - Add exclusion group for CI
 - N°3061 - Automatically check the installation.xml consistency
2020-08-07 14:48:51 +02:00
Pierre Goiffon
07bd6b8539 N°3219 cron : reset CMDBChange for each process 2020-08-04 09:44:20 +02:00
Pierre Goiffon
1148449bb7 📝 Add missing @since on \DBSearch::GetFirstResult 2020-07-29 17:21:15 +02:00
jbostoen
11d418fd49 🌐 Dutch translations: fix use of ITOP_APPLICATION, ITOP_APPLICATION_SHORT
* Fix incorrect ITOP_APPLICATION, ITOP_APPLICATION_SHORT
2020-07-28 16:26:16 +02:00
Eric
ace676dc24 N°2585 - Fix alias problem in portal scopes
The re-aliasing map structure now allows multiple mapping for the same alias (used for the translations of UNIONS)
2020-07-23 16:41:57 +02:00
Eric
8122270476 N°3176 - OQL: Fix malformed UNION queries in portal scopes
Fix regression in Unit tests
2020-07-22 17:30:38 +02:00
Eric
1f66d53ab4 N°3176 - OQL: Fix malformed UNION queries in portal scopes
Fixed AddCondition_ReferencedBy() for unions (regression introduced by N°2970)
2020-07-22 16:09:08 +02:00
Eric
dfaeca43e4 N°3148 - OQL request malformed
Fix variables in ListExpression
2020-07-22 10:06:11 +02:00
Eric
5b04143711 N°3111 - Fix Portal export 2020-07-21 16:39:55 +02:00
Eric
bd14096d43 N°3150 - Wrong count for archived objects 2020-07-21 14:21:55 +02:00
Eric
3b20be05cb 3189 - DBTools enhancements
* Add CLI command bin/report.php to generate report offline
* Keep the latest report in log/dbtools-report.log in order to visualize it with "Log management" menu
2020-07-21 14:08:36 +02:00
Eric
fdec608c3e N°3174 - Remove stack trace from MySQLException 2020-07-16 18:09:44 +02:00
Eric
72cb3de50d N°3173 - Installation issue with PHP 7.4 (fix php notice) 2020-07-16 17:23:21 +02:00
Eric
c03d32b423 N°3180 - Allow HTML in dictionary for login screen ('UI:Login:About') 2020-07-16 15:28:49 +02:00
Eric
94f9b16c03 N°2589 - Infinite loops when logging with a Contact having a non empty TagSet field
Add ListParameters to DBSearch for nested queries
2020-06-24 15:18:11 +02:00
acognet
311aeb0b07 N°2589 - Infinite loops when logging with a Contact having a non empty TagSet field 2020-06-24 12:09:55 +02:00
acognet
68fe3f01be Spelling corrections 2020-06-23 17:38:24 +02:00
acognet
7ce94486bd Spelling correction 2020-06-23 13:49:53 +02:00
acognet
6523b34d58 Update version number for 2.7.1 2020-06-23 11:19:44 +02:00
bruno DA SILVA
be20705449 Add unit test.
unit test the behaviour of the removal of the blacklisted html tags

this is in fact an adaptation of the test added for the rolled-back feature of the n°2556.
This feature has been postponed to the 2.8 due to performance scaling issues.
2020-06-22 16:13:31 +02:00
acognet
e7abaa2838 Update dictionnaries 2020-06-22 15:50:18 +02:00
Pierre Goiffon
8d73eb6dff Revert "N°2556 - Html sanitization preserve content of removed tags (except for a forbidden list)"
This reverts commit 746b47bb0e.
Revert "N°2556 - Repair CI"

This reverts commit 79909fadc0.
2020-06-22 11:36:46 +02:00
acognet
f84995a58f N°309 - Afficher les arbres pliés ou dépliés 2020-06-19 18:45:26 +02:00
acognet
7f66e26b5f Merge remote-tracking branch 'origin/support/2.7' into support/2.7 2020-06-19 12:27:35 +02:00
acognet
a6639b067f N°309 - Afficher les arbres pliés ou dépliés 2020-06-19 12:26:08 +02:00
Pierre Goiffon
8a6d66effd 📝 Fix PHPDoc 2020-06-18 11:08:18 +02:00
Pierre Goiffon
6885d64124 📝 N°1418 DBObject PHPDoc 2020-06-17 19:03:29 +02:00
acognet
6fa153ae8b N°3107 - Remove code merged by mistake 2020-06-17 15:20:52 +02:00
acognet
e226222c2a N°3102 - widget regression: OQL syntax error now crash the page instead of displaying an error in place of the widget 2020-06-17 11:11:48 +02:00
Pierre Goiffon
aca0143e89 📝 PHPDoc for BackgroundProcess exceptions 2020-06-17 09:25:38 +02:00
Pierre Goiffon
1968c60770 📝 \DBObjectSet::ToArray PHPDoc 2020-06-16 12:32:57 +02:00
Pierre Goiffon
26014f410a Set back version for 2.7.1
Was set to 2.8 by mistake in 23afee51 (PR #125 that was rebased in GitHub web)
2020-06-15 15:49:01 +02:00
Pierre Goiffon
8912618732 Revert "N°2214 Add PHP check in CLI scripts"
This reverts commit c768e18e2b.
No risk taken for the 2.7.1 : this will be included but for 2.8 !
2020-06-15 15:18:26 +02:00
Eric
7bee718a13 N°3775 - Dashboard Definition with unknown class leads to an error 2020-06-15 14:53:58 +02:00
Pierre Goiffon
2705543efd N°2997 new test for AbstractWeeklyScheduledProcess
Document the way GetNextOccurrence works O:)
2020-06-12 18:20:07 +02:00
Pierre Goiffon
1e6b885301 SetupUtils : add missing public access keyword for methods 2020-06-12 16:50:04 +02:00
Pierre Goiffon
c768e18e2b N°2214 Add PHP check in CLI scripts
It is quite common that the PHP interpreter that is launched in CLI is different that the one used by the webserver. So iTop code launched by CLI could run in a context that doesn't meet iTop requirements !

This adds in the following scripts the same control that is done on the setup wizard first step :
* cron.php
* backup, check-backup
* export, exportv2
* bulk import
* synchro-exec, synchro-import

If the check throws at least one error then the script is stopped with an appropriate message, and a log is made (IssueLog, Error level, CLI channel)
2020-06-12 16:46:37 +02:00
Eric
d4b93f3bf0 N°2641 - Create a dedicated ErrorPage for fatal errors 2020-06-11 17:16:47 +02:00
acognet
6354c62c2b N°3012 - Fix blocking MTT/MTP when /extensions 2020-06-11 14:13:27 +02:00
acognet
cf8a12fe95 PMP light first version - small evolutions 2020-06-10 10:44:18 +02:00
acognet
36804dfcf4 N°3098 - Portal with IE : apply a transition ends with blank page 2020-06-10 10:44:17 +02:00
Eric
6966c0498a N°3071 - fix missing index for AttributeSet (for migration) 2020-06-08 16:50:32 +02:00
Eric
bbffc40ee0 N°3074 - Fix dashlet creation for IE 2020-06-08 16:20:41 +02:00
acognet
1b7473365d N°3075 - Fix syntax error with PHP 5.6 and TCPDF 6.3.4 2020-06-05 17:03:46 +02:00
Eric
0b84e809f6 Add cache to twig templates 2020-06-05 15:52:26 +02:00
acognet
a858362622 N°3080 - Portal cannot display more 10 attachments 2020-06-05 09:42:04 +02:00
Eric
d195c2b4c9 N°3071 - fix missing index for AttributeSet 2020-06-04 17:04:07 +02:00
acognet
28b75f29e5 N°3020 - Recurring PHP Notice with itop-fence "Undefined index: login_temp_auth_user 2020-06-04 16:21:07 +02:00
Eric
9d8a7bf561 N°3007 - Warn the user that installing a patch on a non conform install is not recommended 2020-06-04 10:38:58 +02:00
Eric
8064a20718 N°2970 - Reset conditions of joined filter because they can be used later by the Filter() method 2020-06-03 11:47:12 +02:00
acognet
f301a283e2 N°3015 - Fix "Undefined index: login_mode" Notice 2020-06-02 16:04:50 +02:00
Pierre Goiffon
e6a8f492d5 N°3049 Fix notice when having an ENUM field with values containing parenthesis 2020-05-28 15:38:21 +02:00
Pierre Goiffon
336637a7a4 SetupLog : ease changing manually the default level
In setup no conf file available so the log_level_min config option cannot be read
A solution is to manually change this constant
2020-05-28 11:40:22 +02:00
acognet
0e5a501b2a N°3012 - Fix blocking MTT/MTP when /extensions 2020-05-27 10:13:44 +02:00
acognet
59af58a173 N°3008 - Align transition form markup metadata to regular form in the backoffice 2020-05-27 10:00:20 +02:00
acognet
7f922560ba N°1976 - Duplicate Service on Customer Contract - formating code 2020-05-27 09:35:02 +02:00
acognet
d2e286345e N°1976 - Duplicate Service on Customer Contract 2020-05-27 09:30:52 +02:00
Pierre Goiffon
fb120bdc7c Merge remote-tracking branch 'origin/support/2.7.0' into support/2.7 2020-05-26 08:44:21 +02:00
Pierre Goiffon
5548997f3e 📝 README : fix for 2.7.0-2 2020-05-26 08:43:11 +02:00
bruno DA SILVA
156828c448 Merge branch 'feature/2958_unescape_slack' into support/2.7 2020-05-25 16:07:05 +02:00
bruno DA SILVA
04ef2b0454 2958 - test a restore 2020-05-25 15:52:37 +02:00
bruno DA SILVA
076d2e3d46 2958 - test a failure 2020-05-25 15:51:42 +02:00
bruno DA SILVA
0c6ab86e54 2958 - Slack notification : fix escaped branch name 2020-05-25 15:34:18 +02:00
bruno DA SILVA
876db3e58f 2958 - Slack notification : fix escaped branch name 2020-05-25 15:32:16 +02:00
Molkobain
5f7fe345cc Update README with iTop 2.7.0-2 information 2020-05-20 10:23:18 +02:00
Molkobain
cb6f78c9e3 Update README with iTop 2.7.0-2 information 2020-05-20 10:22:34 +02:00
acognet
8c86908652 N°3023 - Portal: Fix filter brick input not working in IE11 2020-05-19 10:17:27 +02:00
acognet
7e69256cb4 N°2668 - Notifications - Export wrong attribut format in html 2020-05-18 21:52:31 +02:00
acognet
83e3c089a4 N°1976 - Duplicate Service on Customer Contract 2020-05-18 21:51:29 +02:00
Pierre Goiffon
0d1059a8fc Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	application/utils.inc.php
#	conf/web.config
#	datamodels/2.x/itop-backup/ajax.backup.php
#	datamodels/2.x/itop-backup/status.php
2020-05-18 09:24:46 +02:00
Eric
e2f15ca24a 🌐 Add ES_CR translations to Application Upgrade Menu
From PR#128 by Federico Lazcano
2020-05-15 14:39:22 +02:00
Eric
7628b85b70 🌐 Add ES CR translations for DB Tools
From PR#127 by Federico Lazcano
2020-05-15 14:13:24 +02:00
Eric
525f600c18 🌐 Config Menu title should be uppercase
From PR#126 by Federico Lazcano
2020-05-15 14:04:15 +02:00
Pierre Goiffon
0ffa2850ea Deadlock log : log inside a dedicated log file instead of creating an EventIssue object (#139)
First log implementation (75730ee) was creating EventIssue objects, and was rollbacking transaction if it exists

The new one has some benefits :

* always log one line by default in log/error.log, but details must be activated though config (channels `Deadlock-WaitTimeout` and `Deadlock-Found`)
* detailed logs are in a dedicated file (log/deadlock.log) : 
  - easier for our clients to get and share
  - has rotation by default
  - looking at the file size is a direct way to know if error happened
  - more compliant to industry standards !
* the transaction stays untouched, so that the consumer can do whatever it prefers
2020-05-14 17:49:05 +02:00
Eric
fa3610cfee N°2641 - Create a dedicated ErrorPage for fatal errors
Fix fatal errors being logged in setup.log instead of error.log
2020-05-14 14:37:38 +02:00
acognet
898ee95a2c N°1997 - dbClick to exit the "description" field when creating an incident on the portal 2020-05-14 13:03:49 +02:00
Pierre Goiffon
730570f1f8 📝 MFCompiler language injection 2020-05-14 11:43:57 +02:00
Pierre Goiffon
80ce1eb125 N°2984 Security hardening 2020-05-14 11:33:48 +02:00
Pierre Goiffon
228a945da9 N°2984 Security hardening 2020-05-14 11:26:35 +02:00
bruno DA SILVA
79909fadc0 N°2556 - Repair CI 2020-05-14 10:49:31 +02:00
bruno DA SILVA
746b47bb0e N°2556 - Html sanitization preserve content of removed tags (except for a forbidden list)
forbidden list: see $aTagsContentRemovableList
2020-05-14 10:33:30 +02:00
acognet
150d3e096d N°2346 - Function GetTrackOrigin() doesn't return good value during csvimport 2020-05-13 23:55:26 +02:00
Thomas Casteleyn
23afee514d 🌐 Update nl.dictionary.itop.ui.php (#125) 2020-05-13 14:38:32 +02:00
acognet
48c5698f08 N°2934 - Backoffice theme: Add variable for menu group background color 2020-05-13 12:22:35 +02:00
acognet
1a4ee0f977 N°1953 - Dashlet Title alignment not consistent : Left on List, Center on Table/Pie/Chart 2020-05-13 12:22:35 +02:00
Eric
1ca39618e1 N°1610 - Fix [DBObject] ExecAction - apply_stimulus
removed unnecessary test
2020-05-13 11:38:22 +02:00
Eric
7bb1f9f423 N°2937 - fix export error on EventIssue object 2020-05-13 11:24:34 +02:00
Pierre Goiffon
834297e675 N°2985 Security hardening (#140)
Thanks @bruno-ds  for the review !
2020-05-13 10:04:40 +02:00
bruno DA SILVA
21c2574cd9 N°2358 - Fix deletion of a single replica within a list 2020-05-13 09:37:36 +02:00
Pierre Goiffon
6d9923be68 AbstractWeeklyScheduledProcess fix typo and add @noinspection 2020-05-13 08:45:03 +02:00
bruno DA SILVA
839bbc425f N°2901 Add log to help diagnose lost InlineImage
they are disabled by default, use this to enable:
 ```
 'log_level_min' => array(
 		'InlineImage' => LogAPI::LEVEL_TRACE,
 		'UserRequest' => LogAPI::LEVEL_TRACE,
 	),
```
2020-05-12 15:34:13 +02:00
acognet
70cc19768a N°1953 - Dashlet Title alignment not consistent : Left on List, Center on Table/Pie/Chart 2020-05-12 14:48:56 +02:00
acognet
873d109b98 N°1910 - iTop - Search on Text contains "_" not working - move correction in other place 2020-05-12 14:48:16 +02:00
Eric
a81950571a N°1598 - Fix regression on modify 2020-05-12 14:21:34 +02:00
Eric
bcd9679957 N°3006 - Fix filtering an UNION with parent class 2020-05-12 12:08:18 +02:00
Eric
2c10913fe5 N°2093 - Keep object values when a stimulus action fails 2020-05-12 11:29:30 +02:00
Eric
0342b89481 N°1598 - warning for bad stimulus instead of fatal error 2020-05-12 11:01:04 +02:00
Pierre Goiffon
3c9318d56a N°2990 Fix count warning on audit OQL error 2020-05-12 09:41:24 +02:00
Pierre Goiffon
30d10b6f11 N°2990 Security hardening 2020-05-12 09:40:58 +02:00
acognet
3fd55c6dd6 N°1693 - the history of AttributeEncryptedString must not interpret HTML tags 2020-05-11 12:14:55 +02:00
Pierre Goiffon
f8e39877b3 N°2988 Security hardening 2020-05-07 11:49:58 +02:00
Pierre Goiffon
0a3f7d7ef7 N°2989 ajax.backup small updates
* update copyright
* in messages replace iTop by constant
2020-05-07 11:18:21 +02:00
Pierre Goiffon
222eb47bd2 N°2989 ajax.backup : refactor exit conditions
Adding a die() call so that we are sure to exit on errors !
2020-05-07 10:49:05 +02:00
Eric
c15b3462d1 N°2945 - Adding an empty file as an attachment is generating a fatal error
Changed error message
2020-05-07 08:49:05 +02:00
Pierre Goiffon
32f05ea917 👥 Added Pascal Schirrmann as contributor (N°2980, thanks to him !) 2020-05-07 08:36:53 +02:00
Molkobain
6a50b55a2a N°1598 - Improve user feedback on invalid transition: Display a better error message to the user in the portal 2020-05-06 16:58:25 +02:00
Eric
72f11c6a4d N°2815 - Fix basic authentication with Apache
Added support for REDIRECT_HTTP_AUTHORIZATION
2020-05-06 11:35:56 +02:00
Eric
609ea47f7b PHPDoc 2020-05-06 10:29:47 +02:00
Pierre Goiffon
74b3cfd46c Merge remote-tracking branch 'origin/support/2.7.0' into support/2.7 2020-05-06 10:13:15 +02:00
acognet
f7ea6c09cd N°2589 - Infinite loops when logging with a Contact having a non empty TagSet field 2020-05-05 19:00:24 +02:00
acognet
526a7f9817 N°1910 - iTop - Search on Text contains "_" not working - convert _ to \_ in javascript 2020-05-05 18:36:38 +02:00
Eric
5ccb1ef72a N°1662 - Fix Auto-complete on external key ignore obsolescence user preference
ValueSetObjects now consider obsolete data
2020-05-05 11:14:59 +02:00
Pierre Goiffon
180da03f08 N°2980 Fix backup not executed anymore
Regression introduced by #89
2020-05-05 09:00:40 +02:00
Pierre Goiffon
7ec7626aa0 N°2977 PHP Doc change 2020-05-04 18:13:40 +02:00
Eric
f92a980b4d N°2974 - Fix Global Search doesn't search in external field.
For External Field, allow the search also for FriendlyNames.
2020-05-04 18:13:18 +02:00
Pierre Goiffon
5d7582bb6f N°2977 LogAPI : restore default log level to OK, and really allow LEVEL_DEFAULT overloads
* Level was changed by mistake to trace with refactoring in 289171b9
Thanks @v-dumas !

* self wouldn't allow to override
see https://www.php.net/manual/fr/language.oop5.late-static-bindings.php
Thanks @bruno-ds !

* improve PHPDoc !
2020-05-04 16:55:46 +02:00
bruno DA SILVA
7a40db94fb 2424 - Better messages when an object update fail & removed an unwanted webserver error log entry 2020-05-04 12:00:30 +02:00
Eric
843798505a N°2974 - Fix Global Search doesn't search in external field
The IsSearchable() check was wrong for some attributes
2020-05-04 11:40:02 +02:00
Pierre Goiffon
bf13f9fc8a N°2975 improve RotatingLogFileNameBuilder next cron occurrence computation 2020-04-30 08:41:55 +02:00
Pierre Goiffon
289171b9f1 N°2977 LogAPI : allow to overwrite the default log level 2020-04-29 15:16:45 +02:00
Pierre Goiffon
9b065ffb0a Merge remote-tracking branch 'origin/support/2.7.0' into support/2.7
# Conflicts:
#	datamodels/2.x/itop-attachments/renderers.itop-attachments.php
2020-04-29 09:00:10 +02:00
Pierre Goiffon
96d888fcf3 N°2968 fix email-reply notification not updated
- add a specific container for attachments list, upload button and #attachment_plugin hidden input is outside of it
- refactor code between abstract class and implementation, add some comments
- now refreshes only the attachment list instead of the whole content
2020-04-28 17:47:20 +02:00
Vladimir Kunin
a182a37139 Add Russian translations for 2.7.0-1 (rebased) 2020-04-28 08:42:17 +02:00
Pierre Goiffon
23c15c1b6c Revert "N°2902 - Intersect with union generates unwanted alias renaming"
This reverts commit 866e4ab995.

Fix isn't yet commited, so we don't want to break the build.
The fix will be done in the hotfix/2902_intersect_alias branch
2020-04-27 09:36:38 +02:00
Eric
866e4ab995 N°2902 - Intersect with union generates unwanted alias renaming 2020-04-24 18:32:40 +02:00
Eric
75730eeea0 Log database deadlocks in EventIssue 2020-04-23 15:25:12 +02:00
Pierre Goiffon
58fd8709be Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	css/css-variables.scss
#	datamodels/2.x/authent-external/module.authent-external.php
#	datamodels/2.x/authent-ldap/module.authent-ldap.php
#	datamodels/2.x/authent-local/module.authent-local.php
#	datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php
#	datamodels/2.x/itop-backup/module.itop-backup.php
#	datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php
#	datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php
#	datamodels/2.x/itop-config/module.itop-config.php
#	datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php
#	datamodels/2.x/itop-full-itil/module.itop-full-itil.php
#	datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/module.itop-portal-base.php
#	datamodels/2.x/itop-portal/module.itop-portal.php
#	datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php
#	datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php
#	datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php
#	datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php
#	datamodels/2.x/itop-tickets/module.itop-tickets.php
#	datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php
#	datamodels/2.x/version.xml
2020-04-22 11:14:59 +02:00
Eric
f18ea18a5b N°2936 - TLs option is not set for restore function 2020-04-21 16:59:16 +02:00
Pierre Goiffon
1904bfdba6 css-variables : update to 2.7.0-2 2020-04-21 16:35:41 +02:00
acognet
e1949cd3eb N°2509 - Change Columns via "Configure this list" show obsolete data though user preferences is "not shown obsolete data" 2020-04-21 12:45:59 +02:00
Eric
1b2d3d1e84 N°2952 - Provisioning for hybrid auth fails
Changed Origin for change to an allowed value
2020-04-21 11:59:48 +02:00
Pierre Goiffon
c5b1f02d2b 🔖 Update versions to 2.6.4 2020-04-21 08:52:42 +02:00
Pierre Goiffon
f81ab4d71a 🚀 Release tool to update versions
Was already comitted in 2.7 branch (fd1e17cc)
2020-04-21 08:50:25 +02:00
acognet
0b95dbee7f N°1588 - Count on Managed Brick sometimes wrong 2020-04-20 16:31:56 +02:00
Pierre Goiffon
db593ff85e Merge remote-tracking branch 'origin/support/2.6' into support/2.7
# Conflicts:
#	application/loginwebpage.class.inc.php
#	application/menunode.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/aggregatepagebrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/userprofilebrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/views/bricks/manage/popup-export-excel.html.twig
#	pages/ajax.render.php
2020-04-20 16:05:56 +02:00
Eric Espié
1f750bb12d N°2902 Fix alias renaming when already exists in one OQL of an UNION
The legacy impl is not modified
2020-04-20 14:59:56 +02:00
Pierre Goiffon
4ee66377ce Merge commit '15e5e21a89a3d3214dace82b8765a47e304a8f29' into support/2.7 2020-04-20 14:21:55 +02:00
Eric
432a950f8c N°2945 - Fix fatal error when adding empty attachment
alert when empty attachment is detected
2020-04-20 10:54:27 +02:00
acognet
bbc751bee4 N°2383 - GetAttributeFlag ignored on form refresh with dependent field 2020-04-14 17:56:27 +02:00
acognet
a77ba2fbab N°2564 - Stop copy after "<" character in a Copy operation on a Transition - change only in Copy function 2020-04-14 17:56:27 +02:00
Eric
5b60ec9edf N°2919 - Dashboard - Fix dashboard not saved
the sanitization was too strong. Some names can contain ':'
2020-04-10 18:11:36 +02:00
Eric
b88b9dabdb N°2919 - Dashboard - Fix dashboard not saved
The sanitization was too strong. Some names can contain ':'
2020-04-09 17:59:52 +02:00
Eric
06b17e82db N°2755 - Security hardening 2020-04-09 11:03:07 +02:00
Eric
2add79a473 N°2853 - Security hardening 2020-04-09 10:55:17 +02:00
Molkobain
3103f361a4 Update 2.7.0-1 release date 2020-04-08 11:02:03 +02:00
Eric
3a37e24496 N°2306 - Security hardening 2020-04-08 09:28:20 +02:00
acognet
621295199c N°1402 - Attribut File cannot be emptied Add a trash next to the name of the file 2020-04-06 16:36:46 +02:00
Eric
b1d703bff3 N°1671 Portal: Fix Aggregate Brick when user profile is not allowed to see one of the sub-brick 2020-04-06 14:07:42 +02:00
Eric
a3a34a94e7 N°1355 - Security hardening 2020-04-06 11:47:57 +02:00
Stephen Abello
6edc365685 N°2742 - HTML files preview are now raw text only 2020-04-06 09:47:24 +02:00
Stephen Abello
4b7f736af0 N°2755 - Security hardening 2020-04-06 09:42:41 +02:00
Stephen Abello
016fbaed36 N°2755 - Security hardening 2020-04-06 09:42:15 +02:00
Stephen Abello
bfcd137e52 N°2853 - Security hardening
(cherry picked from commit d01caaf4e4)
2020-04-06 09:37:58 +02:00
Stephen Abello
f9af8fc912 N°2855 - Security hardening
(cherry picked from commit c5c7fd5c85)
2020-04-06 09:20:02 +02:00
Eric
c1a7a36896 Compatibility with MySQL 5.6 2020-04-06 09:02:06 +02:00
acognet
d5fe653e51 N°2848 - Align creation and update message on portal to console message - add a comment for next time 2020-04-02 20:31:06 +02:00
acognet
fc2fb235a2 N°1344 - Save without all mandatory attributes (ajax reload not finished) 2020-04-02 17:46:18 +02:00
acognet
d7211509bd N°1062 - Portal : autocomplete and search = broken : change the max size of the list 2020-04-02 17:29:39 +02:00
acognet
c182b1a01f N°2848 - Align creation and update message on portal to console message 2020-04-02 11:50:01 +02:00
Eric
15e5e21a89 Compatibility with MySQL 5.6 2020-04-01 17:37:55 +02:00
acognet
ee0d231426 N°2895 - Tab dictionnary entries not taken in account in "Printer Friendly Version" screen 2020-04-01 01:05:13 +02:00
acognet
3282b46c9b N°2395 - Error in file light-gray.scss 2020-04-01 00:01:26 +02:00
acognet
05649ba50f Merge branch 'master' of github.com:Combodo/iTop 2020-03-31 23:48:35 +02:00
acognet
40efc4cbb1 N°1062 - Portal : autocomplete and search = broken 2020-03-31 23:47:46 +02:00
Molkobain
30034d381b Update version number to 2.7.0-1 2020-03-31 09:47:37 +02:00
Molkobain
986eb90546 N°2893 - Fix DataModel Viewer not supporting special chars in class name (eg. ") 2020-03-31 09:40:31 +02:00
Pierre Goiffon
eb41d3e2ef 📝 Fix erroneous PHPDoc for InlineImageGC 2020-03-30 17:09:04 +02:00
acognet
c6b16bb52e N°2119 - Dashlet Header statistic on ExternalKey, display id instead of name 2020-03-30 16:24:12 +02:00
acognet
95adbbb58f N°1181 - List of searchable classes in SearchMenuNode - add user rights tests 2020-03-30 16:23:23 +02:00
acognet
60f5c60059 N°1796 - Search : false criteria after using the magnifier 2020-03-30 16:19:23 +02:00
acognet
c0284ecc3b N°1953 - Dashlet Title alignment not consistent : Left on List, Center on Table/Pie/Chart 2020-03-30 16:18:43 +02:00
acognet
fc7b772ba3 N°1910 - iTop - Search on Text contains "_" not working
_ is a special caracter in mysql -> replace with \_
2020-03-30 16:13:47 +02:00
Pierre Goiffon
011d742ae3 N°2891 📌 add mbstring as optional extension 2020-03-27 14:41:59 +01:00
Pierre Goiffon
5b496f4d15 N°2866 Change "cron" case in labels as it is not an acronym
Thanks @Hipska for the feedback done in Combodo/iTop#124 !
2020-03-26 11:15:47 +01:00
Pierre Goiffon
97f4c32271 N°2881 Improve robustnedd of \ModuleInstallerAPI::RenameEnumValueInDB
Was causing errors when migrating from datamodels where the fields were not enum yet (this method is usually launched using \ModuleInstallerAPI::BeforeDatabaseCreation, so before an ALTER could be done to the column)
2020-03-26 10:18:34 +01:00
Pierre Goiffon
c002ca7902 setup.css : update .css that was not up to date :/ 2020-03-26 10:13:10 +01:00
Pierre Goiffon
ff22074418 🎨 setup.css : remove warnings & unused code
Removed unused legacy code :
* #header>H1 : a noline-height ugly when renamed to line-height, seems totally unused when noline-height
* table.formTable : cellpadding & cellspacing
2020-03-26 10:09:08 +01:00
Pierre Goiffon
84968ff550 Merge remote-tracking branch 'origin/release/2.7.0' 2020-03-26 08:50:14 +01:00
bruno DA SILVA
46151c87c0 N°2888 Check password policy only if field set with a string
Some callers are setting the field using an ormPassword object containing hashed password + salt

examples:
 - csv import
 - data synchro
 - ...
2020-03-25 12:43:41 +01:00
Pierre Goiffon
75a900c6f8 🚀 Tool to batch update XML datamodel version 2020-03-24 16:46:48 +01:00
Molkobain
e8c9d99783 Increase XML version to v1.7 2020-03-24 14:06:41 +01:00
Eric
1600302ad9 N°2869 - Removed Check for bad finalclass in root classes (already done) 2020-03-19 15:40:52 +01:00
Eric
a9c3a1b782 N°2869 - Check for bad finalclass in root classes (Allow all non-abstract child classes) 2020-03-19 10:01:16 +01:00
Eric
74848254a4 N°2869 - Check for bad finalclass in root classes 2020-03-18 14:10:35 +01:00
Eric
d7d9bfe0fd N°2869 - Check for bad finalclass in intermediate classes 2020-03-18 10:09:05 +01:00
odain
dd96dec100 Fix license file generation; exclude itop-portal-base 2020-03-18 08:42:55 +01:00
Pierre Goiffon
16ff51f3b7 📄 Update licenses after generation tool upgrade
See 76d26e8e
2020-03-18 08:15:09 +01:00
Pierre Goiffon
27c651b33c 📄 Remove itop-portal-base from license file 2020-03-17 18:08:49 +01:00
Pierre Goiffon
32375265cb 📄 Remove 2.x/authent-cas from license file 2020-03-17 17:47:25 +01:00
Pierre Goiffon
0cba163dc9 🔖 Update version to final in iTop files 2020-03-17 16:50:45 +01:00
Pierre Goiffon
fd1e17cc32 🚀 Release tool to update versions 2020-03-17 16:49:05 +01:00
Eric
d85e1906b7 N°2746 - New Attribute Enum Set
XML migration from 1.7 to 1.6
2020-03-17 12:03:10 +01:00
Pierre Goiffon
f8df84aa7b Update dict for 2.7.0-RC 2020-03-17 10:55:53 +01:00
Eric
c26b9459bb N°2869 - Fix 2.7 Migration
Run UPDATE requests just after the corresponding ALTER TABLE requests
2020-03-16 18:49:12 +01:00
Molkobain
4f7676c42d N°2735 - Rollback previous "fixes" to keep the simple ID policy in the Designer and a unique ID generation at runtime 2020-03-16 12:17:09 +01:00
Molkobain
ceddafaebe N°2735 - Rename parameter for better consistency 2020-03-16 12:17:09 +01:00
Stephen Abello
950640babe N°1986 - Revert feature 2020-03-13 10:24:25 +01:00
jbostoen
11e6be1037 🌐 Added NL translations (#124)
Co-authored-by: jbostoen <->
2020-03-13 09:42:37 +01:00
Molkobain
29d963317f N°2735 - Fix dashlet ID generation to have the "CUSTOM" prefix only at runtime 2020-03-12 16:46:15 +01:00
Molkobain
dd300e075c N°2735 - Fix dashlet edition in the Designer (property form ID was not matching dashlet's) 2020-03-12 16:46:03 +01:00
Molkobain
774ace2302 Fix icon select widget to be compatible with iTop 2.7 2020-03-12 14:16:03 +01:00
Molkobain
bbfddea93d Open new_dashlet_id operation for Designer 2020-03-12 14:16:02 +01:00
Stephen Abello
c5c7fd5c85 N°2855 - Security hardening 2020-03-12 14:13:17 +01:00
jbostoen
5d4b9f4a89 🌐 Fix typos in English translation (#123) 2020-03-12 08:51:40 +01:00
Stephen Abello
d01caaf4e4 N°2853 - Security hardening 2020-03-10 10:23:38 +01:00
Pierre Goiffon
f895821db9 ⚗️ CONTRIBUTING : added some emoji O:) 2020-03-06 20:52:33 +01:00
bruno DA SILVA
19f34d1a72 composer reflexion: list outdated packages 2020-03-05 11:33:36 +01:00
Pierre Goiffon
7ff1a03a3c N°2820 monthly log rotation : restore default config 2020-03-04 16:04:19 +01:00
Pierre Goiffon
eadc3b72c2 📝 N°2793 log rotation add PHPDoc about timezones 2020-03-04 14:23:34 +01:00
odain
c06f8e9a98 N°2793 log rotation test : fix timezone issues 2020-03-04 12:05:42 +01:00
Pierre Goiffon
6675d7d42a N°2793 Test log rotation 2020-03-04 09:21:05 +01:00
Eric
afc118e9c2 🐛 fix GetAsPlainText() on EnumSet 2020-03-03 17:34:15 +01:00
Pierre Goiffon
f36fcb2a2d N°2820 Log rotation : change default from weekly to monthly 2020-03-03 15:31:11 +01:00
Eric
f062af367d N°2826 - Bad SQL request for group by with data-localizer
Unit tests to check the fix in data-localizer
2020-03-03 15:25:12 +01:00
Pierre Goiffon
29d24faf52 N°2793 Log rotation : fix no rotation :/
Was caused by erroneous file exists test
2020-03-03 10:18:09 +01:00
Pierre Goiffon
33f3f2810e N°2793 Log rotation : add file exists check in the lock 2020-03-02 18:33:00 +01:00
Pierre Goiffon
fad00200b6 🔧 PHPStorm remove is_null() rewrite inspection 2020-03-02 15:56:26 +01:00
Pierre Goiffon
56ef6feadf N°2820 Log rotation : new MonthlyRotatingLogFileNameBuilder class 2020-03-02 15:52:59 +01:00
Pierre Goiffon
2be16f9078 N°2793 Log rotation (#117)
Now log file name is unchanged : current log is still /log/error.log \o/

Rotation check (using file last modification time) is done :
* on each file write : we don't want to miss calls if session last from 23:59:59 to 00:01 for example ! Though the filemtime() call is done once per session to lower performance impacts
* using a new background process (LogFileRotationProcess)

File renaming on setup is therefore removed.
Also the interface is renamed (from ILogFileNameBuilder to iLogFileNameBuilder) to conform to iTop convention.
2020-03-02 15:01:12 +01:00
Eric
6874aed4a2 N°1627 - Ticket ref sometimes duplicate
add MakeInsertQuery() to legacy
2020-03-02 12:04:12 +01:00
Pierre Goiffon
07b8830436 N°2814 Fix cannot authenticate in some HTTP calls
basic mode was forced in 0dd1f26b
scripts concerned :
* synchro/synchro_import.php
* webservices/cron.php
* webservices/import.php
2020-03-02 11:56:00 +01:00
Molkobain
39d3e00ba1 N°2822 - Fix timeout message through AJAX calls in the Portal 2020-02-28 16:53:16 +01:00
Stephen Abello
ffa43160bf N°1164 #1491 - Add padding and border to code blocks 2020-02-28 16:42:46 +01:00
Pierre Goiffon
a45d1336f4 🎨 Change \ormStopWatch::ComputeGoal for IDE convencience, add phpdoc 2020-02-28 12:02:20 +01:00
Federico Lazcano
5a287fabba 🌐 Typo in ES_CR User Requests 2020-02-28 08:23:34 +01:00
Federico Lazcano
da86ee4114 🌐 Typo in ES_CR Incidents 2020-02-28 08:22:59 +01:00
Federico Lazcano
5157788afe 🌐 Typo in ES_CR User Requests 2020-02-28 08:22:14 +01:00
Molkobain
386e25efd6 N°2314 - Remove basque-red, ocean-blue and test-blue from default themes 2020-02-27 15:41:54 +01:00
Molkobain
649e2f8e6a Internal: Remove unused import 2020-02-27 15:10:41 +01:00
Molkobain
3c3d744747 N°2314 - Refactor part of the compilation in dedicated helpers 2020-02-27 15:09:57 +01:00
Molkobain
1371eee826 N°2735 - Continue rework of the dashlet id generation: Dashlet could not be added in the Designer 2020-02-27 11:54:20 +01:00
Molkobain
6645a5053f N°2806 - Fix errors on legacy portal "portal" tag during migration to iTop 2.7 2020-02-26 17:17:56 +01:00
Molkobain
e2a3e0e74f N°2735 - Continue rework of the dashlet id generation:
- Move generation from DashboardLayout to Dashboard
- Migrate dashlet user preference in RuntimeDashboard only (and not in DesignTimeDashboard)
2020-02-26 16:29:32 +01:00
Molkobain
401f82062a N°2735 - Make sure to always have the dashboard (sanitized) id for dashlets rendering 2020-02-26 12:10:18 +01:00
Molkobain
5a01a76f80 N°2735 - Add new sanitize filter ('element_identifier') for dashboard identifier 2020-02-26 12:10:18 +01:00
Pierre Goiffon
3e5520d079 N°2735 Fix new dashlet id didn't contain dashboard id 2020-02-26 09:13:19 +01:00
Pierre Goiffon
beef2a89a3 N°2684 Remove upgrade from another repository
This upgrade procedure was :
* dangerous : running two iTop of different versions on the same database should not be done
* insufficient : just /extensions/* was copied, not any Hub or Designer data, no log, no instance.txt, ...
2020-02-25 18:01:59 +01:00
Molkobain
2f920cbb46 Internal: PHPDoc and warnings suppression 2020-02-25 17:45:18 +01:00
Pierre Goiffon
feae36e5b8 N°2735 Fix dashlet id duplicates when moving dashlet from one cell to another 2020-02-25 15:43:20 +01:00
Stephen Abello
92ae0e72e1 N°2314 - Markup extensibility: Add a variable for hovered table lines background color 2020-02-25 15:14:12 +01:00
Stephen Abello
ed030403aa N°2112 - Remove unused legacy portal conf variable and its usage 2020-02-25 14:00:58 +01:00
Pierre Goiffon
dfc894f6fd N°2735 Fix cannot edit new dashlet properties regression
Was introduced by cf83bc73
2020-02-25 11:17:52 +01:00
Stephen Abello
368b49ef8f N°2314 - Markup extensibility: Fix table sorter icons in html export pages 2020-02-25 10:36:56 +01:00
Stephen Abello
ccfd3848fb N°1164 #1491 - Fix syntax code highlighting display in CaseLog/HTML fields 2020-02-25 09:54:18 +01:00
Molkobain
ea59f7bc23 N°2314 - Markup extensibility: Add metadata to caselogs in the admin. console 2020-02-24 18:22:01 +01:00
Molkobain
9d6ed7f489 N°2806 - Fix errors on legacy portal constants during migration to iTop 2.7 2020-02-24 17:03:13 +01:00
Molkobain
0aa006f7c4 Internal: Fix typo in PHPDoc 2020-02-24 16:47:10 +01:00
Molkobain
c669d6951b PHPDoc and warnings suppression 2020-02-24 16:36:31 +01:00
Molkobain
9412f260ae PHPDoc 2020-02-24 11:01:24 +01:00
Molkobain
9781a11988 N°2803 - Regression: Fix "forgot_password" parameter not working anymore 2020-02-24 10:58:24 +01:00
Molkobain
1ed0210fe2 N°2799 - Fix double encoding in "top-list" display mode of the ManageBrick 2020-02-24 09:47:22 +01:00
Molkobain
1ce5ec73ea N°2798 - Fix unable to submit portal forms (Regression from dba6e8ce) 2020-02-24 09:24:23 +01:00
Eric
98304e2bda N°2596 - Allow '1' as true value for boolean in XML files 2020-02-21 18:14:03 +01:00
Pierre Goiffon
04fc58b55c 📝 Some @since annotations were missing complete version (ex 2.5 instead of 2.5.0) 2020-02-21 18:05:30 +01:00
Eric
096c3a3f13 N°2772 - Revert the loading of JS Dict in setup pages 2020-02-21 17:15:12 +01:00
Eric
87e22163d7 N°2037 - Add Twig template rendering to the WebPage 2020-02-21 14:35:25 +01:00
acognet
4cc8b89f4e N°2037 - New dashlet Gantt - add method to insert twig in an existing page 2020-02-21 12:09:15 +01:00
Pierre Goiffon
19809249a2 📝 Update PHPDoc for StopWatches interfaces 2020-02-20 18:01:09 +01:00
Molkobain
7347eed3ac PHPDoc 2020-02-20 17:43:14 +01:00
Molkobain
69d816e345 N°2275 - Add XML delta cleanup on datamodel BC breaking changes introduced in 2.7.0 2020-02-20 17:43:14 +01:00
Vincent Dumas
4008cb7688 Add blocks to enable customization 2020-02-20 17:18:39 +01:00
Lars Hippler
41a1bede70 🌐 Update DE-dictionary for iTop 2.7.0 (#113)
Many thanks @r0ert !
2020-02-20 16:04:24 +01:00
odain
e12845e412 N°2651 - Remove test directories from lib 2020-02-20 15:03:36 +01:00
odain
b30ad45792 N°2651 - Fix missing autoload 2020-02-20 14:58:39 +01:00
odain
84a11fb3c1 added namespace + mv iTopComposer + optimize FileIterator 2020-02-20 14:56:08 +01:00
Pierre Goiffon
ee39a387db N°2651 Remove tests from lib : browse dirs using SPL classes instead of GLOB 2020-02-20 14:56:08 +01:00
bruno DA SILVA
e3c6ac814e N°2651 - Removal of "Test" dirs within dependencies handled using composer 2020-02-20 14:56:08 +01:00
Eric
d668d65c70 N°2772 - Fix errors during upgrade. Prevent JS Dict load for setup pages. 2020-02-20 14:45:39 +01:00
Pierre Goiffon
e21e7c9cf0 🌐 N°2795 Fix dict typos 2020-02-20 09:36:33 +01:00
bruno DA SILVA
27a0de1da1 N°2154 - fix server crash in rare cases
Under undetermined circumstances, `exec('php -v')` called the current script triggering an infinite loop crashing the server
problem reported by @molkobain
see: https://stackoverflow.com/questions/43728378/running-php-files-through-shell-exec
2020-02-19 15:43:33 +01:00
Molkobain
d76e54996c PHPDoc 2020-02-19 11:54:50 +01:00
Pierre Goiffon
a4710f7542 N°2760 Abstract classes for extension API interfaces : remove return; for @return void methods 2020-02-18 18:15:45 +01:00
Eric
98a9c680c5 🐛 Updated rest example 2020-02-18 17:02:13 +01:00
Pierre Goiffon
a92157f763 N°2790 fix collapsibleLabel
* change icon when label closed
* fix switch in about dialog for licenses details
2020-02-18 16:34:51 +01:00
bruno DA SILVA
412f1a394f N°2574 - 💚 fix unit test
The behaviours has changed since the "password_renewed_date" is not changed only after the inter/update and no more just aftyer the $oUserLocal->Set('password')
2020-02-18 14:49:53 +01:00
Molkobain
dba6e8ce1a Fix images being too wide in HTML fields and caselogs in the end-users portal
Regression introduced in a previous version of iTop.
2020-02-17 16:29:21 +01:00
Molkobain
a127ca9ca0 N°2313 - Fix regression: No more validation message on password update in the end-users portal 2020-02-17 15:51:38 +01:00
Molkobain
0b5ee1e05c Internal: Fix typo in PHPDoc 2020-02-17 11:24:20 +01:00
Eric
f94e86ecea 🐛 Add missing function 2020-02-14 17:18:00 +01:00
Pierre Goiffon
fe770f36c5 N°2634 / N°2735 Migrate dashlet user prefs to new dashlet ID format 2020-02-14 15:59:09 +01:00
Pierre Goiffon
cf83bc7364 N°2634 / N°2735 Fix dashlets identifiers : was causing prb on widget init, prefs save
Dashlet id now includes :
* "CUSTOM-" if dashlet is contained in a custom dashboard, nothing elsewhere
* the ID of the dashboard
  - for menus : menu id escaped for HTML
  - for AttributeDashboard : <class>__<field>
* the row / cell / dashlet idx

Examples :
CUSTOM-UserRequestOverview_IDrow1-col0-0
Organization__overview_IDrow1-col0-12
2020-02-14 15:59:09 +01:00
Eric
76982a2846 Revert Last change. The values are already protected at this stage. 2020-02-14 15:42:05 +01:00
bruno DA SILVA
4cedd30625 N°2574 - bugfix and UI
- 🐛 fix regression preventing automatic update of password_renewed_date
 - 💄 add a "general information" fieldset
2020-02-13 15:23:56 +01:00
bruno DA SILVA
a86079c477 N°2154 - 🐛 fix an awful typo producing a nonsense
I'm sorry!
2020-02-13 15:21:01 +01:00
Eric
128a237392 N°2746 - Fix Tags configuration screen (removed EnumSet from tag editable list) 2020-02-13 12:31:22 +01:00
Eric
0ecfffe413 N°2746 - Fix export separator 2020-02-13 12:12:35 +01:00
Eric
ef3bdd63a4 N°2746 - Fix search from shortcut 2020-02-13 11:56:19 +01:00
Eric
585135c6c7 N°2758 - Keep AddCondition to avoid BC break 2020-02-13 11:56:01 +01:00
Eric
b3faa96a45 🌐 Add Trigger context label 2020-02-13 09:53:55 +01:00
Eric
6f04525cdf 🎨 cleanup code 2020-02-13 09:49:58 +01:00
Pierre Goiffon
03834fedb8 N°2369 deprecate MySQL views 2020-02-12 18:11:12 +01:00
Vincent Dumas
6bde8e867f Move menu "Universal Search" under "Query" 2020-02-12 18:01:38 +01:00
Molkobain
0e3d195250 N°2275 - Fix XML delta computation putting flags on wrong XML levels 2020-02-12 17:40:53 +01:00
Pierre Goiffon
fae8c9edbd N°2780 Add ContextTag::TAG_CONSOLE for ajax operations 2020-02-12 17:20:10 +01:00
Pierre Goiffon
133d267aca N°2329 Update TCPDF to version fixing unlink bug
Was updated to 6.3.2 fot PHP 7.4 compat, but this version had a regression (issue 159 in the original repo)
This commit integrates 6.3.4 that includes a fix for issue 159
2020-02-12 15:23:57 +01:00
Stephen Abello
166986f336 N°2314 - Markup extensibility: Replace some hardcoded values by overloadable variables 2020-02-12 14:53:19 +01:00
Stephen Abello
f76d649d1a Wee cleanup 2020-02-12 14:53:19 +01:00
Stephen Abello
30747b92c7 N°2755 - Security hardening 2020-02-12 14:53:19 +01:00
Stephen Abello
12ce718662 Internal: Add HtmlEntityDecode() to utils, a counterpart to HtmlEntities() 2020-02-12 14:53:19 +01:00
Molkobain
a1cdb46663 Internal: Refactor newsroom SCSS rules to real SCSS 2020-02-12 14:20:27 +01:00
Pierre Goiffon
824d8398a3 N°2634 / N°2735 Allow saving list prefs for all DashletObjectList
The id generated for the dashlets in the markup is the one used in the saved appUserPreferences. As no control is done during compilation nor in the Designer editor, we could have duplicates.
The first fix (081ba68a) was adding a generated suffix, but for default dashlet this was generated each time so the id was different on every page load ! For custom dashlets as their definition was saved in a XML file it was ok.
This new fix adds a prefix containing row and col id, so every time the id is the same. No duplicates should be found in the same cell.
2020-02-12 14:07:57 +01:00
Eric
406774aa15 N°2746 - Fix Import/Export using labels or code 2020-02-12 12:08:40 +01:00
Pierre Goiffon
dd8712e2e8 📝 Add more doc for \DBObject::GetAsHTML 2020-02-12 11:44:00 +01:00
Eric
767bcdf117 N°2746 - Fix unit tests (typo) 2020-02-11 17:00:55 +01:00
Eric
5e060737df N°2746 - Fix unit tests 2020-02-11 16:46:24 +01:00
Eric
d9bf0fe012 N°2746 - Fix breadcrumb for search of enumSet 2020-02-11 16:02:55 +01:00
Eric
93c9783b1a N°2746 - Fix empty search for TagSet 2020-02-11 14:51:22 +01:00
Eric
e9c1467026 N°2746 - Fix "Modify All" fatal error 2020-02-11 14:35:38 +01:00
Eric
863cb4cad6 N°2758 - Allow only one condition on ValueSetDef and restore cache 2020-02-11 11:54:00 +01:00
Pierre Goiffon
94b70fc473 N°2776 ObjectFormManager : change transaction scope
* move ApplyStimulus & triggers out of the transaction
* move \utils::RemoveTransaction to a finally block
2020-02-11 11:36:59 +01:00
Pierre Goiffon
4dc383cba8 N°2684 Fix setup broke when upgrading with a config file from another directory
In the moduleschoice screens we were using a wrong approot_url !
2020-02-11 09:41:48 +01:00
Pierre Goiffon
55d8a2316a 📝 GetAttributeFlags PHPDoc revised 2020-02-11 08:34:57 +01:00
Stephen Abello
fe8f274c14 N°2314 - Markup extensibility: Replace a hardcoded value by an overloadable variable 2020-02-10 15:33:47 +01:00
Stephen Abello
72fad49c4e N°2314 - Markup extensibility: Add default color to body node 2020-02-10 15:33:47 +01:00
Eric
888d0775e6 N°2758 - Removed ValueSetDef cache 2020-02-10 14:29:28 +01:00
Molkobain
db19f71758 N°2771 - Fix "Unknown form type" when changing user language in portal 2020-02-10 14:20:11 +01:00
Molkobain
a259443735 N°2314 - Markup extensibility: Add attribute flags as metadata to object forms 2020-02-10 13:27:36 +01:00
Pierre Goiffon
58e8ca1f50 📝 GetAttributeFlags PHPDoc 2020-02-10 09:56:31 +01:00
Pierre Goiffon
ab79426508 N°2293 some PHPDoc update 2020-02-07 18:21:02 +01:00
bruno DA SILVA
7e61917521 N°524 - password validity message can be superseded with conf 2020-02-07 17:25:17 +01:00
Molkobain
e42aab30a5 Internal: Fix regression introduced in 3d2a844f ("Close" button always displayed in object forms in IE) 2020-02-07 17:22:41 +01:00
Molkobain
a79ef0bd51 Update (massively) translations before iTop 2.7 release 2020-02-07 16:51:21 +01:00
Eric
5d88391109 N°2758 - Reset ValueSetDef cache when modifying some parameters 2020-02-07 14:27:22 +01:00
Molkobain
c56c04d84d N°2760 - Ease API interfaces implementation through abstract classes 2020-02-06 18:09:59 +01:00
Molkobain
f2b8f50a94 Internal: Add Anne to the sample data to welcome her! 👋 2020-02-06 18:07:51 +01:00
Molkobain
9de11a29fb PHPDoc 2020-02-06 16:25:25 +01:00
Molkobain
6537e00453 Internal: Add Matthieu to the sample data to welcome him! 👋 2020-02-06 15:53:26 +01:00
Eric
dd5f4909da Fix warning 2020-02-06 15:01:02 +01:00
Stephen Abello
ed67df734f N°2755 - Security hardening 2020-02-06 14:50:27 +01:00
Stephen Abello
44894526f1 N°2742 - HTML files preview are now raw text only 2020-02-06 14:27:13 +01:00
xtophe38
de78963b30 Fix DataAdministration translation to be aligned with other menus 2020-02-06 14:25:52 +01:00
bruno DA SILVA
948fd6f0ce N°2154 - improve robustness of submitted config validator
thanks to @molkobain 's awful provider's using PHP 4.4 within CLI
2020-02-06 14:07:39 +01:00
bruno DA SILVA
214dbeef5b N°2154 - var into string patterns can now also be enabled using server vars
- usage: $_SERVER['ITOP_CONFIG_PLACEHOLDERS']
 - plus removal of useless log Trace since this code is too early in iTop's init process for this feature
2020-02-06 14:05:08 +01:00
bruno DA SILVA
f2fbd8457d N°2498 - Authorize map extension
so as `.js.map` is not forbidden by apache
2020-02-06 14:05:08 +01:00
Molkobain
6a432c6a25 N°2757 - Fix count in group by dashlets 2020-02-06 12:12:27 +01:00
Molkobain
e96a8387a0 N°2750 - Regression: Fix default user profile image not shown in portal due to N°2060 2020-02-06 10:06:18 +01:00
Pierre Goiffon
f3576cffb0 📝 README : remove 2.4.* version as this branch isn't supported anymore by Combodo 2020-02-05 14:51:46 +01:00
Molkobain
c5625e6a8d Internal: Fix setup headers style due to 71708cf 2020-02-05 14:49:33 +01:00
Molkobain
3d2a844fef N°2313 - Markup extensibility: Improve success message display during the workflow 2020-02-05 12:10:15 +01:00
Molkobain
110a030902 PHPDoc 2020-02-05 12:10:15 +01:00
Stephen Abello
5ccd885607 Remove DB Tools from excluded modules 2020-02-05 12:04:26 +01:00
Stephen Abello
e5c6efbe69 Merge branch 'master' into develop
# Conflicts:
#	README.md
2020-02-05 11:24:44 +01:00
Stephen Abello
bd083d632f Update readme for 2.6.3 release 2020-02-05 11:22:39 +01:00
Stephen Abello
65b8132914 N°2314 - Markup extensibility: Fix collapsible icons in "About iTop" modal 2020-02-05 09:47:27 +01:00
Eric
3c2130aa72 N°2321 - Fix SQL request generation for inherited magic attributes 2020-02-04 15:54:03 +01:00
Stephen Abello
e70a2f75d3 N°2748 - Fix regression introduced by 71f5d29c, CKEditor's paragraph spacing wasn't coherent with how it's displayed in iTop 2020-02-04 11:41:10 +01:00
Molkobain
fe8e6ba4b0 N°2314 - Markup extensibility: Fix UI elements not using main colors variables 2020-02-04 10:32:57 +01:00
Eric
008614fde6 N°2321 - Fix SQL request generation for inherited magic attributes 2020-02-04 10:28:35 +01:00
Molkobain
ac6e60f5a1 N°2595 - Reorganize admin. console menus: Change new menu groups IDs to avoid collision with existing extensions 2020-02-04 09:50:11 +01:00
Stephen Abello
bf18d623d6 N°2314 - Markup extensibility: Add 2 additional themes for the backoffice
Adds a colored top bar to easily identify different environments (tests, production, ...)
2020-02-03 16:17:46 +01:00
Stephen Abello
10d04756ee N°2314 - Markup extensibility: Fall back on iTop's default theme when a non existing theme is selected 2020-02-03 15:12:59 +01:00
bruno DA SILVA
6e927114e0 N°2154 - 💚 fix tests
- the correct file is now versioned
2020-02-03 12:04:51 +01:00
Pierre Goiffon
682c24a873 N°2293 DBUpdate : save changed fields and corresponding previous values (#111)
* N°2293 DBUpdate : save changed fields and corresponding previous values for callbacks
* update PHPDoc
* remove m_aChanges and ListChangesUpdated() that were introduced in 2.7.0-beta
* add m_aPreviousValuesForUpdatedAttributes and ListPreviousValuesForUpdatedAttributes()

* :memo Woops forgot to change one PHPDoc

* 📝 Some more PHPDoc O:)

* 📝 Add more info in .doc README

* 📝 Well, again some PHPDoc O:)

* 📝 Replace inline @link by @see
@link are for URI, see https://docs.phpdoc.org/latest/references/phpdoc/inline-tags/link.html
2020-01-31 18:01:26 +01:00
bruno DA SILVA
d4b4ced649 🌐 update dictionaries
- set the translation as requested by Q&A
2020-01-31 17:29:38 +01:00
bruno DA SILVA
c2589492d9 📝 documentation generator dependencies handling improvement
- ignore /.doc/vendor
 - uses a lock file (at /.doc/composer.lock)
2020-01-31 17:29:38 +01:00
bruno DA SILVA
15c9cf926e 2154 - preserve "var" in conf
- add possibility to inject var using string patterns (ie: `'%env(DB_HOST)?:localhost%`)
 - on WriteToFile, preserve the non interpreted value when the interpreted value is kept the same
 - added unit tests for both behaviours
 - minor bugfix (default value in comment was wrong) and code readability improvements
2020-01-31 17:29:37 +01:00
Molkobain
78d4c8c7c7 Internal: Fix typo 2020-01-31 17:22:57 +01:00
Eric
d9e8eed084 💚 Fix CI on TagSet search (request have changed) 2020-01-31 16:13:59 +01:00
Eric
ebe86d09ee N°985 - Add applicable contexts on Trigger (logs) 2020-01-30 16:18:49 +01:00
Eric
5e5d368299 N°2657 - MTP : Progress Bar has disappeared (Search exact match) 2020-01-30 16:02:16 +01:00
Molkobain
f990a83453 N°2060 - Migrate error page to the Symfony framework 2020-01-30 13:56:32 +01:00
Molkobain
c6325dce8e Internal: Fix autoloader path for Symfony bin/console utility 2020-01-30 13:56:32 +01:00
Eric
bbca1625fb N°2657 - MTP : Progress Bar has disappeared (Search exact match) 2020-01-30 12:31:22 +01:00
Pierre Goiffon
53975d1d8f 📝 Replace inline @link by @see
@link are for URI, see https://docs.phpdoc.org/latest/references/phpdoc/inline-tags/link.html
2020-01-30 09:35:25 +01:00
Pierre Goiffon
1358bf9b7f 📝 Well, again some PHPDoc O:) 2020-01-30 09:25:53 +01:00
Pierre Goiffon
7c17be4db6 📝 Add more info in .doc README 2020-01-30 09:22:38 +01:00
Pierre Goiffon
367a92b711 📝 Some more PHPDoc O:) 2020-01-30 08:39:18 +01:00
Pierre Goiffon
0a3201dd41 :memo Woops forgot to change one PHPDoc 2020-01-29 18:43:46 +01:00
Pierre Goiffon
d82690dd84 N°2293 DBUpdate : save changed fields and corresponding previous values for callbacks
* update PHPDoc
* remove m_aChanges and ListChangesUpdated() that were introduced in 2.7.0-beta
* add m_aPreviousValuesForUpdatedAttributes and ListPreviousValuesForUpdatedAttributes()
2020-01-29 18:36:46 +01:00
Eric
7f9e4385ac N°2657 - MTP : Progress Bar has disappeared (support any code length) 2020-01-29 18:01:17 +01:00
Stephen Abello
aa3e284af3 Update README for 2.7.0-beta2 2020-01-29 16:59:16 +01:00
Stephen Abello
a941e5f752 Merge branch 'develop' of https://github.com/Combodo/iTop into develop 2020-01-29 11:49:38 +01:00
Stephen Abello
b1878f7265 Update version number for 2.7.0-beta2 2020-01-29 11:49:20 +01:00
Molkobain
b106a54c50 N°2314 - Markup extensibility: Add 2 additional themes for the backoffice
Basic color changes to identify different environments (tests, production, ...)
2020-01-29 11:04:20 +01:00
Molkobain
002da0b387 N°2314 - Markup extensibility: Rework some SCSS variables 2020-01-29 11:04:20 +01:00
acognet
6b9e723a45 Merge remote-tracking branch 'origin/develop' into develop 2020-01-29 09:55:44 +01:00
acognet
b54e457cbb N°2038 - New dashlet Kanban 2020-01-29 09:54:56 +01:00
jbostoen
e750dd53d8 NL translations for iTop 2.7.0 (#94)
Made by @jbostoen & @Hipska in PR #94 . Many thanks to them !
2020-01-29 09:51:11 +01:00
Eric
da6a55504e N°985 - AttributeEnumSet (portal support) 2020-01-28 17:37:17 +01:00
Eric
b58356c42e N°985 - Add applicable contexts on Trigger (search) 2020-01-28 17:37:17 +01:00
Molkobain
524e43b8c4 N°2313 - Markup extensibility: Add metadata on session messages in the end-users portal 2020-01-28 17:27:32 +01:00
Eric
a80bd6f2b9 N°985 - Add applicable contexts on Trigger (display read-only) 2020-01-28 15:29:12 +01:00
Eric
08eb9ee630 🌐 update dictionaries for 2.7.0-beta2 2020-01-28 15:29:12 +01:00
Eric
05485b838e N°985 - Add applicable contexts on Trigger (display read-only) 2020-01-28 15:29:12 +01:00
Eric
029fe6882d N°985 - Add applicable contexts on Trigger (Fix regression) 2020-01-28 15:29:12 +01:00
Eric
b31eb6aab9 Comment 2020-01-28 15:29:12 +01:00
Molkobain
a96c194676 N°2313 - Markup extensibility: Add CSS classes on object details and lists in the end-users portal 2020-01-28 15:25:12 +01:00
bruno DA SILVA
0d85331bca 1627 - Ticket ref sometimes duplicate
🐛 INSERT/UPDATE do not require to free the results
2020-01-28 11:59:04 +01:00
Pierre Goiffon
e9dec8ae05 N°330 Attachments as table : fix table sorting on size and date
* portal : use data-order attribute for the DataTable plugin (https://datatables.net/manual/data/orthogonal-data)
* console : add textExtraction override for the attachments table (https://mottie.github.io/tablesorter/docs/example-option-text-extraction.html)
2020-01-28 10:11:29 +01:00
bruno DA SILVA
6a6a0ffa24 1627 - Ticket ref sometimes duplicate
🐛 fix ref. generation when inside a transaction (by opening a new connection).
note: the portal make uses of such a transaction.
2020-01-27 17:58:30 +01:00
Molkobain
87623fba3d PHPDoc 2020-01-27 16:58:55 +01:00
Molkobain
a7619f2820 N°2313 - Markup extensibility: Add metadata on admin. console object lists 2020-01-27 16:58:55 +01:00
bruno DA SILVA
cff53d71ba N°2154 & N°2720 & N°2684 - config integrity during setup 2020-01-27 15:21:50 +01:00
Molkobain
71708cfbc7 Internal: Fix setup headers size 2020-01-27 14:54:53 +01:00
acognet
e05b3a5fb9 N°2618 - Fix missing scroll bar in DataModel Viewer for class with large number of attributs 2020-01-27 10:47:19 +01:00
acognet
bfcb1fdb30 N°2618 - Fix missing scroll bar in DataModel Viewer for class with large number of attributs 2020-01-27 10:47:19 +01:00
Eric
cc4e1ea104 N°985 - Add applicable contexts on Trigger (Add portal contexts) 2020-01-24 17:43:59 +01:00
Molkobain
5485897bbb N°2313 - Markup extensibility: Fix raw value and attribute label not always being escaped 2020-01-24 17:38:18 +01:00
Molkobain
27f343e543 N°330 - Attachments: Align table rendering to linkset tables rendering 2020-01-24 17:02:02 +01:00
Molkobain
cca79735fc N°330 - Attachments: Fix empty "Delete" column displayed all the time 2020-01-24 17:02:02 +01:00
Molkobain
c48bbfd32a N°2313 - Markup extensibility: Add metadata on attachments 2020-01-24 17:02:02 +01:00
Molkobain
3ae2058f6f N°2314 - Markup extensibility: Refactor utils::GetCSSFromSASS() to enable SCSS compilation out of a file 2020-01-24 17:02:02 +01:00
Molkobain
0a63568715 PHPDoc 2020-01-24 17:02:02 +01:00
Molkobain
f878eea68d N°330 - Attachments: Update MS Office and OpenOffice file icons with more modern versions 2020-01-24 17:02:02 +01:00
Eric
8ad2b8091c N°2657 - MTP : Progress Bar has disappeared 2020-01-23 11:28:52 +01:00
bruno DA SILVA
d6ca08efb8 N°2730 - Cannot log callstack with callback into EventIssue 2020-01-22 17:37:44 +01:00
Molkobain
ba8a2c1b15 N°2710 - Fix setup crash due to PHP notices (regression introduced in 59678955) 2020-01-22 13:32:31 +01:00
Molkobain
bd9da07734 Merge branch 'support/2.5' 2020-01-22 09:55:50 +01:00
Molkobain
3dbbf296b8 Exclude combodo-db-tools module from packages by default 2020-01-22 09:10:54 +01:00
bruno DA SILVA
0ae0336e04 N°1627 - Ticket ref sometimes duplicate
🐛 Ticket creation no more crash if the current user have limited read access
2020-01-21 18:31:09 +01:00
Molkobain
8df0ef6af9 N°2723 - Fix double scrollbar in search criterion 2020-01-21 17:40:11 +01:00
Molkobain
d77c77c03b PHPDoc 2020-01-21 17:20:12 +01:00
Molkobain
5967895561 N°2710 - Fix extremely slow page load for first user after setup (regression introduced in N°2314) 2020-01-21 17:19:16 +01:00
Molkobain
6e754d4fa5 Setup: Fix graphiz detection feedback message on Windows systems 2020-01-21 15:50:33 +01:00
Molkobain
165fd0e700 N°2314 - Setup: Improve UI of user message when CRON is running 2020-01-21 15:35:09 +01:00
Molkobain
d100ce8005 PHPDoc and code formatting 2020-01-21 15:35:09 +01:00
Eric
770f5a7b67 N°985 - Add applicable contexts on Trigger (order values in DB) 2020-01-21 14:55:03 +01:00
Molkobain
a993f6a80b PHPDoc 2020-01-21 14:19:45 +01:00
Molkobain
c8bb710d21 N°2314 - Markup extensibility: Fix regression introduced in the previous commit (used a PHP 7.x function) 2020-01-21 14:17:44 +01:00
Molkobain
d963fbd8cf N°2314 - Markup extensibility: Fix crash when no <theme> defined in datamodel 2020-01-21 12:20:59 +01:00
Eric
beda8e2810 N°985 - Add applicable contexts on Trigger (fix MTP warnings) 2020-01-21 12:01:42 +01:00
Pierre Goiffon
083f8d69c2 Revert "N°2618 DataModel viewer : fix no vertical scrollbar in MSIE"
Was introducing a regression in Chrome & Fx (cannot change tab anymore)
This reverts commit 8a666b09d6.
2020-01-21 10:51:16 +01:00
Eric
1c16eeb5e4 N°2240 - Supportability - Maintenance mode (setup reset maintenance mode) 2020-01-21 10:27:47 +01:00
Stephen Abello
ecc0b57b31 Merge branch 'master' into develop
# Conflicts:
#	css/css-variables.scss
#	css/light-grey.css
#	datamodels/2.x/authent-external/module.authent-external.php
#	datamodels/2.x/authent-ldap/module.authent-ldap.php
#	datamodels/2.x/authent-local/module.authent-local.php
#	datamodels/2.x/itop-attachments/module.attachments.php
#	datamodels/2.x/itop-backup/module.itop-backup.php
#	datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php
#	datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php
#	datamodels/2.x/itop-config/module.itop-config.php
#	datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php
#	datamodels/2.x/itop-full-itil/module.itop-full-itil.php
#	datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/module.itop-portal-base.php
#	datamodels/2.x/itop-portal/module.itop-portal.php
#	datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php
#	datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php
#	datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php
#	datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php
#	datamodels/2.x/itop-tickets/module.itop-tickets.php
#	datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php
#	datamodels/2.x/version.xml
2020-01-20 16:42:42 +01:00
Stephen Abello
be9f6eff29 Merge branch 'develop' of https://github.com/Combodo/iTop into develop 2020-01-20 16:41:44 +01:00
Stephen Abello
50a8af4082 Update version number for 2.6.3 2020-01-20 16:30:51 +01:00
Stephen Abello
6a1125875b Merge branch 'support/2.5'
# Conflicts:
#	css/css-variables.scss
#	css/light-grey.css
#	datamodels/2.x/authent-external/module.authent-external.php
#	datamodels/2.x/authent-ldap/module.authent-ldap.php
#	datamodels/2.x/authent-local/module.authent-local.php
#	datamodels/2.x/itop-attachments/module.attachments.php
#	datamodels/2.x/itop-backup/module.itop-backup.php
#	datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php
#	datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php
#	datamodels/2.x/itop-config/module.itop-config.php
#	datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php
#	datamodels/2.x/itop-full-itil/module.itop-full-itil.php
#	datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/module.itop-portal-base.php
#	datamodels/2.x/itop-portal/module.itop-portal.php
#	datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php
#	datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php
#	datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php
#	datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php
#	datamodels/2.x/itop-tickets/module.itop-tickets.php
#	datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php
#	datamodels/2.x/version.xml
2020-01-20 16:10:21 +01:00
Stephen Abello
878c23892d Update version number for 2.5.4 2020-01-20 15:59:08 +01:00
Eric
900e8ac6d7 N°985 - Add applicable contexts on Trigger 2020-01-20 15:50:08 +01:00
Stephen Abello
248dab9289 N°2633 - Security hardening 2020-01-20 15:46:04 +01:00
Molkobain
2fcea4d02e N°2313 - Markup extensibility: Add field label in its metadata 2020-01-20 14:43:40 +01:00
Stephen Abello
1927fc743a N°2314 - Fix left padding for menu entries 2020-01-20 11:20:56 +01:00
Molkobain
6aff09eaf7 N°2708 - Internal: Fix regression introduced with N°2313 "Undefined index 'prefix'" 2020-01-20 11:16:07 +01:00
Molkobain
54e9830a3b PHPDoc 2020-01-20 09:53:22 +01:00
Molkobain
a45819dbf0 N°2682 - Portal: Fix transaction ID not being removed 2020-01-17 17:40:37 +01:00
Molkobain
e8aaec5789 N°2060 - Regression: Fix missing PORTAL_ID constant 2020-01-17 17:33:52 +01:00
Molkobain
d16c0ffef9 N°2313 - Markup extensibility: Add metadata on admin. console object creation forms 2020-01-17 14:16:31 +01:00
Molkobain
24ad593dc8 N°2313 - Markup extensibility: Add password attributes to exclude list in metadata 2020-01-17 09:03:14 +01:00
Molkobain
0b67828ab9 Add comments in standard end-users portal XML 2020-01-17 09:03:14 +01:00
Eric
8a1a78444d N°2249 - Supportability - Updater module (unified version name) 2020-01-16 18:13:58 +01:00
Eric
4552bc0778 N°2249 - Supportability - Updater module (changed version name in the priv_module_install table) 2020-01-16 17:42:02 +01:00
Eric
3a113e31fb N°2249 - Supportability - Updater module (run setup when error occurs) 2020-01-16 17:25:28 +01:00
Pierre Goiffon
8a666b09d6 N°2618 DataModel viewer : fix no vertical scrollbar in MSIE
The scrollbar is present on the right side but after viewport limit so not visible !
Can't change div.ui-layout-pane.ui-layout-center width as it is calculated dynamically by JS Layout...
So added another container with a margin. The CSS rules are added to MSIE only using the media query tip :/
2020-01-16 16:40:36 +01:00
Pierre Goiffon
0d9dc34a08 Schema.php : replace <br/> to <br> (might break on MSIE) 2020-01-16 15:06:04 +01:00
Pierre Goiffon
c7ca1eeab5 🎨 Code formatting on pages/schema.php 2020-01-16 15:06:04 +01:00
Eric
02265135e3 N°2249 - Supportability - Updater module (run setup when error occurs) 2020-01-16 11:43:17 +01:00
Eric
2c1bf665c3 N°2249 - Supportability - Updater module (Add read-only warning) 2020-01-16 11:34:50 +01:00
Molkobain
60b6fcc783 N°2313 - Markup extensibility: Better display of success messages on form validation 2020-01-16 11:34:08 +01:00
Molkobain
53adb37f43 N°2060 - Fix session messages and SCSS compilation services being cached 2020-01-16 11:34:08 +01:00
Molkobain
a6fe564a95 Add comments in standard end-users portal XML 2020-01-16 11:34:08 +01:00
Pierre Goiffon
4945f25d49 N°2602 Portal : fix no more border around new caselog editor
With the new version of CKE N°2271, container is span.cke on MSIE instead of div.cke
2020-01-16 11:27:24 +01:00
Eric
e5f3daf88a N°2249 - Supportability - Updater module (Add read-only warning) 2020-01-16 11:19:30 +01:00
Eric
cc3e6d64e1 N°2249 - Supportability - Updater module (Allow to run setup in case of failure) 2020-01-16 10:49:49 +01:00
Eric
8024aad43d N°2249 - Supportability - Updater module (Add read-only warning) 2020-01-16 10:47:37 +01:00
Pierre Goiffon
757dbb8b25 N°2311 login page : add autofocus attribute to the id field
https://caniuse.com/#feat=autofocus
2020-01-16 10:38:08 +01:00
Eric
b370deaac9 N°2313 - Markup extensibility: Add support for both code AND title in admin. console tabs 2020-01-16 09:56:22 +01:00
Eric
026b7e1836 N°2249 - Supportability - Updater module (split ajax calls) 2020-01-15 17:09:31 +01:00
Eric
d03b924240 N°2249 - Supportability - Updater module (split ajax calls) 2020-01-15 16:58:36 +01:00
Eric
97a047e38f N°2249 - Supportability - Updater module (split ajax calls) 2020-01-15 16:42:47 +01:00
Eric
5be800cfce N°2249 - Supportability - Updater module (split ajax calls) 2020-01-15 15:48:54 +01:00
Molkobain
956b597e50 Fix how user data is retrieved for "Form Prefill" in the end-users portal 2020-01-15 15:16:50 +01:00
Molkobain
57100dee9f N°2060 - WIP: Fix cached part of the portal (sync. commit) 2020-01-15 12:53:40 +01:00
Eric
c3cc1afec1 🙈 remove unnecessary info 2020-01-15 11:37:10 +01:00
Pierre Goiffon
7fe24f58f3 N°330 Display attachments as table : portal remove author column 2020-01-15 10:26:25 +01:00
Molkobain
e4160c7cf2 N°2702 - Portal: Fix origin modal not closing when switching to editing of an object 2020-01-15 10:15:36 +01:00
Molkobain
7d87768ec4 PHPDoc and warnings suppression 2020-01-15 10:15:36 +01:00
Molkobain
9946e6c41a Fix typo 2020-01-15 10:15:36 +01:00
Stephen Abello
02b483e33e Setup's cursor style on label wasn't present in .scss file and was lost since 7b6481e 2020-01-15 10:14:59 +01:00
Stephen Abello
7b6481efbd N°2112: Setup alert message introduced by 83ba909 stopped working since 797893d🐒 🐒 2020-01-15 10:09:46 +01:00
Molkobain
efef582119 N°2306 - Security hardening (Fix regression introduced in f3b66a44, thanks to @bruno-ds !) 2020-01-15 08:42:35 +01:00
Molkobain
5056e561fe PHPDoc 2020-01-15 08:42:35 +01:00
Molkobain
4400cfde62 N°2313 - Markup extensibility: Update usages of admin. console tabs to have codes and titles 2020-01-15 08:42:35 +01:00
Molkobain
5a39581c60 N°2313 - Markup extensibility: Add support for both code AND title in admin. console tabs 2020-01-15 08:42:35 +01:00
Pierre Goiffon
4eab0e6450 N°330 Display attachments as table : portal improvements
* display attachments count in section title, updated on each add/delete
* remove "no attchments message" on adding new attachment
2020-01-14 11:56:20 +01:00
Molkobain
f3b66a44ee N°2306 - Security hardening 2020-01-14 11:50:50 +01:00
Molkobain
558f108520 N°2314 - Change breadcrumb icons color to black instead of Combodo's orange 2020-01-14 11:09:01 +01:00
Molkobain
07a93d12e2 Cleanup: Remove old/unused images/CSS files (Exhaustive list in migration notes) 2020-01-14 11:09:01 +01:00
Eric
ce127278bb N°2434 - Track field Comment in core/delete - API REST 2020-01-14 10:46:21 +01:00
Molkobain
887946144c N°2696 - Upgrade ArchiveTar to v1.4.9 (PHP 7.4 compatibility) 2020-01-14 10:35:53 +01:00
Molkobain
cc887c29fd N°2696 - Upgrade SCSSPHP to v1.0.6 (PHP 7.4 compatibility) 2020-01-14 10:35:53 +01:00
Molkobain
460836852e N°2696 - Upgrade SwiftMailer to v5.4.12 (Allow explicit tls1.0, tls1.1, tls1.2 for startTLS) 2020-01-14 10:35:53 +01:00
Eric
208d7ee7ba N°2093 - ApplyStimulus return true when stimuli is not applicable 2020-01-14 10:27:55 +01:00
Eric
3d92b73ae5 :globe-with-meridian: changed filesystem into files for itop-core-update 2020-01-14 10:14:03 +01:00
Stephen Abello
deddb0824b N°2315: Forgot password sent page needed stylization 2020-01-14 09:26:58 +01:00
Vladimir Kunin
3718899663 🌐 Update Russian translations for 2.7.0-beta 2020-01-13 17:52:15 +01:00
Pierre Goiffon
7f30d74f30 N°2269 Update Font Awesome to 5.12.0 2020-01-13 10:47:57 +01:00
Eric
21199fce34 N°2240 - Supportability - Maintenance mode exit on MTP or core update error 2020-01-10 15:32:29 +01:00
Pierre Goiffon
ad821e7d9c N°2651 rollback gitignore for lib tests dirs
Too dangerous ! We'll work properly on this but for 2.8
2020-01-10 15:23:15 +01:00
Eric
881fc2a1de N°2240 - Supportability - Maintenance mode exit on MTP or core update error 2020-01-10 14:14:20 +01:00
Vincent Dumas
44ee6baddb N°2675: Fix AdminTools DataSynchro creation
User with a profile enabling write access on the group id="AdminTools" was not able to create a DataSynchro also it should have been.
2020-01-09 16:07:47 +01:00
Federico Lazcano
42d782740e Paste error! 2020-01-09 10:05:22 +01:00
Federico Lazcano
cf16229948 🌐 Typos and new translations in ES CR 2020-01-09 10:05:22 +01:00
Federico Lazcano
a25427f4c6 Change from alias to real name
Sorry @Molkobain i changed my mind :-|
2020-01-09 10:01:03 +01:00
Federico Lazcano
04b2f7c836 🌐 Added ES CR translations 2020-01-09 09:28:36 +01:00
Molkobain
0f917af55a 👥 Add @lazki to our contributors list. Thanks! 👏 2020-01-09 09:12:27 +01:00
Federico Lazcano
daaed4696e 🌐 Typo in ES CR Translation 2020-01-09 09:08:34 +01:00
Pierre Goiffon
5f52c273d9 N°2329 PHP 7.4 compat : update setup requirements
This PHP version should be ok : we will give it a try during the beta program
2020-01-09 09:05:24 +01:00
Molkobain
b8d35e4783 👥 Add Guy Couronné (@GurneyHallack) to our contributors list! 2020-01-08 19:53:12 +01:00
Molkobain
149dff4b4d N°2313 - Markup extensibility: Add markup hooks on BrowseBrick and ManageBrick tables 2020-01-08 19:48:45 +01:00
Molkobain
f235e0cd66 Update copyright 2020-01-08 19:48:45 +01:00
Pierre Goiffon
e47e02932a N°2329 PHP 7.4 compat : fix warnings in TCPDF
Integrate last TCPDF fork version (6.3.2)
2020-01-08 17:50:51 +01:00
Eric
4544bba652 N°2240 - Supportability - Maintenance mode (setup CRON message) 2020-01-08 17:29:53 +01:00
Eric
9445e12254 MSIE 11 minimum 2020-01-08 17:23:36 +01:00
Eric
951945a607 N°2240 - Supportability - Maintenance mode (Better REST/Export message) 2020-01-08 17:17:34 +01:00
Eric
34f8fff01c Fetch() ignore row when sub-class does not exist 2020-01-08 16:38:11 +01:00
Stephen Abello
8d45e48ce1 🥅 N°1192 Portal: Increase navigation rules checks robustness 2020-01-08 15:31:19 +01:00
Eric
ed26f1cecc Fix menu creation flags 2020-01-08 15:10:10 +01:00
Molkobain
bc298afda3 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	datamodels/2.x/combodo-db-tools/cs.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/da.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/datamodel.combodo-db-tools.xml
#	datamodels/2.x/combodo-db-tools/db_analyzer.class.inc.php
#	datamodels/2.x/combodo-db-tools/dbtools.php
#	datamodels/2.x/combodo-db-tools/de.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/default.css
#	datamodels/2.x/combodo-db-tools/default.scss
#	datamodels/2.x/combodo-db-tools/en.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/es_cr.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/fr.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/hu.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/it.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/ja.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/module.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/nl.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/pt_br.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/ru.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/tr.dict.combodo-db-tools.php
#	datamodels/2.x/combodo-db-tools/zh_cn.dict.combodo-db-tools.php
2020-01-08 12:03:55 +01:00
Molkobain
4f0e3430c0 Merge remote-tracking branch 'origin/support/2.5' 2020-01-08 11:58:15 +01:00
Molkobain
3347f400b8 Internal: Revert files deleted by mistake 🙈 2020-01-08 11:57:29 +01:00
Molkobain
6082308e20 Add combodo-db-tools/1.0.7 module as a default module 2020-01-08 11:40:35 +01:00
odain
1fc290587c N°2154: Fix security breach (scratch install usecase) 2020-01-08 10:10:49 +01:00
Molkobain
77fa02fcf9 PHPDoc and warnings suppression 2020-01-08 10:06:03 +01:00
Molkobain
d445551031 N°1986 - Fix regression introduced in b91183e9, creation form should never be read-only 2020-01-08 10:05:33 +01:00
Molkobain
ebfe9da464 N°2306 - Security hardening 2020-01-07 20:59:09 +01:00
odain
fdd79e91f0 N°2154: Fix security breach (scratch install usecase) 2020-01-07 17:44:39 +01:00
Molkobain
94a09493b0 N°2306 - Security hardening (BC break for some portal extensions, see migration notes) 2020-01-07 17:40:03 +01:00
Molkobain
56dbbb09dc Fix dependencies between modules 2020-01-07 17:00:19 +01:00
Pierre Goiffon
f019e05af5 N°2042 deprecated chrono extensivity 2020-01-07 16:07:25 +01:00
bruno DA SILVA
838c4f123c 👌 peer review
mostly coding convention,

thanks @molkobain
2020-01-07 15:34:27 +01:00
bruno DA SILVA
2043010aad N°2293 - API OnDBUpdate and AfterUpdate need modified fields and previous data
- add a getter for the protected property DBObject::$m_aChanges
2020-01-07 15:05:29 +01:00
bruno DA SILVA
cda18b950e N°524 - Password policy
- removal of a forgotten console.debug
2020-01-07 14:28:20 +01:00
Molkobain
acf28ca4aa N°2306 - Security hardening 2020-01-07 13:54:16 +01:00
Eric
864ded2102 Refactor Core Update (+8 squashed commit)
Squashed commit:

[b907bb759] Refactor Core Update

[5da2473aa] Refactor Core Update

[3fce45615] Refactor Core Update

[5f050a828] Refactor Core Update

[4b9b85174] Refactor Core Update

[f637ed358] Refactor Core Update

[56543edce] Refactor Core Update

[7f06900ef] Refactor Core Update
2020-01-07 10:00:14 +01:00
Eric
5cdc58846b Allow browsing developed OQL class tree 2020-01-07 10:00:14 +01:00
Eric
45cd96eb0d More informative message when class does not exist 2020-01-07 10:00:14 +01:00
Eric
c8335499fd Allow browsing developed OQL class tree 2020-01-07 10:00:14 +01:00
Eric
7f3efe59ab Refactor Core Update (+3 squashed commit)
Squashed commit:

[e1cbfe93f] Refactor Core Update

[41ec2adf7] Refactor Core Update

[ca6cefca3] Refactor Core Update
2020-01-07 10:00:13 +01:00
bruno DA SILVA
69551378c2 n°524 - password policy
- ajax message is now translated in the user's language
 - prevent the form submission if the password policy is not respected
2020-01-06 18:33:47 +01:00
odain
f3fd4bde87 💚 2020-01-06 16:09:41 +01:00
bruno DA SILVA
c115f64cb5 N°2154 - Security breach 2020-01-06 15:31:31 +01:00
Stephen Abello
ee61c1e8fb N°524: Fix style for inputs' feedback on "change password" page 2020-01-06 13:51:40 +01:00
bruno DA SILVA
e716fb118b N°2574 - enable Password expiry 2020-01-06 12:14:34 +01:00
bruno DA SILVA
b0c76346a5 N° 524 - password policy
better colors for : "change pwd" page: add feedback during the password typing
2020-01-06 11:45:48 +01:00
Pierre Goiffon
56807fd941 Person sample file : fix Descartes email
Fix typo introduced in 906e309791
2020-01-06 11:17:57 +01:00
Molkobain
b56f248b79 👥 Add Pimkie to our contributors list (BR / IT translations) 2020-01-06 09:50:15 +01:00
bruno DA SILVA
7a85201a07 524 - password policy
"change pwd" page: add feedback during the password typing
2020-01-06 09:31:28 +01:00
Purple Grape
97ebffd5fb improved chinese translations
1 improved chinese translations
2 fix some missing enries
3 correct line number against english language
2020-01-06 08:43:25 +01:00
Eric
46c239c211 typo 2020-01-03 16:40:49 +01:00
Vincent Dumas
906e309791 Replace Erri De Luca by René Descartes 2020-01-03 11:10:44 +01:00
bruno DA SILVA
4ad1ca0fc6 add option classmap-authoritative to composer.json 2020-01-02 14:19:00 +01:00
bruno DA SILVA
015955f396 N°2306 - Security hardening 2019-12-30 17:31:50 +01:00
Pierre Goiffon
9bee1905c8 N°2329 PHP 7.4 compat : remove get_magic_quotes_gpc/get_magic_quotes_runtime calls
Methods are now deprecated and since PHP 5.4 were always returning false
2019-12-24 17:30:12 +01:00
Pierre Goiffon
8ab157eae4 N°2329 PHP 7.4 compat, AttributeDefinition : fix visibilities of members called by AttributeDefinition::__construct
Not enough to get rid of child classes constructors though :/
2019-12-24 15:28:36 +01:00
Molkobain
17978b829b Internal: Simplify classes FQN 2019-12-24 15:08:45 +01:00
Molkobain
4ddb23cd7c N°2654 - Portal: Fix filter on external key when coming from filter brick 2019-12-24 15:08:45 +01:00
Pierre Goiffon
e27eb7419e N°2329 PHP 7.4 compat, AttributeDefinition : add __construct() to child classes
Shouldn't be necessary but if not present PHP 7.4.0/7.4.1 is crashing when executing new Attribute...(...)
2019-12-24 12:22:49 +01:00
Pierre Goiffon
64ef572429 🎨 AttributeDefinition : some little inspections fixes, and fix misordered function modifiers
According to PSR, we should use public static and not static public
See https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards
2019-12-24 12:22:49 +01:00
Pierre Goiffon
2f81e0fd6f N°2329 PHP 7.4 compat : remove deprecated array with curly braces 2019-12-23 18:44:52 +01:00
odain
987f1f7dbf N°2568 - Log_KPI viewer in the console - Fix broken links 2019-12-23 17:17:10 +01:00
Pierre Goiffon
b53c91f7f3 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	Jenkinsfile
#	setup/setuputils.class.inc.php
2019-12-23 11:34:55 +01:00
Pierre Goiffon
5fce2a2c1c Setup : fix MySQL TLS wiki URL 2019-12-23 11:27:56 +01:00
Pierre Goiffon
13d31ac211 utils::GetDefaultUrlAppRoot : make comparison case insentitive, add a test 2019-12-23 11:06:29 +01:00
Pierre Goiffon
57ae29cf2f \SetupPage::error : remove "error" title as existing calls already add it 2019-12-23 09:54:07 +01:00
Pierre Goiffon
0b3895e39e Core update : fix CanUpdateCore result never displayed on server with warning enabled
Was caused by a call to :
\Combodo\iTop\FilesInformation\Service\FilesInformationUtils::Scan
With path set to ''. Made from :
\Combodo\iTop\FilesInformation\Service\FilesInformation::CanUpdateCore
2019-12-20 18:37:51 +01:00
Pierre Goiffon
0d231d9b94 N°2651 Remove lib test files from index 2019-12-20 17:07:20 +01:00
Molkobain
27a6abeeb3 Internal: Add Benjamin to the sample data to welcome him! 2019-12-20 12:21:02 +01:00
Pierre Goiffon
c75e6960a7 N°2651 Remove lib test files from index 2019-12-20 11:57:18 +01:00
Pierre Goiffon
4766ca3fd0 N°2650 fix run_query error handling incompatible with PHP < 7.3.0 2019-12-20 09:21:00 +01:00
odain
523dd97eca N°2570 Update iTop license list 2019-12-19 16:40:17 +01:00
bruno DA SILVA
c09bd2bfc6 2626 - log modularity: filterable logs using minimal log level per channel
🔊 Adding log level Trace, which is not logged by default (as for Debug)
2019-12-19 11:17:18 +01:00
Molkobain
bd662eaf19 Update README to add 2.7.0-beta section 2019-12-18 16:47:11 +01:00
Pierre Goiffon
ff75ecfe27 💄 Setup : add styling on prerequisites summary title 2019-12-18 11:12:21 +01:00
Pierre Goiffon
54f8b74383 📝 restore WizardStep documentation
Do not add documentation in a doc block containing @copyright O:)
2019-12-18 11:05:41 +01:00
Pierre Goiffon
18a506673f 💄 Setup : restore label{ cursor:pointer;} 2019-12-18 10:44:28 +01:00
Pierre Goiffon
a108be8517 N°330 Fix first column not centered when creating attachment on new ticket 2019-12-18 09:56:33 +01:00
Eric
3e57c3b1e9 N°2249 - Supportability - Updater module (application upgrade) 2019-12-18 09:45:34 +01:00
Stephen Abello
f18e27a183 N°2314 Setup progress bar is now cuter (following 01cb88a) 2019-12-18 09:40:48 +01:00
Pierre Goiffon
358efb0f2f N°2518 Change log level for non existent legacy log file when trying to rename 2019-12-18 09:28:11 +01:00
bruno DA SILVA
723fc917f1 🐛 change back to an authoritative autoloader 2019-12-18 09:25:35 +01:00
Pierre Goiffon
01f34eea29 N°330 Attachments display as table : portal. Table is now responsive, attachment section is collapsable (collapsed by default) 2019-12-17 18:14:21 +01:00
bruno DA SILVA
705d941979 ⬆️ Upgrading dependencies 2019-12-17 17:43:18 +01:00
Stephen Abello
691acb45e6 N°2314 2 css variables were not overridable 2019-12-17 15:23:02 +01:00
Pierre Goiffon
97e4ff30ff N°330 attachments size column : right align (both on console and portal)
Allows easier comparison to see bigger files
2019-12-17 15:12:28 +01:00
Pierre Goiffon
34c76c735a N°330 Attachments display as table : portal. Various improvements
* update CSS for table layout (vertical align, change text-align)
* tooltip : fix max size was not used anymore (tooltip was removing the style attributes)
* tooltip : fix tooltip always available
* delete button background color set to same as validate button
* remove "type" column
* reduce attachment line height
2019-12-17 15:08:22 +01:00
Pierre Goiffon
47d8e35639 N°330 Improve \ormDocument::GetFormattedSize
* Fix typo in method name (many thanks @jbostoen !)
* Use \utils::BytesToFriendlyFormat
2019-12-17 15:08:22 +01:00
odain
d4dc739b30 Finalize license update file 2019-12-17 14:56:13 +01:00
acognet
b84859b07e optimizing the display of the label in FieldsExpression 2019-12-17 13:07:21 +01:00
bruno DA SILVA
3f154fa765 2626 - log modularity: filterable logs using minimal log level per channel
🐛 logs are no more written twice.
2019-12-17 12:33:34 +01:00
Eric
f31e32d7a9 N°2249 - Supportability - Updater module (disable submit when no file provided) 2019-12-17 11:53:29 +01:00
Molkobain
1589535a45 Internal: Add automatic refresh of the maintenance page every 30s to redirect user to iTop when done 2019-12-17 11:48:27 +01:00
odain
53353ec9e1 Merge branch 'develop' of https://github.com/Combodo/iTop into develop 2019-12-17 11:44:17 +01:00
odain
a601b1c59a release: css part of community-licenses.xml 2019-12-17 11:44:13 +01:00
odain
e093abcb2b release: lib part of community-licenses.xml 2019-12-17 11:28:05 +01:00
Molkobain
01cb88a661 N°2314 Regression: Add progress bar color change while on going to show user it's not stucked 2019-12-17 11:15:00 +01:00
Molkobain
5ef32b6b31 N°2314 Regression: fix invisible icons due to wrong FontAwesome calls 2019-12-17 11:09:10 +01:00
Stephen Abello
ba1c719568 N°2314 Regression: fix invisible icons due to wrong FontAwesome calls 2019-12-17 10:55:05 +01:00
Eric
0507e4f4a8 🔖 version 2.7.0-beta 2019-12-17 10:35:15 +01:00
Eric
60eb312e68 🔖 version 2.7.0-beta 2019-12-17 10:28:13 +01:00
Eric
044a8926b3 🔖 version 2.7.0-beta 2019-12-17 10:25:28 +01:00
odain
acf8c9d49e release: js part of community-licenses.xml 2019-12-17 10:22:07 +01:00
Eric
d99e79eb3f 🔖 xml version 1.7 2019-12-17 10:22:03 +01:00
Eric
843c8ccd38 🔖 version 2.7.0 2019-12-17 10:18:15 +01:00
Eric
d45326606d 🌐 Update translations 2019-12-17 10:09:10 +01:00
Molkobain
5886d038e3 Regression: Fix iTop Hub connector not being installed (caused by dd5ac38dd4) 2019-12-17 09:50:27 +01:00
Pierre Goiffon
8fed7c7005 💄 Setup : TLS message style was hardcoded, get back to standard CSS classes to be aligned with the rest 2019-12-17 09:16:10 +01:00
Molkobain
604522aa61 N°2314 Regression: Work on Setup stylesheet 2019-12-16 18:07:59 +01:00
Molkobain
7af35c2d09 Internal: Improve how CSS and JS files are loaded in the DOM to optimize rendering and avoid glitches 2019-12-16 17:53:43 +01:00
Stephen Abello
87497eb491 N°2314 Regression: extracted setup's stylesheet in its own file and pimped it up 2019-12-16 17:05:36 +01:00
Pierre Goiffon
434ed0dd4e N°330 Attachments display as table : portal 2019-12-16 15:51:56 +01:00
Pierre Goiffon
473a55bde6 🎨 bsfileuploader : code formatting 2019-12-16 15:25:32 +01:00
Pierre Goiffon
0b65b36e74 N°330 Attachments : add attributes in Attachment object
* creation date
* external key to creator User
2019-12-16 15:25:32 +01:00
Pierre Goiffon
4aeb78ccac N°330 Attachments display as table : console 2019-12-16 15:25:31 +01:00
Pierre Goiffon
21d5de1756 Fix run_query throwing exception when inccorect query and no suggestions returned 2019-12-16 15:07:26 +01:00
Stephen Abello
797893d317 N°2314 Regression: fix crash on setup ⌨️ 🐒 2019-12-16 14:16:29 +01:00
Eric
dd5ac38dd4 N°2249 - Supportability - Updater module (application upgrade) 2019-12-13 17:28:35 +01:00
Eric
2741a446ea Integrate database integrity module 2019-12-13 17:28:08 +01:00
Molkobain
da3d886bd7 N°2618 - Fix missing scroll bar in DataModel Viewer for class with large number of attributs 2019-12-12 16:41:09 +01:00
Stephen Abello
ad40e02fee N°2314 Forgot to commit these changes with 611e82 🙈 2019-12-12 15:55:06 +01:00
Vincent Dumas
7cc63e21dd Prevent trigger without friendlyname
Make 'description' mandatory as it is used as friendly name, and a blank value is not clickable in the UI
2019-12-12 15:47:39 +01:00
Stephen Abello
611e828d1a N°2314 Introduce custom themes for iTop's console 2019-12-12 15:46:03 +01:00
odain
3abcd59b03 remove redundant test on log api 2019-12-12 14:41:26 +01:00
odain-cbd
48f4cd8943 Merge pull request #101 from Combodo/feature/faf_log_modularity
Feature/faf log modularity
2019-12-12 14:44:02 +01:00
odain
abd5e27c2e fix and complete testcase 2019-12-12 14:22:49 +01:00
Eric
ccb3a21c68 N°2595 - Reorganize/rename admin. console menus (hide empty sub-menus) 2019-12-12 10:20:29 +01:00
Molkobain
aa060746d7 N°2009 - Fix non editable dashboard when wrong attribute code used in its definition 2019-12-12 09:50:13 +01:00
odain
6ec441e501 peer review: added tests but not passed yet 2019-12-12 08:43:01 +01:00
Molkobain
52d3d8cfe7 Internal: PHPDoc, warnings suppression and typos 2019-12-11 20:54:45 +01:00
Molkobain
081ba68af4 N°2634 - Fix non editable dashlets in dashboards 2019-12-11 20:54:45 +01:00
odain
38d5889979 log kpi: class name added to next page buttons in order to use them in itop-log-mgt 2019-12-11 17:58:49 +01:00
Molkobain
5b4808c378 Internal: PHPDoc 2019-12-11 15:58:47 +01:00
Molkobain
2af22d3387 N°2060 Fix regression introduced during migration (iPortalUIExtension extensions not working) 2019-12-11 15:54:01 +01:00
Eric
7c1a8c90da N°2595 - Reorganize/rename admin. console menus 2019-12-11 13:59:31 +01:00
Molkobain
e7726a17db N°2630 - Portal: Fix wrong "apply stimulus" form being used in a branch of classes 2019-12-10 21:51:28 +01:00
Molkobain
57da9a848d Internal: Optimize regexp to remove warning 2019-12-10 21:51:28 +01:00
Molkobain
464ee46631 Internal: Refactor a small piece of code for better readability 2019-12-10 21:51:28 +01:00
Molkobain
46358b6e36 N°1982 - Fix resolution date not updated as expected when concurrent access from both portal and admin. console 2019-12-10 21:51:28 +01:00
Pierre Goiffon
46d6779562 🎨 utils : some code formatting + 1 @var 2019-12-10 17:57:55 +01:00
bruno DA SILVA
ea708e1e05 995 - Searching in OQL, URs with a particular request template field value
added AllowDelete in order to bypass the user's rights
2019-12-10 16:59:44 +01:00
Eric
374946505a N°2381 - Not possible to create a ticket in "resolved" with lnk objects 2019-12-10 15:30:53 +01:00
Pierre Goiffon
18db31f138 Log : rename config parameter from 'min_log_level' to 'log_level_min' 2019-12-10 09:46:42 +01:00
Pierre Goiffon
332c6eb33c log : factorize level & context 2019-12-10 09:39:46 +01:00
bruno DA SILVA
e5c49e3bd4 filterable logs using min_log_level optionnaly per channels 2019-12-10 09:03:14 +01:00
Molkobain
60769dc4b7 Internal: Add Dimitri to the sample data to welcome them! 2019-12-09 16:15:56 +01:00
Pierre Goiffon
9e652ef214 Update iPortalUIExtension param (not using Silex anymore but Symfony) 2019-12-09 16:11:29 +01:00
Pierre Goiffon
d2825c1b24 iTop Hub Connector : remove installation.xml
Was commited by mistake (duplicate of datamodels/2.x/installation.xml)
2019-12-09 16:02:39 +01:00
Eric
8482be7068 N°2623 - Fix setup request error 2019-12-09 14:56:42 +01:00
Eric
9dc56b727e N°1987 - Fix search equals 0 for integer fails 2019-12-06 17:01:46 +01:00
Eric
c6759220b9 🎨 clean warnings and add KPI in ajax.render.php 2019-12-06 15:42:03 +01:00
Pierre Goiffon
470af54acb Add some HTML in errors thrown by \MetaModel::DBCheckFormat 2019-12-05 17:56:42 +01:00
Eric
344f74f444 N°1213 - Allow NOT IN SELECT in OQL syntax - Fix UNION queries 2019-12-05 17:33:47 +01:00
Molkobain
0d1ca1bc0e N°2611 - Make itop-portal-base module mandatory during setup 2019-12-05 17:30:30 +01:00
Molkobain
d9e3684d3d Internal: Add Marie-Annette to the sample data to welcome them! 👋 2019-12-05 17:07:05 +01:00
Molkobain
e59db3f3d9 Internal: Add Alexandre, Anne-Catherine and Olivier to the sample data to welcome them! 👋 2019-12-05 15:47:46 +01:00
Molkobain
c883d618c3 N°1192 - Change default behavior for navigation rules 2019-12-05 15:02:36 +01:00
Eric
8911a9a3ed N°2381 - Not possible to create a ticket in "resolved" with lnk objects 2019-12-05 13:06:23 +01:00
Molkobain
366d2754ef N°2060 - Fix regression making url pointing to the portal not working in notification anymore 2019-12-05 12:39:28 +01:00
Molkobain
4db114f64d N°2313 - Markup extensibility: Add meta information and hooks
Admin. console:
- Class and id on object form
- Class current and target state on object transition form
- Object form mode (view/edit/create/stimulus)
- Object attributes: Attribute code, attribute definition class and raw value
- Navigation menu: Their IDs on group and items
- Actions menu: Their IDs on items

Portal:
- Object attributes: Attribute code, attribute definition class and raw value
2019-12-05 12:27:02 +01:00
Pierre Goiffon
d36340a3cd TagSet tests : use expectException method 2019-12-05 11:50:58 +01:00
Pierre Goiffon
7e6de5d8dd 🐛 \SetupUtils::builddir : avoid infinite loops 2019-12-05 10:27:22 +01:00
bruno DA SILVA
490eda4f4a n°524 - password policy
bugfix : Enter Password phrase no more lack the userName and is properly displayed
2019-12-05 09:55:44 +01:00
Eric
b5b4d70c2d N°1213 - Allow NOT IN SELECT in OQL syntax - Add unit tests 2019-12-05 09:02:11 +01:00
Eric
a74cff6902 N°1213 - Allow NOT IN SELECT in OQL syntax - Fix unit tests 2019-12-04 15:39:44 +01:00
Eric
1010274c48 N°1213 - Allow NOT IN SELECT in OQL syntax - Fix search init & code cleanup 2019-12-04 14:50:36 +01:00
Eric
c39ff13217 N°1213 - Allow NOT IN SELECT in OQL syntax - Fix search init 2019-12-04 14:40:53 +01:00
Eric
58da108e85 N°1213 - Allow NOT IN SELECT in OQL syntax 2019-12-04 14:27:02 +01:00
Eric
8b4fdb54ea N°1213 - Allow NOT IN SELECT in OQL syntax - support of UNION queries 2019-12-04 11:17:51 +01:00
Pierre Goiffon
1877cb5e93 N°2614 Fix datasynchro error when running synchro_import.php 2019-12-04 11:08:18 +01:00
bruno DA SILVA
1530b3f2ca 🐛 apc_clear_cache & opcache_reset can both be called
especially since not calling apc_clear_cache may result in invalid apcu entries...
2019-12-04 10:39:30 +01:00
Eric
4c3c5228aa N°1213 - Allow NOT IN SELECT in OQL syntax 2019-12-03 17:23:14 +01:00
Eric
3ae4ca89f4 N°1213 - Allow NOT IN SELECT in OQL syntax - support of UNION queries and "nested nested" queries 2019-12-03 17:14:53 +01:00
Eric
b415b1eeae N°1213 - Allow NOT IN SELECT in OQL syntax - support of UNION requests 2019-12-03 12:11:00 +01:00
Eric
c0ae983faa N°1213 - Allow NOT IN SELECT in OQL syntax 2019-12-03 12:11:00 +01:00
acognet
7845cbcc55 update tests 2019-12-03 12:11:00 +01:00
acognet
a33977251e N°1213 - Allow NOT IN SELECT in OQL syntax 2019-12-03 12:11:00 +01:00
odain
b0d668b124 N°1213 - Allow NOT IN SELECT in OQL syntax - add unit tests 2019-12-03 12:11:00 +01:00
odain
b0856c1abf fix HTMLDOMSanitizerTest due to merge 2019-12-03 12:10:26 +01:00
Pierre Goiffon
2bffa3cf17 N°2615 PHP versions setup requirements/warnings 2019-12-03 11:54:13 +01:00
odain
5ab05c6a6a Merge branch 'develop' of https://github.com/Combodo/iTop into develop 2019-12-03 11:42:08 +01:00
odain
72af2b7cd6 comment OQL section in phpunit.dist.xml 2019-12-03 11:41:57 +01:00
Molkobain
143c0a5b07 N°2616 - Fix hyperlink placeholder not working in notifications for other portals 2019-12-03 11:39:14 +01:00
Molkobain
daf79f2324 N°2272 Fix calls to DBObjectSet::OptimizeColumnLoad() 2019-12-03 11:39:14 +01:00
odain
15d11c6c86 reomve echo that prevented phpunit execution 2019-12-03 11:26:35 +01:00
odain
b298a1fa82 fix invalid merge 2019-12-03 11:23:25 +01:00
odain
007b8147c7 fix phpunit step 2019-12-03 11:17:01 +01:00
odain
4013b76c9e Merge branch 'speedup_jenkins' into develop 2019-12-03 11:09:30 +01:00
odain
ed81391aff !y# This is a combination of 4 commits.
run OQL tests depending on jenkins param

try sth

try sth

try sth

try sth

try sth

fix parameter to run OQL tests or not

run OQL tests depending on jenkins param

try sth

try sth

try sth

try sth

try sth

fix parameter to run OQL tests or not
2019-12-03 11:02:15 +01:00
Pierre Goiffon
28818010d6 N°2558 Test for the HTMLDOMSanitizer white list 2019-12-03 10:58:21 +01:00
Eric
928c19f923 move OQL2SQL tests to another folder 2019-12-03 10:58:21 +01:00
Eric
34aa240840 🎨 Fix bad parameter init 2019-12-03 10:58:21 +01:00
Eric
6872dbd180 🎨 Fix bad parameter init 2019-12-03 10:58:21 +01:00
Pierre Goiffon
c5bea30c64 N°2329 PHP 7.4 compat : remove deprecated get_magic_quotes_gpc() function call 2019-12-03 10:58:21 +01:00
Molkobain
071a254611 N°2311 Fix focus set to sumbit button when pressing "tab" key after filing inputs 2019-12-03 10:58:21 +01:00
Molkobain
d2d203df34 💄 Increase blur effect on portal modal backdrop 2019-12-03 10:58:21 +01:00
Molkobain
e1ffdea172 N°2272 Fix call to DBObjectSet::OptimizeColumnLoad() in the portal (doesn't support "id" attribute anymore) 2019-12-03 10:08:46 +01:00
Pierre Goiffon
9abcf40df7 N°2558 Test for the HTMLDOMSanitizer white list : remove new lines
the parser gives different results depending on the PHP version
Didn't manage to get it right :
- no php.ini difference
- playing with the parser preserveWhitespace/formatOutput parser options didn't help

So we're removing new lines on both sides :/
2019-12-03 09:47:45 +01:00
Pierre Goiffon
b67dc888fe N°2558 Test for the HTMLDOMSanitizer white list 2019-12-03 08:42:25 +01:00
Eric
c7b101d169 move OQL2SQL tests to another folder 2019-12-03 08:38:57 +01:00
Eric
df5a7440a4 🎨 Fix bad parameter init 2019-12-03 08:38:57 +01:00
Eric
a59a8c0ec5 🎨 Fix bad parameter init 2019-12-03 08:38:57 +01:00
Pierre Goiffon
bf9f43da8b N°2329 PHP 7.4 compat : remove deprecated get_magic_quotes_gpc() function call 2019-12-02 13:47:44 +01:00
Molkobain
928b82a9c8 N°2311 Fix focus set to sumbit button when pressing "tab" key after filing inputs 2019-11-29 17:40:07 +01:00
Molkobain
b9008d2459 💄 Increase blur effect on portal modal backdrop 2019-11-29 17:38:20 +01:00
odain
50dddaaa9b add debug mode as param + use params in phpunit.sh 2019-11-29 16:46:59 +01:00
odain
1b168501af add a parameter to Jenkins pipeline 2019-11-29 16:37:01 +01:00
bruno DA SILVA
35a49bad60 n°524 - password policy
typos

(thanks @jbostoen)
2019-11-29 08:56:18 +01:00
Pierre Goiffon
97c1ff55e9 📝 Comment to explain why Uniqueness isn't protected by a lock 2019-11-28 17:16:01 +01:00
Molkobain
ffead92d5a N°2613 - Portal: Fix crash in object form having empty AttributeBlob field 2019-11-28 17:05:05 +01:00
Molkobain
81ea2b1fe4 Internal: Add comment on suspected dead code 2019-11-28 17:05:05 +01:00
Molkobain
9cdfe0ecb4 Internal: PHPDoc and warning suppression 2019-11-28 17:05:05 +01:00
bruno DA SILVA
0473269132 n°1617 - iTop Fence
- iTop Fence now lock user fetch/creation per login to prevent duplicates
 - iTop now provide a mean to create safe lock when used untrusted strings
 - better log message & function names
 - reduced cyclomatic complexity

(thanks @piRGoif)
2019-11-28 17:03:31 +01:00
Eric
4798bf2f79 N°2408 - Fix FromOQL() with NULL 2019-11-28 11:54:42 +01:00
bruno DA SILVA
c3c5c56dd8 n°524 - password policy
- changed translation key to be more conventional
2019-11-28 11:40:28 +01:00
bruno DA SILVA
4fb9bbb831 n°524 - password policy
- "change password" is now handled gracefully by the portal
2019-11-28 09:05:20 +01:00
bruno DA SILVA
267cdd2aee n°524 - password policy
- "password reset" workflow now handle gracefully the policy enforcement.
2019-11-28 08:52:02 +01:00
bruno DA SILVA
fe0bd1a4b8 n°524 - password policy
- translations added
 - fields are now visible in the detail view
 - minor translation modification for the User object
2019-11-28 08:52:02 +01:00
Molkobain
9fa510d2a8 Internal: PHPDoc and warning suppression 2019-11-27 20:40:39 +01:00
Molkobain
fd29986354 N°2000 - Fix blank page when displaying a synchronized object 2019-11-27 20:07:17 +01:00
Molkobain
8ec6bb4758 N°1666 - Fix missing scroll bar missing in modal window "Create a new field" from Request Template 2019-11-27 19:35:19 +01:00
Molkobain
f3306f5fb4 N°1616 - Fix truncated caselog entry with large HTML table or word 2019-11-27 19:05:37 +01:00
Molkobain
20683fdf50 N°1192 Fix transition form always redirecting to object no matter the navigation rule 2019-11-27 17:21:01 +01:00
Molkobain
603ae8c0e1 N°2272 Fix calls to DBObjectSet::OptimizeColumnLoad() in the portal (now requires ClassAlias to always be specified) 2019-11-27 17:21:01 +01:00
Eric
f1d0418e48 🐛 Fix error when no cache is configured 2019-11-27 16:02:46 +01:00
Eric
9c8c306df3 🐛 Fix DBSearch::Intersect (de-duplicate aliases) 2019-11-27 15:39:33 +01:00
Eric
d2543e9c67 🐛 Fix bad calls to OptimizeColumnLoad 2019-11-27 15:38:30 +01:00
Pierre Goiffon
55a0d910fa N°2490 MariaDB compat : changes after code review
* DEFAULT value unquoting is done with preg_replace now (clearer that we want to do a string replacement)
* DEFAULT value unquoting works even if DEFAULT is not the last keyword
* change test datasource for more readability (use double quotes when needed)
2019-11-27 11:51:47 +01:00
Pierre Goiffon
bd8144a67c 👷 Jenkins : config file is now picked by the unattended install
The problem was that we had an absolute path in the XML : changing it to the file name is sufficient ! The copy introduced in 443763de was unecessary.
2019-11-27 11:45:30 +01:00
Pierre Goiffon
004d1a7245 🎨 Rename constant 2019-11-27 10:15:24 +01:00
Pierre Goiffon
09fb99ed58 Rollback 2f431a0d : might not be a typo, we don't want to cause trouble close to a beta version O:) 2019-11-26 17:31:41 +01:00
Eric
ae8071f707 add unit tests for intersect 2019-11-26 17:24:23 +01:00
Eric
c1cf084e43 fix unit tests - Support Microsoft encoding of non breaking line in UTF-8 2019-11-26 16:32:19 +01:00
Eric
87c794b22e fix unit tests - Support Microsoft encoding of non breaking line in UTF-8 2019-11-26 15:44:17 +01:00
Molkobain
a382d6ad35 N°1192 Change "close rule" behaviour to redirect to homepage if browser doesn't let us close the window 2019-11-26 14:57:35 +01:00
Eric
2d86599a19 N°2519 - ev_timeout from "New" to "Escalated TTO" doesn't work 2019-11-26 13:55:26 +01:00
Pierre Goiffon
914971b30d 💚 Jenkins : Fix default config database name 2019-11-26 12:15:02 +01:00
Pierre Goiffon
443763de48 💚 Jenkins : copy default config after unattended install
The generated config file had too many default values, and not the wanted ones
2019-11-26 12:09:03 +01:00
Stephen Abello
ff3c7ebe54 N°971 Portal: Fix Browse brick n:n level links in tree and mosaic display 2019-11-26 11:39:25 +01:00
Stephen Abello
c0f82f25a3 N°956 Portal: Increase robustness 💪 2019-11-26 11:39:25 +01:00
Eric
f90381d412 Support Microsoft encoding of non breaking line in UTF-8 2019-11-26 08:57:47 +01:00
bruno DA SILVA
d367d2e864 n°524 - password policy
💚 fix CI regression (data provider no longer include classes with side effect)
2019-11-25 18:02:25 +01:00
bruno DA SILVA
9d20eba2ad 2574 - enable Password expiry
- Extensibility: The UserLocal now provide the fields needed for an extension to be able to properly handle the expiration of the password
2019-11-25 17:37:34 +01:00
bruno DA SILVA
863746852f n°524 - password policy
💚 fix CI : tests must be runned into a separate process in order to eliminate side effects of mocking the config
2019-11-25 16:53:04 +01:00
bruno DA SILVA
f416f994c9 n°2371 deprecate \MetaModel::EnumLinksClasses and \MetaModel::EnumLinkingClasses
- phpdoc: move title the to beginning of the block
2019-11-25 16:35:46 +01:00
bruno DA SILVA
70dfbbc15e n°524 - password policy
- The code now uses the standard extension method (using interfaces)
 - the metamodel can now filter on iModuleExtension in order to leverage extensions modularity (see MetaModel::EnumPlugins second param)
 - during the setup, there is no pawsord policy control
 - there is now a default policy
 - new (more precie) translation reflecting the default policy
 - fix CI?
2019-11-25 16:25:38 +01:00
Molkobain
85932eab98 N°1192 Fix crash with default parameters of the rule 2019-11-25 15:33:23 +01:00
Pierre Goiffon
0ee77d8c88 N°2163 DB*Tracked methods : modifications after review with Romain
Previous commit : 24eb82d1
Use \CMDBObject::SetTrackInfo
Move \CMDBObject::SetCurrentChange calls at the top most level of the stacks
Restore old behaviors that were removed in previous commit
2019-11-25 14:58:59 +01:00
Molkobain
2f2d9547b7 N°2603 - Portal: Fix crash when having comments in some parts of the XML 2019-11-25 12:38:34 +01:00
Molkobain
32b065708b N°1192 Add some ready-to-use navigation rules to the standard portal (and comments) 2019-11-25 09:45:31 +01:00
Molkobain
18285df154 Internal: Fix typo 2019-11-22 18:44:27 +01:00
Molkobain
b1b6c9f426 N°1192 Introduce navigation_rules in the end-users portal 2019-11-22 18:44:27 +01:00
Molkobain
ff884533f9 Internal: Add utils::ToCamelCase($sInput) function 2019-11-22 18:44:27 +01:00
Molkobain
417e80fe8d N°1192 Deprecate usage of <submit> and <cancel> tags in action rules 2019-11-22 18:44:27 +01:00
Pierre Goiffon
c203e6c7be Fix utils::StartsWith when needle bigger that value 2019-11-22 14:43:33 +01:00
bruno DA SILVA
730a0d1c98 n°524 - password policy
💚 fix CI : tests must be runned into a separate process in order to eliminate side effects of mocking the config
2019-11-22 14:38:36 +01:00
bruno DA SILVA
d9b374f723 n°524 - password policy
💚 fix CI regression (previous tests are sometimes incompatible with the default password policy)
2019-11-22 14:14:44 +01:00
bruno DA SILVA
b9cb692504 n°524 - password policy
bugfix: no rule does work properly
2019-11-22 12:31:14 +01:00
bruno DA SILVA
23fc4bb4f7 n°524 - password policy 2019-11-22 12:23:00 +01:00
Pierre Goiffon
4ae035dd51 🔧 Modify visual vertical guides setting 2019-11-22 11:42:43 +01:00
Pierre Goiffon
3a791162c5 setup module browsing perf improvement
When a module descriptor file is found, do not dig anymore in subdirectories
2nd fix, should be better than previous one (4042a12d reverted with 5ebc290b)
2019-11-21 17:44:04 +01:00
Pierre Goiffon
06791b06c4 Fix utils::EndsWith when needle bigger that value 2019-11-21 11:57:24 +01:00
Eric
5ebc290b94 Revert Setup : only scan necessary dirs for extensions 2019-11-21 11:37:22 +01:00
Pierre Goiffon
675221a15e N°2490 Setup/toolkit : no longer generates useless ALTER TABLE queries on MariaDB >= 10.2
* case insensitive SQL data type comparison
* some options have also case differences (example 'int(11) unsigned')
* DEFAULT 'NULL' added by MariaDB on all nullable fields
* default values are always surrounded with single quotes on MariaDB

This is a Combodo implementation of PR #91
2019-11-21 11:24:14 +01:00
Pierre Goiffon
2f431a0d14 🐛 Fix SynchroAttLinkSet.attribute_qualifier default value
Old typo (in a galaxy far, far away) : 1e688706
2019-11-21 10:44:54 +01:00
Molkobain
fd4e41950c N°2092 Portal: Fix missing scrollbar in tall form modals 2019-11-20 15:41:11 +01:00
Molkobain
41d5ae704a PHPDoc 2019-11-20 15:41:11 +01:00
Molkobain
83fc069bf4 Portal: Improve callback calls in CombodoPortalToolbox 2019-11-20 15:41:11 +01:00
Pierre Goiffon
32c5cd245b N°2533 Check modules manual install dir on Setup for iTop products 2019-11-20 12:04:54 +01:00
Molkobain
a259be9033 N°2311 Fix focus set to the "login" input field when pressing "tab" key 2019-11-20 12:00:52 +01:00
Molkobain
fbbdee242a Portal: Update code to use the CombodoPortalToolbox.OpenModal() helper 2019-11-20 11:38:42 +01:00
Molkobain
4a12635ea5 Portal: Introduce "CombodoPortalToolbox", helpers to ease JS manipulations especially through the iPopupMenuExtension.
- CombodoPortalToolbox.CloseAllModals() : Close all modal on the page
- CombodoPortalToolbox.OpenUrlInModal(sTargetUrl, bCloseOtherModals) : Open an URL in a modal, typically opening an object form
- CombodoPortalToolbox.OpenModal(oOptions) : Generic method to open modals in the portal with various options
2019-11-20 11:37:39 +01:00
Molkobain
db7278e9c1 🐛 Fix compiler crashing on setup due to coment in XML 2019-11-19 17:59:20 +01:00
Molkobain
10056aa4ca ✏️ Fix typos in comments 2019-11-19 17:33:07 +01:00
Pierre Goiffon
bb566df432 📝 WizardSteps documentation v2
With an ascii art schema
Thanks to http://asciiflow.com/
2019-11-19 16:31:26 +01:00
Pierre Goiffon
4042a12d39 Setup : only scan necessary dirs for extensions
We were browsing the whole hierarchy but only the root module dir was needed
This could be slow (especially when developing with a .git dir)
2019-11-19 15:27:06 +01:00
Pierre Goiffon
5ae4f9ade8 📝 WizardSteps documentation 2019-11-19 15:21:27 +01:00
Molkobain
1636f9839c Updating Symfony lib and dependencies: forgot a few files + composer.lock 2019-11-18 18:08:40 +01:00
Molkobain
c76cccd2e7 Updating Symfony lib and dependencies:
Package operations: 2 installs, 23 updates, 0 removals
  - Updating psr/log (1.1.0 => 1.1.2)
  - Updating symfony/debug (v3.4.30 => v3.4.35)
  - Updating symfony/console (v3.4.30 => v3.4.35)
  - Updating symfony/dotenv (v3.4.30 => v3.4.35)
  - Updating symfony/routing (v3.4.30 => v3.4.35)
  - Updating symfony/finder (v3.4.30 => v3.4.35)
  - Updating symfony/filesystem (v3.4.30 => v3.4.35)
  - Installing symfony/polyfill-util (v1.12.0)
  - Installing symfony/polyfill-php56 (v1.12.0)
  - Updating symfony/http-foundation (v3.4.30 => v3.4.35)
  - Updating symfony/event-dispatcher (v3.4.30 => v3.4.35)
  - Updating symfony/http-kernel (v3.4.30 => v3.4.35)
  - Updating symfony/config (v3.4.30 => v3.4.35)
  - Updating symfony/dependency-injection (v3.4.30 => v3.4.35)
  - Updating symfony/class-loader (v3.4.30 => v3.4.35)
  - Updating symfony/cache (v3.4.30 => v3.4.35)
  - Updating symfony/framework-bundle (v3.4.30 => v3.4.35)
  - Updating twig/twig (v1.42.2 => v1.42.4)
  - Updating symfony/twig-bridge (v3.4.30 => v3.4.35)
  - Updating symfony/twig-bundle (v3.4.30 => v3.4.35)
  - Updating symfony/yaml (v3.4.30 => v3.4.35)
  - Updating symfony/stopwatch (v3.4.30 => v3.4.35)
  - Updating symfony/var-dumper (v3.4.30 => v3.4.35)
  - Updating symfony/web-profiler-bundle (v3.4.30 => v3.4.35)
  - Updating symfony/css-selector (v3.4.30 => v3.4.35)
2019-11-18 18:04:32 +01:00
Eric
532eb466a1 N°1436 - Access control updated for grant_by_profile categories of classes -
Fix access to internal classes from the core engine
2019-11-18 15:36:42 +01:00
Pierre Goiffon
e8879a0455 🎨 Code formatting 2019-11-18 15:29:03 +01:00
Pierre Goiffon
ef5b4e212c N°2371 deprecate \MetaModel::EnumLinksClasses and \MetaModel::EnumLinkingClasses 2019-11-18 10:20:18 +01:00
Pierre Goiffon
24eb82d140 N°2361 Deprecate DB*Tracked methods
* update methods PHPDoc
* DBInsertTracked update callers
* DBInsertTrackedNoReload update callers
* DBUpdateTracked update callers
* DBDeleteTracked update callers
2019-11-15 17:56:04 +01:00
Pierre Goiffon
cdc8edb56b Fix backup regression "Undefined class constant 'DEFAULT_MODULE_SETTING_TIME'"
Was introduced in PR #89, woops
2019-11-15 16:44:38 +01:00
Pierre Goiffon
7235c63445 Abstract implementation for iScheduledProcess (#89)
* 📝 little PHPDoc in BackupExec
* ♻️ Create a extendable implementation of iScheduledProcess
* create AbstractWeeklyScheduledProcess
* move schedule methods to the new abstract class
* create ProcessInvalidConfigException
* in cron.php skip abstract class
2019-11-15 14:41:00 +01:00
Pierre Goiffon
fd3b33b04b N°2586 Test for iTopDesignFormat 2019-11-14 18:07:17 +01:00
Pierre Goiffon
e8815e5653 N°1283 Add migration script 2019-11-14 18:04:22 +01:00
Pierre Goiffon
551b9a3b76 \MFDocument::saveXML : $options were not passed to the callee 2019-11-14 18:04:22 +01:00
bruno DA SILVA
1c6b639992 n°1617 - iTop Fence
various improvement both in iTop and in the extension.
2019-11-14 17:02:52 +01:00
bruno DA SILVA
6fb7587d95 🔧 write the tooling methods enabling migration to/from iTop 2.7 2019-11-14 16:59:08 +01:00
Eric
3953e74cb4 🎨 refactor approot 2019-11-14 15:43:29 +01:00
Pierre Goiffon
a8f616bba7 N°2577 Setup : remove prefix for table prefix collapsible section 2019-11-14 14:46:58 +01:00
bruno DA SILVA
560eb5e071 🔧 write the tooling methods enabling migration to/from iTop 2.7 2019-11-14 12:15:30 +01:00
Eric
c665bb4761 💚 Fix unit tests 2019-11-14 09:37:39 +01:00
Denis Flaven
36584092e5 (Experimental) Export a DBSearch as an array/JSON structure. 2019-11-13 18:03:58 +01:00
Eric
30430bb7dc N°2135 - Setup callbacks for MTP 2019-11-13 17:33:56 +01:00
Eric
fdf5cff12a N°2135 - Setup callbacks for MTP 2019-11-13 15:45:33 +01:00
Eric
4816b2b0fe N°2311 - Authentication extensibility in iTop (login on specific pages and traces) 2019-11-13 15:08:34 +01:00
Eric
9c808bf2ed N°2240 - Supportability - Maintenance mode 2019-11-13 13:50:48 +01:00
Eric
7a12c2c615 N°2240 - Supportability - Maintenance mode 2019-11-13 12:00:50 +01:00
Eric
149bc9f4ef fix typo 2019-11-13 11:41:40 +01:00
Stephen Abello
b91183e9ec N°1986 Portal: Fix read-only forms from da5ccaa to work with auto-generated ones 2019-11-13 11:19:26 +01:00
Eric
b67639f9ec N°2249 - Supportability - Updater module 2019-11-13 11:08:08 +01:00
Eric
cdbcc9ce8c N°2249 - Supportability - Updater module 2019-11-13 10:42:30 +01:00
Pierre Goiffon
6c7d094921 N°2577 Setup : table prefix option is hidden also on iTop first install
Previous commit 3e785687 was hidding it only on iTop update
2019-11-12 08:54:29 +01:00
Stephen Abello
23466f6e00 📝 typo in PHPDoc 2019-11-08 17:13:15 +01:00
bruno DA SILVA
08c1f4f072 autoload rework
- bootstrap.inc.php is now included by approot.inc.php
 - remove all unescessaries includes of bootstrap.inc.php
 - in bootstrap.inc.php autoload can be bypassed using a feature flag because "why not"
2019-11-08 16:51:57 +01:00
Pierre Goiffon
1194c5c7fe 🎨 sla-computation : fix PHPDoc + format code 2019-11-08 15:30:47 +01:00
Eric
f63fb16233 N°2135 - Setup callbacks for MTP 2019-11-08 14:05:24 +01:00
Eric
a4143df36a N°2240 - Supportability - Maintenance mode 2019-11-07 16:45:52 +01:00
Pierre Goiffon
3e78568755 N°2577 Setup : table prefix option is now hidden by default
Should be used only by a few portion of users
2019-11-07 16:34:25 +01:00
Eric
9b14cd7633 N°2240 - Supportability - Maintenance mode 2019-11-07 15:23:42 +01:00
Eric
2b2488f376 N°2240 - Supportability - Maintenance mode 2019-11-07 15:21:48 +01:00
Pierre Goiffon
fd77554cb7 N°2555 action_rule : fix add_to_list regression
Loop was removed in 5c483efd but we need it !
Sample rule that needs such a loop :
				<action_rule id="N2555_multiple_results_addtolist" _delta="define">
					<source_oql>SELECT Person WHERE id > 0</source_oql>
					<presets>
						<preset id="1">add_to_list(id, contacts_list)</preset>
					</presets>
				</action_rule>
2019-11-07 14:56:39 +01:00
Eric
2ee3d27ba8 N°2240 - Supportability - Maintenance mode (revert) 2019-11-07 14:15:34 +01:00
Eric
af24f46803 N°2249 - Supportability - Updater module 2019-11-07 13:24:48 +01:00
Eric
da1684a8b9 N°2249 - Supportability - Updater module 2019-11-07 13:14:20 +01:00
Eric
5e7ae930c5 N°2240 - Supportability - Maintenance mode 2019-11-07 12:36:35 +01:00
Stephen Abello
541226356c 📝 typo in PHPDoc 2019-11-07 11:38:08 +01:00
Eric
a30345c96c N°2249 - Supportability - Updater module 2019-11-07 10:00:05 +01:00
Eric
d035130d00 N°2240 - Supportability - Maintenance mode 2019-11-07 09:16:06 +01:00
Pierre Goiffon
7d8181c44f N°2576 Fix "invalid numeric value" when inserting/updating AttributeDecimal
Was happening on certain configurations with a non EN-US user locale
2019-11-06 18:15:40 +01:00
bruno DA SILVA
45536cf957 🐛 fix regression introduced by the PR n°98
the realpath removed the trailing / wich is required
2019-11-06 10:00:55 +01:00
Stephen Abello
da5ccaaa85 N°1986 Portal: Forms with only transition buttons are now read-only 2019-11-05 12:17:54 +01:00
jbostoen
7c773991e7 Version 20191104-1550
* fix setup crashing due to realpath() returning lowercase path on Windows
2019-11-05 08:55:41 +01:00
bruno DA SILVA
bf976e5b8f typo (bis)
ahhh!
2019-11-04 15:07:47 +01:00
bruno DA SILVA
d9ad3f5e98 typo & unused variable removal
thank you @Hipska !
2019-11-04 15:02:19 +01:00
Eric
9054dcb9ff N°2517 - Supportability : system report (user name) 2019-11-04 12:06:49 +01:00
bruno DA SILVA
57116ef054 1627 - Ticket ref sometimes duplicate
This code is a drop in replacement based on  an abstract counter based on an abstract keyValue store.
The counter can be
 - class based (in this case the counter is initialized on max(id) + 1
 - key based (in this case the counter starts at 0)

Important: on both cases the counter is no more kept aligned with the primary key.

This lead to a MySQL8 compatible implementation.
2019-11-04 11:50:36 +01:00
bruno DA SILVA
c6f5b8b1f9 1627 - Ticket ref sometimes duplicate
This code is a drop in replacement based on  an abstract counter based on an abstract keyValue store.
The counter can be
 - class based (in this case the counter is initialized on max(id) + 1
 - key based (in this case the counter starts at 0)

Important: on both cases the counter is no more kept aligned with the primary key.

This lead to a MySQL8 compatible implementation.
2019-11-04 11:50:36 +01:00
Pierre Goiffon
9e015ba59a 📝 UI better log on catch 2019-11-04 09:22:43 +01:00
Pierre Goiffon
6144cfad3d 📝 Link between Dict::Format and TemplateString 2019-10-31 10:35:48 +01:00
Stephen Abello
3844a18b86 N°971 Portal: Allow n:n links for Browse Brick's levels 2019-10-30 16:41:58 +01:00
Stephen Abello
e88c6e9583 📝 typo in PHPDoc 2019-10-30 16:41:58 +01:00
Pierre Goiffon
6793fb2a35 N°2293 update PHPDoc on callbacks 2019-10-30 16:26:30 +01:00
bruno DA SILVA
4834c326aa 2498 - restrict access to assets into env-*
- allow static html into extensions/ and datamodels/
 - allow direct access to php into env-* for legacy code taht do not use exec.php
2019-10-30 15:46:33 +01:00
Pierre Goiffon
e6167adefd N°2518 ACE Editor : SQL mode 2019-10-30 10:11:33 +01:00
Pierre Goiffon
a8c3756ba7 Rename licenses file
Fix typo in file name
2019-10-30 10:11:33 +01:00
Pierre Goiffon
34b47f0239 N°2518 update licenses to reflect ACE editor moved from itop-config to iTop core 2019-10-30 10:11:33 +01:00
bruno DA SILVA
0d13d9eabe 2498 - restrict access to assets into env-*
- allow static content within datamodels/ and extensions/ (reason: the setup make use of images within this directory)
 - simplified .htaccess and web.content generation during the compilation
 - it now also allow fonts
2019-10-30 09:44:28 +01:00
Pierre Goiffon
358adb2109 📝 Some PHPDoc complement 2019-10-28 16:19:30 +01:00
odain
92285b55b6 add few tests on OQL group by 2019-10-28 15:50:53 +01:00
Pierre Goiffon
dda91be6d1 N°2555 action_rules : an invalid rule won't prevent anymore others to execute
This blocking scenario was added in 5c483efd
2019-10-25 15:56:26 +02:00
Eric
bec4dbafd2 N°2315 - Login screen extensibility API refactor 2019-10-25 14:35:24 +02:00
Eric
dcb46990c2 N°1436 - Search retrieve users belonging to not allowed Org 2019-10-25 10:31:47 +02:00
Pierre Goiffon
fe03342b6f 🌐 Fix typo
SF#1812, many thanks Lars Scheibling !
2019-10-25 09:37:22 +02:00
Eric
ee037acd34 N°2315 - Login screen extensibility API refactor 2019-10-25 08:32:29 +02:00
Pierre Goiffon
d4a696cb6b N°2555 Specific exception for invalid action_rules 2019-10-24 18:05:58 +02:00
Pierre Goiffon
5c483efd15 N°2555 action_rule performance
* do not execute scope_oql that have no conditions
* pick the first result only
2019-10-24 17:24:09 +02:00
Pierre Goiffon
9aeba1df9b N°2555 New \DBSearch::GetFirstResult method 2019-10-24 17:24:09 +02:00
bruno DA SILVA
e98683ae1c fix regression introduced in the carbon branch 2019-10-24 16:19:07 +02:00
Eric
c552e73d20 N°2315 - Login screen extensibility API refactor 2019-10-24 14:56:01 +02:00
Stephen Abello
1851163cee N°1881 Portal: Show confirmation dialog when closing forms with unsaved data 2019-10-24 10:51:49 +02:00
Pierre Goiffon
3667f95b7c N°2558 center is back in sanitizer white list
Reverts 4450d6af (2.5.0)
Was causing troubles when integrating emails
2019-10-24 10:20:47 +02:00
Eric
b6796d2742 N°679 - Database inconsistency during INSERT
N°2499
2019-10-24 09:00:56 +02:00
Eric
047983cb91 🎨 Login screen extensibility 2019-10-23 17:27:04 +02:00
Eric
8455abdfe9 N°2315 - Markup extensibility: interface refactor 2019-10-23 16:49:00 +02:00
Eric
b7c3fbb176 💚 Refactor unit tests 2019-10-23 16:41:28 +02:00
Eric
5642552f9a N°1888 - Filter search with another search 2019-10-23 12:56:02 +02:00
Eric
6f6b654dba N°1113 - Global search only searchable attributes 2019-10-23 10:24:37 +02:00
Pierre Goiffon
c8b791efd3 Merge remote-tracking branch 'origin/itop-carbon' into develop
# Conflicts:
#	application/utils.inc.php
#	setup/ajax.dataloader.php
2019-10-22 18:27:13 +02:00
Pierre Goiffon
52fd58cd93 Remove "s" JQueryUI resizable handle override
Better to override locally O:)
2019-10-22 16:45:25 +02:00
Pierre Goiffon
66d638e224 💄 N°2518 New JQueryUI "s" handler style 2019-10-22 16:06:32 +02:00
Pierre Goiffon
16c4f18a81 N°2518 fix log call is crashing when invalid log_filename_builder_impl value set in config 2019-10-22 15:15:40 +02:00
Pierre Goiffon
cd6104ddb3 N°2518 If switching to log file rotation, rename setup/error legacy files 2019-10-22 15:08:48 +02:00
Pierre Goiffon
4fe7cd5adc 🎨 Config file code formating 2019-10-22 15:08:48 +02:00
Eric
3f59141407 N°1114 - config-itop.php access rights enforcement 2019-10-22 15:02:51 +02:00
Pierre Goiffon
8b37f503c7 N°1455 change hidden obsolete data message 2019-10-22 11:16:32 +02:00
Eric
7c9353d299 N°1888 - Circumvention of the restriction of rights by organization 2019-10-22 10:49:22 +02:00
Eric
dfc901ffa4 1355 - [Security] Password Autocomplete in Browser 2019-10-22 10:31:57 +02:00
Eric
611bf3035f N°1113 - AttributePassword content searchable in Global Search
The global search now avoid AttributePassword type of attributes
2019-10-22 09:56:09 +02:00
Eric
35bb2da6bd N°1114 - config-itop.php access rights enforcement 2019-10-21 18:14:44 +02:00
Eric
53e034ce4f 💚 Fix unit tests 2019-10-21 16:37:56 +02:00
Eric
cd4db1db06 💚 Fix unit tests 2019-10-21 16:32:43 +02:00
Pierre Goiffon
b1dbddffb9 N°2518 Integrating ACE in iTop 2019-10-17 19:21:30 +02:00
Pierre Goiffon
221c10aa9b itop-config : syntax highlighting for JS 2019-10-17 17:35:41 +02:00
bruno DA SILVA
15ecd7bccf itop-portal-base: .env.local is no more versioned 2019-10-17 16:47:18 +02:00
Eric
0d8dd0dc17 N°2517 - Supportability - file System integrity 2019-10-17 16:00:14 +02:00
Eric
ec986e0fbc N°2517 - Supportability - file System integrity 2019-10-17 15:55:33 +02:00
Eric
f0e0c73e9b N°2517 - Supportability - file System integrity 2019-10-17 15:51:41 +02:00
bruno DA SILVA
d9a24d2e14 2498 - restrict access to assets into env-*
iis bugfix: the configuration is now valid
2019-10-17 15:08:30 +02:00
Eric
93618f974d 💚 Fix unit tests 2019-10-17 12:45:50 +02:00
Eric
4dfc217992 N°2517 - Supportability - OQL Explain 2019-10-17 12:21:12 +02:00
Eric
5a1a6cf6f0 💚 Fix unit tests 2019-10-17 12:19:23 +02:00
Eric
36b325f71d N°2517 - Supportability - OQL Explain 2019-10-17 11:06:31 +02:00
bruno DA SILVA
74a3712116 n°2311 - prenvent cas logo to be fullscreen during the login page loading 2019-10-17 10:53:35 +02:00
Eric
1fe7eb6cf4 🎨 Fix Login CSS colors for ie 2019-10-17 10:46:47 +02:00
Pierre Goiffon
0d0f8e9ffc 💚 N°2538 Fix test
Was broken since ce207e5c
2019-10-17 10:45:12 +02:00
Stephen Abello
0a2063ce69 N°2060: Fix data-localizer and archive mode initialization for Symfony portal 2019-10-17 10:12:40 +02:00
Pierre Goiffon
ce207e5c56 Restore old APPROOT var init
Rollback change in 607d355c
2019-10-17 10:09:21 +02:00
bruno DA SILVA
f22eaae457 ✏️ fix a typo 2019-10-17 10:00:35 +02:00
Eric
fbc5280add 💚 Fix unit tests 2019-10-17 09:23:32 +02:00
bruno DA SILVA
65512ca984 2498 - restrict access to module's assets
- into env-*
 - into datamodels
 - into extensions
2019-10-16 18:01:33 +02:00
Pierre Goiffon
385b4f8d4a 🎨 \utils::RealPath Move var init next to its use 2019-10-16 17:33:49 +02:00
Pierre Goiffon
f65f22f333 N°2538 check path validity little improvements
* ajax-backup : change code to be more readable
* does a realpath() call on basepath to avoid troubles when havin '/' on Windows
2019-10-16 11:37:50 +02:00
Pierre Goiffon
607d355c61 N°2538 enforce generic method to check path validity
Now uses realpath() and StartsWith
2019-10-16 11:13:19 +02:00
Pierre Goiffon
29c30c1f89 🎨 Code format 2019-10-16 11:13:19 +02:00
Stephen Abello
2ff771c16a N°2311: Fix change password page, correctly display buttons with long string 2019-10-16 10:43:20 +02:00
Pierre Goiffon
5e641f2273 N°2538 generic method to check path validity 2019-10-15 18:41:07 +02:00
Eric
d52254bbf0 🎨 Make some room in the menu 2019-10-15 12:10:16 +02:00
bruno DA SILVA
a97c8be31a 2498 - restrict access to assets into env-*
this is done by adding a .htaccess file on a per module basis.
NB: if there is already a .htaccess file, it is kept as it, so you can see this commit as adding a "default" htaccess.
2019-10-15 11:46:18 +02:00
bruno DA SILVA
9c067e5645 💡 type an @return for better code completion 2019-10-15 11:46:18 +02:00
bruno DA SILVA
24d6857069 👌 comiled PHP files have no more spaces before the PHP open tag. 2019-10-15 11:46:18 +02:00
Eric
ed9259df9e 🐛 Fix access to change password page
🎨 Code cleanup
2019-10-15 11:43:47 +02:00
Eric
75794fb4d9 Fix count with Archive mode 2019-10-15 09:50:33 +02:00
Pierre Goiffon
4c386da7d2 📝 Fix typo (thanks @jbostoen !) 2019-10-15 08:44:47 +02:00
Denis Flaven
abbd2e64c9 Fixed the doc generation and some typos in the README 2019-10-14 16:44:43 +02:00
Pierre Goiffon
300a723fca 📝 Add some @var PHPDoc for iQueryModifier calls 2019-10-11 18:09:00 +02:00
Eric
ddf42d0358 Access right on display explain search 2019-10-11 17:08:35 +02:00
Eric
88be0d7638 N°2261 - Log KPI not available in lnk window 2019-10-11 16:27:01 +02:00
Stephen Abello
e26428a0eb Fix visual glitch on portal's modal-backdrops 2019-10-11 16:08:19 +02:00
Eric
7b36852d7a N°2261 - Log KPI not available in lnk window 2019-10-11 15:56:32 +02:00
bruno DA SILVA
d1eb674314 n°1617 - meets iTop fence requirements 2019-10-09 18:53:40 +02:00
Pierre Goiffon
4afed39b0e N°2529 Fix charset sent by logout page 2019-10-09 18:07:08 +02:00
Stephen Abello
c1460cfdc7 N°2142 Portal: Fix list tabs and on charts click when a Manage brick has a chart as default display mode 2019-10-09 17:15:07 +02:00
Vincent Dumas
85a94ee1e7 Fix products setup icons hyperlinks
The 3 icons at the end of the Setup were pointing to broken url links
2019-10-09 15:36:25 +02:00
Eric
68895551b2 N°2517 - Supportability - system report (Added cron user) 2019-10-09 12:11:17 +02:00
Stephen Abello
eece09e5ed N°2311: Avoid new SSO buttons to flicker on page loading 2019-10-09 10:21:38 +02:00
Eric
0dd1f26b39 N°2311 - Authentication extensibility in iTop 2019-10-08 15:23:24 +02:00
Eric
1b958a3c4d N°2240 - Supportability - Maintenance mode 2019-10-08 15:07:34 +02:00
Eric
a1d23cddc5 N°2248 - Supportability - Integrity module 2019-10-08 09:29:49 +02:00
Pierre Goiffon
14c25e3d9b 🎨 SetupPage code formatting 2019-10-08 08:42:41 +02:00
Pierre Goiffon
c3915ee48e N°2518 Implementation to rotate logs on a weekly basis 2019-10-08 08:42:41 +02:00
Pierre Goiffon
21ff03e28f N°2518 Possibiliy to rotate log files based on days
See the 'log_filename_builder_impl' config parameter
2019-10-08 08:42:41 +02:00
Pierre Goiffon
2c8887398d 🎨 Log classes : PHPDoc & fix wrong self:: uses 2019-10-08 08:42:41 +02:00
Eric
f51cd65b1f N°2249 - Supportability - Updater module 2019-10-07 17:44:17 +02:00
Stephen Abello
dbb5a5191b N°1146 Portal: Correctly display external field targeting enum field 2019-10-07 12:04:14 +02:00
Pierre Goiffon
03b8ed5ce4 Merge branch 'support/2.6.2' 2019-10-07 09:41:08 +02:00
Pierre Goiffon
e9844aed45 Merge branch 'support/2.6.2' into develop 2019-10-07 09:37:03 +02:00
Eric
aaf6289953 N°2249 - Supportability - Updater module 2019-10-04 18:26:21 +02:00
Eric
b0d0223821 N°2249 - Supportability - Updater module 2019-10-04 18:03:27 +02:00
Pierre Goiffon
f271606e5e N°729 Update DBObject::Prefill* methods PHPDoc 2019-10-04 11:09:16 +02:00
Eric
23a9bae391 N°2249 - Supportability - Updater module 2019-10-03 15:31:23 +02:00
Eric
b7c795c313 N°2240 - Supportability - Maintenance mode 2019-10-02 10:18:07 +02:00
Eric
46c553fbad N°2249 - Supportability - Updater module 2019-10-02 08:39:32 +02:00
Pierre Goiffon
fc5bbfbed2 N°2269 fix obsolete icon color in lists 2019-10-01 18:10:45 +02:00
Eric
afe760a8bc N°2240 - Supportability - Maintenance mode 2019-10-01 13:53:34 +02:00
Vincent Dumas
7e78c35d23 N°2479: fix typo in user message 2019-09-30 18:30:03 +02:00
Vincent Dumas
56f0e95a22 Fix typo in a comment 2019-09-30 17:05:43 +02:00
Eric
7f9024465f N°2311 - Refactor Login FSM for errors 2019-09-30 15:10:29 +02:00
Eric
75dc11b882 N°2311 - Refactor Login FSM for errors 2019-09-30 13:45:50 +02:00
Eric
db0a5bd071 N°2240 - Supportability - Maintenance mode 2019-09-27 18:00:09 +02:00
Eric
64434f8065 🎨 remove warnings 2019-09-27 17:14:04 +02:00
Eric
044623309c N°2240 - Supportability - Maintenance mode 2019-09-27 17:13:25 +02:00
Pierre Goiffon
a54695b2e0 🎨 Some InlineImage comment / formatting 2019-09-27 16:11:42 +02:00
Eric
7acb53a22f N°2311 - Refactor Login FSM for errors 2019-09-27 13:12:00 +02:00
Vincent Dumas
a2d05e8119 Fix typo on French message when object not found (#92) 2019-09-27 11:25:48 +02:00
Pierre Goiffon
dfcebfcbea 🎨 Remove useless consecutive call 2019-09-27 09:24:20 +02:00
Eric
3f165c9803 N°2456 - Deadlock during concurrent updates 2019-09-26 18:18:52 +02:00
Eric
85971ea9f3 N°2272 - OQL performance (hierarchical keys) 2019-09-26 08:30:57 +02:00
Eric
ff3ec219ef N°2272 - OQL performance (empty class alias) 2019-09-25 17:43:20 +02:00
Eric
e0374dd186 N°2272 - OQL performance (unit tests) 2019-09-25 14:39:12 +02:00
Eric
51ee3b31cb N°2272 - OQL performance (SQL Generation) 2019-09-25 10:57:35 +02:00
Eric
496ea830c5 N°2272 - OQL performance (unit tests) 2019-09-24 13:20:55 +02:00
Eric
1e911b5094 N°2272 - OQL performance (SQL Generation) 2019-09-24 11:40:08 +02:00
Eric
6073be25de N°2272 - OQL performance (OQL class tree optimizer) 2019-09-19 13:44:15 +02:00
Eric
93a736e42a N°2272 - OQL performance (OQL class tree wip) 2019-09-19 13:44:15 +02:00
Eric
128afc8a56 N°2272 - OQL performance (comments) 2019-09-19 13:44:15 +02:00
Stephen Abello
a8d5630030 N°967 Portal: Browse brick actions are now correctly ordered even without a rank tag 2019-09-19 10:53:42 +02:00
Pierre Goiffon
d83a256b9d N°2293 DBUpdate changes finalisation
* ListChanges are back where they were (extra precaution to prevent AfterUpdate callback impl regressions)
* aChanges reset is done after the reentrance test
2019-09-17 15:06:47 +02:00
Pierre Goiffon
5af33ffe0a N°2293 Saves changes in DBObjet::DBUpdate, just before the AfterUpdate call
This will allow to get changes made in ComputeValues, OnUpdate, etc
2019-09-17 11:59:17 +02:00
Pierre Goiffon
ffd37d7802 🎨 cmdbAbstract : add missing visibility keywords for some function 2019-09-13 11:32:31 +02:00
Stephen Abello
31a34c247c N°2482 Regression on mandatory external field with only 1 value 2019-09-13 10:42:55 +02:00
Eric
4ccd842bdf N°2272 - OQL performance (unit tests) 2019-09-13 10:35:41 +02:00
Eric
f186c9e242 N°2272 - OQL performance (code refactor) 2019-09-13 08:39:50 +02:00
Pierre Goiffon
4e66c9fc23 N°2478 clearer comment 2019-09-12 15:52:13 +02:00
Pierre Goiffon
99e21652a0 🎨 clarify \Config::UpdateIncludes with $sModulesDir=null 2019-09-12 09:54:06 +02:00
Pierre Goiffon
24a0cc2f64 N°2478 Fix install not working anymore when having no env-* 2019-09-12 09:29:24 +02:00
Pierre Goiffon
e9dee86b7c Remove unecessary require() calls in utils class
We still need manual require() for LoginForm and associated
2019-09-11 18:03:44 +02:00
Pierre Goiffon
42d7901828 🎨 some code formatting in utils class 2019-09-11 17:51:23 +02:00
Pierre Goiffon
7f156e961d N°2478 Fix unattended install
* remove require() calls (now we have an autoloader \o/)
* change cache policy in utils::GetConfig
* set config in utils class from ApplicationInstaller
2019-09-11 16:41:50 +02:00
bruno DA SILVA
d71b3b1893 N°1455 - obsolescence: show hint in the search bar 2019-09-10 15:45:57 +02:00
Pierre Goiffon
cb1488c17f 👷 Jenkins : no composer install needed anymore 2019-09-10 14:28:35 +02:00
Pierre Goiffon
a625733885 👷 Jenkins : fix jenkinsfile filename case 2019-09-10 14:23:36 +02:00
Eric
e13bcba89a N°2311 - Login Page extensibility (constant used for application name) 2019-09-10 13:42:37 +02:00
Eric
7d8e8df0c5 N°2272 - OQL performance (fix 2.5 regression) 2019-09-10 13:06:47 +02:00
Pierre Goiffon
0e5c0ff46d 👷 Jenkins : fix toolkit unzip 2019-09-10 12:06:28 +02:00
Pierre Goiffon
67bff3e19d Jenlinks : change toolkit URL (http to https) 2019-09-10 11:46:55 +02:00
Eric
19d9c69fb8 N°2311 - Login Page extensibility (CSS reworked) 2019-09-10 08:40:28 +02:00
Eric
cb772a9527 N°2311 - Login Page extensibility (CAS button) 2019-09-06 17:54:02 +02:00
Eric
ee621c1b92 N°2311 - Login Page extensibility 2019-09-06 17:40:29 +02:00
Eric
20aa1bfdd6 cleanup warnings 2019-09-06 15:06:08 +02:00
Eric
9c52f6b949 N°2272 - OQL performance (add finalclass on all intermediate tables) 2019-09-06 14:56:37 +02:00
Eric
0f890ad228 N°2272 - OQL performance (Expression cache is configurable) 2019-09-06 14:30:42 +02:00
Eric
aac6ab0fc6 N°2272 - OQL performance (testability) 2019-09-06 14:30:42 +02:00
Eric
3fde778c0c N°2311 - Login Page extensibility 2019-09-06 14:30:42 +02:00
bruno DA SILVA
348bdbdc0d typo 2019-09-05 16:38:40 +02:00
Eric
3e9223a0bc N°2311 - Preferences extensibility 2019-09-02 17:55:55 +02:00
Eric
a905a8a3c1 N°2311 - Dictionary 2019-09-02 11:39:06 +02:00
Eric
b2ab07aa69 N°2311 - Login Page extensibility 2019-08-30 15:07:51 +02:00
Eric
9bd1da95e0 N°2456 - Deadlock during concurrent updates 2019-08-27 09:34:50 +02:00
Eric
83c0df2157 N°2456 - Deadlock during concurrent updates 2019-08-26 15:50:40 +02:00
Eric
8d7c64be66 N°2455 - Wrong Request Template query validation
Avoid blocking a form if a RequestTemplate reference a bad attribute (e.g. :this->id)
2019-08-23 17:30:54 +02:00
Eric
0625a01a4f Force MySQL port to int (for MySQL connector) 2019-08-23 15:13:29 +02:00
Pierre Goiffon
208a8723ff 🎨 Code formatting for iApplicationObjectExtension 2019-08-23 10:24:48 +02:00
Pierre Goiffon
f4c2a9ca7d N°2293 Some PHPDoc (@since for changes availability) 2019-08-23 10:18:22 +02:00
Pierre Goiffon
c97fd63e6d N°2293 Object update hooks now have access to object changes
* new \cmdbAbstractObject::$m_aChanges for \iApplicationObjectExtension::OnDBUpdate calls
* calling ListChanges() from within \DBObject::AfterUpdate will now give the right informations
* update PHPDoc in iApplicationObjectExtension
2019-08-23 10:13:44 +02:00
Eric
58402cdda8 N°2311 - User Provisioning API documentation 2019-08-22 14:38:07 +02:00
Eric
59fa3e10a3 N°2311 - User Provisioning API 2019-08-22 14:00:54 +02:00
Eric
0831a427cc N°2311 - authent-cas compatibility with 2.6 configuration 2019-08-22 14:00:53 +02:00
Pierre Goiffon
08517f0c7e 📝 Some PHPDoc in ExternalKey field rendering 2019-08-22 11:01:59 +02:00
Eric
97e58c2d79 N°2311 - combodo-cas renamed authent-cas 2019-08-21 12:21:24 +02:00
Eric
6693ec48a0 N°2311 - Add combodo-cas 2019-08-21 10:46:58 +02:00
Eric
9a13d4ce04 N°2311 - Code cleanup 2019-08-20 18:04:44 +02:00
Pierre Goiffon
51bbe1f79d Handle nested transactions (#90)
* starting a new transaction will send nothing in the DB (only one global transaction : merge nested transactions)
* same for COMMIT or ROLLBACK if more than 1 transaction is opened
* transactions are kept inside \DBObject::DBInsertNoReload, but they can be disabled using config flag db_core_transactions_enabled=false (true by default, hidden by default)
2019-08-20 10:47:29 +02:00
Eric
5dd92ab506 N°2311 - Add logs to logout 2019-08-20 10:26:43 +02:00
Eric
7120201469 N°2311 - Extend logout/error page 2019-08-20 09:53:11 +02:00
Stephen Abello
046eeb03f2 N°1671 Portal: Fix Aggregate Brick when user profile is not allowed to see one of the sub-brick 2019-08-19 11:28:53 +02:00
Eric
ce22dc9309 N°2311 - HybridAuth Extension 2019-08-16 18:42:04 +02:00
Eric
953c9e588e N°2311 - CAS Extension 2019-08-16 17:39:48 +02:00
Eric
2ceb4068ad N°2311 - Refactor Login FSM Extensions 2019-08-16 17:39:48 +02:00
Eric
11f62063a6 N°2311 - Debug login FSM 2019-08-16 17:39:47 +02:00
Eric
7885d712a6 N°2311 - Authentication extensibility in iTop 2019-08-16 17:39:47 +02:00
Molkobain
a6ca282ff4 Internal: Remove unused function in portal form handler 2019-08-16 17:05:37 +02:00
Molkobain
8ef67dee3b N°1881.1 Portal: Add DOM attribute (and widget helper) on object form that fields have been touched 2019-08-16 17:02:40 +02:00
Molkobain
fb1b730bd5 N°2435.8 Manage TCPDF lib using composer 2019-08-16 10:38:30 +02:00
Stephen Abello
af9c45849e N°1320: Add option to show/hide linkedsets out of user's scopes in portal 2019-08-16 10:05:45 +02:00
Pierre Goiffon
a711a67f4c Fix throw inside transaction without rollback 2019-08-14 14:43:40 +02:00
Molkobain
b743b7e2fb N°2435.7 Manage ArchiveTar lib using composer 2019-08-14 14:06:56 +02:00
Molkobain
3db92359e5 N°2435.6 Add .gitignore to remove non necessary folders from dependancies (eg. examples, tests, docs, ...) 2019-08-14 14:06:56 +02:00
Stephen Abello
088f08b315 N°967 Portal: Browse brick actions are now ordered following a rank tag 2019-08-14 12:39:32 +02:00
Molkobain
71cd61dfe4 Internal: Remove ClassLoader affectation from bootstrap.inc.php as we don't use it yet. 2019-08-14 10:30:43 +02:00
Molkobain
947e26d864 Internal: Change how the bootstrap.inc.php file is included in endpoints (This completes commit ec095896) 2019-08-13 17:38:51 +02:00
Molkobain
e3995a130f PHPDoc 2019-08-13 17:25:04 +02:00
Molkobain
384641e274 N°895 Portal: Filter linkedsets on remote object scopes 2019-08-13 16:59:25 +02:00
Molkobain
0985415e11 N°2435.5 Manage SwiftMailer lib using composer 2019-08-13 14:09:16 +02:00
Molkobain
3e13c9e825 N°2435.4 Manage SwiftMailer lib using composer 2019-08-13 13:51:41 +02:00
Molkobain
ec09589646 N°2439 Add real autoloader for framework files (not modules) 2019-08-13 13:46:19 +02:00
Molkobain
83e3321a48 N°2435.3 Security hardening: Avoid direct access to lib directory 2019-08-13 10:52:15 +02:00
Molkobain
bb4c8ea52d N°2435.2 Manage SCSSPHP lib using composer 2019-08-13 10:50:54 +02:00
Molkobain
5960dc6245 N°2435.1 Portal: Split portal composer.json in 2
- Autoloader for portal files in the itop-portal-base module
- Dependencies moved to root composer.json
- Add autoloader for /core and /application content
2019-08-13 10:34:22 +02:00
Molkobain
ca92316e7d N°919 Portal: Make portal denial based on user profiles work again 2019-08-12 16:15:09 +02:00
Molkobain
b096472ccf PHPDoc 2019-08-12 11:45:33 +02:00
Molkobain
261498d225 Internal: Move expression cache files in a dedicated directory 2019-08-12 11:45:33 +02:00
Stephen Abello
320a6b8a16 N°2238 Portal: Track in object's history attachments addition and deletion 2019-08-09 15:37:52 +02:00
Stephen Abello
b3cadaf314 PHP doc + typo 2019-08-09 10:49:55 +02:00
Stephen Abello
660852115e Portal: Rename an endpoint with a typo 2019-08-09 10:49:55 +02:00
Stephen Abello
543e57ed7d N°2432 Portal: Manage and Browse brick filters now apply on subclasses fields in lazy mode 2019-08-09 10:49:55 +02:00
Pierre Goiffon
4d78b7ca13 📝 add comment on prefill API call 2019-08-08 09:44:17 +02:00
Pierre Goiffon
a32bdf3f2f 📝 fix phpdoc (see call in UI.php operation=new) 2019-08-07 18:10:20 +02:00
Pierre Goiffon
5382d2006c N°2429 change visibility of \DBObject::GetReferencingObjects internal method
In iTop, only called by \DBObject::MakeDeletionPlan which is private
Not called in our extensions
Not called/redefined in any client customization
2019-08-07 16:08:59 +02:00
Pierre Goiffon
ae1d60d11e 📝 little PHPDoc modification 2019-08-07 11:50:59 +02:00
Stephen Abello
e8c0bcfbb2 N°769 Portal: Add parameter to set default list length in ManageBrick and BrowseBrick 2019-08-07 10:28:25 +02:00
Molkobain
b8a04cb842 Create README.md 2019-08-07 10:12:46 +02:00
Pierre Goiffon
b4ffa8c045 📝 Fix wrong phpdoc 2019-08-06 15:27:32 +02:00
Pierre Goiffon
7e540f16f9 🎨 \DBObject::DBDeleteSingleObject : isolate exit condition at the top 2019-08-06 14:45:05 +02:00
Stephen Abello
e69275c6c5 N°956 Portal: Add an icon to copy object name and url next to the form title
* Add a generic utility to build iTop clipboard widget
* Can be used in portal, console and extensions
2019-08-06 12:29:18 +02:00
Stephen Abello
16c123df49 Trigger bootstrap modal loaded event in 66287757 refactor 2019-08-06 12:29:18 +02:00
Pierre Goiffon
446eee79fc 🎨 Unwrap useless else statement 2019-08-06 11:49:19 +02:00
Pierre Goiffon
cbc96d8a58 📝 Attachment : add some @var on object init 2019-08-05 11:04:26 +02:00
Stephen Abello
d2015b7d7b N°1232 Portal: Harmonize right checks for external url in forms 2019-08-02 11:04:32 +02:00
Stephen Abello
305b236f41 N°2060: Add portal's ContextTag lost in Symfony migration 2019-08-02 10:58:52 +02:00
Pierre Goiffon
e172bd13df N°2211 DataSynchro : remove DBUpdate() arguments for future 2.7.0 2019-08-01 17:04:01 +02:00
Stephen Abello
94cb4a2bb4 N°2060: Fix regression introduced in migration 2019-08-01 14:37:50 +02:00
Pierre Goiffon
7abbbf6b7b 📝 PHPDoc for BackgroundTask 2019-08-01 09:54:47 +02:00
Molkobain
66287757b3 Portal: Refactor creation of modal dialog through a common helper (CreatePortalModal(oOptions)) 2019-07-31 15:51:25 +02:00
Molkobain
661ecc57c5 PHPDoc 2019-07-31 15:51:25 +02:00
Molkobain
15f9f79a24 Fix unit test to be used in the ITSM Designer (Shame shame shame 🔔🙈) 2019-07-31 15:51:25 +02:00
Molkobain
286374fe7c N°1232 Portal: Allow external keys to be opened in object forms (only if user has permissions)
- Created new JS method to handle modals (bootstrap-portal-modal.js > CreatePortalModal)
- Moved from global modal hacks to the same file
2019-07-31 15:51:25 +02:00
Pierre Goiffon
ea288c2194 🌐 Fix english label
Many thanks @jbostoen who suggested the change in 60863c5fcf
2019-07-31 09:04:38 +02:00
Molkobain
927cd60ad2 N°1736.2 Fix sBrickSubtitle not being defined by default in most bricks 2019-07-30 17:41:09 +02:00
Molkobain
fb6e47e42a N°1736 Portal: Add option to display ManageBrick's current tab description as the brick subtitle
Actually, every brick can now display a subtitle if they populate the sBrickSubtitle variable for the template.
2019-07-30 17:19:07 +02:00
Pierre Goiffon
34d4f6b1f9 N°2240 add /.maintenance in ignore 2019-07-30 08:59:52 +02:00
Stephen Abello
f7170953fb N°2353: Typo in French dictionary 2019-07-29 15:33:48 +02:00
Pierre Goiffon
e80d52cc0f N°2416 fix datepicker not opening anymore
This was brought by PR #40 integration in 06592d7d37
2019-07-29 12:12:34 +02:00
Pierre Goiffon
75da1ce7a7 🎨 iTopWebPage : some syntax highlighting in HEREDOC JS 2019-07-29 11:09:33 +02:00
Pierre Goiffon
7894c872dc N°2414 Remove \DBObject::RegisterCallback
This was experimental and never used. The official way is to use iApplicationObjectExtension !
2019-07-26 16:24:06 +02:00
Pierre Goiffon
14b2d2ed4c 🔧 Update EditorConfig file with idea specific options
Available since PHPStorm 2019.2
@see https://blog.jetbrains.com/phpstorm/2019/07/phpstorm-2019-2-release/#editorconfig
2019-07-26 12:05:08 +02:00
Pierre Goiffon
a7b5077e0c N°2010 \SetupUtils::MYSQL_NOT_VALIDATED_VERSION is now empty 2019-07-25 17:33:41 +02:00
Pierre Goiffon
de2b88b707 📝 PHPDoc for archiving remove @api
Public API is currently under review, we shouldn't change the review perimeter !
2019-07-25 17:33:41 +02:00
Stephen Abello
130734bec7 Merge branch 'master' into develop
# Conflicts:
#	setup/backup.class.inc.php
2019-07-25 17:18:49 +02:00
Stephen Abello
d7fad4b646 Merge branch 'support/2.6.2' 2019-07-25 17:07:49 +02:00
Stephen Abello
db4c241cba N°680 Fix 'G', 'd', 'j' DateTime format in regexp generation 2019-07-25 15:12:44 +02:00
Pierre Goiffon
be09909976 📝 PHPDoc for archiving : rephrase for clarity
Thanks @bruno-ds !!
2019-07-24 17:04:10 +02:00
Stephen Abello
f4d538ef6c N°2410 Fix regression in mysqldump call introduced in 2.6.2 2019-07-24 16:02:20 +02:00
Molkobain
a6b1da393b N°2269 Font Awesome v5: Fix files integration in portal 2019-07-23 18:10:00 +02:00
Pierre Goiffon
501c20a34d 📝 Some PHPDoc on object archiving 2019-07-23 18:05:05 +02:00
Molkobain
b858ba3786 N°1268 Add support for abstract classes creation in browse brick
* Refactored parts of the create brick into the object controller
2019-07-23 11:45:33 +02:00
Molkobain
60863c5fcf 🌐 Fix English dictionary entries 2019-07-23 11:45:33 +02:00
Pierre Goiffon
1ee3f4a984 Merge remote-tracking branch 'origin/master' into develop 2019-07-22 15:59:21 +02:00
Pierre Goiffon
aadb605dec Merge remote-tracking branch 'origin/support/2.6.0' 2019-07-22 15:58:58 +02:00
Pierre Goiffon
f63f2bd445 N°1802 backup : remove old itop_root config parameter
Was renamed to itop_backup_incident in 2.6.0
2019-07-22 15:57:30 +02:00
Molkobain
0205f150a3 N°902.3 Portal: Extract column sorting helper to a specific service 2019-07-22 11:45:31 +02:00
Pierre Goiffon
cdbdf580c8 📝 CONTRIBUTING : small changes
* security wasn't in bold
* more explanations on branches, ask to base always on develop
2019-07-22 11:34:48 +02:00
Pierre Goiffon
e4ba2b0828 N°2366 Remove unused iTopArchive class 2019-07-22 09:02:45 +02:00
Pierre Goiffon
28d00cc7c9 N°2366 Remove zip from mandatory PHP ext 2019-07-22 09:02:44 +02:00
Pierre Goiffon
b897da8f6f N°2404 remove charset/collation DB parameters
Are constants since N°1001 (iTop 2.5.0)
2019-07-19 16:58:25 +02:00
Pierre Goiffon
dc868b16ab N°2366 remove DBBackup::CreateZip
* remove method and its dependencies
* create \utils::GetFileMimeType
* in \DBBackup::DownloadBackup mime type isn't hardcoded anymore
2019-07-19 15:51:05 +02:00
Pierre Goiffon
ee2e109769 N°2269 Font Awesome v5 : kept old CSS name for compat 2019-07-19 10:43:58 +02:00
Pierre Goiffon
2b955ddd53 N°2269 Font Awesome v5 : move back lib from /lib to /css
Thanks to the team, yeah you're right, this wasn't a good idea (did because there is a way to use Font Awesome in JS, but we'll see if we do so in the future, for now we don't :) )
2019-07-19 10:16:22 +02:00
Molkobain
33cb4fd42b N°902.2 Portal: Add support for columns sorting in BrowseBrick's "lazy" mode
(And start refactoring in ManageBrick)
2019-07-18 12:11:09 +02:00
Pierre Goiffon
a03af7e9ef 🐛 N°2240 Fix startup.inc.php cannot be called alone anymore 2019-07-17 16:50:48 +02:00
Molkobain
90dbc35d41 N°902 Portal: Add support for columns sorting in ManageBrick's "lazy" mode 2019-07-17 15:40:44 +02:00
Molkobain
66e9fc2068 N°2396 Autocomplete: Harmonize accent handling 2019-07-17 15:40:43 +02:00
Molkobain
0a9b376684 N°2324 Remove legacy portal security check 2019-07-17 15:40:43 +02:00
Molkobain
83ba909c08 N°2112 Remove legacy end-user portal
- Accessing the /portal URL redirects to the new portal (/pages/exec.php?exec_module=itop-portal-base&...)
- Removed /itop_design/portals/portal[@id="legacy_portal"] from standard datamodel, adapt your XML accordingly
- Removed /itop_design/constants/constant[@id^="PORTAL_"] from standard datamodel, adapt your XML accordingly
- Removed PortalWebPage & TransactionException classes
- Added a warning in setup when no portal is selected
2019-07-17 15:40:43 +02:00
Pierre Goiffon
9ed33f16dd N°2269 Font Awesome v5 : fix new lines breaking code :(
Those regressions were introduced in a4743901
Saw with a JS error in schema.php
2019-07-17 11:02:26 +02:00
Pierre Goiffon
e9fdb61bb5 N°2269 Font Awesome v5 : remove unused CSS 2019-07-17 10:24:07 +02:00
Pierre Goiffon
073b1cd303 N°2018 Backup : fix version check for MySQL8
Now uses \CMDBSource::GetDBVersion instead of mysqldump -V
2019-07-16 18:05:31 +02:00
Pierre Goiffon
e712791f43 Merge remote-tracking branch 'origin/master' into develop 2019-07-16 17:45:24 +02:00
Pierre Goiffon
fefd9aae95 N°2399 backup : throw exception and log error if cannot create archive
(before error was silently ignored)
2019-07-16 17:44:56 +02:00
Pierre Goiffon
a4743901a3 N°2269 Font Awesome : update iTop for new v5 icons
* remove useless css in light-grey (weren't used)
* change icons class names from v4 to v5
2019-07-16 12:20:59 +02:00
Pierre Goiffon
ced9489643 N°2269 Add Font-Awesome v5.9.0
Also add v4-shims for compatibility. Will be removed with N°2393
2019-07-16 09:57:51 +02:00
Pierre Goiffon
0c45a0ca49 N°2269 Remove Font-Awesome v4 2019-07-16 09:57:51 +02:00
Pierre Goiffon
f3572e82ec N°2060 fix portal crash if css not yet compiled
Was using services.yaml parameters before they were defined
2019-07-16 09:57:30 +02:00
Pierre Goiffon
dd620022a8 📝 new iTop security policy (#85) 2019-07-16 08:47:30 +02:00
Molkobain
2237ec581c N°2323.7 Fix images display in browse brick as a list 2019-07-15 13:41:36 +02:00
Eric
a0cd70ae71 N°2240 - Supportability - Maintenance mode (setup) 2019-07-12 16:13:13 +02:00
Eric
80fce579a0 N°2240 - Supportability - Maintenance mode (soap message removed) 2019-07-12 15:35:20 +02:00
Pierre Goiffon
1313484ebe 💄 setup : update progress bar if error occurs 2019-07-12 11:14:53 +02:00
Pierre Goiffon
95aa541293 N°2150 Archive_Tar update : fix warnings on overloaded methods
In Archive_Tar the methods signatures did change... But the overrides were useless (same code or direct call to parent)
2019-07-12 10:34:23 +02:00
Molkobain
c4702f6a87 Merge remote-tracking branch 'origin/develop' into develop 2019-07-12 10:25:17 +02:00
Molkobain
5c0fc0bec5 N°2323.6 Reintegrate fixes in the new Symfony portal 2019-07-12 10:17:58 +02:00
Stephen Abello
d8de7b19cb N°2226: Add missing files for Scss v1.0.0 2019-07-12 10:13:00 +02:00
Molkobain
38640b01a8 Merge branch 'feature/b2060-migrate-silex-to-symfony' into develop
# Conflicts:
#	core/dbsearch.class.php
#	datamodels/2.x/itop-portal-base/module.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/userprofilebrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/helpers/applicationhelper.class.inc.php
#	datamodels/2.x/itop-portal/module.itop-portal.php
2019-07-12 09:57:16 +02:00
Eric
a11e783867 N°2240 - Supportability - Maintenance mode (soap message) 2019-07-12 09:04:10 +02:00
Molkobain
8ca2fffa78 N°2060 [WIP] Initialisation of the portal application: Remove Silex framework files from embedded libs 2019-07-11 17:50:36 +02:00
Molkobain
3f3cbd17ed N°2060 [WIP] Initialisation of the portal application: Remove Silex portal files 2019-07-11 17:50:31 +02:00
Molkobain
5a18769336 N°2060 [WIP] Initialisation of the portal application: Make AggregatePageBrick work again 2019-07-11 17:45:43 +02:00
Molkobain
cd6fe171cd N°2060 [WIP] Initialisation of the portal application: Refactor way brick controllers forward actions between each others 2019-07-11 17:45:21 +02:00
Molkobain
ee45e546a8 N°2060 [WIP] Initialisation of the portal application: Code cleanup 2019-07-11 16:44:22 +02:00
Molkobain
c8be217a1d N°2060 [WIP] Initialisation of the portal application: Make CreateBrick work again 2019-07-11 16:04:06 +02:00
Molkobain
618df6de1d N°2060 [WIP] Initialisation of the portal application: Fix class extended by ObjectController 2019-07-11 16:03:44 +02:00
Pierre Goiffon
e6e79df8db N°2150 update Archive_Tar to 1.4.7
Now we don't have anymore some Combodo specific code inside the lib \o/
2019-07-11 14:30:30 +02:00
Eric
509ca47b36 N°2240 - Supportability - Maintenance mode 2019-07-11 12:04:11 +02:00
Eric
066353e1e7 N°2240 - Supportability - Maintenance mode 2019-07-11 12:00:15 +02:00
Eric
a6737afb2f N°2240 - Supportability - Maintenance mode 2019-07-11 10:22:39 +02:00
Molkobain
d5b3a62df5 N°2060 [WIP] Initialisation of the portal application: Code cleanup 2019-07-10 11:55:47 +02:00
Eric
7f82faefe1 N°679 - DB inconsistency protection 2019-07-10 11:49:44 +02:00
Molkobain
08731857e5 N°2060 [WIP] Initialisation of the portal application: Code cleanup 2019-07-10 11:45:47 +02:00
Molkobain
90062acc35 N°2060 [WIP] Initialisation of the portal application: Fix typo 2019-07-10 11:38:22 +02:00
Molkobain
030d912820 Code cleanup
- Format code accordingly to coding conventions
- Add / update PHPDoc all over the place
- Suppress most of the warnings that did not have a big impact on code's logic
2019-07-09 19:10:16 +02:00
Molkobain
9e9187b169 N°2060 [WIP] Initialisation of the portal application: Huge code cleanup
- Rename variables and methods in iTop files to match coding conventions
- Format code accordingly to coding conventions
- Add / update PHPDoc all over the place
- Suppress most of the warnings that did not have a big impact on code's logic
2019-07-09 19:08:40 +02:00
Molkobain
c1258d0527 N°2060 [WIP] Initialisation of the portal application:
- Fix attachment download: Controller's action was still using the Silex\Application object to return a response.
- Push all cleanup modifications as well by mistake...
2019-07-09 17:54:37 +02:00
Molkobain
b7039c81ba N°2060 [WIP] Initialisation of the portal application: Object's routes
- Fix autocomplete search route path was incorrect (missing parameters)
- Fix generic search route by removing the default controller as it didn't exist
- Remove regular search route as it was never used / implemented
2019-07-09 16:15:14 +02:00
Molkobain
7088b96c16 N°2060 [WIP] Initialisation of the portal application: Enable webprofiler for easier debug! 2019-07-08 16:59:46 +02:00
Molkobain
d31273dff5 N°2060 [WIP] Initialisation of the portal application: PHPDoc 2019-07-08 16:04:25 +02:00
Molkobain
85460ef6e2 N°2060 [WIP] Initialisation of the portal application:
- Remove old composer.json that was not necessary
- Add empty model.itop-portal-base.php file for future XML snippets to be loaded
- Increase module version number to 2.7.0
2019-07-08 15:49:07 +02:00
Molkobain
5ab059c404 N°2060 [WIP] Initialisation of the portal application:
- Simplify PortalUrlMaker to avoid necessity to copy most of the code. Drawback: BC break, check migration notes.
- Fix multiple portal instances (in the same running process)
- Refactor portal constants into env. vars
- Fix cache path for services (ScopeValidator & LifecycleValidator)
- Change evalution order of the portal id ($_ENV['PORTAL_ID'] > $_GET('portal_id'] > PORTAL_ID)
2019-07-08 15:44:39 +02:00
Molkobain
322ea1870d N°2060 [WIP] Initialisation of the portal application:
- Refactor kernel bootstrapping:
  - Make bin/console from SF work
  - Make iTopPortalEditUrlMaker / iTopPortalViewUrlMaker work again
- Add classmap to /application in composer.json
2019-07-05 15:53:05 +02:00
Pierre Goiffon
878b87b68c N°2349 fix GroupBy dashlet on classes with ExternalField to ExternalField 2019-07-05 12:10:04 +02:00
Molkobain
ab3024d98a N°2060 [WIP] Initialisation of the portal application: Restore ApplicationHelper.php history 2019-07-05 11:42:39 +02:00
Molkobain
d447c96385 N°2060 [WIP] Initialisation of the portal application: Temporary delete ApplicationHelper.php in order to restore history 2019-07-05 11:36:02 +02:00
Molkobain
e3ac4d1039 N°2060 [WIP] Initialisation of the portal application:
- Make ManageBrick work again!
- Make ObjectController::CreateFromFactory() work again
- Refactor object form rendering from Twig string (in memory) in the "object_form_handler" service
- Fix ApplicationHelper::GetLoadedListFromClass()
2019-07-05 11:30:08 +02:00
Molkobain
8fc4aa7240 N°2060 [WIP] Initialisation of the portal application: Fix template paths in ObjectController 2019-07-04 17:12:53 +02:00
Molkobain
aff9d8cbca N°2060 [WIP] Initialisation of the portal application:
- Fix object_brick.yaml actions path (Double slashes)
- Add declaration for "security_helper" service
- Refactor ObjectFormManager and ObjectFormHandlerHelper for SF
2019-07-04 17:06:58 +02:00
Molkobain
260c15c6b6 N°2060 [WIP] Initialisation of the portal application:
- Refactor of BrickCollection to store properties at the root level, hence having easier API
- Code cleanup (Coding conventions, PHPDoc)
- Extract ObjectController::HandleForm() into new "object_form_handler" service
- Migrate ObjectController and UserProfileBrickController to SF
- Remove route/action "Search hierarchy" from ObjectController as it was never implemented
2019-07-04 15:14:46 +02:00
Purple Grape
dab48146bf Update zh_cn.dict.itop-config-mgmt.php
translation correction
2019-07-03 08:42:10 +02:00
Pierre Goiffon
14ae9f0809 Merge remote-tracking branch 'origin/support/2.5'
# Conflicts:
#	css/css-variables.scss
#	datamodels/2.x/authent-external/module.authent-external.php
#	datamodels/2.x/authent-ldap/module.authent-ldap.php
#	datamodels/2.x/authent-local/module.authent-local.php
#	datamodels/2.x/itop-attachments/module.attachments.php
#	datamodels/2.x/itop-backup/module.itop-backup.php
#	datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php
#	datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php
#	datamodels/2.x/itop-config/module.itop-config.php
#	datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php
#	datamodels/2.x/itop-full-itil/module.itop-full-itil.php
#	datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/module.itop-portal-base.php
#	datamodels/2.x/itop-portal/module.itop-portal.php
#	datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php
#	datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php
#	datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php
#	datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php
#	datamodels/2.x/itop-tickets/module.itop-tickets.php
#	datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php
#	datamodels/2.x/version.xml
2019-07-02 15:09:11 +02:00
Pierre Goiffon
b3369c8b0e Update version number for 2.5.3 beta 2019-07-02 14:54:36 +02:00
Molkobain
1115cdd2ec Portal: Fix sidebar menu entries being to narrow when only "Home" displayed 2019-07-01 22:33:15 +02:00
Molkobain
44673b9fd2 N°2060 [WIP] Initialisation of the portal application: Replace SF default UrlGenerator with our own 2019-07-01 17:50:25 +02:00
Molkobain
faf9b32176 N°2060 [WIP] Initialisation of the portal application 2019-07-01 17:47:45 +02:00
Molkobain
a93c1092fc N°2060 [WIP] Initialisation of the portal application:
- Refactor SecurityHelper into SF service (DI)
- Make BrowseBrick work (again!)
- Extract methods from BrowseBrickController to a dedicated service (BrowseBrickHelper)
2019-07-01 17:41:12 +02:00
Pierre Goiffon
6c81163d20 Merge remote-tracking branch 'origin/master' into develop 2019-07-01 17:30:21 +02:00
Molkobain
f71edbf45b N°2060 [WIP] Initialisation of the portal application: Refactor to make services 'combodo.current_user' and 'combodo.current_contact.photo_url' work 2019-06-28 17:26:30 +02:00
Molkobain
0d3e48475e N°2060 [WIP] Initialisation of the portal application: Code cleanup 2019-06-28 17:26:30 +02:00
Molkobain
ae8451e837 N°2060 [WIP] Initialisation of the portal application:
- Default env. is now production.
- Debug mode through url param. is now available like in Silex version
2019-06-28 17:26:24 +02:00
Pierre Goiffon
33903f570b N°2174 ExternalField to friendlyname : restore behavior without dict key
* displaying "class -> field" was breaking exports (columns labels for ext fields to friendlynames in default datamodel, for example UserRequest.agent_id_friendlyname)
* dict key is always searched first, so a custom label can always be set
2019-06-28 15:13:15 +02:00
Molkobain
123e734046 N°2060 [WIP] Initialisation of the portal application: Fix file format (tab used instead of spaces) 2019-06-28 15:09:06 +02:00
Molkobain
008261e918 N°2060 [WIP] Initialisation of the portal application: Part of the "brick_collection" service refactoring 2019-06-28 15:08:30 +02:00
Molkobain
d388086baa N°2060 [WIP] Initialisation of the portal application: Fix composer.json file
- Reupgrade Symfony/* to v3.4.* instead of v3.4.12 thanks to symfony/polyfill-php70
- Remove "replace" key that was necessary for Flex
- Add "classmap" key to auload all classes from <itop>/core (eg. \ModuleDesign)
2019-06-28 15:07:12 +02:00
Stephen Abello
f7af705bb5 Fix scss and css errors 2019-06-28 14:25:25 +02:00
Stephen Abello
a827cb7546 N°2226: Upgrade ScssPHP to v1.0.0 2019-06-28 14:24:56 +02:00
Stephen Abello
c7fe6f388a N°2270: Upgrade bootstrap to v3.4.1 2019-06-28 14:22:35 +02:00
Molkobain
a04080a93e N°2060 [WIP] Initialisation of the portal application: Migrate routes to YAML format 2019-06-27 17:11:04 +02:00
Molkobain
04158f5589 N°2060 [WIP] Initialisation of the portal application: Fix of the composer.json file
- Temporary downgrade Symfony/* from v3.4.* to v3.4.12 because of a PHP7 dependency in Symfony/http-foundation
- Remove Flex as it was only compatible with PHP7
- Remove auto scripts relying on Flex (post update and post install)
- Rename rogue itop-portal-base/composer.json that should not be used (will be removed later)
2019-06-27 16:32:45 +02:00
bruno DA SILVA
127809a836 Merge remote-tracking branch 'origin/support/2.5' 2019-06-26 15:41:13 +02:00
bruno DA SILVA
6c948873ff N°2323.6 Fix regression introduced in previous commit 2019-06-26 15:38:42 +02:00
Stephen Abello
a93be39aeb N°2166: Fix regression introduced in b157fad 2019-06-26 14:15:04 +02:00
Stephen Abello
6de6c38834 N°2268: Upgrade jQuery to v3.4.1 and jQuery migrate to v3.1.0. Remove version number from both libraries filename 2019-06-26 10:36:40 +02:00
Pierre Goiffon
a5745ba72d N°2345 privUITransactionFile : avoid create dir race condition 2019-06-26 10:17:47 +02:00
Eric
7c93d116ec 2.6.2 fix module version 2019-06-25 16:56:15 +02:00
Molkobain
0867d8a3c4 N°2060 [WIP] Initialisation of the portal application 2019-06-25 11:58:38 +02:00
Stephen Abello
71f5d29cba N°2271: Upgrade CKEditor to v4.11.4 2019-06-24 15:52:26 +02:00
Stephen Abello
f948d6e026 N°2336: Set right parameter for --ssl-mode 2019-06-21 14:37:48 +02:00
Stephen Abello
a222ead43c N°2336: Use --ssl-mode instead of --ssl with MySQL >= 5.7.0 2019-06-21 13:59:36 +02:00
Stephen Abello
d6bfbbcd30 N°1529: Allow parameter OpenSSLMcryptCompatibility to be used 2019-06-21 11:08:23 +02:00
Molkobain
17df9d0f9d Merge remote-tracking branch 'origin/support/2.5' 2019-06-21 10:03:17 +02:00
Molkobain
93099ea3c7 N°2323.5 Fix regression introduced in previous commit
Could not upload images in HTML field anymore
2019-06-21 10:01:31 +02:00
Molkobain
2f9e050e2b N°2323.4 Fix regression introduced in previous commit
Current user picture was no longer displayed in the portal

(cherry picked from commit 56b9eb6cf3)
2019-06-20 17:52:26 +02:00
Eric
e68340273b Merge branch 'master' into develop
# Conflicts:
#	core/config.class.inc.php
#	core/htmlsanitizer.class.inc.php
#	css/css-variables.scss
#	css/light-grey.css
#	datamodels/2.x/version.xml
#	dictionaries/zh_cn.dictionary.itop.ui.php
#	synchro/synchrodatasource.class.inc.php
2019-06-20 16:11:38 +02:00
Eric
5c341138e1 N°2129 - Fix lost dict. entries by toolkit updating script 2019-06-20 15:48:41 +02:00
Molkobain
56b9eb6cf3 N°2323.4 Fix regression introduced in previous commit
Current user picture was no longer displayed in the portal
2019-06-20 10:34:10 +02:00
Pierre Goiffon
db20244212 N°2174 External field label retrieval : fix default value
\AttributeDefinition::GetLabel with default null was returning att code !! Added PHPDoc and changed default value
2019-06-19 16:13:29 +02:00
Pierre Goiffon
6f9f74e72f N°2230 BR translations
Many thanks to our client Pimkie !
2019-06-19 15:55:05 +02:00
Eric
8070d5b9b7 2.6.2-beta 2019-06-19 15:08:40 +02:00
Molkobain
6197ecbaf4 Update version number for 2.6.2 beta 2019-06-19 14:43:21 +02:00
Eric
ca585d3f42 N°2044 - Search Form Prefill not effective when searching objects to add to an AttributeLinkedSet (n:1) 2019-06-18 15:53:48 +02:00
Eric
02c78d4044 N°2278 - Object-copier: Fix n:n link attributes set to default on copy
(cherry picked from commit 6564d84a2f)
2019-06-18 14:57:45 +02:00
Pierre Goiffon
9e5d668c02 N°2328 TagSet : allow to create codes with 3 characters
(was wrongly 4 min before)
2019-06-18 14:36:47 +02:00
Pierre Goiffon
051656f295 N°2174 External field : change label retrieval
* Now the  dict entry will be used even for friendly names
* If no dict keys exists, then the class path plus field name will be returned
2019-06-18 11:27:02 +02:00
Eric
9a51a44549 Merge remote-tracking branch 'origin/support/2.5' 2019-06-18 10:50:04 +02:00
Eric
5102b113ed N°2323 - Fix calls to ajax endpoints
(cherry picked from commit c723d19e01)
2019-06-18 10:45:50 +02:00
Eric
f1e4d94499 N°2323 - Fix calls to ajax endpoints for portal 2019-06-18 10:43:45 +02:00
Pierre Goiffon
d04102bab3 N°2243 IT translations : final versions 2019-06-18 08:56:06 +02:00
Eric
c723d19e01 N°2323 - Fix calls to ajax endpoints 2019-06-17 15:59:43 +02:00
Eric
b0414748cb Typo 2019-06-13 11:55:10 +02:00
Eric
dac77e0606 Revert id in select 2019-06-13 10:24:01 +02:00
Eric
02b98543d9 Fix Bad db_key_field definition 2019-06-13 10:06:52 +02:00
Eric
519aaadd9a N°2157 - Fix backup manual warning 2019-06-13 09:44:40 +02:00
bruno DA SILVA
fe27fef530 Merge remote-tracking branch 'origin/master' 2019-06-12 18:27:11 +02:00
bruno DA SILVA
72dbb6f937 N°1373 - supportability: log stack trace on DBObject::Reload error 2019-06-12 18:26:35 +02:00
Pierre Goiffon
ccb29d10ae N°2243 IT translations : keys in parent classes 2019-06-12 18:09:41 +02:00
Pierre Goiffon
e479775833 N°2243 IT translations
Thanks to our client Pimkie !
2019-06-12 18:09:41 +02:00
Stephen Abello
86a7192f5a N°2160: Correctly initialize fields depending on a select field with only 1 value 2019-06-12 14:39:29 +02:00
Pierre Goiffon
4a1be13904 N°2208 new IT translations 2019-06-12 11:02:49 +02:00
Pierre Goiffon
0f3347f64d 📝 Fix some PhpDoc 2019-06-12 10:39:30 +02:00
Eric
6564d84a2f N°2278 - Object-copier: Fix n:n link attributes set to default on copy 2019-06-12 10:17:19 +02:00
Eric
f4747c5cef PHPStorm 2019-06-12 09:46:21 +02:00
Eric
1e92c2f28a Sanitize error message 2019-06-11 17:18:36 +02:00
Eric
e4b097b196 Add KPIs to search 2019-06-11 17:18:35 +02:00
Eric
85653c9ffc Sanityzation:
- no use of cache to build queries when the flag is set
- Use class key instead of 'id' for default select column
2019-06-11 17:18:35 +02:00
Pierre Goiffon
b1761e04b2 🎨 DataSynchro : remove some warnings, code formating
(cherry picked with small modifications from commit 26dcaa0ded : it was reverted on master as this branch contains a fix only version, ok to commit it on develop though)
2019-06-11 17:01:08 +02:00
Stephen Abello
da5d8b20fa N°2044: Enable Search form prefill when adding objects to 1:n 2019-06-11 16:59:27 +02:00
Molkobain
9a5a5f858f N°2235.2 Fix emptied URLs on object modification when URL starts with a placeholder 2019-06-11 16:13:53 +02:00
Pierre Goiffon
d6b194b0aa 📝 Change back CONTRIBUTING file name to uppercase 2019-06-11 14:53:56 +02:00
Pierre Goiffon
50ed52bacc Fix ticket ref uniqueness rule declaration (many thanks @jbostoen !) 2019-06-11 09:08:36 +02:00
Thomas Casteleyn
daa906a697 Only set Ticket ref if not yet present via import or synchro (#82)
New non blocking uniqueness rule on Ticket.ref to warn when having ref duplicates
2019-06-10 11:28:24 +02:00
Stephen Abello
a0cd281c42 ⬆️ iTop >=2.6.1 supports PHP 7.3.x 2019-06-07 16:16:23 +02:00
Pierre Goiffon
ecd8f40c0f 🔧 Create a .editorconfig
See https://editorconfig.org/
2019-06-07 15:22:21 +02:00
Pierre Goiffon
616c1b9b73 🔧 Update PhpStorm formatter 2019-06-07 15:21:59 +02:00
Stephen Abello
6bb5606c00 N°2216: Set the mandatory icon inline with its field 2019-06-06 15:56:05 +02:00
Eric
a6ceb88fca N°2216 - Request Template Mandatory fields are not marked as "Mandatory" 2019-06-06 15:14:31 +02:00
Eric
7bb7a94fbc N°2291 - Fix blinking of warning image on mandatory HTML field 2019-06-06 15:14:31 +02:00
Pierre Goiffon
e4324cedb4 N°2235 Enable notification placeholders in hyperlinks
(cherry picked from commit bc55bfbee1)
2019-06-06 10:59:44 +02:00
Eric
07781c7c9d 1023 - Email Outlook : Fix iTop page broken by tag <o:p> 2019-06-06 09:56:31 +02:00
Stephen Abello
ea58a807fc N°2044: Forgot to add a variable in 7c1290f 2019-06-06 09:44:20 +02:00
Pierre Goiffon
fb6806a1c1 🎨 DataSynchro : some phpdoc and formatting 2019-06-05 17:26:00 +02:00
Pierre Goiffon
d24870e0ae Merge remote-tracking branch 'origin/master' into develop 2019-06-04 16:23:58 +02:00
Pierre Goiffon
166451c4e9 N°532 autocomplete : fix regressions introduced in ebb541e4
* multiple separator
* XSS filter
* search field value reset
2019-06-04 11:32:08 +02:00
Stephen Abello
7c1290f684 N°2044: Enable Search form prefill when adding objects to 1:n 2019-06-04 11:18:30 +02:00
Stephen Abello
179c774ba8 N°2207: Copy the content from the right source file into production.delta.prev.xml 2019-06-03 12:36:05 +02:00
Guy Couronné
b57c224052 📈 Add KPI on API Rest (#67) 2019-06-03 09:07:25 +02:00
Stephen Abello
e886d80de6 N°2215: Set autocomplete minimum width (instead of its width) to its parent field width 2019-05-31 12:14:41 +02:00
Pierre Goiffon
3791b2dd24 📝 Change return type for \MetaModel::GetObject 2019-05-28 17:18:07 +02:00
Pierre Goiffon
12c916f4e5 📝 Add @var for iApplicationUIExtension loops 2019-05-28 17:16:02 +02:00
Pierre Goiffon
ba7e00e130 N°2211 DataSynchro : rollback oChange remove in DBUpdate() + added log
Be conservative : this is a fix only release... oChange will be done in the future, it's a work that should be done everywhere in iTop and not only DataSynchro
2019-05-28 17:16:02 +02:00
Molkobain
895abde39c N°2060 [WIP] Renamed Silex portal dir before starting Symfony integration 2019-05-28 12:04:34 +02:00
Eric
bada955725 N°2211 - DataSynchro : fix delete rules
- code review bug fixes and comments
2019-05-28 10:40:00 +02:00
Molkobain
b6418d95e7 Add PHPDoc for type hinting as iTop replaces \DOMDocument with \MFDocument 2019-05-28 10:36:18 +02:00
Stephen Abello
f9e18675f3 N°2062: When a table displaying all rows is rebuilt (eg: by adding a column), reordering using columns now works 2019-05-24 16:20:31 +02:00
bruno DA SILVA
22416cc0be :note: PhpDoc generation for the public API
- typo (tunning => tuning)
 - rework of the README.md
2019-05-24 14:05:22 +02:00
Pierre Goiffon
ec086ad94a 📝 Fix /doc readme (thanks @jbostoen !) 2019-05-23 18:25:26 +02:00
Pierre Goiffon
17d4b570e8 N°2211 DataSynchro fix regression in DoJob2 method (create new iTop objects)
The \SynchroExecution::$m_oLastFullLoadStartDate is also used in DoJob2... So move back its instantiation in \SynchroExecution::PrepareProcessing, but with more variables and comment : the attribute is null until PrepareProcessing()
2019-05-23 18:15:50 +02:00
Pierre Goiffon
2dfad12553 Revert "🎨 DataSynchro : remove some warnings, code formating"
This reverts commit 26dcaa0ded.
Such modifications does not belong to a fix only branch !!
2019-05-23 11:58:10 +02:00
Pierre Goiffon
b7dc55604e 🎨 DataSynchro : rename DoJob1/2/3 methods 2019-05-23 11:19:18 +02:00
Pierre Goiffon
991bc359cb Merge remote-tracking branch 'origin/master' into develop 2019-05-23 10:52:34 +02:00
Pierre Goiffon
26dcaa0ded 🎨 DataSynchro : remove some warnings, code formating 2019-05-23 10:48:54 +02:00
Pierre Goiffon
b5d3ddb7e3 N°2211 DataSynchro : fix deletion rules regression when using synchro_exec.php
* fix regression : no update if exec phase only and full load interval <= 0
* fix regression : update if exec phase only and full load interval > 0
* some PHPDoc
* move back \SynchroExecution::$m_oLastFullLoadStartDate init to constructor
* add a boolean member to indicate if LastFullLoadStartDate was passed by caller
* factorize database current datetime retrieval
2019-05-23 10:48:54 +02:00
Pierre Goiffon
8b178914b3 Fix \DBObject::DBDelete PHPDoc 2019-05-22 14:46:53 +02:00
OИUЯd da silva
ce6fd4d775 bugfix: remove lower cased version of the README.md 2019-05-22 11:44:45 +02:00
Molkobain
bc55bfbee1 N°2235 Enable notification placeholders in hyperlinks 2019-05-21 17:38:28 +02:00
OИUЯd da silva
9c75cb4537 :note: PhpDoc generation for the public API (#63)
- generate phpdoc to a dokuwiki compatible format
- add/update the phpdoc of a selection of class methods
2019-05-21 12:05:52 +02:00
bruno DA SILVA
633fa343a5 N°775 - request template : fix mandatory field list with only one possible value 2019-05-20 17:47:15 +02:00
bruno DA SILVA
a1d01e252b N°2191 - Stopwatch sub-items no more available as search criteria 2019-05-20 17:03:25 +02:00
Stephen Abello
e9119e95ac N°1164, SF#1491: Add code snippets with syntax highlighting to CaseLog/HTML fields 2019-05-17 15:59:01 +02:00
Molkobain
af332a34d6 ♻️ Make ticket reference generation working with new sub-classes (#78) 2019-05-17 11:21:24 +02:00
Molkobain
2d6251e5df 💄 Add warning message CSS class (like error message) 2019-05-15 17:53:48 +02:00
Stephen Abello
b157fad0b6 N°2166: Portal: fields in CKEditor modals are inactive 2019-05-15 15:41:38 +02:00
Stephen Abello
70d2bb163c N°2179: Strengthen data/setup directory creation 2019-05-15 11:27:53 +02:00
Pierre Goiffon
d9bf3339d2 linkswidget : remove dead (unreachable) code 2019-05-13 09:57:24 +02:00
Pierre Goiffon
b4ee5cd59c Merge branch 'master' into develop 2019-05-13 08:54:00 +02:00
Pierre Goiffon
fae6c89e9a Merge remote-tracking branch 'origin/support/2.5' 2019-05-13 08:53:50 +02:00
Pierre Goiffon
89d310258b N°2198 ReloadBlock call and parameter escaping improvements
Use an anonymous function instead of a string to get rid of a useless level of escaping
Use json_encode instead of addslashes
(many thanks for the tips @bruno-ds !!)
2019-05-09 10:37:34 +02:00
Pierre Goiffon
a58529f46c N°2198 Fix "invalid filter" error when refreshing "Requests assigned to me" 2019-05-07 18:39:38 +02:00
Pierre Goiffon
12a2035791 N°2192 table-selectable-lines : add forgotten param 2019-05-07 11:53:39 +02:00
Pierre Goiffon
b1ff7f0e9b N°2192 table-selectable-lines : replace another :has selector, and use existing constant 2019-05-07 11:44:41 +02:00
OИUЯd da silva
23cf2b91f4 make demo_mode effect more expressive
closes #71
2019-05-06 11:42:27 +02:00
Pierre Goiffon
3c4fe338b6 N°2192 fix freeze when lots of lines in a table with selectable lines
Many thanks to Jeffrey Bostoen (@jbostoen) for the bug report !
2019-05-03 17:43:36 +02:00
Pierre Goiffon
6159ab33b7 🔊 DBSearch ajax update : better handling of invalid queries 2019-05-02 17:33:41 +02:00
Molkobain
91f410a85c 💄 Fix images being too large in icon selector (dashboards and Designer)
Note: The widget still needs a more aggressive refactoring to render nicely...
2019-05-02 16:42:21 +02:00
Pierre Goiffon
58ffd37f9e N°1283 Add option to open WebPageMenuNode in new window 2019-04-30 16:11:29 +02:00
Eric
0a48696cd8 Carbon: N°1855 - Fix: Cannot remove last 'dependencies' with UI
Note that multi-select value when no entry is selected is "" and not []
in order to be posted, so multi-select values are not always arrays.
2019-04-30 15:46:44 +02:00
Eric
2f71570390 Carbon: N°1855 - fix "depends on" displaying fields from children 2019-04-30 12:02:13 +02:00
Thomas Casteleyn
5c9d98d12c Fix cron crash when MySQL connection lost (#80) 2019-04-30 11:02:02 +02:00
Pierre Goiffon
15362df69a Merge branch 'master' into develop 2019-04-29 11:26:52 +02:00
Pierre Goiffon
77f757995e Merge remote-tracking branch 'origin/support/2.5' 2019-04-29 11:26:37 +02:00
Thomas Casteleyn
2858d13fd5 🐛 Fix default usage of iTopMutex when TLS is enabled
See R-021467
2019-04-29 11:18:54 +02:00
Thomas Casteleyn
ab0c97621a Add support to optionally mention username in password reset mail (#76)
Can now use login in reset password email dict keys
* UI:ResetPwd-EmailSubject
* UI:ResetPwd-EmailBody
2019-04-29 11:12:19 +02:00
Molkobain
78b6c03af7 💡 Add some PHPDoc 2019-04-25 12:46:57 +02:00
Molkobain
22342cdc05 🐛 N°2184 Fix validation issue when several label fiels in a dashlet/designer form 2019-04-25 12:42:16 +02:00
Stephen Abello
99f398a87e N°1529: Correct wrong constant name for Mcrypt, handle iv generation fails to avoid data corruption 2019-04-24 11:44:43 +02:00
Molkobain
dccdd84c25 ♻️ Fix unit tests for compatibility with CI 2019-04-17 14:52:58 +02:00
Guy Couronné
d4d16f43ac Add status.php for getting iTop's status (#56)
Allow for HAProxy and monitoring to get iTop's status
 Add tests for status

Signed-off-by: Guy Couronné <gcouronne:@sapiens.biz>
2019-04-17 09:21:45 +02:00
Molkobain
dcf4963e0c N°2152 Fix bad XML generation when adding a dashboard attribute on a new class 2019-04-16 17:15:15 +02:00
Pierre Goiffon
a773a4957a Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	README.md
2019-04-10 16:26:37 +02:00
Pierre Goiffon
87ee731dbe 📝 Update readme for 2.6.1 2019-04-10 16:24:34 +02:00
Eric
9ec36a76f6 Carbon: N°1589 - Check migration 2019-04-10 12:12:31 +02:00
Pierre Goiffon
5dc8283229 💡 Some doc for Config::GetModule* methods 2019-04-10 11:27:11 +02:00
Eric
09b470e6c7 Better output 2019-04-09 10:43:39 +02:00
Molkobain
40151c7a43 N°2147 Fix non working impact relation when based on default value 2019-04-05 16:25:26 +02:00
Molkobain
34c030b501 N°2070 Extend ModelFactory implementations to optionally check meta classes (PHP) along with regular XML classes 2019-04-05 15:48:29 +02:00
Pierre Goiffon
e9a2528b13 📝 CONTRIBUTING : use emoji codes instead of characters 2019-04-03 15:33:15 +02:00
Pierre Goiffon
e9d72bd022 💡 Fix some PhpDoc for \utils::DoPostRequest 2019-04-03 15:29:06 +02:00
Pierre Goiffon
b166686a15 📝 CONTRIBUTING : add a note on datamodel modifications (#68)
* %memo% CONTRIBUTING : suggest use SF tickets for default datamodel modifications
2019-04-02 09:02:02 +02:00
Molkobain
c59d3cc624 Fix unreachable log message on exception 2019-04-01 16:52:22 +02:00
Pierre Goiffon
ca95060b05 idea update for 2019.1 2019-03-29 16:38:02 +01:00
Molkobain
f2380ae354 🌐 Add slovak dictionary files in all modules for future translation 2019-03-28 11:07:18 +01:00
Molkobain
2d039af278 🎨 Format dictionary entries 2019-03-28 11:05:15 +01:00
Molkobain
831879fe37 🐛 N°2122 Fix missing dictionary entries for "Service families" menu of "Service Mgmt Provider" module 2019-03-28 10:31:48 +01:00
Pierre Goiffon
0451ae07c8 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	dictionaries/sk.dictionary.itop.core.php
2019-03-27 16:33:43 +01:00
Molkobain
ea1dfd8933 👥 Add Martin Kincel to the contributors. Thanks for the slovak translations! 2019-03-27 11:43:35 +01:00
Molkobain
24519c69a4 🌐 Add new language for main features thanks to Martin Kincel! 2019-03-27 11:43:35 +01:00
Molkobain
3e55693bfa 👥 Add Martin Kincel to the contributors. Thanks for the slovak translations! 2019-03-27 11:34:32 +01:00
Molkobain
f5d0947b27 🌐 Add new language for main features thanks to Martin Kincel! 2019-03-27 11:33:08 +01:00
Vladimir Kunin
b5c4801beb 🌐 Russian translations for 2.6.1 (#70) 2019-03-25 16:29:05 +01:00
Molkobain
3eff8f62b1 Merge branch 'support/2.5' 2019-03-25 15:47:51 +01:00
Molkobain
16c8466841 N°2115 Fix regression introduced in N°1443: Left pane menu not showing due a JS error 2019-03-25 15:39:45 +01:00
Pierre Goiffon
2da181a399 Combodo PHPStorm settings : some accessibility inspections are now weak warns instead of warns 2019-03-22 18:00:54 +01:00
Thomas Casteleyn
6e8bcf7b69 Make setup backup location and name similar as other backups (#61) 2019-03-22 16:02:17 +01:00
Eric
b83e5e2b72 N°1618 - Fix custom date format: Fix issue with in-line creation 2019-03-22 15:42:11 +01:00
Pierre Goiffon
da6791d75f 💄 Setup wizard backup path : larger input widget 2019-03-22 15:38:18 +01:00
Eric
764b0f8e31 N°1846 - Fix Object Copier: Create Ticket from CI, duplicate links
(cherry picked from commit 44b7821015)
2019-03-22 11:06:23 +01:00
Pierre Goiffon
2a0928b4be Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	css/css-variables.scss
#	css/light-grey.css
#	datamodels/2.x/version.xml
2019-03-21 17:46:30 +01:00
Pierre Goiffon
cac0da4e3d Merge remote-tracking branch 'origin/support/2.5'
# Conflicts:
#	application/utils.inc.php
#	css/css-variables.scss
#	css/light-grey.css
#	datamodels/2.x/authent-external/module.authent-external.php
#	datamodels/2.x/authent-ldap/module.authent-ldap.php
#	datamodels/2.x/authent-local/module.authent-local.php
#	datamodels/2.x/itop-attachments/module.attachments.php
#	datamodels/2.x/itop-backup/module.itop-backup.php
#	datamodels/2.x/itop-bridge-virtualization-storage/module.itop-bridge-virtualization-storage.php
#	datamodels/2.x/itop-change-mgmt-itil/module.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/module.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/module.itop-config-mgmt.php
#	datamodels/2.x/itop-config/module.itop-config.php
#	datamodels/2.x/itop-datacenter-mgmt/module.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-endusers-devices/module.itop-endusers-devices.php
#	datamodels/2.x/itop-full-itil/module.itop-full-itil.php
#	datamodels/2.x/itop-hub-connector/module.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/module.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/module.itop-portal-base.php
#	datamodels/2.x/itop-portal/module.itop-portal.php
#	datamodels/2.x/itop-problem-mgmt/module.itop-problem-mgmt.php
#	datamodels/2.x/itop-profiles-itil/module.itop-profiles-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/module.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/module.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/module.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/module.itop-service-mgmt.php
#	datamodels/2.x/itop-sla-computation/module.itop-sla-computation.php
#	datamodels/2.x/itop-storage-mgmt/module.itop-storage-mgmt.php
#	datamodels/2.x/itop-tickets/module.itop-tickets.php
#	datamodels/2.x/itop-virtualization-mgmt/module.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-welcome-itil/module.itop-welcome-itil.php
#	datamodels/2.x/version.xml
2019-03-21 17:39:26 +01:00
Pierre Goiffon
7e064365eb N°1968 Uniqueness : fix only root disabled class was removed from searches
Now all of the following hierarchy is excluded
2019-03-21 17:25:51 +01:00
Pierre Goiffon
7c7382f372 N°1835 add new 'transaction_id' sanitize filter 2019-03-21 14:28:24 +01:00
Pierre Goiffon
4918b9c83a 💡 Add phpdoc for N°1835 new Sanitize param 2019-03-21 12:04:31 +01:00
Thomas Casteleyn
9bb365e60d Added example php location argument 2019-03-20 10:14:54 +01:00
Thomas Casteleyn
b3c80e6ecf Added changes as requested 2019-03-20 10:14:54 +01:00
Thomas Casteleyn
e5c77f64aa Update cron.cmd to have better defaults and remove references to old php version 2019-03-20 10:14:54 +01:00
Pierre Goiffon
ed95f4e05f 📦 Update CSS for 2.6.1 2019-03-19 11:58:48 +01:00
Pierre Goiffon
9f0e8dc49b 📦 Update CSS for 2.5.2 2019-03-19 11:47:29 +01:00
Pierre Goiffon
693fdfdc5b 📦 Update versions for 2.6.1, woops wrong version on previous commit 2019-03-19 11:39:11 +01:00
Pierre Goiffon
b8d5c01382 📦 Update versions for 2.5.2 2019-03-19 11:37:15 +01:00
Pierre Goiffon
01108ca83d 📦 Update versions for 2.6.1 2019-03-19 11:35:42 +01:00
Pierre Goiffon
3d5b7197f6 📦 Update modules versions for 2.6.1 2019-03-19 11:34:01 +01:00
Pierre Goiffon
d3db77c675 📦 Update modules versions for 2.5.2 2019-03-19 11:29:37 +01:00
Pierre Goiffon
c313ed2efc Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	composer.json
2019-03-19 11:18:18 +01:00
Pierre Goiffon
54c027823b 🌐 Fix dict automatic update 2019-03-19 11:14:39 +01:00
Pierre Goiffon
f63aceeabe Merge remote-tracking branch 'origin/support/2.5'
# Conflicts:
#	datamodels/2.x/authent-external/da.dict.authent-external.php
#	datamodels/2.x/authent-external/de.dict.authent-external.php
#	datamodels/2.x/authent-external/fr.dict.authent-external.php
#	datamodels/2.x/authent-external/hu.dict.authent-external.php
#	datamodels/2.x/authent-external/ja.dict.authent-external.php
#	datamodels/2.x/authent-external/nl.dict.authent-external.php
#	datamodels/2.x/authent-external/pt_br.dict.authent-external.php
#	datamodels/2.x/authent-external/zh_cn.dict.authent-external.php
#	datamodels/2.x/authent-ldap/cs.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/da.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/de.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/fr.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/hu.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/ja.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/nl.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/pt_br.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/ru.dict.authent-ldap.php
#	datamodels/2.x/authent-ldap/zh_cn.dict.authent-ldap.php
#	datamodels/2.x/authent-local/da.dict.authent-local.php
#	datamodels/2.x/authent-local/de.dict.authent-local.php
#	datamodels/2.x/authent-local/fr.dict.authent-local.php
#	datamodels/2.x/authent-local/hu.dict.authent-local.php
#	datamodels/2.x/authent-local/ja.dict.authent-local.php
#	datamodels/2.x/authent-local/nl.dict.authent-local.php
#	datamodels/2.x/authent-local/pt_br.dict.authent-local.php
#	datamodels/2.x/authent-local/ru.dict.authent-local.php
#	datamodels/2.x/authent-local/zh_cn.dict.authent-local.php
#	datamodels/2.x/itop-attachments/cs.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/da.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/de.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/en.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/es_cr.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/fr.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/hu.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/it.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/ja.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/nl.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/pt_br.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/tr.dict.itop-attachments.php
#	datamodels/2.x/itop-attachments/zh_cn.dict.itop-attachments.php
#	datamodels/2.x/itop-backup/da.dict.itop-backup.php
#	datamodels/2.x/itop-backup/de.dict.itop-backup.php
#	datamodels/2.x/itop-backup/es_cr.dict.itop-backup.php
#	datamodels/2.x/itop-backup/hu.dict.itop-backup.php
#	datamodels/2.x/itop-backup/it.dict.itop-backup.php
#	datamodels/2.x/itop-backup/ja.dict.itop-backup.php
#	datamodels/2.x/itop-backup/nl.dict.itop-backup.php
#	datamodels/2.x/itop-backup/tr.dict.itop-backup.php
#	datamodels/2.x/itop-change-mgmt-itil/da.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/de.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/fr.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/hu.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/it.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/ja.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/nl.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/ru.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt-itil/zh_cn.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/da.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/de.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/fr.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/hu.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/it.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/ja.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/nl.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/pt_br.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/ru.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/tr.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-change-mgmt/zh_cn.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/cs.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/da.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/de.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/es_cr.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/fr.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/hu.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/it.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/ja.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/nl.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/pt_br.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/ru.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/tr.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/zh_cn.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config/da.dict.itop-config.php
#	datamodels/2.x/itop-config/de.dict.itop-config.php
#	datamodels/2.x/itop-config/es_cr.dict.itop-config.php
#	datamodels/2.x/itop-config/fr.dict.itop-config.php
#	datamodels/2.x/itop-config/hu.dict.itop-config.php
#	datamodels/2.x/itop-config/it.dict.itop-config.php
#	datamodels/2.x/itop-config/ja.dict.itop-config.php
#	datamodels/2.x/itop-config/nl.dict.itop-config.php
#	datamodels/2.x/itop-config/pt_br.dict.itop-config.php
#	datamodels/2.x/itop-config/tr.dict.itop-config.php
#	datamodels/2.x/itop-datacenter-mgmt/cs.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/da.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/de.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/es_cr.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/fr.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/hu.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/it.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/ja.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/nl.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/pt_br.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/ru.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/tr.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-datacenter-mgmt/zh_cn.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-endusers-devices/cs.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/da.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/de.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/es_cr.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/fr.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/hu.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/it.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/ja.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/nl.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/pt_br.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/ru.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/tr.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-endusers-devices/zh_cn.dict.itop-endusers-devices.php
#	datamodels/2.x/itop-hub-connector/cs.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/da.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/de.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/es_cr.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/fr.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/hu.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/it.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/ja.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/nl.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/pt_br.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/ru.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/tr.dict.itop-hub-connector.php
#	datamodels/2.x/itop-hub-connector/zh_cn.dict.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/cs.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/da.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/de.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/es_cr.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/hu.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/it.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/ja.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/nl.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/pt_br.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/ru.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/tr.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-incident-mgmt-itil/zh_cn.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/cs.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/da.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/de.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/hu.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/it.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/ja.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/nl.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/tr.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/zh_cn.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/da.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/de.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/hu.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/it.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/ja.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/nl.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/ru.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/tr.dict.itop-portal-base.php
#	datamodels/2.x/itop-portal-base/zh_cn.dict.itop-portal-base.php
#	datamodels/2.x/itop-problem-mgmt/da.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/de.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/fr.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/hu.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/it.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/ja.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/nl.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/ru.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/zh_cn.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-request-mgmt-itil/cs.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/da.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/de.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/en.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/es_cr.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/fr.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/hu.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/it.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/ja.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/pt_br.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/ru.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/tr.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/zh_cn.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/cs.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/da.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/de.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/fr.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/hu.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/it.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/ja.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/nl.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/ru.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/tr.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/zh_cn.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/cs.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/da.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/de.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/en.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/fr.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/hu.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/it.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/ja.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/nl.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/pt_br.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/ru.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/tr.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt-provider/zh_cn.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/cs.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/da.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/de.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/en.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/fr.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/hu.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/it.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/ja.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/nl.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/pt_br.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/ru.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/tr.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-service-mgmt/zh_cn.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-sla-computation/cs.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/da.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/de.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/es_cr.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/fr.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/hu.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/it.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/ja.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/nl.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/pt_br.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/ru.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/tr.dict.itop-sla-computation.php
#	datamodels/2.x/itop-sla-computation/zh_cn.dict.itop-sla-computation.php
#	datamodels/2.x/itop-storage-mgmt/cs.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/da.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/de.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/es_cr.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/fr.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/hu.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/it.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/ja.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/nl.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/pt_br.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/ru.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/tr.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-storage-mgmt/zh_cn.dict.itop-storage-mgmt.php
#	datamodels/2.x/itop-tickets/cs.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/da.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/de.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/hu.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/it.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/ja.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/nl.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/ru.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/tr.dict.itop-tickets.php
#	datamodels/2.x/itop-tickets/zh_cn.dict.itop-tickets.php
#	datamodels/2.x/itop-virtualization-mgmt/cs.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/da.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/de.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/es_cr.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/fr.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/hu.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/it.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/ja.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/nl.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/pt_br.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/ru.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/tr.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-virtualization-mgmt/zh_cn.dict.itop-virtualization-mgmt.php
#	datamodels/2.x/itop-welcome-itil/cs.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/da.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/de.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/en.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/es_cr.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/fr.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/hu.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/it.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/ja.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/nl.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/pt_br.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/ru.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/tr.dict.itop-welcome-itil.php
#	datamodels/2.x/itop-welcome-itil/zh_cn.dict.itop-welcome-itil.php
#	dictionaries/cs.dictionary.itop.core.php
#	dictionaries/cs.dictionary.itop.ui.php
#	dictionaries/da.dictionary.itop.core.php
#	dictionaries/da.dictionary.itop.ui.php
#	dictionaries/de.dictionary.itop.core.php
#	dictionaries/de.dictionary.itop.ui.php
#	dictionaries/es_cr.dictionary.itop.core.php
#	dictionaries/es_cr.dictionary.itop.ui.php
#	dictionaries/fr.dictionary.itop.core.php
#	dictionaries/fr.dictionary.itop.ui.php
#	dictionaries/hu.dictionary.itop.core.php
#	dictionaries/hu.dictionary.itop.ui.php
#	dictionaries/it.dictionary.itop.core.php
#	dictionaries/it.dictionary.itop.ui.php
#	dictionaries/ja.dictionary.itop.core.php
#	dictionaries/ja.dictionary.itop.ui.php
#	dictionaries/nl.dictionary.itop.core.php
#	dictionaries/nl.dictionary.itop.ui.php
#	dictionaries/pt_br.dictionary.itop.core.php
#	dictionaries/pt_br.dictionary.itop.ui.php
#	dictionaries/ru.dictionary.itop.core.php
#	dictionaries/ru.dictionary.itop.ui.php
#	dictionaries/tr.dictionary.itop.core.php
#	dictionaries/tr.dictionary.itop.ui.php
#	dictionaries/zh_cn.dictionary.itop.core.php
#	dictionaries/zh_cn.dictionary.itop.ui.php
2019-03-19 10:54:06 +01:00
Pierre Goiffon
533e65fcd1 🌐 Fix dict automatic update 2019-03-19 10:52:43 +01:00
Pierre Goiffon
3fb0c768e6 🌐 Update dictionnaries for iTop 2.5.2 2019-03-19 10:10:28 +01:00
Pierre Goiffon
243aab1030 N°1968 Uniqueness : do not allow invalid rule overrides definition
On overrides disabled key must has a value
2019-03-18 16:07:36 +01:00
bruno DA SILVA
22dba9ae07 🐛 composer.json dependencies correctness 2019-03-18 15:00:35 +01:00
Thomas Casteleyn
d8f75495fe Don't display organization name in menu bar if it's the only one 2019-03-18 11:12:05 +01:00
Pierre Goiffon
2240743100 %memo% README : fix iTop Hub docs links (from 2.5.0 to latest) 2019-03-15 17:39:59 +01:00
Pierre Goiffon
a6a2410c50 Merge branch 'master' into develop
# Conflicts:
#	datamodels/2.x/itop-attachments/nl.dict.itop-attachments.php
2019-03-15 17:23:04 +01:00
Pierre Goiffon
02857a86fd Merge remote-tracking branch 'origin/support/2.5' 2019-03-15 17:22:04 +01:00
Stephen Abello
d663d01798 N°1966: Added missing strings to dict files 2019-03-15 17:02:24 +01:00
Stephen Abello
3602163b38 Revert N°1919 and its incorrect translations 2019-03-15 17:00:53 +01:00
Thomas Casteleyn
34751a52a8 Replaced first name by last name in default person list view 2019-03-15 16:16:59 +01:00
Lars Hippler
cb7c382b99 Secure the server: prevent the users from browsing/getting files from the conf directories.
With Apache, it is still a must to enable htaccess with the spec "AllowOverride All". The index.php files are here to prevent from browsing whatever the HTTP server config.
2019-03-15 14:32:43 +01:00
Molkobain
3322074ce7 🐛 N°1889 Portal: Wrong encoding of special chars like in dashlets (eg. "ö", "&", ...)
(cherry picked from commit 83bb3b6d72)
2019-03-13 17:01:57 +01:00
Molkobain
83bb3b6d72 🐛 N°1889 Portal: Wrong encoding of special chars like in dashlets (eg. "ö", "&", ...) 2019-03-13 16:56:04 +01:00
Eric
229f800266 N° 1837 - Fix Synchro Obsolescence
(cherry picked from commit 75737b4ffe)
2019-03-13 14:19:25 +01:00
Eric
75737b4ffe N° 1837 - Fix Synchro Obsolescence 2019-03-13 11:01:13 +01:00
Molkobain
a5340917a7 🐛 N°1956 Portal: Fix message content in user profile when password edition is disabled 2019-03-13 10:31:04 +01:00
Molkobain
914d19e7e4 🐛 N°2072 Fix missing/empty error message when uploading too large attachment 2019-03-13 09:51:49 +01:00
Pierre Goiffon
eb49dbbdc8 N°1968 uniqueness rules : fix search for classes hierarchy, disallow 'attributes' property overrides 2019-03-12 18:12:01 +01:00
Molkobain
912bab5a43 🐛 N°2091: Portal: Fix regression introduced in 2.5, better error message when user logged out 2019-03-12 17:08:12 +01:00
Pierre Goiffon
76c3f640db Merge remote-tracking branch 'origin/master' into develop 2019-03-08 14:35:35 +01:00
Pierre Goiffon
94092f445f Merge remote-tracking branch 'origin/support/2.5'
# Conflicts:
#	application/applicationextension.inc.php
#	webservices/rest.php
2019-03-08 14:35:02 +01:00
Eric
f5b56d9855 composer warnings 2019-03-08 09:10:35 +01:00
Pierre Goiffon
b25a8b4c9f 💡 add missing @var 2019-03-08 09:06:12 +01:00
Pierre Goiffon
7ad9b9dd08 🎨 Use finally instead of duplicating lines
see http://php.net/manual/fr/language.exceptions.php#language.exceptions.finally : finally was added in PHP 5.5
2019-03-07 16:03:51 +01:00
Eric
856c037bb0 N°2064 - Fix abstract class state list for notification triggers 2019-03-07 15:56:29 +01:00
Eric
388896b963 N°941 - Backup/Windows %, ! or " not allowed in password 2019-03-07 15:26:53 +01:00
Eric
1d8addf675 typo 2019-03-06 18:21:19 +01:00
Eric
c8c3d32b18 Error logs and corresponding eml stored by message and accessible from the console 2019-03-06 17:46:47 +01:00
Molkobain
75a0979eee N°2045 Portal: Fix regression introduced with N°1980: New request with 2 Request Templates does not display fields 2019-03-06 14:46:01 +01:00
Pierre Goiffon
d6a0a279a5 N°1449 Update REST API version for new pagination params 2019-03-04 16:00:36 +01:00
Pierre Goiffon
44f5d71e1b 💡 PHPDoc for REST API 2019-03-04 16:00:35 +01:00
Pierre Goiffon
bc841dd239 N°1921 Process InlineImage from another iTop as external images
* Notifications : do not embed InlineImage with wrong secret
* HtmlSanitizer : remove data-img-* attributes if not the same iTop (using approot from Config)
* move \HTMLDOMSanitizer::ProcessImage to \InlineImage::ProcessImageTag
* data-img-* attributes name are now InlineImage class constants

(cherry picked from commit 0aab80917a)
2019-03-04 14:59:38 +01:00
Stephen Abello
9c71d32964 typo in last merge 2019-03-04 12:01:52 +01:00
Eric
d199d84b27 🌐 french typo fixed 2019-03-04 09:41:09 +01:00
Pierre Goiffon
065895aa73 Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	datamodels/2.x/itop-portal-base/zh_cn.dict.itop-portal-base.php
#	dictionaries/zh_cn.dictionary.itop.core.php
#	dictionaries/zh_cn.dictionary.itop.ui.php
2019-03-04 09:21:14 +01:00
Pierre Goiffon
24aca83de4 Merge remote-tracking branch 'origin/support/2.5' 2019-03-04 09:16:53 +01:00
Pierre Goiffon
3de7aa1ada 🙈 Update ignore file 2019-03-04 09:15:38 +01:00
Stephen Abello
5a0edb5c39 Merge branch 'support/2.5'
# Conflicts:
#	js/jquery.tablesorter.pager.js
2019-03-01 17:06:44 +01:00
Stephen Abello
d4fec14123 N°1443: Handle disabled selectable rows in datatables when "All checking/unchecking" 2019-03-01 12:18:07 +01:00
Eric
38951fab1a N°1618 - Custom date format: Fix issue with in-line creation 2019-02-28 17:40:49 +01:00
Pierre Goiffon
e2c8237beb Allow params "limit" and "page" in REST-API
PR #25, code author Dennis Lassiter, many thanks !
Was commited to develop first but decided to retrofit this on support/2.5 (N°1449)
(cherry picked from commit fd55bdf9a8)
(cherry picked from commit 49e31ddb3d)
2019-02-28 10:06:42 +01:00
Pierre Goiffon
1224570fa5 Merge remote-tracking branch 'origin/support/2.5' 2019-02-28 08:45:30 +01:00
Pierre Goiffon
afb99c0f4b N°2054 fix search with sSearchValue GET param in BrowseBrick 2019-02-27 16:21:29 +01:00
Eric
733c908e34 N°2043 - Fix: CSV Import reconciliation using ExternalField broken in service management for provider 2019-02-27 16:00:47 +01:00
Pierre Goiffon
06592d7d37 🐛 Fix datepicker locale not set correctly for ZH CN and PT BR
Reused code made by @annProg in PR #40, many thanks !
2019-02-27 12:53:37 +01:00
Eric
377b4b038c N°2041 - Fix: Reset(LinkedSetIndirect) breaks data integrity 2019-02-27 09:57:01 +01:00
Pierre Goiffon
49e31ddb3d 🎨 REST service : change var names for new pagination params (thanks @jbostoen !) 2019-02-27 09:43:38 +01:00
Dennis Lassiter
fd55bdf9a8 Allow params "limit" and "page" in REST-API
PR #25, code author Dennis Lassiter, many thanks !
2019-02-26 17:06:44 +01:00
Eric
3f7fd6f9f9 N°1954 - Recent change on impact analysis - old change appears on result 2019-02-26 15:36:56 +01:00
Eric
1cb36621a1 N°1963 - Dashlet GroupBy: allow ExternalField selection in UI 2019-02-26 15:31:31 +01:00
Eric
ddd9188eb7 Fix non-existing variable 2019-02-26 15:24:15 +01:00
Eric
02254eac67 N°1966 - Missing dictionaries entries (recover lost translation) 2019-02-25 17:40:08 +01:00
Eric
ebe026b2e9 N°1966 - Missing dictionaries entries (other languages) 2019-02-25 17:20:47 +01:00
Eric
efc7c5b0f4 N°1966 - Missing dictionaries entries 2019-02-25 16:44:51 +01:00
Pierre Goiffon
6eb3a243df Merge remote-tracking branch 'origin/master' into develop 2019-02-25 12:11:15 +01:00
Pierre Goiffon
f68a77450d Merge remote-tracking branch 'origin/support/2.5' 2019-02-25 12:10:30 +01:00
Stephen Abello
c5943c6c28 Internal: Fix a regression introduced by 6b5cc7c on dot path 2019-02-22 10:06:10 +01:00
Pierre Goiffon
bc3b50ad23 Fix wrong method call 2019-02-22 10:00:23 +01:00
Pierre Goiffon
b52e972a39 🐛 Fix login page in chinese instead of english
Introduced by PR #39 (commit 6ad27b43)
2019-02-22 09:54:56 +01:00
Pierre Goiffon
2d344e0209 Fix merge error again......... 2019-02-21 17:38:47 +01:00
Pierre Goiffon
519252efd4 Fix merge error (wooops) 2019-02-21 17:29:53 +01:00
Pierre Goiffon
e59e62fb1b Merge remote-tracking branch 'origin/master' into develop
# Conflicts:
#	core/expressioncache.class.inc.php
2019-02-21 17:24:37 +01:00
Pierre Goiffon
1f7923beae Merge remote-tracking branch 'origin/support/2.5'
# Conflicts:
#	datamodels/2.x/itop-backup/module.itop-backup.php
#	setup/setup.js
#	setup/wizardsteps.class.inc.php
2019-02-21 17:18:29 +01:00
Pierre Goiffon
2f15bbdaf3 N°2033 backup : tar generation simplify buffer size computation
(cherry picked from commit 5b46644786)
2019-02-21 17:12:18 +01:00
Pierre Goiffon
a35690d13c 📌 Identify & remove Combodo code from ArchiveTar lib 2019-02-21 17:07:31 +01:00
Pierre Goiffon
4857569813 🔧 PhpStorm settings : disallow php short open tags 2019-02-21 15:39:13 +01:00
Eric
a2d34d1779 N°1954 - Fix recent change on impact analysis 2019-02-21 09:41:36 +01:00
Pierre Goiffon
cdba1e0d36 N°2033 backup : fix corrupted archive for files which size is a multiple of 1024 bytes
(cherry picked from commit 3356856a5f)
2019-02-20 17:29:10 +01:00
Eric
48f15d7781 N°1974 - Fix: Stimuli can be applied through URL even if the access rights are set to deny 2019-02-20 16:11:49 +01:00
Eric
d0a766d424 N°1975 - Fix: Change Menu rights to "Admin only" leads in crash test
(cherry picked from commit a89bca4626)
2019-02-20 15:06:57 +01:00
Eric
a89bca4626 N°1975 - Fix: Change Menu rights to "Admin only" leads in crash test 2019-02-20 14:57:39 +01:00
Pierre Goiffon
23ec21e494 N°2031 backup : now logs using IssueLog, and remove debug config property 2019-02-19 14:46:44 +01:00
Eric
63a36fd0f6 N°2030 - Fix function CopyAttribute for external fields 2019-02-19 14:09:14 +01:00
Pierre Goiffon
02617e8976 🔊 itop-backup : add some more logs 2019-02-19 12:21:53 +01:00
Eric
7cf7e55454 N°1823 - Fix tags not saved in case of error 2019-02-19 10:16:45 +01:00
Eric
5067c867b8 N°2014 - Fix Object modification refused when a n-n relation is locked by datasynchro 2019-02-18 15:41:06 +01:00
Stephen Abello
6b5cc7ca4b N°1877 & N°2012: Fix regression backup link on setup, security hardening 2019-02-18 10:40:51 +01:00
Eric
acf80b4b92 Merge branch 'master' into develop 2019-02-15 17:44:59 +01:00
Eric
7bb49893ee N°1884 - Admin Tools Manager no longer has access to 'Schedule Backup' and 'Configuration' menus 2019-02-15 17:34:38 +01:00
Eric
bf62b63173 N°1884 - Admin Tools Manager no longer has access to 'Schedule Backup' and 'Configuration' menus 2019-02-15 17:33:47 +01:00
Eric
b8fb1fa78a N°1884 - Admin Tools Manager no longer has access to 'Schedule Backup' and 'Configuration' menus
(cherry picked from commit 818b4d08da)
2019-02-15 17:31:37 +01:00
Eric
818b4d08da N°1884 - Admin Tools Manager no longer has access to 'Schedule Backup' and 'Configuration' menus 2019-02-15 17:28:55 +01:00
Eric
f438fbd06f N°941 - fix regex 2019-02-15 17:06:50 +01:00
Eric
297a45d477 N°941 - Backup/Windows %, ! or " not allowed in password 2019-02-15 17:03:07 +01:00
Eric
17fe9dfd5f N°1906 - Enhancement Request: Handling a lot of many to many relations in form element (edit mode) 2019-02-15 15:33:22 +01:00
Eric
084d12bb45 Merge branch 'master' into develop 2019-02-14 10:58:42 +01:00
Eric
9d0cbca497 N°941 - Check DB password in configuration when saving 2019-02-14 10:57:36 +01:00
Eric
1587218c6d Merge tag 'N941-2' into develop
Tagging hotfix N941-2 N941-2
2019-02-14 09:48:50 +01:00
Eric
a613b4b101 Merge branch 'hotfix/N941-2' 2019-02-14 09:48:48 +01:00
Eric
c989e2eda5 N°941 - Check DB password also in configuration 2019-02-14 09:47:22 +01:00
Eric
12d3e36887 Merge tag 'N941' into develop
Tagging hotfix N941 N941
2019-02-13 17:45:46 +01:00
Eric
c6fd381b01 Merge branch 'hotfix/N941' 2019-02-13 17:45:44 +01:00
Eric
a784661025 N°941 - Backup/Windows % not allowed in password 2019-02-13 17:43:32 +01:00
Eric
1f9a638bc1 N°941 - Backup/Windows % not allowed in password 2019-02-13 17:39:04 +01:00
Stephen Abello
545504c0de (retrofit from master) N°1443 : Add table_id used by tables paging
(cherry picked from commit 43b0747b83)
2019-02-13 15:13:13 +01:00
Stephen Abello
32f1e97bcd (retrofit from master) N°1148: Fix regression on export
(cherry picked from commit 90e128f951)
2019-02-13 15:13:13 +01:00
Stephen Abello
456b51d7f8 Merge branch 'master' into develop 2019-02-13 15:03:50 +01:00
Stephen Abello
43b0747b83 N°1443 : Add table_id used by tables paging 2019-02-13 14:43:25 +01:00
Eric
9637e75f97 N°2011: Fix Issue with "ExecAsyncTask: async_task_retries" 2019-02-13 14:07:13 +01:00
Eric
6f0effcc66 Merge tag 'N2016' into develop
Tagging hotfix N2016 N2016
2019-02-13 14:04:27 +01:00
Eric
84767692b0 Merge branch 'hotfix/N2016' 2019-02-13 14:04:25 +01:00
Eric
d484614c0f N°2016 - Fix Issue with "ExecAsyncTask: async_task_retries" 2019-02-13 14:03:22 +01:00
Eric
3dd8f214bf Merge tag 'N2011' into develop
Tagging hotfix N2011 N2011
2019-02-13 12:49:27 +01:00
Eric
b403bace6c Merge branch 'hotfix/N2011' 2019-02-13 12:49:25 +01:00
Eric
0b751a9dd6 N°2011 - Fix search auto-completion bug 2019-02-13 12:48:05 +01:00
Eric
d3700ac9f8 Merge tag 'N1963' into develop
Tagging hotfix N1963 N1963
2019-02-13 11:01:42 +01:00
Eric
8f434cad08 Merge branch 'hotfix/N1963' 2019-02-13 11:01:39 +01:00
Eric
f83292fccc N°1953 - Dashlet GroupBy: allow ExternalField selection in UI 2019-02-13 10:59:40 +01:00
Stephen Abello
90e128f951 N°1148: Fix regression on export 2019-02-11 13:33:07 +01:00
Stephen Abello
8efc372a68 (retrofit from develop) N°1909: PHP 7.3 compatibility 2019-02-11 13:33:07 +01:00
Molkobain
257fb4d036 🐛 N°2019 Fix empty error message on object update 2019-02-08 15:39:01 +01:00
Stephen Abello
97261820f6 N°1919: Fix mistakes in Russian translation integration 2019-02-08 15:08:04 +01:00
Stephen Abello
2f83a2168c N°1919: Update Russian translation 2019-02-07 16:41:53 +01:00
Pierre Goiffon
7aa5d84ff4 💡 Fix PHPDoc for \CMDBSource::GetSqlStringColumnDefinition 2019-02-07 15:06:57 +01:00
Molkobain
46e99bfb40 🐛 Fix notifications tab in objects no longer displaying items (regression introduced by a9bd5a8) 2019-02-07 14:06:06 +01:00
Molkobain
fb5f59e72e 🚨 Fix wrong method visiblity 2019-02-07 14:06:06 +01:00
Molkobain
8af1a53721 💡 PHPDoc 2019-02-07 14:06:06 +01:00
Pierre Goiffon
7034ffea39 N°2010 Fix case for information_schema column names
In MySQL 8, we need to use same case as column declaration, or use an alias
2019-02-07 11:17:19 +01:00
Stephen Abello
c0275eec21 N°1955: Fix typo in German translation (thanks to ITOMIG!) 2019-02-05 10:42:42 +01:00
Pierre Goiffon
94ed0354c2 Merge branch 'master' into develop 2019-01-31 18:43:31 +01:00
Pierre Goiffon
2bd7a7b5f8 Merge remote-tracking branch 'origin/support/2.5'
# Conflicts:
#	application/utils.inc.php
2019-01-31 18:43:20 +01:00
Pierre Goiffon
0aab80917a N°1921 Process InlineImage from another iTop as external images
* Notifications : do not embed InlineImage with wrong secret
* HtmlSanitizer : remove data-img-* attributes if not the same iTop (using approot from Config)
* move \HTMLDOMSanitizer::ProcessImage to \InlineImage::ProcessImageTag
* data-img-* attributes name are now InlineImage class constants
2019-01-30 11:32:47 +01:00
Pierre Goiffon
31a2b634cc 💡 Fix PHPDoc for \utils::GetAbsoluteUrlAppRoot 2019-01-30 11:16:29 +01:00
Molkobain
dc7bafa41c 🐛 N°1980 Portal: Fix form validation when request template displayed as read only 2019-01-29 17:39:02 +01:00
Pierre Goiffon
2cf3408023 💡 add PhpDoc to AttributeImage methods 2019-01-29 11:08:01 +01:00
Molkobain
3b16d33775 N°1990 Fix setup crash when class has an empty zlist tag (eg. <details />)
Compiler crashed due to PHP warning being output depending on the error reporting level.
2019-01-29 10:36:17 +01:00
Pierre Goiffon
3ff6374ace Merge branch 'master' into develop 2019-01-28 16:04:44 +01:00
Pierre Goiffon
505aad1e89 Merge branch 'support/2.5'
# Conflicts:
#	datamodels/2.x/itop-hub-connector/zh_cn.dict.itop-hub-connector.php
#	lib/tcpdf/CHANGELOG.TXT
#	lib/tcpdf/composer.json
#	lib/tcpdf/include/tcpdf_fonts.php
#	lib/tcpdf/include/tcpdf_images.php
#	lib/tcpdf/include/tcpdf_static.php
#	lib/tcpdf/tcpdf.php
2019-01-28 16:04:19 +01:00
Pierre Goiffon
0ea2fed481 💡 fix phpdoc on \utils::GetCurrentModuleDir 2019-01-28 15:58:59 +01:00
Pierre Goiffon
6bbc543ac1 🚸 Change AttributeImage methods visibility to allow overrides 2019-01-28 13:56:20 +01:00
Eric
1ca4f993b0 💚 Fix apc-emulation 2019-01-24 18:07:50 +01:00
Eric Espié
44f448fec4 faster directory creation 2019-01-24 17:22:49 +01:00
Eric
abf7e65816 Avoid unnecessary warnings 2019-01-24 17:22:49 +01:00
Molkobain
55bce63cea Internal: Update compiled CSS file for administration console that seems to not have been committed correctly someday
Fixes:
* Browser dev. tools error about "data:0" on navigation menu
* Newsroom menu
2019-01-24 16:30:36 +01:00
Pierre Goiffon
710e5afe08 🔥 Remove iTopPDF::SetFontSize as there is TCPDF::SetFontSize 2019-01-23 17:36:05 +01:00
Pierre Goiffon
cbf37677cb 📝 README little improvements 2019-01-23 12:06:49 +01:00
Pierre Goiffon
efb98c6414 🔧 Fix invalid composer.json 2019-01-23 12:00:51 +01:00
Pierre Goiffon
01fbcb7044 🎨 replace TCPPDF:SetFont calls by iTopPDF::SetFontParams
This ensures that the same font is used in every caller
2019-01-23 11:46:52 +01:00
Pierre Goiffon
53d2f6320b 💡 Some comments on TCPPDF fonts 2019-01-23 11:44:23 +01:00
Pierre Goiffon
9d02da9d9c 🎨 PDF : new helper method to set only font size 2019-01-23 11:05:12 +01:00
Molkobain
4508b9d7d5 N°1758 Fix read only attributes on bulk apply stimulus
(cherry picked from commit 7e3fceb7dc)
2019-01-22 16:35:22 +01:00
Molkobain
a0841d76db 💄 Portal: Improve modal backdrop UX 2019-01-21 16:03:51 +01:00
Pierre Goiffon
e3c4d611c3 New InvalidConfigParamException
To be used for example in extensions like notify-on-expiration
2019-01-18 11:05:29 +01:00
Pierre Goiffon
79e8c48824 📝 README : update release section 2019-01-18 09:54:35 +01:00
Pierre Goiffon
9ef298608e 🎨 README : move links to corresponding sections 2019-01-18 09:54:35 +01:00
Stephen Abello
888aa5f958 update tcpdf to v6.2.26 (php 7.3 compatibility) 2019-01-17 10:34:07 +01:00
Stephen Abello
4051524b5c N°1933: Security hardening 2019-01-16 15:07:43 +01:00
Stephen Abello
c8c4b072b1 N°1932: Security hardening 2019-01-16 14:50:19 +01:00
Stephen Abello
08543287e8 N°1931: Security hardening 2019-01-16 10:35:38 +01:00
Eric
3ee8d5125b Support for extensions unit tests (scans env-production/*/test) 2019-01-15 11:52:05 +01:00
Eric
59c490fcea Add test for search with 'NOT LIKE' 2019-01-15 11:51:03 +01:00
Eric
b8b468195c PR#39 Fix support of expressions (friendlyname) in different languages context (use class name by language for the expression caches) 2019-01-15 11:24:48 +01:00
Pierre Goiffon
d873a5e68b Remove php ext from composer.json
Not really mandatory, can cause trouble when really using composer !
2019-01-15 09:18:58 +01:00
Stephen Abello
21e5eee31f N°1930: Security hardening 2019-01-14 11:59:45 +01:00
Stephen Abello
ed3fd851f1 N°1933: Security hardening 2019-01-14 11:57:16 +01:00
Stephen Abello
dfe81f6272 N°1935: Security hardening 2019-01-14 11:54:46 +01:00
Eric
6ad27b43ab PR#39 Fix support of expressions (friendlyname) in different language contexts 2019-01-14 11:30:01 +01:00
purplegrape
1df19f65c4 small translation improvement for chinese
1 symbols should not be translated
2 small improvement
2019-01-11 17:31:36 +01:00
Pierre Goiffon
00c59b7f2c Finish readme_2.5.1 2019-01-10 10:29:18 +01:00
Pierre Goiffon
c22a20c1ef Finish readme_2.5.1 2019-01-10 10:29:18 +01:00
Pierre Goiffon
dbcde14f5e 📝 README : was still pointing to 2.5.0 whereas 2.5.1 was published 2019-01-10 10:28:47 +01:00
Pierre Goiffon
a6f4adfed8 Finish 2.6.0 2019-01-09 17:27:17 +01:00
Pierre Goiffon
c140ab970e Finish 2.6.0
# Conflicts:
#	core/dbobject.class.php
#	install.txt
2019-01-09 17:27:07 +01:00
Pierre Goiffon
effaba42d0 Merge remote-tracking branch 'origin/support/2.5' into release/2.6 2019-01-09 17:24:54 +01:00
Pierre Goiffon
340cacc691 Merge remote-tracking branch 'origin/release/2.6.0-community' into release/2.6
# Conflicts:
#	install.txt
2019-01-09 17:23:43 +01:00
Stephen Abello
0bce9c78ea N°1935: Security hardening 2019-01-09 14:23:15 +01:00
Stephen Abello
48c920f848 N°1934: Security hardening 2019-01-09 11:03:05 +01:00
Pierre Goiffon
a85bedd31c Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	install.txt
2019-01-09 10:51:11 +01:00
Pierre Goiffon
23269eab77 📝 Update install.txt for 2.6.x 2019-01-09 10:45:14 +01:00
Pierre Goiffon
05bcfbe4c3 📝 Update install.txt for 2.5.x 2019-01-09 10:44:21 +01:00
Pierre Goiffon
27ad2e2169 📝 Update README.md for 2.6.0 community 2019-01-09 10:01:40 +01:00
Pierre Goiffon
5d09841cd5 📝 Update install.txt for 2.6.0 2019-01-09 09:53:20 +01:00
Pierre Goiffon
5723e9a77e 🎨 PDF : new helper method to set only font weight and size 2019-01-09 09:25:40 +01:00
Pierre Goiffon
bdedd83368 🔧 New "export_pdf_font" config param 2019-01-09 09:25:40 +01:00
Pierre Goiffon
2f5f92ddca Adding DroidSansFallback font to TCPDF
Modification proposed by @purplegrape with PR #49, many thanks !
2019-01-09 09:24:07 +01:00
Eric
11ec46c18b N°1408 - Fix overview attribute when not already defined in Organization class 2019-01-08 15:19:52 +01:00
Denis Flaven
87a98fe382 🐛 N°1946 - newsroom cache shared between users
The cache should be per user, even if two users share the same
machine/browser.
2019-01-08 15:16:50 +01:00
Stephen Abello
da76fc70bb N°1933: Security hardening 2019-01-07 16:46:29 +01:00
Denis Flaven
2b563d4fc8 Remove debug traces when updating objects
A very verbose debug trace in the error log was happening each time a
CmdbAbstractObject gets created non-interactively.
2019-01-07 16:24:31 +01:00
Stephen Abello
8894ff0fda N°1909: PHP 7.3 compatibility 2019-01-07 13:56:42 +01:00
Eric
488d2ed886 Debug OQL for search is accessible directly for the administrators 2019-01-07 09:43:44 +01:00
Molkobain
48f190447c 🐛 N°1939 REST/JSON: Fix must_exists flag for remote object of indirect linkedset 2019-01-04 17:36:26 +01:00
Molkobain
2773a8bf2f N°1917 Setup: Fix warnings when upgrading an extension with an extension.xml file
(cherry picked from commit 4eb416d407)
2019-01-04 14:13:33 +01:00
Duarte Sotto-Mayor Ribeirinho
63184d0bf5 Update link to always reflect latest version
This way there is no need for further updates of version number on link
2019-01-04 11:36:34 +01:00
Eric
ad36011fc8 N°1716 - "Group by" Dashlet is no more clickable in edition 2019-01-03 17:47:27 +01:00
Eric
b82b095f58 1814 - Search with criteria : always add default criteria 2019-01-03 09:58:54 +01:00
Eric
a9bd5a8bb0 Avoid scalar values in OQL, replace them with variables 2019-01-02 17:41:56 +01:00
Eric
6c9850b8f6 1814 - Search with criteria : always add default criteria 2019-01-02 14:19:48 +01:00
Eric
e89b4e070c Security update 2019-01-02 10:11:03 +01:00
Pierre Goiffon
2f5c810276 Merge remote-tracking branch 'origin/support/2.5' into release/2.6 2018-12-31 17:21:52 +01:00
Pierre Goiffon
d90e094d4d 📝 CONTRIBUTING : add a link to the translation wiki page 2018-12-31 16:55:51 +01:00
Molkobain
4eb416d407 N°1917 Setup: Fix warnings when upgrading an extension with an extension.xml file 2018-12-31 14:55:22 +01:00
Pierre Goiffon
636a3940cd N°1915 import : fix cannot create object with value for field that is readonly in modification
Last fix (523e19528e) was not a correct solution
2018-12-31 12:13:45 +01:00
Pierre Goiffon
352f8cee10 💡 Config : add ref to loading methods 2018-12-31 11:38:57 +01:00
Pierre Goiffon
523e19528e N°1915 import : fix cannot create object with value for field that is readonly in modification
GetAttributeFlags method returns OPT_ATT_READONLY for this field, but not GetInitialStateAttributeFlags method
2018-12-28 18:16:32 +01:00
Pierre Goiffon
9f3332b2f2 💡 PHPDoc for AttributeFlags methods 2018-12-28 16:37:03 +01:00
Pierre Goiffon
2b71621628 Merge remote-tracking branch 'origin/support/2.5' into release/2.6 2018-12-28 11:42:11 +01:00
Pierre Goiffon
5349fc6f4b 📝 CONTRIBUTING : fix some typos, more info in gitflow 2018-12-28 11:15:46 +01:00
Pierre Goiffon
1665b12b86 💡 PHPDoc for \DBObject::DBInsert methods hierarchy (and some more, too O:) ) 2018-12-27 15:07:49 +01:00
purplegrape
1bbed99636 chinsese translation improvement for relase 2.6
chinsese translation improvement for relase 2.6
2018-12-27 10:40:53 +01:00
Denis Flaven
778db225a8 N°1912: 🐛 text written in white in the PDF export of the impact analysis. 2018-12-26 15:41:00 +01:00
bruno DA SILVA
ca48e8ff92 🐛 method call correction
- do no longer provide a parameter absent from the signature
2018-12-26 15:25:04 +01:00
Pierre Goiffon
75d5630164 N°1885 move back php-gd from mandatory extension to optional
(cherry picked from commit 672bc471be)
2018-12-26 11:10:24 +01:00
Pierre Goiffon
911d84d513 N°1885 add php-gd as a mandatory extension
(was made on release/2.6 branch but then rollbacked as this is an infrastructure change that needs to be in the release notes)
2018-12-26 11:05:25 +01:00
Pierre Goiffon
bb6bd61c37 👥 Remove duplicate jbostoen (my mistake... see 5338325a73) 2018-12-26 09:53:26 +01:00
Pierre Goiffon
1a3f836a5a Merge remote-tracking branch 'origin/release/2.6' into develop
# Conflicts:
#	application/itopwebpage.class.inc.php
#	core/config.class.inc.php
#	css/css-variables.scss
#	css/light-grey.css
#	datamodels/2.x/itop-attachments/nl.dict.itop-attachments.php
#	datamodels/2.x/itop-incident-mgmt-itil/nl.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/version.xml
2018-12-21 10:26:17 +01:00
Pierre Goiffon
b51b5582a0 Merge remote-tracking branch 'origin/support/2.5' into release/2.6 2018-12-21 10:23:29 +01:00
Eric
bc5643707e N°1898 - Fix pagination issue for search with accent 2018-12-21 10:04:04 +01:00
Eric
27b1b1f8a8 N°1903 - Fix initial value of a MetaEnum attribute is always its default value 2018-12-21 09:59:19 +01:00
Eric
a45e543eac N°1898 - Fix pagination issue for search with accent 2018-12-21 09:36:28 +01:00
Pierre Goiffon
50235bbb04 🌐 Fix typos in EN translations
Report PR #38 modifications, many thanks @jbostoen !
2018-12-20 17:19:32 +01:00
Eric
a2ddb30f78 N°1420 - Autocomplete fix keyboard behavior (compatibility fix) 2018-12-19 17:39:35 +01:00
Eric
d31a4047f6 Fix Setup hardening 2018-12-19 17:13:49 +01:00
Eric
75fbb831c9 Fix Setup hardening 2018-12-19 17:10:02 +01:00
Molkobain
3219957eed Internal: Fix regression introduced during XSS protection on tag sets 2018-12-19 11:43:50 +01:00
Eric
44671a5085 Fix typos in configuration description 2018-12-19 09:02:49 +01:00
Purple Grape
bc4873dfe5 🌐 update 2.6 chinese translation and corresponding licences (#45)
* Update zh_cn.dict.authent-external.php

* Update zh_cn.dict.authent-ldap.php

* Update zh_cn.dict.authent-local.php

* Update zh_cn.dict.itop-attachments.php

* Update zh_cn.dict.itop-backup.php

* Update zh_cn.dict.itop-change-mgmt-itil.php

* Update zh_cn.dict.itop-change-mgmt.php

* Update zh_cn.dict.itop-config-mgmt.php

* Update zh_cn.dict.itop-config.php

* Update zh_cn.dict.itop-datacenter-mgmt.php

* Update zh.dict.itop-endusers-devices.php

* Update zh_cn.dict.itop-hub-connector.php

* Update zh_cn.dict.itop-incident-mgmt-itil.php

* Update zh_cn.dict.itop-knownerror-mgmt.php

* Update zh_cn.dict.itop-portal-base.php

* Update zh_cn.dict.itop-portal-base.php

* Update zh_cn.dict.itop-problem-mgmt.php

* Update zh_cn.dict.itop-request-mgmt-itil.php

* Update zh_cn.dict.itop-request-mgmt.php

* Update zh_cn.dict.itop-welcome-itil.php

* Update zh_cn.dict.itop-tickets.php

* Update zh_cn.dict.itop-service-mgmt-provider.php

* Update zh_cn.dict.itop-service-mgmt.php

* Update zh_cn.dictionary.itop.core.php

* Update zh_cn.dictionary.itop.ui.php
2018-12-18 18:11:20 +01:00
Eric
92657951c7 N°1408 - Dashboard Attribute (removed from "Properties" tab in edition) 2018-12-18 16:32:46 +01:00
Eric
8b2c18ab8c N°1420 - Autocomplete fix keyboard behavior 2018-12-18 16:00:29 +01:00
Pierre Goiffon
18999f29c5 🐛 Fix PHP syntax error in itop-chg-mgmt NL dict file 2018-12-18 15:30:23 +01:00
Pierre Goiffon
e8075bf5fd 🌐 Remove useless dict keys (see PR #38) 2018-12-18 15:24:17 +01:00
Pierre Goiffon
5338325a73 👥 Add contributor : jboesten / Jeffrey 2018-12-18 15:12:32 +01:00
Pierre Goiffon
4d3810a10d 🌐 New Dutch translations
Integrated directly from PR #38 as rebase and squash seems very difficult
Many thanks @jbostoen and @Hipska !
2018-12-18 15:10:38 +01:00
Pierre Goiffon
672bc471be N°1885 move back php-gd from mandatory extension to optional 2018-12-18 11:15:56 +01:00
Pierre Goiffon
3089cbc2bc 💡 Add some PhpDoc 2018-12-18 11:15:55 +01:00
Molkobain
ce9416d887 N°1878 Request Template: Fix history updated even if template not updated
When editing the object, the hidden input is not initialized correctly with the values from the form. This is due to a timing issue among async processes. To fix that, we made sure the WizardHelper updates the input value before submit. The real fix would be to better handle the subform building process.
2018-12-18 11:08:54 +01:00
Pierre Goiffon
473d1fb756 Fix 2.5 merge error 2018-12-17 17:12:30 +01:00
Pierre Goiffon
b880ca05a5 Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	composer.json
#	setup/setuputils.class.inc.php
2018-12-17 17:04:39 +01:00
Molkobain
cbc9784d21 N°1882 Internal: Fix regression on organization autocomplete (left menu) that could not be emptied 2018-12-17 16:46:39 +01:00
Pierre Goiffon
faba67b292 N°1885 add php-gd as a mandatory extension 2018-12-17 15:52:06 +01:00
Molkobain
16cb1bbbbf N°1843 Portal: Fix inline images being displayed too large sometimes in forms 2018-12-17 15:27:15 +01:00
Molkobain
a1c2b809ba 🌐 N°1839 Update translations for TriggerOnThresholdReached 2018-12-17 15:27:15 +01:00
Stephen Abello
c9691457b8 Prepare datamodels' versions for 2.6.0 release 2018-12-17 15:10:37 +01:00
“purplegrape”
9828b905b2 rename chinese translation file from zh.dict*php to zh_cn.dict*php .
in case guys from HongKong ,TaiWan or Singapore wana have their own translations.
2018-12-17 11:16:25 +01:00
Molkobain
9ef6c78395 N°1637 Portal: Add form mode (create/edit/view) to information passed to iPopupMenuExtension on object details 2018-12-17 09:53:13 +01:00
Molkobain
81f70c4c58 N°1637 Portal: Add CSS/JS hook on object forms (form mode: create/edit/view) 2018-12-17 09:51:47 +01:00
Molkobain
869f590bf4 N°657 Portal: Fix modal not closing when pressing "esc" key 2018-12-14 19:06:14 +01:00
Molkobain
3b6aa7eaf5 N°1879 Additional fix for default print format of dashboards 2018-12-14 17:31:43 +01:00
Molkobain
53ef2b0b5d N°1171 Portal: Add CSS/JS hooks in navigation menu to identify bricks 2018-12-14 17:26:55 +01:00
Molkobain
4dfe6fc817 N°1220 Portal: Fix logo displayed not wide enough when it has a small height 2018-12-14 17:06:37 +01:00
Molkobain
260143050e N°1880 Fix logo url not pointing to the portal home page instead of the 'app_icon_url' parameter's value 2018-12-14 17:01:22 +01:00
Molkobain
6adde38399 N°1880 Fix logo url not pointing to the portal home page instead of the 'app_icon_url' parameter's value 2018-12-14 16:54:51 +01:00
Molkobain
76a40b2f45 N°1879 Change default print format for dashboards to "A4 Landscape" 2018-12-14 16:03:56 +01:00
Denis Flaven
77c2537df7 Zoom-in cursor on zoomable images
(for browsers supporting the zoom-in cursor: i.e. not IE)
2018-12-14 15:12:52 +01:00
Molkobain
6a88f622ad N°1839 Update TriggerOnThresholdReached to select attribute from a set of valid attributes instead of typing it manually 2018-12-14 11:51:14 +01:00
Molkobain
9b5d8b8a01 N°931 Fix bug when max allowed items set to 1 2018-12-14 11:11:59 +01:00
Molkobain
b4448c5bb9 Code cleanup 2018-12-14 10:00:29 +01:00
Denis Flaven
7faf3258f7 Setup hardening. 2018-12-13 18:12:58 +01:00
Denis Flaven
cb3440c85d Setup hardening. 2018-12-13 18:12:03 +01:00
Denis Flaven
7c0d03ea3b Cosmetics on setup (Licenses prompt)
Limit the height of the list of licences (displaying a scrollbar if
needed) so that the page fits on screen.
2018-12-13 12:12:28 +01:00
Denis Flaven
d1837377a4 Merge branch 'release/2.6' of https://github.com/Combodo/iTop.git into release/2.6 2018-12-13 11:47:41 +01:00
Denis Flaven
1c3a503a82 N°1872 Regression when editing query phrasebook entries. Fixed. 2018-12-13 11:46:39 +01:00
Molkobain
daafa9123c N°1852 Fix loss of inline images and attachments when user has been logged off 2018-12-13 11:35:00 +01:00
Molkobain
5a1b6e43c9 N°1835 Internal: Fix regression introduced by commit 36d47c2 2018-12-13 11:18:25 +01:00
Molkobain
81d502cae8 N°1835 Internal: Fix regression introduced by commit 36d47c2 2018-12-12 20:56:07 +01:00
Molkobain
4a99ed2ad8 N°1835 Internal: Fix regression introduced by commit 36d47c2 2018-12-12 19:51:06 +01:00
Vladimir Kunin
7016724abc Show resolution_date in resolved problem details. 2018-12-12 11:38:07 +01:00
Molkobain
0a8e3f099e N°1864 Portal: Add notification placeholders for portal links in edit or view mode 2018-12-12 10:04:00 +01:00
Pierre Goiffon
45910dc115 Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	datamodels/2.x/itop-config-mgmt/zh.dict.itop-config-mgmt.php
#	dictionaries/zh.dictionary.itop.ui.php
2018-12-11 17:23:34 +01:00
Pierre Goiffon
afd6428411 💡 @var on iApplicationObjectExtension calls 2018-12-11 17:19:52 +01:00
Eric
7eb419507b N°1420 - Perf autocomplete (remove almost duplicated requests) 2018-12-11 16:39:57 +01:00
Eric
8400eb910f N°1420 - Perf autocomplete (remove almost duplicated requests) 2018-12-11 16:35:31 +01:00
Eric
b38d33d7a6 N°1420 - Perf autocomplete (remove almost duplicated requests) 2018-12-11 16:23:08 +01:00
Pierre Goiffon
b4a6d378ab N°1827 fix freeze on object creation when changing dependant field, if object has hidden TagSet field 2018-12-11 15:54:33 +01:00
Eric
44b7821015 N°1846 - Fix Object Copier: Create Ticket from CI, duplicate links 2018-12-11 15:26:24 +01:00
Pierre Goiffon
52ac819c1f N°1835 wooops fix previous commit 2018-12-11 10:25:48 +01:00
Pierre Goiffon
c4ba1d55ac 🔊 N°1835 log error when transaction_id invalid in UI.php 2018-12-11 10:09:50 +01:00
Molkobain
85acac60c7 💪 Fix execution notice 2018-12-11 09:54:09 +01:00
Purple Grape
23ee8d6a14 Update zh.dict.itop-config-mgmt.php
add two empty lines against english  ,small translation improvement
2018-12-11 09:16:38 +01:00
Pierre Goiffon
2154916848 ZH translation : remove unecessary '~~' 2018-12-11 09:08:40 +01:00
Purple Grape
d3fd81545a Update zh.dictionary.itop.ui.php
fix one line missing and small translation improvement
2018-12-11 09:06:22 +01:00
Molkobain
f54da5f9a6 Internal: Debug trace when InlineImage::FinalizeInlineImages() fails to retrieve transaction ID 2018-12-10 17:44:49 +01:00
Pierre Goiffon
36d47c2274 N°1835 fix transaction_id lost with session
* transaction_id are now stored by default in file instead of session ("transaction_storage" config parameter : default value was 'Session', it is now 'File')
* session_regenerate_id() call can be disabled using "regenerate_session_id_enabled" config parameter
* new 'transaction_id' parameter type to allow dots (with a file storage, transaction_id equals the temp file name and on Windows we're getting *.tmp)
2018-12-10 17:39:07 +01:00
Eric
bd082c0a6e N°917 - Rolled back fields to AttributeText until AttributeQueryAttCodeSet can manage fields order correctly 2018-12-10 15:25:22 +01:00
Stephen Abello
fb028710e0 Datamodel viewer: Fix an issue where OQL Filters were truncated 2018-12-10 15:10:58 +01:00
Stephen Abello
29dd196193 N°1848: Fix timeout regression on impact analysis' tooltip 2018-12-10 10:01:48 +01:00
Pierre Goiffon
80a8f7a888 Update translation files 2018-12-10 08:46:02 +01:00
Pierre Goiffon
7f497fe3be Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	datamodels/2.x/itop-attachments/zh.dict.itop-attachments.php
#	datamodels/2.x/itop-backup/zh.dict.itop-backup.php
#	datamodels/2.x/itop-change-mgmt-itil/zh.dict.itop-change-mgmt-itil.php
#	datamodels/2.x/itop-change-mgmt/zh.dict.itop-change-mgmt.php
#	datamodels/2.x/itop-config-mgmt/es_cr.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config-mgmt/zh.dict.itop-config-mgmt.php
#	datamodels/2.x/itop-config/zh.dict.itop-config.php
#	datamodels/2.x/itop-datacenter-mgmt/zh.dict.itop-datacenter-mgmt.php
#	datamodels/2.x/itop-hub-connector/zh.dict.itop-hub-connector.php
#	datamodels/2.x/itop-incident-mgmt-itil/zh.dict.itop-incident-mgmt-itil.php
#	datamodels/2.x/itop-knownerror-mgmt/zh.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/zh.dict.itop-portal-base.php
#	datamodels/2.x/itop-problem-mgmt/es_cr.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-problem-mgmt/zh.dict.itop-problem-mgmt.php
#	datamodels/2.x/itop-request-mgmt-itil/es_cr.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt-itil/zh.dict.itop-request-mgmt-itil.php
#	datamodels/2.x/itop-request-mgmt/es_cr.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-request-mgmt/zh.dict.itop-request-mgmt.php
#	datamodels/2.x/itop-service-mgmt-provider/zh.dict.itop-service-mgmt-provider.php
#	datamodels/2.x/itop-service-mgmt/zh.dict.itop-service-mgmt.php
#	datamodels/2.x/itop-tickets/zh.dict.itop-tickets.php
#	datamodels/2.x/itop-welcome-itil/zh.dict.itop-welcome-itil.php
#	dictionaries/zh.dictionary.itop.core.php
#	dictionaries/zh.dictionary.itop.ui.php
2018-12-10 08:38:19 +01:00
Molkobain
59570f3a21 Update spanish translations (thanks to Miguel Turrubiates) 2018-12-07 19:32:27 +01:00
Eric
53fe826f9f Autocomplete: Prevent the RETURN key to submit form if no value is set 2018-12-07 16:06:52 +01:00
Molkobain
56b4ecb4ce 🌐 Update spanish translations (thanks to Miguel Turrubiates! ✌) 2018-12-07 14:25:17 +01:00
Pierre Goiffon
d17717e4b5 👥 Add @purplegrape to the contributor's list (PR #24, thank you !) 2018-12-07 11:23:55 +01:00
Molkobain
68da3a4aad Change default attachments (and inline images) lifetime to 1 day instead of 1 hour 2018-12-07 11:16:41 +01:00
Molkobain
855480fd7b PHPDoc 2018-12-07 11:16:41 +01:00
Pierre Goiffon
79200e8f96 🙈 Update gitignore to handle toolkit symlinks 2018-12-07 11:13:51 +01:00
Purple Grape
7d43ae40b8 Support/2.5 (#24)
* Update zh.dict.authent-ldap.php

* Update zh.dict.authent-local.php

* Create zh.dict.itop-attachments.php

* Create zh.dict.itop-backup.php

* Update zh.dict.itop-change-mgmt-itil.php

* Create zh.dict.itop-change-mgmt.php

* Update zh.dict.itop-config-mgmt.php

* Create zh.dict.itop-config.php

* Create zh.dict.itop-datacenter-mgmt.php

* Create zh.dict.itop-hub-connector.php

* Create zh.dict.itop-incident-mgmt-itil.php

* Update zh.dict.itop-knownerror-mgmt.php

* Create zh.dict.itop-portal-base.php

* Update zh.dict.itop-problem-mgmt.php

* Create zh.dict.itop-request-mgmt-itil.php

* Create zh.dict.itop-request-mgmt.php

* Create zh.dict.itop-service-mgmt-provider.php

* Update zh.dict.itop-service-mgmt.php

* Update zh.dict.itop-tickets.php

* Update zh.dict.itop-welcome-itil.php

* Update zh.dictionary.itop.ui.php

* Update zh.dictionary.itop.core.php
2018-12-07 10:38:50 +01:00
Denis Flaven
540bc3a54b Newsroom finalization & integration tests. 2018-12-06 15:38:29 +01:00
Stephen Abello
35752a8041 N°1837: Internal: fix regression on data synchronized attributes display 2018-12-06 15:05:13 +01:00
Molkobain
2baa95ff6d N°1841 Portal: Service catalog items not collapsed / expended as expected 2018-12-06 10:43:25 +01:00
Lars Hippler
86dce21849 Some small typo fixes in German translations
Fix typo in German dashlet translations (Group by sum)
Fix typo in German translation (config-saved)
2018-12-06 08:51:42 +01:00
Pierre Goiffon
fca5a625d2 🐛 N°1834 Query Phrasebook : fix fields dictionary key 2018-12-05 16:58:34 +01:00
Eric
2766fad61a Autocomplete: select automatically the first entry with the RETURN key 2018-12-05 12:01:32 +01:00
Pierre Goiffon
c6da1db72b 🔒 N°1802 add auth to check-backup.php 2018-12-05 11:37:42 +01:00
Pierre Goiffon
843c06b007 🚸 improves backup/check-backup
* backup.php now handles calls from datamodels (approot)
* fix check-backup sample cli
* better error on check-backup invalid check_ticket_itop cli parameter
2018-12-05 11:37:42 +01:00
Pierre Goiffon
7cf7628b8f 🔧 N°1802 update backup.params.distrib 2018-12-05 11:18:49 +01:00
Pierre Goiffon
41b096ba76 🔧 N°1802 rename itop_root config file parameter to itop_backup_incident 2018-12-05 10:45:14 +01:00
Eric
2a4bd4b0dc 💚 N°1825 - Fix ormset control when no limit 2018-12-05 10:10:45 +01:00
Eric
f4f5281769 💚 N°1825 - Fix tagset control when no limit 2018-12-05 10:08:40 +01:00
Eric
a4a09cd8c7 N°1825 - Fix TagSet code numeric generate a Fatal Error 2018-12-05 09:39:41 +01:00
Eric
831b18b4d2 Force the number of Tags in ormTagSet 2018-12-05 09:04:30 +01:00
Eric
e4e5f627c4 Display error log if UpdateObjectFromPostedForm fails when modifying an object in console 2018-12-05 09:04:30 +01:00
Denis Flaven
53e532cbaf 🐛 N°1822 fix for the autocomplete on IE.
Support of some accents (western languages) on IE, complete support of
all unicode accents on browsers supporting String.normalize.
2018-12-04 15:07:46 +01:00
Eric
3fa0cbf0fe Merge remote-tracking branch 'origin/support/2.5' into release/2.6 2018-12-04 14:57:56 +01:00
Eric
6450d2339f N°1826 - Fix Error in PDF export with php 7.1 2018-12-04 14:55:57 +01:00
Eric
af8b06dda6 💚 Display error log instead of fatal error in case of Exception when modifying an object in console 2018-12-04 11:33:32 +01:00
Stephen Abello
72e2473444 N°1811: Fix regression in impact analysis: misplaced tooltips on Chrome 2018-12-04 10:58:49 +01:00
Eric
6e31a040b2 Display error log instead of fatal error in case of Exception when modifying an object in console 2018-12-04 10:49:30 +01:00
Molkobain
0c8dd6fd1b N°562 Notifications: Add support for placeholders in HTML hyperlinks (regular href, mailto, ...) 2018-12-04 10:22:31 +01:00
Pierre Goiffon
6c07688c34 N°1815 TagSet widget : change filter callback to an anonymous function, fix String obj conversion bug 2018-12-04 09:53:45 +01:00
Pierre Goiffon
598c22a285 🏁 N°1815 fix tagset widget parse error in MSIE all versions 2018-12-03 17:31:57 +01:00
Denis Flaven
d392b9c0f6 Adaptation of the Hub URLs for the newsroom. 2018-12-03 17:26:22 +01:00
Eric
387c166985 Fix Remote User synchro 2018-12-03 11:33:15 +01:00
Stephen Abello
9115bc118d 🌐 N°1809: Refactor Triggers' help section and add new triggers description 2018-12-03 11:26:23 +01:00
Eric
aca11ac966 Fix AttributeSet wrong error on number of tags in creation 2018-12-03 11:01:54 +01:00
Eric
c15d626095 Fix AttributeSet history database field size (was too short) 2018-12-03 09:27:56 +01:00
Molkobain
79d00b9fe6 Add CONTRIBUTING.md 2018-12-03 08:31:59 +01:00
Pierre Goiffon
a92e2fd882 📦 Update datamodels versions from 2.5.0 to 2.6.0 2018-11-30 18:25:20 +01:00
Eric
7ed51984c7 N°944 - Fix bad xml when attributes name has been changed and redefinition of label is required and cache is regenerated 2018-11-30 14:28:26 +01:00
Pierre Goiffon
cdf11a3485 GitFlow autoconfig file 2018-11-30 11:39:20 +01:00
Eric
bbefd22950 Version 2.6.0 2018-11-29 09:19:55 +01:00
Eric
e08369122d Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	core/config.class.inc.php
#	css/css-variables.scss
#	css/light-grey.css
2018-11-29 09:10:34 +01:00
Eric
0ce0572c40 N°1783 - Search : fix error when searching for a quote in a text field 2018-11-28 14:52:51 +01:00
Molkobain
9d19556419 Internal: Remove wrongly added default search criterion on FAQ (Introduced in commit 5f7e8c9) 2018-11-28 14:52:51 +01:00
Molkobain
67c0e0eb1c Fix iTop version that stayed to "2.5.0-beta" for the release 2018-11-28 14:52:50 +01:00
Pierre Goiffon
c5d0dd05b9 🔒 N°1802 itop-backup : move iTop root to config file 2018-11-28 14:49:49 +01:00
Molkobain
4e1f877ab4 Internal: Add new Person in the sample data to welcome Alexia a.k.a "Simone de Beauvoir"! 👋 2018-11-28 14:41:58 +01:00
Eric
0e0d254188 N°1783 - fix unit tests 2018-11-28 14:41:08 +01:00
Eric
992421292c N°1783 - Search : fix error when searching for a quote in a text field 2018-11-28 14:26:13 +01:00
Eric
47cb4feeeb N°1783 - Search : fix error when searching for a quote in a text field 2018-11-28 14:16:03 +01:00
Molkobain
76acd8fe9e Internal: Remove wrongly added default search criterion on FAQ (Introduced in commit 5f7e8c9) 2018-11-28 10:07:05 +01:00
Molkobain
961b1570e8 Fix iTop version that stayed to "2.5.0-beta" for the release 2018-11-27 17:57:15 +01:00
Molkobain
88dea990e1 (Cherry pick from revision 19d4de4) N°1737 Fix tags sanitization in search criteria 2018-11-27 17:57:15 +01:00
Molkobain
19d4de482d N°1737 Fix tags sanitization in search criteria 2018-11-27 17:43:21 +01:00
Pierre Goiffon
bb0e797cee Remove Config deprecated methods in v2.7 2018-11-27 15:48:47 +01:00
Pierre Goiffon
d2505d15fe 🔒 N°1802 itop-backup : move iTop root to config file 2018-11-27 11:09:14 +01:00
Eric
122c3a9542 N°1779 - Fix Excel Export from a search result when object contains AttributeDashboard 2018-11-27 10:11:01 +01:00
Eric
15d9ba9906 N°917 - Add AttributeSubItem to the exclusion list of the trigger attributes 2018-11-27 09:36:50 +01:00
Eric
95a22a1a7e N°1799 - Fix TTO and TTR not recomputed when change on priority 2018-11-27 09:36:50 +01:00
Pierre Goiffon
5309aa225a Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	application/utils.inc.php
#	js/dashboard.js
#	pages/ajax.render.php
2018-11-26 18:28:42 +01:00
Eric
c0cd450c5f Add the user_id to the log_kpi instead of * 2018-11-26 15:26:25 +01:00
Eric
d831549c7b Add User Id on KPI 2018-11-26 15:24:38 +01:00
Pierre Goiffon
0f20f9ca5d 🔒 N°1795 prevent CSRF on dashboard import 2018-11-26 15:17:53 +01:00
Pierre Goiffon
d5568afc68 🔒 N°1795 prevent XSS on some fields 2018-11-23 18:00:26 +01:00
Pierre Goiffon
44d7abac6e 🎨 check-backup : improve code readability
move exit conditions on top to avoid if/else nightmare
2018-11-23 17:58:21 +01:00
Denis
1b4b71cb35 Prevent a catchable fatal error when using memcache(d) as the session handler (regression introduced when fixing n°1778). 2018-11-23 16:56:07 +01:00
Pierre Goiffon
f37f3c4c22 iconv was missing (used in export) 2018-11-23 16:35:46 +01:00
Pierre Goiffon
83b3fb80d5 🎨 N°659 uniqueness constraint : more possibilities to customize check
* 2 methods called per rule instead of only one
* now we're getting the rule id as parameter
2018-11-23 16:35:46 +01:00
Pierre Goiffon
c242f90440 N°659 uniqueness constraint : fix class used in the dict key for the error message
It has to be the rule root class, not the current class
2018-11-23 09:44:42 +01:00
Pierre Goiffon
e4912ee175 🎨 PhpDoc
(cherry picked from commit d3aeb807d433e656df22f166387230b431656f58)
2018-11-22 17:40:37 +01:00
Molkobain
83e1f35f9c N°1792 Fix error message in browser console "Failed to load resource: ERR_INVALID_URL" 2018-11-22 16:59:08 +01:00
Denis Flaven
c42333d085 N°1718 Make attribute image zoomable 2018-11-22 16:06:23 +01:00
Eric
c4c0b0f630 💄 rework of the slider button 2018-11-22 15:24:30 +01:00
Eric
aec3c34eea N°1787 - Fix execution warning 2018-11-22 14:17:45 +01:00
Molkobain
c4ff20b9fb N°1789 Internal: Fix regression introduced in 6a6c069 2018-11-22 10:49:02 +01:00
Molkobain
c7ce35a877 Merge branch 'release/2.6' of https://github.com/Combodo/iTop into release/2.6 2018-11-22 10:36:27 +01:00
Denis Flaven
5ccfa24b27 iTop Newsroom implementation - painfully merged manually... 2018-11-21 19:36:51 +01:00
Molkobain
1c6a6edf5a Merge branch 'release/2.6' of https://github.com/Combodo/iTop into release/2.6 2018-11-21 18:50:29 +01:00
Pierre Goiffon
a659de9c9b Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	datamodels/2.x/itop-portal-base/portal/src/controllers/browsebrickcontroller.class.inc.php
2018-11-21 18:14:13 +01:00
Molkobain
8530db347b N°1788 Portal: Fix regression, icons not displayed in service catalog (introduced in ab1715ed) 2018-11-21 17:35:33 +01:00
Molkobain
29e28dedf1 Internal: Fix SASS to CSS convert for urls with query string (parameters after the "?") 2018-11-21 17:16:57 +01:00
Molkobain
3aed65c921 (cherry picked from 854bb81) N°1779 Fix none draggable columns in exports (Excel, CSV, ...)
- Fix AjaxWebPage load of linked stylesheets
- Remove unnecessary imports of JS/CSS files
2018-11-21 16:13:11 +01:00
Molkobain
0acc0b4a74 PHPDoc 2018-11-21 16:09:16 +01:00
Molkobain
c300e46480 N°1779 Fix none draggable columns in exports (Excel, CSV, ...)
- Fix AjaxWebPage load of linked stylesheets
- Remove unnecessary imports of JS/CSS files
2018-11-21 15:55:45 +01:00
Eric
0a3f076335 1784 - Fix Toolkit error on decimals 2018-11-21 15:11:19 +01:00
Eric
12d9551845 N°1706 - Fix error display when object cannot be saved 2018-11-21 14:26:50 +01:00
Vladimir Kunin
0d6c799f9c RU: name_brand iqueness rule and type phone in Model; person is mandatory error in User; all core attributes. 2018-11-21 14:22:46 +01:00
Eric
a395f5b63c N°1583 - No filter applied if only one org defined 2018-11-21 11:25:24 +01:00
Eric
cf0ad59ec5 N°1754 - Linkset and CheckToWrite: Loss of links on error during creation 2018-11-21 10:34:06 +01:00
Eric
2e46fa50b3 🌐 Update dictionaries with new missing entries 2018-11-21 10:25:58 +01:00
Molkobain
5a30a3dcb3 N°1750 Portal: Fix broken attachment preview and link on object creation (worked on object edition) 2018-11-21 10:08:27 +01:00
Eric
f9bb2e7a14 💚 N°1583 - user_manager User cannot create a User without Contact (fixed CI) 2018-11-20 18:03:08 +01:00
Eric
57e8b9faaf N°1583 - user_manager User cannot create a User without Contact 2018-11-20 15:43:05 +01:00
chifu1234
c737b83eb5 Update metamodel.class.php (Cherry picked from branch develop 91f1598) 2018-11-20 15:22:59 +01:00
Pierre Goiffon
5c91a1a612 🌐 RU for itop-config-mgmt : put back 2 missing keys for name_brand uniqueness rule in Model class 2018-11-20 11:53:13 +01:00
Pierre Goiffon
0c49641094 N°659 Uniqueness rules : description and error message are now picked in dictionaries entries with the $sClassName/UniquenessRule:$sUniquenessRuleId convention 2018-11-20 11:42:25 +01:00
Molkobain
99e909dae4 N°1702 Change "description" & "error_message" properties from hardcoded string to dictionary entries
New convention is:
- Class:<class>/UniquenessRule:<rule_code> for the error message
- Class:<class>/UniquenessRule:<rule_code>+ for the description of the rule itself
2018-11-19 18:18:35 +01:00
Molkobain
ecf34b47cb Code cleanup 2018-11-19 12:17:35 +01:00
Molkobain
949b4495fc Revert "Code cleanup" from commit ac89b2d 2018-11-19 12:16:22 +01:00
Eric
bd7e0174f3 🎨 Code refactor proposed by jbostoen 2018-11-19 11:31:57 +01:00
Molkobain
ac89b2dc44 Code cleanup 2018-11-19 11:28:38 +01:00
Molkobain
7e3fceb7dc N°1758 Fix read only attributes on bulk apply stimulus 2018-11-16 17:42:21 +01:00
Eric
b28ed08a85 🐎 N°1668 - Perf: avoid object update parse hidden LinkedSet attribute 2018-11-16 17:27:42 +01:00
Stephen Abello
a488c42dca N°721: ResolveFrom now only set attributes mandatory in resolved & closed states that aren't already set 2018-11-16 17:20:11 +01:00
Pierre Goiffon
62bc6714e0 N°1746 add another log in CK image upload : when mime type is not an image 2018-11-16 15:24:15 +01:00
Eric
9c9ebeeceb N°1763 - Fix autocomplete and accents 2018-11-16 15:17:49 +01:00
Molkobain
fb233709e0 Search: Fix search submit after closing an empty criterion 2018-11-16 11:37:48 +01:00
Eric
9169cced20 Merge remote-tracking branch 'origin/support/2.5' into release/2.6 2018-11-16 11:33:33 +01:00
Eric
9ceb8e9f0b N°1765 - Fix Organization filter and UNION filter in ExternalKey search 2018-11-16 11:31:36 +01:00
Eric
1db9708624 Merge remote-tracking branch 'origin/support/2.5' into release/2.6 2018-11-16 10:36:24 +01:00
Eric
5cedcb2389 N°1620: Fix 'forgot your password?' error when resetting password 2018-11-16 10:34:12 +01:00
Molkobain
52b42d0210 PHPDoc 2018-11-16 09:31:24 +01:00
Kamil Konečný
67f5f09530 Title field XSS vulnerability solution. 2018-11-16 08:59:50 +01:00
Eric
b9e0747825 N°1074 - ExternalField default label is now "key_name->label" 2018-11-15 17:33:42 +01:00
Eric
e44ed248ef N°1659 - Don't use anymore the current organization in the external key search (and n-n) 2018-11-15 17:07:31 +01:00
Stephen Abello
b0c120d7fd N°1728: Display error on setup for unsupported MySQL 8+ versions (MariaDB & Percona not affected) 2018-11-15 15:04:44 +01:00
Molkobain
177b6d1757 N°1750 Portal: Fix broken attachment preview and link on object creation (worked on object edition) 2018-11-15 14:29:52 +01:00
Eric
ff39b7bc51 N°1759 - Fix setup error on abstract class not existing 2018-11-15 10:59:28 +01:00
Eric
7401e88844 N°1408 - Dashboard Attribute (tab order) 2018-11-14 17:56:02 +01:00
Eric
b1e1e29254 N°244 - Object Copier: copy attachments 2018-11-14 17:20:40 +01:00
Eric
ffac3250af N°1408 - Dashboard Attribute (removed from "Properties" tab) 2018-11-14 17:20:40 +01:00
Eric
e9fb885d34 N°1408 - Dashboard Attribute (dictionary) 2018-11-14 17:20:40 +01:00
Eric
b87037d187 code cleanup 2018-11-14 17:20:40 +01:00
Pierre Goiffon
a97680fb04 N°931 fix TagSet regression (not displayed correctly in the console)
introduced in f9b2fda092
2018-11-14 15:37:08 +01:00
Stephen Abello
798e526010 N°1758: Fix regression on bulk transition due to filter format changes 2018-11-14 15:25:27 +01:00
Stephen Abello
d344478b48 N°1408: Fix AttributeDashboard for portal 2018-11-14 12:11:42 +01:00
Stephen Abello
b898a09c4c N°1728: Display error on setup for unsupported MySQL 8+ versions (MariaDB & Percona not affected) 2018-11-14 10:13:08 +01:00
Pierre Goiffon
17589e060a Merge branch 'support/2.5' into release/2.6 2018-11-14 10:04:29 +01:00
Pierre Goiffon
7e4f235c59 N°1761 fix MetaModel class not found when calling utils method 2018-11-14 10:04:15 +01:00
Molkobain
7867cc1dca N° 688 Portal: Fix enum attributes sort order in ManageBrick (eg. Ongoing requests). Now sorted by code like in the admin. console 2018-11-13 19:31:46 +01:00
Molkobain
114b18d7c8 Portal: Add HTML hooks in object forms to know object's class and ID (useful for CSS /JS hacks) 2018-11-13 16:01:19 +01:00
Eric
5baff6257b N°1754 - Linkset and CheckToWrite: Loss of links on error during creation 2018-11-13 15:37:10 +01:00
Pierre Goiffon
8264d21520 Add Nould to contributors list (PR #20) 2018-11-13 14:48:14 +01:00
Kamil Konečný
8bd10a2d11 Session id regeneration on login. 2018-11-13 14:28:08 +01:00
Molkobain
05d866f0f7 Add chifu1324 to the contributors list! Thanks ✌ 2018-11-13 13:46:29 +01:00
jbostoen
cce88f09b0 Versoin 20181113-1219
* additional strings
2018-11-13 13:40:57 +01:00
Lars Hippler
26475ad10f Add missing German translations related to 4072ed0 2018-11-13 13:40:01 +01:00
Molkobain
c1a81e4f0d N°944 Fix wrong XML generated when attribute name has been changed and redefinition of label is required 2018-11-13 11:48:27 +01:00
Vladimir Kunin
4a5cb23730 Add Russian translations for TagSetFieldData fields 2018-11-13 11:26:39 +01:00
Eric
f0e5128fb5 N°1740 - Class Query invalid Datamodel - Attention: Setup mandatory when applying this (core datamodel migration) 2018-11-13 11:18:10 +01:00
Eric
63b08b0e70 Merge remote-tracking branch 'origin/support/2.5' into release/2.6
# Conflicts:
#	sources/application/search/searchform.class.inc.php
2018-11-13 11:11:15 +01:00
Pierre Goiffon
4072ed09ac N°931 TagSet : add missing translations for TagSetFieldData fields 2018-11-13 10:55:46 +01:00
Eric
c722d64850 N°1706 - Fix problem with user_manager profile 2018-11-13 08:50:49 +01:00
Molkobain
70137808f0 PHPDoc 2018-11-12 21:36:03 +01:00
Stephen Abello
36ade3b15c N°1727: Fix non disappearing tooltip for mandatory HTML field 2018-11-12 17:42:56 +01:00
Vladimir Kunin
6b5f32611d Russian lang for 2.6-beta 2018-11-12 11:36:43 +01:00
Pierre Goiffon
43bfe06882 Merge branch 'support/2.5' into release/2.6 2018-11-09 17:39:17 +01:00
Pierre Goiffon
6f79c16ba0 N°1746 add a log when CK image upload fails 2018-11-09 17:39:03 +01:00
Denis Flaven
e7fbb2273d N°1718 Make attribute image zoomable 2018-11-09 16:56:26 +01:00
Eric
29df8f8f92 N°1737 - Tags HTML sanitization for display of labels 2018-11-09 10:09:42 +01:00
Eric
216d965d76 N°1724 - Fix external key search error when an UNION is used as a filter in the datamodel 2018-11-09 09:13:59 +01:00
Eric
95fce0eefb Fix audit bug (DBUnionSearch::AddConditionForInOperatorUsingParam() does not exist) when category is a UNION and rule flag 'Valid objects?' is 'true' and there are invalid entries in the result of the audit. 2018-11-09 09:13:18 +01:00
Eric
841127c131 N°828 - GetSelectFilter issue with DBUnionSearch 2018-11-09 09:11:25 +01:00
Eric
405b1b8e6f N°917 - Trigger on object update: limit the fields proposed to the ones that can be updated 2018-11-08 14:36:15 +01:00
Eric
b050210737 N°1374 - Fix TTR deadline wrong value when re-assigning overdue tickets outside open hours 2018-11-08 08:55:48 +01:00
Eric
ed02e3522e code cleanup 2018-11-08 08:55:48 +01:00
Eric
a327b5fb5e Allow an alternative SQL generation from OQL (same as 2.3.0) 2018-11-08 08:55:48 +01:00
Pierre Goiffon
f9b2fda092 N°931 fix link for TagSet in portal lists
- they were linking to a console search
- now will filter the list using the label
2018-11-07 18:06:59 +01:00
Molkobain
0d082bf378 N°1487 Search: Removing an empty criterion doesn't refresh the results anymore 2018-11-07 14:44:37 +01:00
steffunky
d8cef95d56 N°1639: Add white-space style to CKEditor whitelist 2018-11-07 12:15:10 +01:00
steffunky
2258e8c652 N°1650: Add vertical-align style to CKEditor whitelist 2018-11-07 12:14:47 +01:00
Molkobain
5e19d338b9 N°1537 Fix "Demandeur" not updated on Change objects in french version only.
caller_id and requestor_id had the same labels which was misleading in transitions.
2018-11-07 11:36:11 +01:00
Molkobain
14ecfc4ce8 Add Jeffrey Bostoen, larhip & chifu1234 to the contributors list! Many thanks to them 🙌 2018-11-07 11:10:59 +01:00
chifu1234
91f159841b Update metamodel.class.php
Update metamodel.class.php
2018-11-07 11:05:53 +01:00
steffunky
170d84d635 N°1061: Remove bold on "auto_select" lines in setup "ready to install" step 2018-11-07 10:08:55 +01:00
Lars Hippler
a962f6535e Add German translations regarding release 2.6
especially AttributeTag, AttributeOverview and uniqueness rules translations
2018-11-07 09:30:20 +01:00
Pierre Goiffon
a4055c4a74 Change comments to use same tickets ref syntax 2018-11-06 17:36:14 +01:00
Molkobain
9ed550ee7f N°562 Notifications: Add support for placeholders in HTML hyperlinks (regular href, mailto, ...) 2018-11-06 17:35:17 +01:00
steffunky
00bd7583f7 N°1053: Set the first day of the week on date/time picker to a language based setting
* Update moment.js
* Add locales to moment.js
* Align console & portal on the same moment.js library
2018-11-06 11:06:07 +01:00
Eric
e4619fbc0f N°1724 - Fix external key search error when an UNION is used as a filter in the datamodel 2018-11-06 10:01:36 +01:00
Eric
518d94f5f3 Fix audit bug (DBUnionSearch::AddConditionForInOperatorUsingParam() does not exist) when category is a UNION and rule flag 'Valid objects?' is 'true' and there are invalid entries in the result of the audit. 2018-11-06 08:49:35 +01:00
Eric
389a1791d7 N°828 - GetSelectFilter issue with DBUnionSearch 2018-11-06 08:49:35 +01:00
Pierre Goiffon
905dba67c3 Some PhpDoc to document api (just a start !) 2018-11-05 17:15:44 +01:00
Thomas Casteleyn
54eb41b66f Fix typo Incident Impact (report PR#10)
(cherry picked from commit 676b83519a)
2018-11-05 17:00:20 +01:00
Pierre Goiffon
ede2673ba5 Fix uniqueness PHPUnit tests - 2nd commit (forgot to change annotation) 2018-11-05 16:02:15 +01:00
Pierre Goiffon
dd50c99ec4 Fix uniqueness PHPUnit tests 2018-11-05 15:52:35 +01:00
Pierre Goiffon
357555e507 AttributeImage : add css classes to be able to style 2018-11-05 11:54:35 +01:00
Pierre Goiffon
1f6a51b31f Some refactoring in AttributeImage URL generation 2018-11-05 11:54:35 +01:00
Molkobain
6d4cf71197 N°567 Enhance WikiText URLs synthax (usage of IDs and labels supported)
[[<objClass>:<objName|objId>|<label>]]
 <label> is optional

 Examples:
 - [[Server:db1.tnut.com]]
 - [[Server:123]]
 - [[Server:db1.tnut.com|Production server]]
 - [[Server:123|Production server]]
2018-11-05 11:29:06 +01:00
steffunky
87f898d29d Fix a typo in Dutch translations 2018-11-05 11:23:38 +01:00
jbostoen
d5576522ae Version 20181102-1455
* quick first translation
2018-11-05 11:03:52 +01:00
Thomas Casteleyn
676b83519a Fix typo Incident Impact 2018-11-05 09:43:32 +01:00
Molkobain
6addd9acec Update dictionaries for all languages to iTop 2.6 2018-11-02 11:52:33 +01:00
Molkobain
9b5942bf4e Remove duplicate entries in english dictionaries 2018-11-02 11:40:05 +01:00
Molkobain
9faa4e4cbd Update english dictionaries' file comment 2018-11-02 11:02:34 +01:00
Molkobain
8b80bd71e7 N°1714 Tags: Add default search criteria 2018-11-02 09:42:54 +01:00
Molkobain
8989206461 (Cherry pick 5f7e8c9 from branch support/2.5) N°1715 Search: Add default criteria for FAQ, FAQCategory & KnownError classes. 2018-11-02 09:04:02 +01:00
Molkobain
5f7e8c9229 N°1715 Search: Add default criteria for FAQ, FAQCategory & KnownError classes. 2018-11-02 08:50:56 +01:00
Molkobain
89a21c8e44 Code cleanup
Remove ending "?>" from dictionary files before updating all languages.
2018-11-01 15:35:49 +01:00
Molkobain
a7ec6e5ca0 Internal: Remove unused dictionary file. 2018-11-01 15:35:49 +01:00
steffunky
a08675352a N°1687: Fix typos in German translation (thanks to ITOMIG) 2018-10-31 12:04:13 +01:00
steffunky
7158b1f787 N°1504: Add a translation for the top left "Page" string on PDF export 2018-10-31 10:21:43 +01:00
Eric
3925ad252f Fixed execution warning in search (not visible in production) 2018-10-31 09:00:15 +01:00
Pierre Goiffon
f3fd47a792 N°659 PHPUnit to test uniqueness rule validity check... and debug tested method (woops ! unit test will save the world ;) ) 2018-10-30 18:01:35 +01:00
steffunky
af92f58265 N°1704: Upgrade portal datetime picker widget & moment.js for jQuery 3 compatibility 2018-10-30 15:51:19 +01:00
Pierre Goiffon
81b5f18579 N°1707 fix mandatory TagSet were not highlighted in the console 2018-10-30 15:06:47 +01:00
Molkobain
184c0cb84b Fix visual glitch in icon select widget 2018-10-30 10:53:50 +01:00
Eric
c892862822 N°1202 - Fix History on Decimal. No diff when modify only trailing 0s. 2018-10-30 09:13:52 +01:00
Pierre Goiffon
b61d1feec4 Update README after 2.6.0-beta release 2018-10-29 16:49:22 +01:00
Molkobain
a73ff16642 Merge pull request #7 from Super-Visions/feature/dutch-dict
Another update for Dutch dictionary

(cherry picked from commit 0e2c8ff220)
2018-10-29 12:11:32 +01:00
Molkobain
0e2c8ff220 Merge pull request #7 from Super-Visions/feature/dutch-dict
Another update for Dutch dictionary
2018-10-29 12:08:15 +01:00
Eric
e39a6b96bd Fixed execution warning in search (not visible in production) 2018-10-26 10:59:21 +02:00
Pierre Goiffon
7763983ef4 N°1408 fix Organization.overview EN and FR dict keys 2018-10-24 14:58:24 +02:00
Pierre Goiffon
35f7fe98ae update versions 2018-10-24 10:35:11 +02:00
Pierre Goiffon
da1268fc05 update versions 2018-10-24 10:35:01 +02:00
Pierre Goiffon
533acbde8d Update README 2018-10-24 10:35:00 +02:00
Pierre Goiffon
d72da422de PHPDoc 2018-10-24 10:35:00 +02:00
Pierre Goiffon
891608f812 N°1408 Organization.overview dashboard is now editable 2018-10-24 10:00:52 +02:00
Pierre Goiffon
e66da81a20 N°1408 new AttributeDashboard : Organization.overview 2018-10-23 18:37:39 +02:00
Eric
cae0cd00c2 DBSearch: Fix serialization rework (missing internal parameters) 2018-10-23 17:23:43 +02:00
Eric
32fc87023c AttributeDashboard support Dashlet Badge in XML files (fix the <class> collision) 2018-10-23 16:14:30 +02:00
Molkobain
0021482c1b Internal jQuery 3 migration fix 2018-10-23 15:43:31 +02:00
Molkobain
276427e3df PHPDoc 2018-10-23 15:43:31 +02:00
Eric
7b49bde3ad Dashlet "Header with statistics" query parameter changed to a text area 2018-10-23 15:15:35 +02:00
Eric
a94d940bd3 DBSearch: Fix serialization rework in bulk modify 2018-10-23 15:08:40 +02:00
Eric
313c3c6fc3 Code cleanup 2018-10-23 15:08:40 +02:00
Eric
de86f71c90 Fix error on Tag Admin screen when no TagSet attribute is defined 2018-10-23 15:08:40 +02:00
Eric
098b0531d8 Remove the generation of an additional class TagFieldData for AttributeDashboard 2018-10-23 15:08:40 +02:00
Pierre Goiffon
34552214bf N°1703 The dates are no longer reset when inserting a Ticket
Could cause problems when importing using REST API or using form prefill
2018-10-23 14:17:03 +02:00
Eric
d61a8ba160 DBSearch: Fix serialization rework 2018-10-22 18:59:38 +02:00
Pierre Goiffon
84ebca58ac N°931 TagSet : FAQ.domains is now displayes in the portal (FAQ list and details form) 2018-10-22 18:39:31 +02:00
Molkobain
fb07d19a64 Merge branch 'develop' into feature/dutch-dict 2018-10-22 17:28:55 +02:00
Pierre Goiffon
def4c54d26 N°659 Console & Portal now we have same object save error messages and sessionmessages
* create new CoreCannotSaveException
* throw this exception in DBInsertNoReload/DBUpdate if CheckToWrite fails
* console : change UI.php code to catch this exception instead of calling CheckToWrite itself (was called twice :(( )
* portal : specific catch for the new exception
* portal : get and displays session messages
2018-10-22 17:11:08 +02:00
Pierre Goiffon
027b0fcff7 N°659 use header message to display uniqueness errors on object creation / modification 2018-10-22 17:11:08 +02:00
Pierre Goiffon
fc0cb44a84 Reformat iTopWebPage 2018-10-22 17:11:08 +02:00
Pierre Goiffon
574d72b0e7 N°659 Add uniqueness checks
* modify compiler to save the new rules
* add check on object save (\DBObject::DoCheckUniqueness)
* default model : add uniqueness rules on Brand, Model, Person
2018-10-22 17:11:07 +02:00
Pierre Goiffon
cd5e1afb2b DBSearch: Fix serialization rework, use htmlentities 2018-10-22 15:51:28 +02:00
Eric
0298d6bc19 DBSearch: Fix serialization rework 2018-10-22 15:37:32 +02:00
Eric
60d2fd4f7e N°1408 - Fix specific dashboard display without context 2018-10-22 12:26:56 +02:00
Thomas Casteleyn
487e0c8769 Improved error message translation 2018-10-22 10:39:16 +02:00
Thomas Casteleyn
5faa0ffe08 Update Dutch dictionary for attachments (#6)
(Thanks to @Hipska !)
2018-10-20 00:20:31 +02:00
Eric
705ce02580 Setup steps duration 2018-10-19 17:18:39 +02:00
Eric
78c674a989 DBSearch serialization rework 2018-10-19 16:02:07 +02:00
Eric
84d9be3293 Strengthen the SQL creation from OQL 2018-10-19 15:58:50 +02:00
Thomas Casteleyn
30c622052e Fix integer validation in dashlet forms
Mandatory integer fields were valid even when empty. (Thanks @Hipska for the fix!)
2018-10-19 15:06:56 +02:00
Eric
ada56da63e Fix multiple TagSet creation in the same object 2018-10-19 11:16:34 +02:00
Thomas Casteleyn
5ee125c593 Actually, kilo should be lowercase 2018-10-18 17:27:14 +02:00
Thomas Casteleyn
4876ae7c22 The use of Bytes instead of octets is more common in Dutch 2018-10-18 17:09:55 +02:00
Pierre Goiffon
78b626bbd2 JenkinsFile : add fixed notification 2018-10-18 15:44:35 +02:00
Pierre Goiffon
823311dc86 Update jenkins conf 2018-10-18 15:12:59 +02:00
Pierre Goiffon
21c5638e1e Merge branch 'support/2.5' into develop
# Conflicts:
#	application/applicationextension.inc.php
#	application/dashlet.class.inc.php
#	application/itopwebpage.class.inc.php
#	application/loginwebpage.class.inc.php
#	application/menunode.class.inc.php
#	application/nicewebpage.class.inc.php
#	application/query.class.inc.php
#	application/utils.inc.php
#	application/webpage.class.inc.php
#	application/wizardhelper.class.inc.php
#	core/action.class.inc.php
#	core/attributedef.class.inc.php
#	core/cmdbchangeop.class.inc.php
#	core/cmdbobject.class.inc.php
#	core/cmdbsource.class.inc.php
#	core/config.class.inc.php
#	core/dbobject.class.php
#	core/dbobjectsearch.class.php
#	core/dbobjectset.class.php
#	core/kpi.class.inc.php
#	core/modelreflection.class.inc.php
#	core/modulehandler.class.inc.php
#	core/oql/expression.class.inc.php
#	core/oql/oql-lexer.plex
#	core/oql/oql-parser.y
#	core/oql/oqlquery.class.inc.php
#	core/ormpassword.class.inc.php
#	core/sqlobjectquery.class.inc.php
#	core/sqlquery.class.inc.php
#	core/sqlunionquery.class.inc.php
#	core/trigger.class.inc.php
#	core/userrights.class.inc.php
#	css/light-grey.scss
#	datamodels/2.x/itop-backup/status.php
#	datamodels/2.x/itop-config/config.php
#	datamodels/2.x/itop-full-itil/datamodel.itop-full-itil.xml
#	datamodels/2.x/itop-knownerror-mgmt/en.dict.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-knownerror-mgmt/module.itop-knownerror-mgmt.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/abstractcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/brickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/browsebrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/createbrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/defaultcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/managebrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/objectcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/controllers/userprofilebrickcontroller.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/routers/abstractrouter.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/routers/browsebrickrouter.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/routers/createbrickrouter.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/routers/defaultrouter.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/routers/managebrickrouter.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/routers/objectrouter.class.inc.php
#	datamodels/2.x/itop-portal-base/portal/src/routers/userprofilebrickrouter.class.inc.php
#	datamodels/2.x/itop-portal/datamodel.itop-portal.xml
#	datamodels/2.x/itop-tickets/en.dict.itop-tickets.php
#	dictionaries/da.dictionary.itop.core.php
#	dictionaries/da.dictionary.itop.ui.php
#	dictionaries/en.dictionary.itop.core.php
#	dictionaries/en.dictionary.itop.ui.php
#	dictionaries/fr.dictionary.itop.core.php
#	dictionaries/hu.dictionary.itop.core.php
#	dictionaries/it.dictionary.itop.core.php
#	dictionaries/nl.dictionary.itop.core.php
#	dictionaries/pt_br.dictionary.itop.core.php
#	dictionaries/tr.dictionary.itop.core.php
#	dictionaries/zh.dictionary.itop.core.php
#	js/forms-json-utils.js
#	js/jquery-migrate-1.4.1.min.js
#	js/jquery.layout.js
#	js/jquery.layout.min.js
#	js/jquery.tablesorter.pager.js
#	js/linkswidget.js
#	js/searchformforeignkeys.js
#	js/utils.js
#	js/wizardhelper.js
#	pages/schema.php
#	readme.txt
#	setup/ajax.dataloader.php
#	setup/xmldataloader.class.inc.php
#	sources/renderer/bootstrap/fieldrenderer/bssubformfieldrenderer.class.inc.php
#	sources/renderer/console/consoleformrenderer.class.inc.php
#	sources/renderer/console/fieldrenderer/consoleselectobjectfieldrenderer.class.inc.php
#	sources/renderer/console/fieldrenderer/consolesimplefieldrenderer.class.inc.php
#	sources/renderer/console/fieldrenderer/consolesubformfieldrenderer.class.inc.php
#	test/ItopDataTestCase.php
#	test/core/ormLinkSetTest.php
#	webservices/backoffice.dataloader.php
#	webservices/rest.php
2018-10-18 14:34:22 +02:00
Pierre Goiffon
588899db63 Convert all files from CrLf to Lf (preparing merge to develop) 2018-10-18 14:20:40 +02:00
bruno DA SILVA
02da84b4cf jenkins conf in .jenkins
- clearer dead ends
2018-10-16 10:57:17 +02:00
Eric
ebb5ede613 N°1408 - Asynchronous load of dashboard tab 2018-10-15 16:37:19 +02:00
Eric
db4b8b2f43 N°1408 - Dashboard selector 2018-10-15 16:37:18 +02:00
Eric
c17f7caa29 N°1408 - Dashboard selector 2018-10-15 16:37:18 +02:00
Eric
d7df975971 cleanup code 2018-10-15 16:37:18 +02:00
Eric
f3f70d6296 N°1408 - Dashboard Printer friendly page + user edit rights 2018-10-15 16:37:18 +02:00
Eric
256d4e2cb3 N°1408 - Revert dashboard field in datamodel 2018-10-15 16:37:18 +02:00
Eric
fb31c9006a N°1408 - Fix import dashboard 2018-10-15 16:37:18 +02:00
Eric
bf000e6a89 N°1408 - DBSearch Serialize refactor (json format) 2018-10-15 16:37:17 +02:00
Eric
94b4f10277 N°1408 - Fix Object print page for attributes dashboard 2018-10-15 16:37:17 +02:00
Eric
15671f6dd4 N°1408 - Use dashboards only in read-only mode 2018-10-15 16:37:17 +02:00
Eric
2460d2112f N°1408 - Auto-refresh dashboards 2018-10-15 16:37:17 +02:00
Eric
709badd0f7 N°1408 - Support contextual parameters in attributes dashboard 2018-10-15 16:37:17 +02:00
Eric
99153d02ee N°1408 - Support contextual parameters in attributes dashboard 2018-10-15 16:37:17 +02:00
Eric
4347b2c5ff N°1408 - Support contextual parameters in attributes dashboard 2018-10-15 16:37:17 +02:00
Eric
c13b6ea13a N°1408 - AttributeDashboard first implementation 2018-10-15 16:37:17 +02:00
Eric
6e5d4834f1 N°1408 - Move of the dashboard menu into the dashboard 2018-10-15 16:37:16 +02:00
Eric
9f489d8a59 cleanup code 2018-10-15 16:37:16 +02:00
Eric
c9be1a8e71 cleanup code 2018-10-15 16:37:16 +02:00
Pierre Goiffon
c1e2f35c96 N°931 TagSet : fix remove/add of a partial value in bulk edit 2018-10-15 11:45:29 +02:00
Pierre Goiffon
462148a12f N°931 TagSet POC : fix markup for preview 2018-10-15 11:35:59 +02:00
Pierre Goiffon
7e4edc6e3a Forms mandatory check : switch to first tab with error
(cherry picked from commit 80e6801db3e7770997e705d087e57b682e8df092)
2018-10-15 09:45:08 +02:00
bruno DA SILVA
452e7cce01 jenkins: default iTop isntance conf 2018-10-12 17:18:49 +02:00
bruno DA SILVA
cb7b5dfffb jenkins: default iTop isntance conf 2018-10-12 17:11:27 +02:00
steffunky
0a34fb7a7a N°1590: Advanced search: fixed a bug when selecting foreign keys would not add items (selectionMode is mandatory) 2018-10-12 11:06:31 +02:00
Pierre Goiffon
460337954b CSS : remove duplicate declaration
(cherry picked from commit 7f99322da8896fa5120077381dc1a7fc9ff1f828)
2018-10-12 10:47:59 +02:00
steffunky
74a8c3f5bd N°1555: fixed a case where AttributeExternal field was pointing anything else than an ExternalKey and its label wouldn't show up on search criteria, remove duplicate catch 2018-10-09 18:27:36 +02:00
steffunky
3347d32f2a N°1555: fixed a case where AttributeExternal field was pointing anything else than an ExternalKey and its label wouldn't show up on search criteria 2018-10-09 18:25:48 +02:00
Pierre Goiffon
4c2be6b2c5 N°931 AttributeTagSet widget js wrapper : partial values can now be added with just a click 2018-10-09 09:04:21 +02:00
Pierre Goiffon
860bb6d615 N°931 AttributeTagSet widget js wrapper : fix remaining console.debug call, and fix indentations 2018-10-08 17:56:34 +02:00
Pierre Goiffon
950ffcde2b N°931 remove remaining references to Ticket.tagfield
(it was the old AttributeTagSet test, now we have FAQ.domains)
2018-10-08 15:45:50 +02:00
Pierre Goiffon
0580c71749 N°931 fix requirements for AttributeTagSet PhpUnit tests
* itop-kown-error-mgmt module
* creates a FAQCategory if needed
2018-10-08 11:58:45 +02:00
Pierre Goiffon
c66b0bea41 N°931 fix PhpUnit tests for TagSets (default datamodel doesn't have anymore Ticket.tagfield, but FAQ.domains) 2018-10-05 17:55:40 +02:00
Pierre Goiffon
7281bd4a1a N°931 default datamodel : remove Ticket.tagfield and add AttributeTagSet FAQ.domains 2018-10-05 17:37:23 +02:00
Pierre Goiffon
c9d73fc0c8 N°931 fix TagSet not saved on object creation 2018-10-05 17:12:58 +02:00
Pierre Goiffon
8720ac2b08 N°931 Fix import TagSet failing with multiple code values (using CLI with no_localize=1) 2018-10-05 09:18:23 +02:00
Pierre Goiffon
33e8b6a64c Switch back files from CrLf to Lf 2018-10-04 17:43:03 +02:00
Pierre Goiffon
d7cf339ab5 N°931 TagSet : adding widget JQuery plugin (Selectize.js) to the licences 2018-10-04 15:30:01 +02:00
Pierre Goiffon
714fada9f0 N°931 Fix TagSet export : with format=spreadsheet codes where always returned (now uses codes or labels according to what was set) 2018-10-04 15:00:33 +02:00
Pierre Goiffon
d36fd6a47d N°931 export localize option label : change FR value 2018-10-04 14:57:12 +02:00
Stephen
c0d83e96d8 Retrofit 2.5.1 fixes into develop (11308dc7, 1e0d654, 7fddd6ac, 12e9e453, cbe749af, 10b7fa60, c5f3598f, 396fc2cd) 2018-10-04 11:12:16 +02:00
Pierre Goiffon
3da6251cc7 N°931 change export localize option label
as attcodes, enum and tagset are concerned then the label don't contains anymore the field types impacted
also, we rephrased it to remove the negation and be clearer about the effect
2018-10-04 09:31:49 +02:00
Pierre Goiffon
1bf39aa092 N°931 fix XML export (node was always empty) 2018-10-03 10:53:34 +02:00
Pierre Goiffon
3387d8fdd2 Fix XLSX export failing on PHP 7.1 on systems without "/tmp" path
Since PHP 7.1 tempnam() throws a notice if the dir parameter can't be used : bug #69489 in http://php.net/ChangeLog-7.php#7.1.0
2018-10-02 17:20:12 +02:00
Pierre Goiffon
9f926fccd8 N°931 TagSet admin updates :
* when modifying tag, code field is read only if tag is used by at least one object
* "tag usage" tab : show only parent class
2018-10-02 16:36:49 +02:00
Pierre Goiffon
e9a77c798e Fix Contact data sample (reordering and remove duplicate id) 2018-10-02 15:01:30 +02:00
Pierre Goiffon
29691a09fe .idea : use Combodo presets for code style and inspections 2018-10-02 09:11:56 +02:00
Eric
cb73c2a3f9 N°931: Unit tests for mysql stop words 2018-10-02 08:56:13 +02:00
Pierre Goiffon
713a41909b N°931 TagSet history : CSS and scss were out of sync 2018-10-01 19:02:39 +02:00
Steffunky
9972e253d5 enable jQuery migrate warning only in dev. environment 2018-10-01 16:17:41 +02:00
Eric
55309be9a1 N°917: AttributeQueryAttCodeSet support in XML definition 2018-10-01 15:52:36 +02:00
Eric
fd75f3af28 cleanup (fix error) 2018-10-01 15:36:47 +02:00
Eric
af7e5eb03e N°917: Display attcodes instead of labels in triggers and allow search on AttributeSet 2018-10-01 15:23:29 +02:00
Eric
b97ce7a25f N°917: Fix Ajax calls on objects containing AttributeSet 2018-10-01 15:22:31 +02:00
Molkobain
89d617c152 N°931 Better tooltips. 2018-10-01 12:30:16 +02:00
Molkobain
4595c565cc N°931 Portal: Start working on UI. 2018-10-01 09:27:07 +02:00
Eric
8f55d4054a N°917: Fix Search criterion when TagSet = 'tag1 tag2...' 2018-09-28 17:33:05 +02:00
Pierre Goiffon
2e255b10a7 Finish b931 2018-09-28 16:42:49 +02:00
Molkobain
cf9c1b52ed N°931 Portal integration due to AttributeSet refactoring. UI still to be done. 2018-09-28 16:34:52 +02:00
Eric
d3b3c44cbd N°917: Fix unit tests 2018-09-28 16:32:15 +02:00
Molkobain
edb25b6dca N°931 Internal: Move AttributeTagSet class. 2018-09-28 15:49:00 +02:00
Molkobain
4bf748641d N°931 UI: Display a regular tooltip instead of a qtip when item has no description. 2018-09-28 15:47:22 +02:00
Eric
16a6b70708 N°917: Fix unit tests 2018-09-28 15:36:13 +02:00
Eric
40355cb2d0 N°917: Fix refresh edit screen, avoid storing bad values in db 2018-09-28 12:08:35 +02:00
Eric
b52aaaadf2 N°917: Remove AttributeSet search 2018-09-28 12:08:34 +02:00
Pierre Goiffon
f55c0aa1c9 N°917: Fix TagSet search 2018-09-28 12:08:34 +02:00
Molkobain
333c51b0f9 N°931 Fix XSS in console. 2018-09-28 12:08:14 +02:00
Molkobain
46dee2919e Taxons: Fix item's remove box position. 2018-09-28 11:17:20 +02:00
Pierre Goiffon
799618dee7 N°931 AttributeSet widget : add charset parameter to htmlentities 2018-09-28 10:33:17 +02:00
Pierre Goiffon
96aaa0d8e1 N°931 TagSet in history : display "added" in bold and "removed" as striked 2018-09-28 10:33:17 +02:00
Molkobain
5556e3efec Taxons: Refactor of CSS for the console. 2018-09-28 09:40:46 +02:00
Pierre Goiffon
d8b2d4435a N°931 AttributeSet widget : keep initial removed values 2018-09-28 09:26:23 +02:00
Pierre Goiffon
a4315b4789 N°931 AttributeSet widget : better fix for crash when having a ' in the label
use htmlentities for input hidden value instead of a textarea display:none
2018-09-28 09:02:35 +02:00
Pierre Goiffon
3e8dd61607 N°931 AttributeSet widget : fix crash when having a ' in the label 2018-09-27 18:31:58 +02:00
Pierre Goiffon
1d28a67d21 N°931 TagSet widget enabling / disabling in bulk edit
- rename ToogleField -> ToggleField
- for the set input, use the same ID as other fields (used by ToggleField method)
- disable the set widget if needed on opening
- binds the update event to enable / disable at will
2018-09-27 17:29:36 +02:00
Eric
3a551e9cec N°917: Restrict "Attribute...AttCodeSet" to existing attributes on database write 2018-09-27 17:14:26 +02:00
Eric
cf6693a534 N°931: Fix tag css class 2018-09-27 16:47:14 +02:00
Eric
8c5c275952 N°931: Fix compiler (AttributeSet is abstract) 2018-09-27 16:47:14 +02:00
Molkobain
5fa4b4cb88 Taxons: Rework of CSS & markup in the console (portal still to come). 2018-09-27 16:45:04 +02:00
Eric
58525f247e N°917: AttributeDef CSS class 2018-09-27 15:57:08 +02:00
Eric
d78f19525e N°917: AttributeDef CSS class 2018-09-27 15:40:00 +02:00
Eric
5559c8205f Merge branch 'feature/AttributeSet' into feature/b931
# Conflicts:
#	core/attributedef.class.inc.php
2018-09-27 15:29:27 +02:00
Eric
2a6a97526d N°917: AttributeDef CSS class 2018-09-27 15:25:51 +02:00
bruno DA SILVA
1adea8f014 jenkins: slack notif on build fixed 2018-09-27 14:40:17 +02:00
Eric
29177ec86b N°917: New AttributeQueryAttCodeSet and enhanced Query phrase book 2018-09-27 14:37:50 +02:00
Pierre Goiffon
741e88e1f0 N°931 AttributeSet widget : little naming fixes 2018-09-27 12:05:45 +02:00
Pierre Goiffon
66bddc5730 N°931 AttributeSet CSS : fix remove box disappearing with long tag labels 2018-09-27 12:05:17 +02:00
Pierre Goiffon
6eaa7c0530 N°931 AttributeSet more generic CSS classes :
* more generic names
* use same classes in both view and edit
* in the scss file, 3 sections : attribute-set edition (with other field types styles), generic Selectize overridings, and styles for attribute-set items visualisation
2018-09-27 11:47:28 +02:00
Eric
b257fae03e N°917: Fix Unit tests 2018-09-27 11:44:28 +02:00
Eric
2d24324dea N°917: Fix AttributeClassState 2018-09-27 11:36:41 +02:00
Eric
ec597f697a N°917: Adapt to generic widget for set 2018-09-27 11:04:20 +02:00
Pierre Goiffon
3bed62a473 N°931 AttributeSet POC : now testing both widget for edition and CSS for viewing 2018-09-27 10:50:12 +02:00
Eric
b5f7227ecd N°917: Fix AttributeClassState 2018-09-27 10:49:33 +02:00
Eric
615adf8281 N°917: Trigger on delete 2018-09-27 10:49:32 +02:00
Eric
cb7bb3242a N°917: New AttributeClassState for triggers on state (entering or leaving a state) 2018-09-27 10:49:30 +02:00
Eric
4b08eea998 N°931: Fix Label protection for tags 2018-09-27 10:49:29 +02:00
Eric
01551942b3 N°917: Fix Bulk modify for AttCodeSet 2018-09-27 09:11:03 +02:00
Eric
720d334053 N°917: AttributeClassAttCodeSet created 2018-09-27 09:11:02 +02:00
Molkobain
9397d1ac2e Taxons: Add support in the portal (UI still to be done). 2018-09-26 17:13:55 +02:00
Pierre Goiffon
1530bb89fe N°931 TagSet widget and its POC are now more generic (to be used in all AttributeSet hierarchy) 2018-09-26 14:26:26 +02:00
Thomas Casteleyn
e9b04b923e Merge develop into feature/dutch-dict 2018-09-26 11:22:07 +02:00
Thomas Casteleyn
f09683949d Add Dutch dictionary for incident management (#3)
Thanks to @Hipska!
2018-09-25 17:29:05 +02:00
Pierre Goiffon
e1f96974bb Merge branch 'develop' into feature/b931 2018-09-25 14:52:59 +02:00
Pierre Goiffon
1fc261937f Add toolkit to gitignore 2018-09-25 14:52:38 +02:00
Eric
a94211d3d3 Merge remote-tracking branch 'origin/develop' into feature/b931
# Conflicts:
#	.idea/inspectionProfiles/Combodo.xml
#	application/cmdbabstract.class.inc.php
#	core/attributedef.class.inc.php
#	css/light-grey.css
#	css/light-grey.scss
2018-09-25 12:03:44 +02:00
Eric
534f6b6a54 Merge branch 'feature/b917' into develop 2018-09-25 11:55:11 +02:00
Eric
901764bf70 N°917 - Add new trigger on object update 2018-09-25 11:29:15 +02:00
Eric
e67d6e8a80 N°917 - Add new trigger on object update 2018-09-25 10:38:01 +02:00
Molkobain
16476f736a Taxons: Add specific CSS class to tags so they can be easily stylized. 2018-09-24 16:38:11 +02:00
Eric
e9ecd89cda Code cleanup 2018-09-24 13:57:45 +02:00
Eric
55036511ab longer lines for PHP code format 2018-09-24 11:48:15 +02:00
Molkobain
3cf5d31f5d Start working on tags integration in the end-users portal. 2018-09-21 17:25:45 +02:00
Molkobain
84ae36cf1a Merge branch 'feature/b931' of https://github.com/Combodo/iTop into feature/b931 2018-09-21 17:24:56 +02:00
Molkobain
00515ac14a Refactor GetJSONForWidget helper (moved from cmdbAbstract to AttributeTagSet) 2018-09-21 17:24:34 +02:00
Eric
245612d0eb N°931: Tags dictionary and validation pattern 2018-09-21 16:56:53 +02:00
Eric
ae6e3b4f17 N°931: Tags Template format 2018-09-21 16:00:18 +02:00
Eric
12a3f1c36c N°931: Fix integrity controls (reserved word) 2018-09-21 15:59:54 +02:00
Eric
1af1e92b60 N°931: Fix error reporting for data synchro 2018-09-20 17:22:46 +02:00
Thomas Casteleyn
5d8b9fd4db Added Dutch dictionary for incident management 2018-09-20 16:39:37 +02:00
Eric
a1ad7a5def N°931: Fix Search when screen is refreshed (number of selected criteria for tags) 2018-09-20 15:57:37 +02:00
Eric
398d1aa820 N°931: Limit the number of tags in the widget 2018-09-20 15:15:25 +02:00
Molkobain
38278f3432 Taxons: UI WIP. 2018-09-20 14:41:56 +02:00
Molkobain
baf4662ed8 Taxons: UI WIP. 2018-09-20 10:53:07 +02:00
Eric
cf07c9f1a2 N°931: Fix search when referencing a non existing tag 2018-09-20 10:31:02 +02:00
Eric
446bd0ad1f N°931: Rename Tag columns in database 2018-09-20 09:58:35 +02:00
Eric
3d5e46faac N°931: Fix Search when screen is refreshed 2018-09-19 17:21:05 +02:00
bruno DA SILVA
b8fba8997a Merge branch 'feature/jenkinsfile' into develop 2018-09-19 16:33:05 +02:00
Eric
a07c81d0d9 N°931: TagSetData table name 2018-09-19 16:18:09 +02:00
Eric
0252d091ca N°931: TagSetData table name 2018-09-19 16:07:10 +02:00
Molkobain
18d9ada58d N°1636 Fix concurrent lock not released on failed transition (in the console) 2018-09-19 15:56:50 +02:00
Molkobain
055d2cc62c Taxons: UI WIP. 2018-09-19 11:00:33 +02:00
Eric
e15c5c58d8 N°931: HTML 2018-09-19 10:19:16 +02:00
Eric
b734aca4d0 N°931: Fix History 2018-09-19 09:52:06 +02:00
Eric
e495b36dfb N°931: Add link to read-only HTML representation of tags 2018-09-18 17:34:03 +02:00
Eric
cdcfe03d67 N°931: Tag max number and max length per class and field (defined in xml) 2018-09-18 15:33:00 +02:00
Eric
2c6dc20046 N°931: "Empty" message added to the tag usage tab 2018-09-18 14:57:56 +02:00
Eric
a8c3b7ac2e N°931: Reformat 2018-09-18 14:16:30 +02:00
Eric
98572c6efb N°931: Tags admin menu (typo) 2018-09-18 13:57:46 +02:00
Eric
70840c53aa N°931: TagSetFieldData Fix bad name extract 2018-09-18 12:17:27 +02:00
Eric
9fbd27f3a8 N°931: Import/Export separator defined in configuration 2018-09-18 12:04:08 +02:00
Eric
c3c1897258 N°931: Tags data class display name 2018-09-18 11:38:34 +02:00
Eric
5403219746 N°931: Tags admin menu 2018-09-18 10:28:39 +02:00
Molkobain
fb08903a8a UI: Improve selected rows background color in tables. 2018-09-17 17:09:12 +02:00
Molkobain
416005654e Merge branch 'develop' of https://github.com/Combodo/iTop into develop 2018-09-17 17:07:52 +02:00
Eric
1debf77ab4 N°931: DBSearch AddCondition updated for tags 2018-09-17 12:46:46 +02:00
Eric
f1a8bb08da N°931: Fix integrity controls (tag code length) 2018-09-17 12:03:17 +02:00
Eric
7edff12bbf Merge remote-tracking branch 'origin/support/2.5' into develop
# Conflicts:
#	application/startup.inc.php
2018-09-17 11:47:47 +02:00
Molkobain
34d601f49c UI: Make caselog entries' header font a bit more tinier in enhanced portal. 2018-09-16 21:39:09 +02:00
Pierre Goiffon
ec38473d88 N°931 TagSet widget : disable/enable methods for mass edit (need to be plugged, but where ?!??) 2018-09-14 17:57:45 +02:00
Pierre Goiffon
875c77ae65 N°931 TagSet widget : fix empty widget on creation form
Now displays a placeholder
The + icon can't be used as is cause it's inserted with ::after, and without tags it can't be right aligned
2018-09-14 17:43:38 +02:00
Eric
75e24f9f79 Changed table selection background color 2018-09-14 17:26:06 +02:00
Eric
16a4662129 warnings reworked 2018-09-14 17:08:25 +02:00
Eric
1eda1eb9de N°931: cleanup code 2018-09-14 17:08:05 +02:00
Eric
d981fd35ef N°931: TagSet Fix CSV import 2018-09-14 14:55:41 +02:00
Pierre Goiffon
6f1dc44932 N°931 TagSet widget : fix added / removed not updating correctly
* move integrity checks from refresh method to add/remove callbacks
* use onInitialize callback for partial values instead of render
2018-09-14 14:50:24 +02:00
Pierre Goiffon
95b929dd27 N°931 TagSet widget POC HTML page 2018-09-13 18:15:58 +02:00
Eric
0c75b98f48 N°931: TagSet Fix Bulk update 2018-09-13 17:49:25 +02:00
Eric
ecc5a0bf8a N°931: TagSet Fix 'New...' object form 2018-09-13 17:06:58 +02:00
Pierre Goiffon
d9315bec84 N°931 integrate TagSet widget 2018-09-13 15:57:32 +02:00
Eric
d1ee7f4353 N°931: TagSet search (manage undefined values) unit tests 2018-09-12 18:17:17 +02:00
Eric
979095337b code cleanup 2018-09-12 15:35:18 +02:00
Eric
34b528b1f4 N°931: TagSet search unit tests 2018-09-12 15:34:37 +02:00
Eric
5ea056a3fc code cleanup 2018-09-12 15:14:27 +02:00
Eric
2ba31244c2 N°931: TagSet search form integration 2018-09-12 15:03:35 +02:00
Molkobain
3ea16694b4 Fix dictionary entry on linkedset tab that was adding a 's' on object class. (eg. "Add IP Addresss..." now becomes "Add IP Address objects...") 2018-09-12 11:02:02 +02:00
Molkobain
35e872310d Update dictionaries for ActionEmail class. (Missing uppercase on first letters) 2018-09-12 09:58:04 +02:00
Pierre Goiffon
b86b24d444 N°931 JS/CSS files for TagSet widget 2018-09-12 09:03:04 +02:00
Molkobain
45e1a6ffd6 PHP Documentation 2018-09-11 21:45:19 +02:00
Pierre Goiffon
c87f001956 Little modifications on PHPStorm code style & inspections 2018-09-11 18:44:44 +02:00
Eric
1fc3b3a4ed N°931: Integrity controls + unit tests 2018-09-11 17:27:27 +02:00
Eric
c706a2d77c N°931: Integrity controls 2018-09-11 12:40:46 +02:00
Eric
8577fc6701 N°931: Integrity controls 2018-09-11 12:22:50 +02:00
Eric
ead3067d49 Merge remote-tracking branch 'origin/support/2.5' into develop 2018-09-11 09:59:47 +02:00
Eric
4772b8c5bb PHPStorm config 2018-09-11 09:54:56 +02:00
Eric
6817cfbeea N°931: Integrity controls 2018-09-07 17:50:40 +02:00
bruno DA SILVA
f851238eab Merge branch 'develop' into feature/jenkinsfile 2018-09-07 15:11:14 +02:00
bruno DA SILVA
79157c465a [WIP] jenkinsfile integration 2018-09-07 14:52:22 +02:00
Pierre Goiffon
64438f6b6d idea : change XML indent 2018-09-06 18:35:51 +02:00
Pierre Goiffon
f2b914a4c5 N°931 change CSS for displaying TagSet datas 2018-09-06 18:34:23 +02:00
Pierre Goiffon
da71004898 N°931 update TagSet DataModel declaration parameters 2018-09-06 17:10:40 +02:00
Eric
e9019b294a Merge branch 'develop' into feature/jenkinsfile 2018-09-06 15:51:31 +02:00
Eric
e2c3ea22e4 N°931: Start bulk modify implementation 2018-09-06 15:42:10 +02:00
Eric
c7f3f20229 New Unit tests 2018-09-06 14:42:00 +02:00
bruno DA SILVA
46dc024335 Merge branch 'develop' into feature/jenkinsfile 2018-09-06 14:31:59 +02:00
Eric
34c68cfef0 Fix regression introduced in bugfix 1554 and detected by unit tests 2018-09-06 14:20:42 +02:00
Molkobain
d6a564a38b Add Thomas Casteleyn to the contributors list! :)
(I forgot him on the initial commit)
2018-09-06 11:32:38 +02:00
Pierre Goiffon
31c69088ca New contributor : Dennis Lanister (PR #1) 2018-09-06 10:14:24 +02:00
Dennis Lassiter
49bb8fd515 Fixed bug that caused memory_limit=-1 to lead to 'not enough memory' … (#1)
* Fixed bug that caused memory_limit=-1 to lead to 'not enough memory' error
* Added Unit Test to Memory Limit Check
2018-09-06 10:04:28 +02:00
Eric
b8f8a0d455 N°1585: Fix ajax request uri too long on auto-complete 2018-09-05 15:10:11 +02:00
Molkobain
374e34a8b8 Merge branch 'develop' of https://github.com/Combodo/iTop into develop 2018-09-05 15:07:34 +02:00
Molkobain
7ef1d72314 Add a "Contributors" in the READMME.md to thank all the contributors! :) 2018-09-05 15:06:56 +02:00
bruno DA SILVA
5666a3d74c Merge branch 'develop' into feature/jenkinsfile 2018-09-05 10:12:13 +02:00
bruno DA SILVA
8004b411da gitignore
- add the test's  vendor dir
2018-09-05 10:11:09 +02:00
bruno DA SILVA
e473c46dc3 [WIP] jenkinsfile integration 2018-09-05 08:08:19 +02:00
bruno DA SILVA
148309245b [WIP] jenkinsfile integration 2018-09-05 08:00:07 +02:00
bruno DA SILVA
5dc39fe068 [WIP] jenkinsfile integration 2018-09-04 18:10:39 +02:00
bruno DA SILVA
47c7a3c5e3 [WIP] jenkinsfile integration 2018-09-04 18:05:19 +02:00
bruno DA SILVA
85b7e86e58 [WIP] jenkinsfile integration 2018-09-04 18:03:56 +02:00
Pierre Goiffon
f871581997 Merge branch 'develop' into feature/b931
# Conflicts:
#	application/applicationextension.inc.php
#	core/attributedef.class.inc.php
#	core/cmdbchangeop.class.inc.php
#	core/cmdbobject.class.inc.php
#	core/dbobjectsearch.class.php
#	core/oql/expression.class.inc.php
#	core/oql/oql-lexer.plex
#	core/oql/oql-parser.y
#	core/oql/oqlquery.class.inc.php
#	css/light-grey.scss
#	datamodels/2.x/itop-full-itil/datamodel.itop-full-itil.xml
#	datamodels/2.x/itop-portal/datamodel.itop-portal.xml
#	datamodels/2.x/itop-tickets/en.dict.itop-tickets.php
#	dictionaries/en.dictionary.itop.core.php
#	dictionaries/fr.dictionary.itop.core.php
#	setup/xmldataloader.class.inc.php
#	test/ItopDataTestCase.php
2018-09-04 18:02:51 +02:00
bruno DA SILVA
3fca465f1d [WIP] jenkinsfile integration 2018-09-04 18:02:12 +02:00
bruno DA SILVA
7955dd86f4 [WIP] jenkinsfile integration 2018-09-04 18:00:34 +02:00
Pierre Goiffon
40a4e6d7b0 Fix files using CrLf, convert them to Lf to have the whole repo using Lf
Warn your git config (core.autocrlf = input or true)
2018-09-04 17:59:51 +02:00
bruno DA SILVA
bef4ac83a4 [WIP] jenkinsfile integration 2018-09-04 17:58:20 +02:00
bruno DA SILVA
bde83fc705 [WIP] jenkinsfile integration 2018-09-04 17:53:18 +02:00
Pierre Goiffon
cad18bee73 SetupUtils : update comments to match current branch version 2018-09-04 12:02:16 +02:00
Eric
98e5eaa4e0 N°931: Add Delta management in ormTagSet (with unit tests) 2018-09-04 11:06:53 +02:00
Pierre Goiffon
3129e94363 Merge branch 'N°1620' into develop
# Conflicts:
#	sources/application/search/searchform.class.inc.php
2018-09-04 09:54:12 +02:00
bruno DA SILVA
7ac0e50bd9 phpstorm's line separator in edited files 2018-09-03 17:36:37 +02:00
Eric
7d502fae23 N°931: TagSet : OQL Parse/Normalize unit tests 2018-09-03 15:18:19 +02:00
Pierre Goiffon
894eeef140 ignore : add extensions 2018-09-03 15:10:51 +02:00
bruno DA SILVA
7991069282 .gitignore completion
- cache
 - logs
 - composer's vendor dir
2018-09-03 12:13:57 +02:00
Eric
39f3972a24 N°931: TagSet : OQL Parsing unit tests 2018-08-31 18:02:22 +02:00
Pierre Goiffon
fc0e5ecd3b Ignore : add other shared files in index 2018-08-31 17:46:12 +02:00
Pierre Goiffon
8897d9f82b ignore : add other shared idea files in index 2018-08-31 17:36:52 +02:00
Eric
1329b5f684 N°931: TagSet : Set automatically the class and attcode from tag class name 2018-08-31 16:59:02 +02:00
Eric
e58bc738d0 N°931: TagSet : Parsing OQL 2018-08-31 15:58:55 +02:00
Denis Flaven
af63579f31 Rework of the readme... 2018-08-30 16:35:56 +02:00
Denis Flaven
55fad3a9ec Added .project files to ignore. 2018-08-30 15:32:41 +02:00
Eric
3250e0a1e6 N°931: TagSet - Support for removed tags in history 2018-08-30 12:42:56 +02:00
bruno DA SILVA
8df287f45e updated readme 2018-08-30 12:25:20 +02:00
Eric Espié
f458a77449 N°962: TagSet - Attribute definition (continued)
SVN:b931[6032]
2018-08-30 11:08:47 +02:00
Eric Espié
1953c05b33 N°962: TagSet - add label support
SVN:b931[6031]
2018-08-30 11:08:47 +02:00
Eric Espié
a03c553000 N°962: TagSet attribute definition dev (continued)
SVN:b931[6030]
2018-08-30 11:08:47 +02:00
Eric Espié
ecdc4076d9 N°962: TagSet Edition in string mode
SVN:b931[6029]
2018-08-30 11:08:47 +02:00
Eric Espié
cd2ea3793e N°962: TagSet Fix Attribute definition
SVN:b931[6028]
2018-08-30 11:08:47 +02:00
Pierre Goiffon
d40ffd944f Revert "@@@@ OQL parsing"
This reverts commit 0beafc1e9a7c4a629a458aec669aa5e11b27db49.

SVN:b931[6027]
2018-08-30 11:08:47 +02:00
Pierre Goiffon
0ee4b52baa N°931 rights on TagSetFieldData on ConfigurationManager profile
SVN:b931[6026]
2018-08-30 11:08:46 +02:00
Pierre Goiffon
5e7db7a27e @@@@ OQL parsing
SVN:b931[6025]
2018-08-30 11:08:46 +02:00
Eric Espié
9631021f84 N°962: TagSet Attribute definition and values (with unit tests on values)
SVN:b931[6024]
2018-08-30 11:08:46 +02:00
Pierre Goiffon
157193c831 N°931 Change default XML version and remove done TODOs
SVN:b931[6022]
2018-08-30 11:08:46 +02:00
Pierre Goiffon
1415f12506 composer.json : add missing ext-dom (iTopDesignFormat)
SVN:b931[6021]
2018-08-30 11:08:46 +02:00
Pierre Goiffon
4df497a768 N°931 Increment iTop XML version (1.5 -> 1.6)
SVN:b931[6020]
2018-08-30 11:08:46 +02:00
Eric Espié
9a13eb0f90 warnings cleanup, search mode switched to BOOLEAN
SVN:b931[6019]
2018-08-30 11:08:46 +02:00
Pierre Goiffon
eaa49bce05 N°931 woops forgot to rename TagSetFielData file name
SVN:b931[6018]
2018-08-30 11:08:46 +02:00
Pierre Goiffon
96334d859a Add shared idea file 2018-08-30 11:05:27 +02:00
Pierre Goiffon
13855b1501 Add .gitignore and README 2018-08-30 11:04:23 +02:00
Eric Espié
277b24e2f0 warnings cleanup, search mode switched to BOOLEAN
SVN:trunk[6019]
2018-08-24 12:09:55 +00:00
Pierre Goiffon
abb2a2a6e2 N°931 new MatchExpression, allow to query the DB
SVN:trunk[6016]
2018-08-23 15:06:41 +00:00
Pierre Goiffon
961f5fd387 N°931 new TagField iTop class generated for each AttributeTag field
SVN:trunk[6015]
2018-08-23 15:06:17 +00:00
Pierre Goiffon
bdb62de81c N°931 new AttributeTag, handle field creation & update
SVN:trunk[6014]
2018-08-23 15:05:36 +00:00
Pierre Goiffon
422a850792 AttributeDefinition : fix lots of warnings
SVN:trunk[6013]
2018-08-23 14:55:33 +00:00
Eric Espié
1dfcc77098 N°1554: Search form - hide unknown external keys from the search criteria.
SVN:trunk[6012]
2018-08-23 12:32:37 +00:00
Eric Espié
13097d7e0e Fix excel export when reconciliation key list is containing empty keys.
Fix the compiler to avoid generating a reconciliation array not empty when
the tag is present in the xml definition of the class but no key is defined.

SVN:trunk[6011]
2018-08-23 08:22:44 +00:00
Eric Espié
ea9b7eddde N°1595 - Setup : Blocking error on backup failure
SVN:trunk[6010]
2018-08-22 10:16:35 +00:00
Guillaume Lajarige
07056613e5 N°1611 Fix "UTF-8 Characters Malformed" error due to wrong file encoding.
SVN:trunk[6009]
2018-08-21 10:29:46 +00:00
Pierre Goiffon
4d45793ec7 PHPDoc (schema)
SVN:trunk[6008]
2018-08-17 12:04:57 +00:00
Pierre Goiffon
4718133ab6 PHPDoc
SVN:trunk[6006]
2018-08-16 13:17:56 +00:00
Pierre Goiffon
ba518fa975 PHPDoc
SVN:trunk[6005]
2018-08-16 12:36:24 +00:00
Pierre Goiffon
0311e78690 KPI : fix PHP notice var might be undefined
SVN:trunk[6004]
2018-08-16 12:36:11 +00:00
Stephen Abello
9db47428db N°1559: Fixed external attributes selection on export form
SVN:trunk[6003]
2018-08-14 13:19:36 +00:00
Vincent Dumas
84dc3c2093 German Translation: typos (UserRequest #18704)
SVN:trunk[6001]
2018-08-08 09:18:25 +00:00
Stephen Abello
7d37b06555 Form prefill: add possibility to change attributes flag on the fly
SVN:trunk[6000]
2018-08-06 14:33:47 +00:00
Pierre Goiffon
6e6a89fb8c Selectable lines in tables : add an exclusion rule for click on padding/margin/border
SVN:trunk[5999]
2018-08-06 10:12:48 +00:00
Stephen Abello
135d9c5e55 Support any php default password hash algorithm change
SVN:trunk[5998]
2018-08-03 14:52:05 +00:00
Stephen Abello
dd46048ea6 Use a better algorithm to hash new passwords
SVN:trunk[5997]
2018-08-03 12:49:20 +00:00
Stephen Abello
8fe38b03f6 Added replacement for mcrypt removal in PHP 7.2, added stronger encryption options
SVN:trunk[5996]
2018-08-03 08:43:36 +00:00
Pierre Goiffon
0adadeb280 Remove old code that was here for old PHP version compatibility
SVN:trunk[5995]
2018-08-03 07:39:50 +00:00
Pierre Goiffon
775a5122c9 Selectable lines in tables can now be checked clicking anywhere in the line (previously this could only be done clicking on the checkbox)
SVN:trunk[5994]
2018-08-02 14:36:15 +00:00
Stephen Abello
5099060be2 N°1203 : Correctly use 'from' field for test email notifications
SVN:trunk[5993]
2018-08-02 08:34:58 +00:00
Pierre Goiffon
201c93e20a N°1582 Fix audit when a current organization is set and there is an audit rule with valid=true
Was generating an OQL missing query argument error

SVN:trunk[5991]
2018-08-01 09:12:00 +00:00
Stephen Abello
c852d91a72 Updated tcpdf to v6.2.17 for better compatibility with different PHP versions
SVN:trunk[5990]
2018-07-31 13:29:18 +00:00
Pierre Goiffon
a3c6e62bd5 PHP 7.2 compatibility: fix another count(null)
SVN:trunk[5988]
2018-07-30 10:30:16 +00:00
Pierre Goiffon
8cd18fe190 Setup : log in log/setup.log on PHP error (register_shutdown_function callback)
SVN:trunk[5987]
2018-07-26 14:54:45 +00:00
Guillaume Lajarige
5e1452f9b9 N°1580 Portal: Default image of image attributes not correctly displayed in object forms.
SVN:trunk[5986]
2018-07-26 14:22:15 +00:00
Guillaume Lajarige
b76de65886 Internal: Fix CSS typo.
SVN:trunk[5985]
2018-07-25 15:11:21 +00:00
Guillaume Lajarige
48b3bd8bf3 N°1579 Portal: Fix wrong pictogram placement on email & tel attributes in the ManageBrick.
SVN:trunk[5984]
2018-07-25 15:02:29 +00:00
Guillaume Lajarige
ab1715edec N°1576 Portal: Security hardening.
SVN:trunk[5983]
2018-07-25 14:48:11 +00:00
Guillaume Lajarige
3589783ee1 PHPDoc.
SVN:trunk[5982]
2018-07-25 13:09:35 +00:00
Guillaume Lajarige
af43e22f03 N°1578 Fix "Run Query" page hotkeys behavior in some configurations due to a wrong url.
SVN:trunk[5981]
2018-07-25 13:06:38 +00:00
Eric Espié
956f6403b8 Display error message for end users instead of blank screen
SVN:trunk[5980]
2018-07-25 08:02:28 +00:00
Guillaume Lajarige
82ed1853fa Code cleanup.
SVN:trunk[5977]
2018-07-25 07:57:07 +00:00
Guillaume Lajarige
eb0403945b PHPDoc
SVN:trunk[5976]
2018-07-25 07:55:39 +00:00
Pierre Goiffon
3126af94ac N°931 change MySQL dependency from 5.5.3 to 5.6 (to have fulltext on InnoDB)
SVN:trunk[5974]
2018-07-25 07:51:47 +00:00
Guillaume Lajarige
e71ad536a9 Code cleanup
SVN:trunk[5973]
2018-07-25 07:23:52 +00:00
Guillaume Lajarige
d0322b471d PHPDoc
SVN:trunk[5972]
2018-07-24 16:03:15 +00:00
Guillaume Lajarige
a6af11e644 Code cleanup and PHPDoc.
SVN:trunk[5971]
2018-07-24 15:50:52 +00:00
Guillaume Lajarige
1809180d41 Internal: Portal: Fix router API that was never returning the right route.
SVN:trunk[5970]
2018-07-24 15:46:23 +00:00
Pierre Goiffon
9612b1b9e9 Fix non existing parameter passed to function
SVN:trunk[5969]
2018-07-24 15:36:26 +00:00
Guillaume Lajarige
526d4c4d15 N°1575 Portal: Security hardening.
SVN:trunk[5968]
2018-07-24 14:26:51 +00:00
Pierre Goiffon
3f4c824fd5 N°1572 composer.json : add PHP ext dependencies
SVN:trunk[5967]
2018-07-24 12:30:07 +00:00
Pierre Goiffon
9c25feb67c N°1572 Add composer.json for PHP language level
SVN:trunk[5965]
2018-07-24 12:17:05 +00:00
Stephen Abello
e31faf81a9 jQuery 3: patched layout library
SVN:trunk[5964]
2018-07-23 09:47:53 +00:00
Pierre Goiffon
6eb13c24aa JQuery 3 : oops use the REAL min file this time
SVN:trunk[5963]
2018-07-23 09:12:50 +00:00
Pierre Goiffon
dd20017b0a JQuery 3 : change JQuery min file
SVN:trunk[5962]
2018-07-23 09:09:49 +00:00
Stephen Abello
6630051ef3 Updated jQuery to v3.3.1
SVN:trunk[5961]
2018-07-23 06:58:30 +00:00
Vincent Dumas
a66d91c507 Fix duplicated label in French: Ticket.caller_id = Change.requestor_id by renaming the second
SVN:trunk[5960]
2018-07-20 13:08:30 +00:00
Vincent Dumas
2f34f0458b Fix XML bug: Duplicate id=team_id in state new.
SVN:trunk[5959]
2018-07-20 12:49:23 +00:00
Guillaume Lajarige
076abc8ae7 N°1568 Portal: Fix async error messages catching when submitting a form was redirecting to a modal that crashed (eg. Transition on object that failed to load)
SVN:trunk[5958]
2018-07-19 16:54:11 +00:00
Eric Espié
5134e57109 Search: better translation of search criteria in "natural language" for ISNULL function
SVN:trunk[5957]
2018-07-19 08:45:39 +00:00
Guillaume Lajarige
3d1ccf2028 N°1566 Fix security message in the browser console ("Unsafe attempt to load URL data:image/svg+xml;utf8")
SVN:trunk[5952]
2018-07-18 14:40:12 +00:00
Eric Espié
60b980fbff N°1556 - Search: Fix removing last criterion on a 'or' line resulted in 'OR 1'.
The empty OR condition is now removed completely from the screen and the criterion list.

SVN:trunk[5951]
2018-07-18 14:08:56 +00:00
Eric Espié
df20f1b5ab N°1553 - Search: Fix operator on indexed attributes. It was previously always forced to '=', now it's only defaulted to '='
SVN:trunk[5950]
2018-07-18 13:13:02 +00:00
Eric Espié
27144f07b1 N°1561 - Fix auto-complete error when the friendlyname depends on other classes
SVN:trunk[5948]
2018-07-18 12:30:40 +00:00
Guillaume Lajarige
8135fdb9d2 Update spanish translations (Thanks to Miguel Turrubiates!)
SVN:trunk[5947]
2018-07-18 07:51:17 +00:00
Pierre Goiffon
985ad18048 REST service PHPDoc & code cleanup
SVN:trunk[5946]
2018-07-18 07:40:10 +00:00
Eric Espié
768ed2666d N°1555 - Search: ExternalField label not displayed.
The search is not restricted for external fields anymore.

SVN:trunk[5945]
2018-07-17 13:17:22 +00:00
Eric Espié
c289a53ed3 Advanced search: Fix an error when using search form from an union.
SVN:trunk[5940]
2018-07-17 12:04:53 +00:00
Eric Espié
5c206718c8 N°1551 - Search: selected org & default criteria
Display the default search criteria also when an org is selected.
The org restriction criterion is read only.

SVN:trunk[5939]
2018-07-17 12:01:29 +00:00
Eric Espié
d7f18e879a Automatic Tests: new ormLinkSet test
SVN:trunk[5938]
2018-07-13 12:34:45 +00:00
Eric Espié
4881a2c274 Better KPI navigation
SVN:trunk[5937]
2018-07-13 09:42:52 +00:00
Eric Espié
5eb5fa05bc cleanup code
SVN:trunk[5936]
2018-07-13 08:34:47 +00:00
Eric Espié
c7e0f36d7c N°1546 - Ticket JSON Export PHP Notice for pre-2.0 tickets
SVN:trunk[5935]
2018-07-13 07:47:13 +00:00
Pierre Goiffon
54d54ca78e Fix setup for PHP 5.5 (cannot use expression as default field value)
SVN:trunk[5933]
2018-07-12 07:45:13 +00:00
Eric Espié
4cd591f81c DBObject->GetOriginal() hardening (now support attributes not set: for example sla_tto_passed for UserRequest until it is closed)
SVN:trunk[5932]
2018-07-11 13:40:38 +00:00
Denis Flaven
d21d732545 Do not check if the organizations are allowed if there is no user logged in (use case: automatic synchro of users at connection time)
SVN:trunk[5930]
2018-07-05 12:54:58 +00:00
Pierre Goiffon
ea4854d239 fix comment typo
SVN:trunk[5929]
2018-07-02 07:48:28 +00:00
Guillaume Lajarige
7ca95b9413 Code cleanup: Warning suppression & PHPDoc.
SVN:trunk[5928]
2018-06-29 17:14:13 +00:00
Guillaume Lajarige
00d0d383f8 Code cleanup: Warning suppression & PHPDoc.
SVN:trunk[5927]
2018-06-29 16:05:11 +00:00
Bruno Da Silva
401a8cdd77 Lab "performance"
- move some heavy introspection into cached part of MetaModel aka iterate over get_declared_classes() in order to check is_subclass_of($sPHPClass, 'ModuleHandlerAPI')
 - make use of an interface in order to rely on existing code

SVN:trunk[5926]
2018-06-29 13:00:18 +00:00
Guillaume Lajarige
b2384855fd Code cleanup: Warning suppression.
SVN:trunk[5925]
2018-06-28 15:33:29 +00:00
Guillaume Lajarige
602c087c29 N°1528 Portal: Add support for SCSS files through the PortalUIExtension API (only CSS were supported)
SVN:trunk[5924]
2018-06-28 14:51:31 +00:00
Guillaume Lajarige
0d96ed5436 Starting dev on iTop 2.6!
SVN:trunk[5923]
2018-06-28 08:27:15 +00:00
Pierre Goiffon
97fa3ac3b3 Fix portal DE translation (thanks again Lars Hippler / Itomig !)
SVN:trunk[5919]
2018-06-28 07:15:39 +00:00
6474 changed files with 553691 additions and 414688 deletions

103
.doc/README.md Normal file
View File

@@ -0,0 +1,103 @@
# Phpdoc dokuwiki template
This directory contains a template for rendering iTop phpdoc as dokuwiki pages.
Conventional tags that you should use:
* `@internal` : exclude from the documentation.
* `@api` : it means that a method is an api, thus it may be interacted with.
* `@see` : it points to another documented method
* `@link` : external url
* if you point to another page of the wiki, please use relative links.
* `@example` : let you provide example of code
* `@param`, `@return`, `@throws`, ...
## Special instructions
Some iTop specific tags were added :
* `@api-advanced`: it means that a method is an `@api` but mark it also as "complex" to use
* `@overwritable-hook`: used to mark a method as "designed to be extended"
* `@extension-hook`: not used for now
* `@phpdoc-tuning-exclude-inherited`: once this tag is present on a class, it's inherited methods won't be showed.
### known limitations:
#### `@see` tags must be very specific:
* always prefix class members (attributes or methods) with `ClassName::` (do not use self)
* for methods always suffix them with `()`,
* do not reference variables since they are not documented. If you have to, always prefix them with `$`
examples:
```
/**
* @see DBObject
* @see DBObject::Get()
* @see DBObject::$foo
*/
```
#### Do not use inline tags, they do not work properly, example:
```
/**
* This is a texts with an inline tag {@see [FQSEN] [<description>]} it must never be used
*/
```
#### The `@example` tag must respect this very precise syntax
* the sentence in the first line (next to the tag) is the title, it must be enclosed by double quotes
* the following lines are the sample code.
* 💔 since we simply hack the official tag, this syntax must be respected carefully 💔
example:
```
/**
* @example "This is the title of the multiline example"
* $foo = DBObject::Get('foo');
* DBObject::Set('foo', ++$foo);
*/
```
## How content is included into the documentation
**For a class** those requirements have to be respected:
- the file containing the class must be listed in `/phpdoc/files/file[]` of `.doc/phpdoc-objects-manipulation.dist.xml`
- the class **must not** have the tag `@internal`
- the class **must** have at least one of: `@api`, `@api-advanced`, `@overwritable-hook`, `@extension-hook`
Then, **for a method** of an eligible class:
- **public** methods **must** have at least one of: `@api`, `@api-advanced`, `@overwritable-hook`, `@extension-hook`
- **protected** methods **must** have at least one of: `@overwritable-hook`, `@extension-hook`
- **private** methods are **always excluded**
**Class properties** and **constants** are never documented (this is subject to change).
## A note about the rendering engine
:notebook: as spaces are used to mark code, the templates (`.doc/phpdoc-templates/combodo-wiki/*`) have very few indentation, thus they are awful to read (sorry).
## Installation
```
cd .doc
composer require phpdocumentor/phpdocumentor:~2 --dev
```
## Generation
`./bin/build-doc-object-manipulation` and `./bin/build-doc-extensions` contains examples of doc. generation, beware: they have to be called from the .doc directory:
```shell
cd /path/to/itop/.doc
./bin/build-doc-object-manipulation
```
the resulting documentation is written into `data/phpdocumentor/output`
## Dokuwiki requirements
* the template uses the [wrap plugin](https://www.dokuwiki.org/plugin:wrap).
* the generated files have to be placed under an arbitrary directory of `[/path/to/dokuwiki]/data/pages`.
* the html has to be activated [config:htmlok](https://www.dokuwiki.org/config:htmlok)
* the generated files have to be in lowercase

6
.doc/bin/build-doc-extensions Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh -x
rm -rf /tmp/phpdoc-twig-cache/ && rm -rf data/phpdocumentor/output/extensions/ && rm -rf data/phpdocumentor/temp/extensions/ && .doc/vendor/bin/phpdoc -c .doc/phpdoc-extensions.dist.xml -vvv
# now wee need to lowercase every generated file because dokuwiki can't handle uppercase
cd data/phpdocumentor/output/extensions/ && for i in $( ls | grep [A-Z] ); do mv -i $i `echo $i | tr 'A-Z' 'a-z'`; done

View File

@@ -0,0 +1,7 @@
#!/bin/sh -x
rm -rf /tmp/phpdoc-twig-cache/ && rm -rf ../data/phpdocumentor/output/objects-manipulation/ && rm -rf ../data/phpdocumentor/temp/objects-manipulation/ && ./vendor/bin/phpdoc -c ./phpdoc-objects-manipulation.dist.xml -vvv
# now wee need to lowercase every generated file because dokuwiki can't handle uppercase
cd ../data/phpdocumentor/output/objects-manipulation/ && for i in $( ls | grep [A-Z] ); do mv -i $i `echo $i | tr 'A-Z' 'a-z'`; done

6
.doc/composer.json Normal file
View File

@@ -0,0 +1,6 @@
{
"require-dev": {
"phpdocumentor/phpdocumentor": "~2",
"jms/serializer": "1.7.*"
}
}

3015
.doc/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

20
.doc/phpdoc-extensions.dist.xml Executable file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<title><![CDATA[iTop extensions]]></title>
<parser>
<target>../data/phpdocumentor/temp/extensions</target>
</parser>
<transformer>
<target>../data/phpdocumentor/output/extensions</target>
</transformer>
<transformations>
<template name="phpdoc-templates/combodo-wiki"/>
</transformations>
<files>
<file>../application/applicationextension.inc.php</file>
</files>
</phpdoc>

View File

@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" ?>
<phpdoc>
<!--
/**
The documentation of this file can be found here : https://docs.phpdoc.org/references/configuration.html
it has to be completed by the CLI parameters documentation which is more comprehensive: https://docs.phpdoc.org/references/commands/project_run.html#usage
usage:
vendor/bin/phpdoc -c phpdoc-objects-manipulation.dist.xml
*/
-->
<title><![CDATA[iTop's objects manipulation API]]></title>
<parser>
<default-package-name>iTopORM</default-package-name>
<target>../data/phpdocumentor/temp/objects-manipulation</target>
<visibility>public,protected</visibility>
<markers>
<!--<item>TODO</item>-->
<!--<item>FIXME</item>-->
</markers>
<extensions>
<extension>php</extension>
</extensions>
</parser>
<transformer>
<target>../data/phpdocumentor/output/objects-manipulation</target>
</transformer>
<transformations>
<template name="phpdoc-templates/combodo-wiki"/>
</transformations>
<!--<logging>-->
<!--<level>warn</level>-->
<!--<paths>-->
<!--&lt;!&ndash;<default>data/phpdocumentor/log/objects-manipulation/{DATE}.log</default>&ndash;&gt;-->
<!--&lt;!&ndash;<errors>data/phpdocumentor/log/objects-manipulation/{DATE}.errors.log</errors>&ndash;&gt;-->
<!--<default>{APP_ROOT}/data/log/{DATE}.log</default>-->
<!--<errors>{APP_ROOT}/data/log/{DATE}.errors.log</errors>-->
<!--</paths>-->
<!--</logging>-->
<files>
<file>../core/dbobject.class.php</file>
<file>../core/dbobjectsearch.class.php</file>
<file>../core/metamodel.class.php</file>
<file>../core/dbobjectset.class.php</file>
<file>../core/dbsearch.class.php</file>
<file>../core/dbunionsearch.class.php</file>
</files>
</phpdoc>

View File

@@ -0,0 +1,136 @@
{% extends 'layout.txt.twig' %}
{% block content %}
<wrap button>[[start|🔙 Back]]</wrap>
{% if node.tags['internal'] is defined %}
====== {{ node.name }} ======
<WRAP alert>This class is "internal", and thus is not documented!</WRAP>
{% elseif node.tags['api'] is not defined and node.tags['api-advanced'] is not defined and node.tags['overwritable-hook'] is not defined and node.tags['extension-hook'] is not defined %}
====== {{ node.name }} ======
<WRAP alert>This class is neither "api", "api-advanced", "overwritable-hook" or "extension-hook", and thus is not documented!</WRAP>
{% else %}
====== {{ node.name }} ======
{% if node.deprecated %}<wrap danger>deprecated</wrap>{% endif %}
{% if node.abstract %}<wrap warning>abstract</wrap>{% endif %}
{% if node.final %}<wrap notice>final</wrap>{% endif %}
{% include 'includes/wrap-tags.txt.twig' with {structure:node, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
{% if node.deprecated %}
=== **<del>Deprecated</del>**===
//{{ node.tags.deprecated[0].description }}//
{% endif %}
== {{ node.summary|replace({"\n":""})|raw }} ==
<html>{{ node.description|markdown|raw }}</html>
{% include 'includes/code-examples.txt.twig' with {structure:node, title_level: '====='} %}
{% set class = node.parent %}
{% block hierarchy_element %}
{% if class and class.name is defined and class.name|trim != '' %}
==== parent ====
{% set child = class %}
{% set class = class.parent %}
{{ block('hierarchy_element') }}
[[{{ child.name }}|{{ child.name }}]]
{% endif %}
{% endblock %}
{% for interface in node.interfaces|sort_asc %}
{% if loop.first %}
==== Implements ====
{% endif %}
{% if loop.length > 1 %} * {% endif %}{{ interface.fullyQualifiedStructuralElementName ?: interface }}
{% endfor %}
{% for trait in node.usedTraits|sort_asc %}
{% if loop.first %}
==== Uses traits ====
{% endif %}
{% if loop.length > 1 %} * {% endif %}{{ trait.fullyQualifiedStructuralElementName ?: trait }}
{% endfor %}
{% include 'includes/see-also.txt.twig' with {structure:node, title_level: '==='} %}
{% include 'includes/tags.txt.twig' with {structure:node, title_level: '=====', blacklist: ['link', 'see', 'abstract', 'example', 'method', 'property', 'property-read', 'property-write', 'package', 'subpackage', 'phpdoc-tuning-exclude-inherited', 'api', 'api-advanced', 'overwritable-hook', 'extension-hook', 'copyright', 'license', 'code-example']} %}
{% set methods = node.inheritedMethods.merge(node.methods.merge(node.magicMethods)) %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api'} %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api-advanced'} %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'overwritable-hook'} %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'extension-hook'} %}
{% include 'includes/code-examples.txt.twig' with {structure:node, title_level: '=====', sub_title_level: '=='} %}
<WRAP clear />
{% for method in methods|sort_asc
if method.visibility == 'public'
and (
method.tags['api'] is defined
or method.tags['api-advanced'] is defined
or method.tags['overwritable-hook'] is defined
or method.tags['extension-hook'] is defined
)
and (
node.tags['phpdoc-tuning-exclude-inherited'] is not defined
or method.parent.name == node.name
)
%}
{%- if loop.first %}
===== Public methods =====
{% endif %}
{{ block('method') }}
{% endfor %}
{% for method in methods|sort_asc if method.visibility == 'protected' and (method.tags['overwritable-hook'] is defined or method.tags['extension-hook'] is defined) %}
{%- if loop.first %}
===== Protected methods =====
{% endif %}
{{ block('method') }}
{% endfor %}
{% set constants = node.inheritedConstants.merge(node.constants) %}
{% if constants|length > 0 %}
===== Constants =====
{% for constant in constants|sort_asc %}
{{ block('constant') }}
{% endfor %}
{% endif %}
{#{% set properties = node.inheritedProperties.merge(node.properties.merge(node.magicProperties)) %}#}
{#{% for property in properties|sort_asc if property.visibility == 'public' %}#}
{#{%- if loop.first %}#}
{#===== Public properties =====#}
{#{% endif %}#}
{#{{ block('property') }}#}
{#{% endfor %}#}
{#{% for property in properties|sort_asc if property.visibility == 'protected' %}#}
{#{%- if loop.first %}#}
{#===== Protected properties =====#}
{#{% endif %}#}
{#{{ block('property') }}#}
{#{% endfor %}#}
{%- endif %} {#{% elseif node.tags['xxx'] is not defined and ... #}
<wrap button>[[start|🔙 Back]]</wrap>
{% endblock %}

View File

@@ -0,0 +1,31 @@
{% block constant %}
<WRAP group box >
<WRAP twothirds column >
==== {{ constant.name }} ====
</WRAP>{# twothirds column#}
<WRAP third column>
{% if constant.deprecated %}<wrap danger>deprecated</wrap> {% endif %}
{% if (node.parent is not null and constant.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
</WRAP>{# third column#}
== {{ constant.summary|replace({"\n":""})|raw }} ==
<html>{{ constant.description|markdown|raw }}</html>
{% if constant.deprecated %}
=== Deprecated ===
{{ constant.tags.deprecated[0].description|raw }}
{% endif %}
{% include 'includes/inherited-from.txt.twig' with {structure:constant} %}
{% include 'includes/see-also.txt.twig' with {structure:constant, title_level: '=='} %}
{% include 'includes/uses.txt.twig' with {structure:constant, title_level: '=='} %}
{% include 'includes/tags.txt.twig' with {structure:constant, title_level: '==', blacklist: ['link', 'see', 'var', 'deprecated', 'uses', 'package', 'subpackage', 'todo', 'code-example']} %}
</WRAP>{# group #}
{% endblock %}

View File

@@ -0,0 +1,95 @@
{% block method %}
<WRAP group box >
<WRAP twothirds column >
==== {{ method.name }} ====
</WRAP>{# twothirds column#}
<WRAP third column >
{% include 'includes/wrap-tags.txt.twig' with {structure:method, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
{% if method.deprecated %}<wrap danger>deprecated</wrap> {% endif %}
{% if (node.parent is not null and method.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
{% if method.abstract %}<wrap warning>abstract</wrap> {% endif %}
{% if method.final %}<wrap notice>final</wrap> {% endif %}
<wrap notice>{{ method.visibility }}</wrap>
{% if method.static %}<wrap warning>static</wrap> {% endif %}
</WRAP>{# third column#}
== {{ method.summary|replace({"\n":""})|raw }} ==
<html>{{ method.description|markdown|raw }}</html>
<code php>{% if method.abstract %}abstract {% endif %}{% if method.final %}final {% endif %}{{ method.visibility }} {% if method.static %}static {% endif %}{{ method.name }}({% for argument in method.arguments %}{{ argument.isVariadic ? '...' }}{{ argument.name }}{{ argument.default ? (' = '~argument.default)|raw }}{% if not loop.last %}, {% endif %}{% endfor %})</code>
<WRAP twothirds column >
=== Parameters ===
{% if method.arguments|length > 0 -%}
^ types ^ name ^ default ^ description ^
{% for argument in method.arguments -%}
| **<nowiki>{{ argument.types|join('|')|raw }}</nowiki>** | {{ argument.name }} {{ argument.isVariadic ? '<small style="color: gray">variadic</small>' }} | <nowiki>{{ argument.default|raw }}</nowiki> | {{ argument.description|trim|replace("\n", ' ')|raw }} |{{ "\r\n" }}
{%- endfor %}
{% else %}
//none//
{% endif %}
{#=== Parameters ===#}
{#{% if method.arguments|length > 0 -%}#}
{#{% for argument in method.arguments -%}#}
{#== {{ argument.name }} ==#}
{#{% set varDesc %}#}
{#<span style="margin:0 10px; 0 20px; font-weight: bold;">{{ argument.types|join('|') }}</span>#}
{#{{ argument.isVariadic ? '<small style="color: gray">variadic</small>' }}#}
{#{{ argument.description|raw }}#}
{#{% endset %}#}
{#<html>{{ varDesc|markdown|raw }}</html>#}
{#{%- endfor %}#}
{#{% else %}#}
{#<wrap tip>This method has no parameter</wrap>#}
{#{% endif %}#}
{% if method.response and method.response.types|join() != 'void' %}
=== Returns ===
<html>{{ ('**' ~ method.response.types|join('|')|trim ~ '** ' ~ method.response.description)|markdown|raw }}</html>
{% endif %}
</WRAP>{# twothirds column#}
<WRAP third column >
{% if method.tags.throws|length > 0 or method.tags.throw|length > 0 %}
=== Throws ===
{% for exception in method.tags.throws -%}
{% if loop.length > 1 %} * {% endif %}''{{ exception.types|join('|')|raw }}'' <nowiki>{{ exception.description|raw }}</nowiki>
{% endfor %}
{% endif %}
{% include 'includes/inherited-from.txt.twig' with {structure:method} %}
{% include 'includes/see-also.txt.twig' with {structure:method, title_level: '==='} %}
{% include 'includes/uses.txt.twig' with {structure:method, title_level: '==='} %}
{% include 'includes/used-by.txt.twig' with {structure:method, title_level: '==='} %}
{% include 'includes/tags-with-description.txt.twig' with {structure:method, title_level: '===', WRAP: 'info', tagsWithDescription: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
{% include 'includes/tags.txt.twig' with {structure:method, title_level: '===', blacklist: ['todo', 'link', 'see', 'abstract', 'example', 'param', 'return', 'access', 'deprecated', 'throws', 'throw', 'uses', 'api', 'api-advanced', 'overwritable-hook', 'extension-hook', 'used-by', 'inheritdoc', 'code-example']} %}
</WRAP>{# third column#}
{% include 'includes/code-examples.txt.twig' with {structure:method, title_level: '==='} %}
</WRAP>{# group #}
{% endblock %}

View File

@@ -0,0 +1,49 @@
{% block property %}
<WRAP group box>
<WRAP twothirds column >
==== ${{ property.name }} ====
</WRAP>{# twothirds column#}
<WRAP third column>
{% if property.deprecated %}<wrap danger>deprecated</wrap> {% endif %}
{% if (node.parent is not null and property.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
</WRAP>{# third column#}
== {{ property.summary|replace({"\n":""})|raw }} ==
<html>{{ property.description|markdown|raw }}</html>
{% if property.var.0.description %}<html>{{ property.var.0.description|markdown|raw }}</html>{% endif %}
{#{% if property.types %}#}
{#== Type ==#}
{#{% for type in property.types %}#}
{#{% if loop.length > 1 %} * {% endif %}{{ type|raw }} : {{ type.description|raw }}#}
{#{% endfor %}#}
{#{{ property.types|join('|')|raw }}#}
{#{% endif %}#}
{% if property.deprecated %}
== Deprecated ==
{{ property.tags.deprecated[0].description }}
{% endif %}
{% include 'includes/inherited-from.txt.twig' with {structure:property} %}
{% include 'includes/see-also.txt.twig' with {structure:property, title_level: '=='} %}
{% include 'includes/uses.txt.twig' with {structure:property, title_level: ''} %}
{% include 'includes/tags.txt.twig' with {structure:property, title_level: '==', blacklist: ['link', 'see', 'access', 'var', 'deprecated', 'uses', 'todo', 'code-example']} %}
<code php>{{ property.visibility }} ${{ property.name }}{% if property.types %} : {{ property.types|join('|')|raw }}{% endif %}</code>
</WRAP>{# group #}
{% endblock %}

View File

@@ -0,0 +1 @@
{{ node.source|raw }}

View File

@@ -0,0 +1,122 @@
{% extends 'layout.txt.twig' %}
{% block javascripts %}
{% endblock %}
{% block content %}
{#<section class="row-fluid">#}
{#<div class="span2 sidebar">#}
{#{% set namespace = project.namespace %}#}
{#{{ block('sidebarNamespaces') }}#}
{#</div>#}
{#</section>#}
{#<section class="row-fluid">#}
====== {{ node.path|split('/')|slice(0,-1)|join('/') }}{{ node.name }} ======
{{ node.summary }}
<html>{{ node.description|markdown|raw }}</html>
{% if node.traits|length > 0 %}
===== Traits =====
{% for trait in node.traits %}
<tr>
<td>{{ trait|raw }}</td>
<td><em>{{ trait.summary }}</em></td>
</tr>
{% endfor %}
{% endif %}
{% if node.interfaces|length > 0 %}
===== Interfaces =====
{% for interface in node.interfaces %}
<tr>
<td>{{ interface|raw }}</td>
<td><em>{{ interface.summary }}</em></td>
</tr>
{% endfor %}
{% endif %}
{% if node.classes|length > 0 %}
===== Classes =====
{% for class in node.classes %}
{{ class|raw }}
<em>{{ class.summary }}</em>
{% endfor %}
{% endif %}
{% if node.package is not empty and node.package != '\\' %}
===== Package =====
{{ node.subpackage ? (node.package ~ '\\' ~ node.subpackage) : node.package }}
{% endif %}
{% for tagName,tags in node.tags if tagName in ['link', 'see'] %}
{% if loop.first %}
===== See also =====
{% endif %}
{% for tag in tags %}
<dd><a href="{{ tag.reference ?: tag.link }}"><div class="namespace-wrapper">{{ tag.description ?: tag.reference }}</div></a></dd>
{% endfor %}
{% endfor %}
<h2>Tags</h2>
<table class="table table-condensed">
{% for tagName,tags in node.tags if tagName not in ['link', 'see', 'package', 'subpackage'] %}
<tr>
<th>
{{ tagName }}
</th>
<td>
{% for tag in tags %}
{{ tag.description|markdown|raw }}
{% endfor %}
</td>
</tr>
{% else %}
<tr><td colspan="2"><em>None found</em></td></tr>
{% endfor %}
</table>
</aside>
</div>
{% if node.constants|length > 0 %}
<div class="row-fluid">
<section class="span8 content file">
<h2>Constants</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
{% for constant in node.constants %}
{{ block('constant') }}
{% endfor %}
{% endif %}
{% if node.functions|length > 0 %}
<div class="row-fluid">
<section class="span8 content file">
<h2>Functions</h2>
</section>
<aside class="span4 detailsbar"></aside>
</div>
{% for method in node.functions %}
{{ block('method') }}
{% endfor %}
{% endif %}
</div>
</section>
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label">{{ node.file.name }}</h3>
</div>
<div class="modal-body">
<pre data-src="{{ path('files/' ~ node.path ~ '.txt')|raw }}" class="language-php line-numbers"></pre>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,42 @@
{% extends 'layout.html.twig' %}
{% block stylesheets %}
<link href="{{ path('css/jquery.iviewer.css') }}" rel="stylesheet" media="all"/>
<style>
#viewer {
position: relative;
width: 100%;
}
.wrapper {
overflow: hidden;
}
</style>
{% endblock %}
{% block javascripts %}
<script src="{{ path('js/jquery.mousewheel.js') }}" type="text/javascript"></script>
<script src="{{ path('js/jquery.iviewer.js') }}" type="text/javascript"></script>
<script type="text/javascript">
$(window).resize(function(){
$("#viewer").height($(window).height() - 100);
});
$(document).ready(function() {
$("#viewer").iviewer({src: '{{ path('graphs/classes.svg') }}', zoom_animation: false});
$('#viewer img').bind('dragstart', function(event){
event.preventDefault();
});
$(window).resize();
});
</script>
{% endblock %}
{% block content %}
<div class="row-fluid">
<div class="span12">
<div class="wrapper">
<div id="viewer" class="viewer"></div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,5 @@
# Fixes a vulnerability in CentOS: http://stackoverflow.com/questions/20533279/prevent-php-from-parsing-non-php-files-such-as-somefile-php-txt
<FilesMatch \.php\.txt$>
RemoveHandler .php
ForceType text/plain
</FilesMatch>

View File

@@ -0,0 +1,34 @@
{% if title_level is not defined %}
{%- set title_level = '==' -%}
{% endif %}
{% if sub_title_level is not defined %}
{%- set sub_title_level = title_level|slice(1) -%}
{% endif %}
{% if sub_title_level == '=' %}
{%- set sub_title_level = '' -%}
{% endif %}
{#{% for tagName,tags in structure.tags if tagName in ['code-example'] %}#}
{#{% if loop.first %}#}
{#{{title_level}} Examples {{title_level}}#}
{#{% endif %}#}
{#{% for tag in tags %}#}
{#{%- set descToken = tag.description|split("\n", 2) -%}#}
{#{%- set title = descToken[0] -%}#}
{#{%- set code = descToken[1] -%}#}
{#{{sub_title_level}} {{ title }} {{sub_title_level}}#}
{#<code php>{{ code|raw }}</code>#}
{#{% endfor %}#}
{#{% endfor %}#}
{% for tagName,tags in structure.tags if tagName in ['example'] %}
{% if loop.first %}
{{title_level}} Examples {{title_level}}
{% endif %}
{% for tag in tags %}
{{ sub_title_level }} {{ tag.filePath|escape }}{{ sub_title_level }}
<code php>{{ tag.description|raw }}</code>
{% endfor %}
{% endfor %}

View File

@@ -0,0 +1,12 @@
{% if title_level is not defined %}
{% set title_level='' %}
{% endif %}
{% if (node.parent is null) %}
{{title_level}} File {{ structure.path }} {{title_level}}
{% endif %}
{% if (node.parent is not null and structure.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}
{{title_level}} Inherited from {{title_level}}
[[{{structure.parent}}|{{structure.parent}}]]
{% endif %}

View File

@@ -0,0 +1,26 @@
{% for structure in structures|sort_asc if structure.tags['internal'] is not defined and (structure.tags['api'] is defined or structure.tags['api-advanced'] is defined or structure.tags['overwritable-hook'] is defined or structure.tags['extension-hook'] is defined ) %}
{#{{ structure|raw }}#}
{% set structureName = structure|trim('\\', 'left') %}
<WRAP group box>
<WRAP twothirds column >
==== {{ structureName }} ====
</WRAP>{# twothirds column#}
<WRAP third column>
{% if structure.deprecated %}<wrap danger>deprecated</wrap>{% endif %}
{% if structure.abstract %}<wrap warning>abstract</wrap>{% endif %}
{% if structure.final %}<wrap notice>final</wrap>{% endif %}
{% if (node.parent is not null and structure.parent.fullyQualifiedStructuralElementName != node.fullyQualifiedStructuralElementName) %}<wrap notice>inherited</wrap> {% endif %}
{% include 'includes/wrap-tags.txt.twig' with {structure:structure, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
</WRAP>{# third column#}
{{ structure.summary|raw }}
[[{{structureName}}|More information]]
</WRAP>{# group #}
{% endfor %}

View File

@@ -0,0 +1,26 @@
{% if title_level is not defined %}
{%- set title_level='==' -%}
{% endif %}
{% for tagName,tags in structure.tags if tagName in ['link', 'see'] %}
{% if loop.first %}
{{title_level}} See also {{title_level}}
{% endif %}
{% for tag in tags %}
{%- set linkTag = tag.reference|trim('\\', 'left') -%}
{% if not('()' in linkTag or '$' in linkTag or node.name in linkTag or '::' in linkTag ) %}
{%- set linkTag = linkTag|lower -%}
{% elseif node.name~'::' in linkTag %}
{%- set linkTag = linkTag|replace({(node.name~'::'): '#'})|lower -%}
{% elseif '::' in linkTag -%}
{%- set linkTag = linkTag|replace({'::': '#'})|lower -%}
{% else %}
{%- set linkTag = '#' ~ linkTag|lower -%}
{%- endif %}
{% if loop.length > 1 %} * {% endif %}{% if tag.reference is not empty -%}
[[{{linkTag}}|{{ (tag.reference)|trim('\\', 'left') }}]] {% if tag.description|trim is not empty %}: {{ tag.description|trim('\\', 'left') }} {% endif %}
{%- else -%}
{#{{ tag.description|trim('\\', 'left') }}#}
{% endif %}
{% endfor %}
{% endfor %}

View File

@@ -0,0 +1,56 @@
{% if tag is not defined -%}
{# Do not display @api if @api-advanced is also present #}
{%- set tag = "api" -%}
{%- endif %}
{% if hidden_by is not defined -%}
{# Do not display @api if @api-advanced is also present #}
{%- set hidden_by = {"api" : "api-advanced"} -%}
{%- endif %}
{% for method in methods|sort_asc
if (method.visibility == 'public')
and (
method.tags[tag] is defined
and (
hidden_by[tag] is not defined or method.tags[hidden_by[tag]] is not defined
)
)
%}
{%- if loop.first %}
{% if tag == 'api' %}
===== API synthesis =====
<WRAP>
List of the public API methods.
When manipulating {{ node.name }}, You can call those methods:
</WRAP>
{% elseif tag == 'api-advanced' %}
===== Advanced API synthesis =====
<WRAP>
List of advanced API methods
Beware they usage is recommended to advanced users only.
</WRAP>
{% elseif tag == 'overwritable-hook' %}
===== overwritable-hook synthesis =====
<WRAP >When inheriting from {{ node.name }},
you can overwrite those methods in order to add custom logic:
</WRAP>
{% elseif tag == 'extension-hook' %}
===== extension-hook synthesis =====
<WRAP >
When inheriting from {{ node.name }},
you can extend the behaviour of iTop by implementing:
</WRAP>
{% endif %}
{% endif %}
{% set sanitizedMethod = method|trim('\\', 'left')|replace({(node.name~'::'): ''}) %}
{% if '::' in sanitizedMethod -%}
{%- if node.tags['phpdoc-tuning-exclude-inherited'] is not defined %}
* [[{{sanitizedMethod|replace({'::': '#'})|lower}}|↪{{sanitizedMethod}}]] — {{ method.summary|replace({"\n":""})|raw }}
{% endif %}
{%- else %}
* [[#{{sanitizedMethod}}|{{sanitizedMethod}}]] — {{ method.summary|replace({"\n":""})|raw }}
{% endif %}
{% endfor %}

View File

@@ -0,0 +1,20 @@
{% if title_level is not defined %}
{% set title_level = '==' %}
{% endif %}
{%- for tagName,tags in structure.tags if tagName in tagsWithDescription -%}
{%- for tag in tags -%}
{%- if tag.description is not empty -%}
{%- if WRAP is defined -%}
<WRAP {{WRAP}}>
{%- endif -%}
{{title_level}} {{ tagName }} {{title_level}}
{{ tag.description|escape }}
{%- if WRAP is defined -%}
</WRAP>
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}

View File

@@ -0,0 +1,22 @@
{% if title_level is not defined %}
{% set title_level='=====' %}
{% endif %}
{% if blacklist is not defined %}
{% set blacklist =['link', 'see', 'abstract', 'example', 'method', 'property', 'property-read', 'property-write', 'package', 'subpackage', 'api', 'api-advanced', 'todo', 'code-example'] %}
{% endif %}
{% if hidden_by is not defined -%}
{# Do not display @api if @api-advanced is also present #}
{%- set hidden_by = {"api" : "api-advanced"} -%}
{%- endif %}
{#^ {% for tagName,tags in structure.tags if tagName not in blacklist -%}#}
{#{{ tagName }} ^#}
{#{%- endfor %}#}
{% for tagName,tags in structure.tags if tagName not in blacklist and (hidden_by[tagName] is not defined or structure.tags[hidden_by[tagName]] is not defined) %}
{%- if loop.first %}
{{title_level}} Tags {{title_level}}
{% endif %}
^ {{ tagName }} | {% for tag in tags %}{{ tag.version ? tag.version ~ ' ' : '' }}{{ tag.description}}{% endfor %} |
{% endfor %}

View File

@@ -0,0 +1,24 @@
{% if title_level is not defined %}
{% set title_level='' %}
{% endif %}
{% for tagName,tags in structure.tags if tagName in ['used-by'] %}
{% if loop.first %}
{{title_level}} Used by {{title_level}}
{% endif %}
{% for tag in tags %}
{% if loop.length > 1 %} * {% endif %}{{ tag.reference ?: tag.link }} : {{ tag.description ?: tag.reference }}
{% endfor %}
{% endfor %}
{#{% for tagName,tags in method.tags if tagName in ['uses'] %}#}
{#{% if loop.first %}#}
{#<dt>Uses</dt>#}
{#{% endif %}#}
{#{% for tag in tags %}#}
{#<dd>{{ tag.reference|raw }}</dd>#}
{#{% endfor %}#}
{#{% endfor %}#}

View File

@@ -0,0 +1,24 @@
{% if title_level is not defined %}
{% set title_level='' %}
{% endif %}
{% for tagName,tags in structure.tags if tagName in ['uses'] %}
{% if loop.first %}
{{title_level}} Uses {{title_level}}
{% endif %}
{% for tag in tags %}
{% if loop.length > 1 %} * {% endif %}{{ tag.reference ?: tag.link }} : {{ tag.description ?: tag.reference }}
{% endfor %}
{% endfor %}
{#{% for tagName,tags in method.tags if tagName in ['uses'] %}#}
{#{% if loop.first %}#}
{#<dt>Uses</dt>#}
{#{% endif %}#}
{#{% for tag in tags %}#}
{#<dd>{{ tag.reference|raw }}</dd>#}
{#{% endfor %}#}
{#{% endfor %}#}

View File

@@ -0,0 +1,11 @@
{% if wrap is not defined -%}
{% set wrap = 'notice' %}
{%- endif -%}
{% if hidden_by is not defined -%}
{# Do not display @api if @api-advanced is also present #}
{%- set hidden_by = {"api" : "api-advanced"} -%}
{%- endif %}
{%- for tagName,tags in structure.tags if tagName in wrapTags and (hidden_by[tagName] is not defined or structure.tags[hidden_by[tagName]] is not defined) %}
<wrap {{wrap}}>{{tagName}}</wrap>
{% endfor %}

View File

@@ -0,0 +1,121 @@
{% extends 'layout.txt.twig' %}
{% block content %}
<wrap button>[[start|🔙 Back]]</wrap>
{% if node.tags['internal'] is defined %}
====== {{ node.name }} ======
<WRAP alert>This interface is "internal", and thus is not documented!</WRAP>
{% elseif node.tags['api'] is not defined and node.tags['api-advanced'] is not defined and node.tags['overwritable-hook'] is not defined and node.tags['extension-hook'] is not defined %}
====== {{ node.name }} ======
<WRAP alert>This interface is neither "api", "overwritable-hook" or "extension-hook", and thus is not documented!</WRAP>
{% else %}
====== {{ node.name }} ======
{% if node.deprecated %}<wrap danger>deprecated</wrap>{% endif %}
{% if node.abstract %}<wrap warning>abstract</wrap>{% endif %}
{% if node.final %}<wrap notice>final</wrap>{% endif %}
{% include 'includes/wrap-tags.txt.twig' with {structure:node, wrap: 'safety', wrapTags: ['api', 'api-advanced', 'overwritable-hook', 'extension-hook']} %}
{% if node.deprecated %}
=== **<del>Deprecated</del>**===
//{{ node.tags.deprecated[0].description }}//
{% endif %}
== {{ node.summary|replace({"\n":""})|raw }} ==
<html>{{ node.description|markdown|raw }}</html>
{% include 'includes/code-examples.txt.twig' with {structure:node, title_level: '====='} %}
{% set class = node.parent %}
{% block hierarchy_element %}
{% if class and class.name is defined and class.name|trim != '' %}
==== parent ====
{% set child = class %}
{% set class = class.parent %}
{{ block('hierarchy_element') }}
[[{{ child.name }}|{{ child.name }}]]
{% endif %}
{% endblock %}
{% for interface in node.interfaces|sort_asc %}
{% if loop.first %}
==== Implements ====
{% endif %}
{% if loop.length > 1 %} * {% endif %}{{ interface.fullyQualifiedStructuralElementName ?: interface }}
{% endfor %}
{% for trait in node.usedTraits|sort_asc %}
{% if loop.first %}
==== Uses traits ====
{% endif %}
{% if loop.length > 1 %} * {% endif %}{{ trait.fullyQualifiedStructuralElementName ?: trait }}
{% endfor %}
{% include 'includes/see-also.txt.twig' with {structure:node, title_level: '==='} %}
{% include 'includes/tags.txt.twig' with {structure:node, title_level: '=====', blacklist: ['link', 'see', 'abstract', 'example', 'method', 'property', 'property-read', 'property-write', 'package', 'subpackage', 'phpdoc-tuning-exclude-inherited', 'api', 'api-advanced', 'overwritable-hook', 'extension-hook', 'copyright', 'license', 'code-example']} %}
{% set methods = node.inheritedMethods.merge(node.methods) %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api'} %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'api-advanced'} %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'overwritable-hook'} %}
{% include 'includes/tag-synthesys.txt.twig' with {methods:methods, tag:'extension-hook'} %}
<WRAP clear />
{% for method in methods|sort_asc if method.visibility == 'public' %}
{%- if loop.first %}
===== Public methods =====
{% endif %}
{{ block('method') }}
{% endfor %}
{% for method in methods|sort_asc if method.visibility == 'protected' %}
{%- if loop.first %}
===== Protected methods =====
{% endif %}
{{ block('method') }}
{% endfor %}
{% set constants = node.inheritedConstants.merge(node.constants) %}
{% if constants|length > 0 %}
===== Constants =====
{% for constant in constants|sort_asc %}
{{ block('constant') }}
{% endfor %}
{% endif %}
{#{% set properties = node.inheritedProperties.merge(node.properties) %}#}
{#{% for property in properties|sort_asc if property.visibility == 'public' %}#}
{#{%- if loop.first %}#}
{#===== Public properties =====#}
{#{% endif %}#}
{#{{ block('property') }}#}
{#{% endfor %}#}
{#{% for property in properties|sort_asc if property.visibility == 'protected' %}#}
{#{%- if loop.first %}#}
{#===== Protected properties =====#}
{#{% endif %}#}
{#{{ block('property') }}#}
{#{% endfor %}#}
{%- endif %} {#{% elseif node.tags['xxx'] is not defined and ... #}
<wrap button>[[start|🔙 Back]]</wrap>
{% endblock %}

View File

@@ -0,0 +1,5 @@
{% use 'elements/constant.txt.twig' %}
{% use 'elements/property.txt.twig' %}
{% use 'elements/method.txt.twig' %}
{% block content %}{% endblock %}

View File

@@ -0,0 +1,51 @@
{% extends 'layout.txt.twig' %}
{% block content %}
{% set namespace = project.namespace %}
{{ block('sidebarNamespaces') }}
{#{{ node.parent|raw }}#}
{#====== {{ node.parent.fullyQualifiedStructuralElementName }}{{ node.name }} ======#}
{% if node.children|length > 0 %}
=====Namespaces=====
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.children} %}
----
{% endif %}
{% if node.traits|length > 0 %}
===== Traits =====
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.traits} %}
----
{%- endif %}
{% if node.interfaces|length > 0 %}
===== Interfaces =====
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.interfaces} %}
----
{% endif %}
{% if node.classes|length > 0 %}
===== Classes =====
{% include 'includes/namespace-structure-toc.html.twig' with {structures: node.classes} %}
----
{% endif %}
{#{% if node.constants|length > 0 %}#}
{#===== Constants =====#}
{#{% for constant in node.constants|sort_asc %}#}
{# {{ block('constant') }}#}
{#{% endfor %}#}
{#{% endif %}#}
{#{% if node.functions|length > 0 %}#}
{#===== Functions =====#}
{#{% for method in node.functions|sort_asc %}#}
{# {{ block('method') }}#}
{#{% endfor %}#}
{#{% endif %}#}
{% endblock %}

View File

@@ -0,0 +1,49 @@
====== Deprecated elements ======
{#{% for element in project.indexes.elements if element.deprecated %}#}
{#{% if element.file.path != previousPath %}#}
{#<li><a href="#{{ element.file.path }}"><i class="icon-file"></i> {{ element.file.path }}</a></li>#}
{#{% endif %}#}
{#{% set previousPath = element.file.path %}#}
{#{% endfor %}#}
{% for element in project.indexes.elements if element.deprecated %}
{% if element.file.path != previousPath %}
{% if previousPath %}
</WRAP>{# group #}
{% endif %}
{#<a name="{{ element.file.path }}" id="{{ element.file.path }}"></a>#}
===== {{ element.file.path }} ({{ element.tags.deprecated.count }} found)=====
<WRAP group >
<WRAP third column >
Element
</WRAP>{# third column#}
<WRAP third column >
Line
</WRAP>{# third column#}
<WRAP third column >
Description
</WRAP>{# third column#}
{% endif %}
{% for tag in element.tags.deprecated %}
<WRAP group >
<WRAP third column >
{{ element.fullyQualifiedStructuralElementName }}
</WRAP>{# third column#}
<WRAP third column >
{{ element.line }}
</WRAP>{# third column#}
<WRAP third column >
{{ tag.description }}
</WRAP>{# third column#}
{% endfor %}
</WRAP>{# group #}
{% set previousPath = element.file.path %}
{% else %}
<WRAP info>No deprecated elements have been found in this project.</WRAP>
{% endfor %}

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<template>
<author>Bruno DA SILVA</author>
<email>contact [at] combodo.com</email>
<version>1.0.0</version>
<copyright>Combodo 2018</copyright>
<description><![CDATA[
Forked from the clean theme of https://github.com/phpDocumentor/phpDocumentor2 provided under the MIT licence.
The original work is copyright "Mike van Riel".
------------------------------------------------------------------------------------------------------------------
To improve performance you can add the following to your .htaccess:
<ifModule mod_deflate.c>
<filesMatch "\.(js|css|html)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
]]></description>
<transformations>
<transformation writer="twig" query="namespace" source="templates/combodo-wiki/namespace.txt.twig" artifact="start.txt"/>
<transformation writer="twig" query="indexes.classes" source="templates/combodo-wiki/class.txt.twig" artifact="{{name}}.txt"/>
<transformation writer="twig" query="indexes.interfaces" source="templates/combodo-wiki/interface.txt.twig" artifact="{{name}}.txt" />
</transformations>
</template>

571
.editorconfig Normal file
View File

@@ -0,0 +1,571 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 300
tab_width = 4
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = false
ij_smart_tabs = false
ij_visual_guides = 300
ij_wrap_on_typing = true
[*.css]
indent_style = tab
ij_smart_tabs = true
ij_visual_guides = none
ij_css_align_closing_brace_with_properties = false
ij_css_blank_lines_around_nested_selector = 1
ij_css_blank_lines_between_blocks = 1
ij_css_brace_placement = end_of_line
ij_css_enforce_quotes_on_format = false
ij_css_hex_color_long_format = false
ij_css_hex_color_lower_case = false
ij_css_hex_color_short_format = false
ij_css_hex_color_upper_case = false
ij_css_keep_blank_lines_in_code = 2
ij_css_keep_indents_on_empty_lines = false
ij_css_keep_single_line_blocks = false
ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
ij_css_space_after_colon = true
ij_css_space_before_opening_brace = true
ij_css_use_double_quotes = true
ij_css_value_alignment = do_not_align
[*.scss]
indent_size = 2
tab_width = 2
ij_visual_guides = none
ij_scss_align_closing_brace_with_properties = false
ij_scss_blank_lines_around_nested_selector = 1
ij_scss_blank_lines_between_blocks = 1
ij_scss_brace_placement = 0
ij_scss_enforce_quotes_on_format = false
ij_scss_hex_color_long_format = false
ij_scss_hex_color_lower_case = false
ij_scss_hex_color_short_format = false
ij_scss_hex_color_upper_case = false
ij_scss_keep_blank_lines_in_code = 2
ij_scss_keep_indents_on_empty_lines = false
ij_scss_keep_single_line_blocks = false
ij_scss_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow
ij_scss_space_after_colon = true
ij_scss_space_before_opening_brace = true
ij_scss_use_double_quotes = true
ij_scss_value_alignment = 0
[*.twig]
ij_smart_tabs = true
ij_visual_guides = none
ij_wrap_on_typing = false
ij_twig_keep_indents_on_empty_lines = false
ij_twig_spaces_inside_comments_delimiters = true
ij_twig_spaces_inside_delimiters = true
ij_twig_spaces_inside_variable_delimiters = true
[.editorconfig]
ij_visual_guides = none
ij_editorconfig_align_group_field_declarations = false
ij_editorconfig_space_after_colon = false
ij_editorconfig_space_after_comma = true
ij_editorconfig_space_before_colon = false
ij_editorconfig_space_before_comma = false
ij_editorconfig_spaces_around_assignment_operators = true
[{*.ant, *.fxml, *.jhm, *.jnlp, *.jrxml, *.rng, *.tld, *.wsdl, *.xml, *.xsd, *.xsl, *.xslt, *.xul, phpunit.xml.dist}]
indent_size = 2
tab_width = 2
ij_smart_tabs = true
ij_visual_guides = none
ij_wrap_on_typing = false
ij_xml_align_attributes = true
ij_xml_align_text = false
ij_xml_attribute_wrap = normal
ij_xml_block_comment_at_first_column = true
ij_xml_keep_blank_lines = 2
ij_xml_keep_indents_on_empty_lines = false
ij_xml_keep_line_breaks = true
ij_xml_keep_line_breaks_in_text = true
ij_xml_keep_whitespaces = false
ij_xml_keep_whitespaces_around_cdata = preserve
ij_xml_keep_whitespaces_inside_cdata = true
ij_xml_line_comment_at_first_column = true
ij_xml_space_after_tag_name = false
ij_xml_space_around_equals_in_attribute = false
ij_xml_space_inside_empty_tag = false
ij_xml_text_wrap = off
[{*.bash,*.sh,*.zsh}]
indent_size = 2
tab_width = 2
ij_visual_guides = none
ij_shell_binary_ops_start_line = false
ij_shell_keep_column_alignment_padding = false
ij_shell_minify_program = false
ij_shell_redirect_followed_by_space = false
ij_shell_switch_cases_indented = false
ij_shell_use_unix_line_separator = true
[{*.cjs,*.js}]
indent_style = tab
ij_continuation_indent_size = 4
ij_smart_tabs = true
ij_visual_guides = none
ij_javascript_align_imports = false
ij_javascript_align_multiline_array_initializer_expression = false
ij_javascript_align_multiline_binary_operation = false
ij_javascript_align_multiline_chained_methods = false
ij_javascript_align_multiline_extends_list = false
ij_javascript_align_multiline_for = true
ij_javascript_align_multiline_parameters = true
ij_javascript_align_multiline_parameters_in_calls = false
ij_javascript_align_multiline_ternary_operation = false
ij_javascript_align_object_properties = 0
ij_javascript_align_union_types = false
ij_javascript_align_var_statements = 0
ij_javascript_array_initializer_new_line_after_left_brace = false
ij_javascript_array_initializer_right_brace_on_new_line = false
ij_javascript_array_initializer_wrap = off
ij_javascript_assignment_wrap = off
ij_javascript_binary_operation_sign_on_next_line = false
ij_javascript_binary_operation_wrap = off
ij_javascript_blacklist_imports = rxjs/Rx,node_modules/**,**/node_modules/**,@angular/material,@angular/material/typings/**
ij_javascript_blank_lines_after_imports = 1
ij_javascript_blank_lines_around_class = 1
ij_javascript_blank_lines_around_field = 0
ij_javascript_blank_lines_around_function = 1
ij_javascript_blank_lines_around_method = 1
ij_javascript_block_brace_style = end_of_line
ij_javascript_call_parameters_new_line_after_left_paren = false
ij_javascript_call_parameters_right_paren_on_new_line = false
ij_javascript_call_parameters_wrap = off
ij_javascript_catch_on_new_line = false
ij_javascript_chained_call_dot_on_new_line = true
ij_javascript_class_brace_style = end_of_line
ij_javascript_comma_on_new_line = false
ij_javascript_do_while_brace_force = always
ij_javascript_else_on_new_line = false
ij_javascript_enforce_trailing_comma = keep
ij_javascript_extends_keyword_wrap = off
ij_javascript_extends_list_wrap = off
ij_javascript_field_prefix = _
ij_javascript_file_name_style = relaxed
ij_javascript_finally_on_new_line = false
ij_javascript_for_brace_force = always
ij_javascript_for_statement_new_line_after_left_paren = false
ij_javascript_for_statement_right_paren_on_new_line = false
ij_javascript_for_statement_wrap = off
ij_javascript_force_quote_style = false
ij_javascript_force_semicolon_style = false
ij_javascript_function_expression_brace_style = end_of_line
ij_javascript_if_brace_force = always
ij_javascript_import_merge_members = global
ij_javascript_import_prefer_absolute_path = global
ij_javascript_import_sort_members = true
ij_javascript_import_sort_module_name = false
ij_javascript_import_use_node_resolution = true
ij_javascript_imports_wrap = on_every_item
ij_javascript_indent_case_from_switch = true
ij_javascript_indent_chained_calls = true
ij_javascript_indent_package_children = 0
ij_javascript_jsx_attribute_value = braces
ij_javascript_keep_blank_lines_in_code = 2
ij_javascript_keep_first_column_comment = true
ij_javascript_keep_indents_on_empty_lines = false
ij_javascript_keep_line_breaks = true
ij_javascript_keep_simple_blocks_in_one_line = false
ij_javascript_keep_simple_methods_in_one_line = false
ij_javascript_line_comment_add_space = true
ij_javascript_line_comment_at_first_column = false
ij_javascript_method_brace_style = end_of_line
ij_javascript_method_call_chain_wrap = off
ij_javascript_method_parameters_new_line_after_left_paren = false
ij_javascript_method_parameters_right_paren_on_new_line = false
ij_javascript_method_parameters_wrap = off
ij_javascript_object_literal_wrap = on_every_item
ij_javascript_parentheses_expression_new_line_after_left_paren = false
ij_javascript_parentheses_expression_right_paren_on_new_line = false
ij_javascript_place_assignment_sign_on_next_line = false
ij_javascript_prefer_as_type_cast = false
ij_javascript_prefer_explicit_types_function_expression_returns = false
ij_javascript_prefer_explicit_types_function_returns = false
ij_javascript_prefer_explicit_types_vars_fields = false
ij_javascript_prefer_parameters_wrap = false
ij_javascript_reformat_c_style_comments = false
ij_javascript_space_after_colon = true
ij_javascript_space_after_comma = true
ij_javascript_space_after_dots_in_rest_parameter = false
ij_javascript_space_after_generator_mult = true
ij_javascript_space_after_property_colon = true
ij_javascript_space_after_quest = true
ij_javascript_space_after_type_colon = true
ij_javascript_space_after_unary_not = false
ij_javascript_space_before_async_arrow_lparen = true
ij_javascript_space_before_catch_keyword = true
ij_javascript_space_before_catch_left_brace = true
ij_javascript_space_before_catch_parentheses = true
ij_javascript_space_before_class_lbrace = true
ij_javascript_space_before_class_left_brace = true
ij_javascript_space_before_colon = true
ij_javascript_space_before_comma = false
ij_javascript_space_before_do_left_brace = true
ij_javascript_space_before_else_keyword = true
ij_javascript_space_before_else_left_brace = true
ij_javascript_space_before_finally_keyword = true
ij_javascript_space_before_finally_left_brace = true
ij_javascript_space_before_for_left_brace = true
ij_javascript_space_before_for_parentheses = true
ij_javascript_space_before_for_semicolon = false
ij_javascript_space_before_function_left_parenth = true
ij_javascript_space_before_generator_mult = false
ij_javascript_space_before_if_left_brace = true
ij_javascript_space_before_if_parentheses = true
ij_javascript_space_before_method_call_parentheses = false
ij_javascript_space_before_method_left_brace = true
ij_javascript_space_before_method_parentheses = false
ij_javascript_space_before_property_colon = false
ij_javascript_space_before_quest = true
ij_javascript_space_before_switch_left_brace = true
ij_javascript_space_before_switch_parentheses = true
ij_javascript_space_before_try_left_brace = true
ij_javascript_space_before_type_colon = false
ij_javascript_space_before_unary_not = false
ij_javascript_space_before_while_keyword = true
ij_javascript_space_before_while_left_brace = true
ij_javascript_space_before_while_parentheses = true
ij_javascript_spaces_around_additive_operators = false
ij_javascript_spaces_around_arrow_function_operator = true
ij_javascript_spaces_around_assignment_operators = true
ij_javascript_spaces_around_bitwise_operators = true
ij_javascript_spaces_around_equality_operators = true
ij_javascript_spaces_around_logical_operators = true
ij_javascript_spaces_around_multiplicative_operators = true
ij_javascript_spaces_around_relational_operators = true
ij_javascript_spaces_around_shift_operators = true
ij_javascript_spaces_around_unary_operator = false
ij_javascript_spaces_within_array_initializer_brackets = false
ij_javascript_spaces_within_brackets = false
ij_javascript_spaces_within_catch_parentheses = false
ij_javascript_spaces_within_for_parentheses = false
ij_javascript_spaces_within_if_parentheses = false
ij_javascript_spaces_within_imports = false
ij_javascript_spaces_within_interpolation_expressions = false
ij_javascript_spaces_within_method_call_parentheses = false
ij_javascript_spaces_within_method_parentheses = false
ij_javascript_spaces_within_object_literal_braces = false
ij_javascript_spaces_within_object_type_braces = true
ij_javascript_spaces_within_parentheses = false
ij_javascript_spaces_within_switch_parentheses = false
ij_javascript_spaces_within_type_assertion = false
ij_javascript_spaces_within_union_types = true
ij_javascript_spaces_within_while_parentheses = false
ij_javascript_special_else_if_treatment = true
ij_javascript_ternary_operation_signs_on_next_line = false
ij_javascript_ternary_operation_wrap = off
ij_javascript_union_types_wrap = on_every_item
ij_javascript_use_chained_calls_group_indents = true
ij_javascript_use_double_quotes = true
ij_javascript_use_explicit_js_extension = global
ij_javascript_use_path_mapping = always
ij_javascript_use_public_modifier = false
ij_javascript_use_semicolon_after_statement = true
ij_javascript_var_declaration_wrap = normal
ij_javascript_while_brace_force = always
ij_javascript_while_on_new_line = false
ij_javascript_wrap_comments = false
[{*.ctp, *.hphp, *.inc, *.module, *.php, *.php4, *.php5, *.phtml}]
indent_style = tab
ij_continuation_indent_size = 4
ij_smart_tabs = true
ij_wrap_on_typing = false
ij_php_align_assignments = true
ij_php_align_class_constants = false
ij_php_align_group_field_declarations = false
ij_php_align_inline_comments = false
ij_php_align_key_value_pairs = true
ij_php_align_multiline_array_initializer_expression = true
ij_php_align_multiline_binary_operation = false
ij_php_align_multiline_chained_methods = false
ij_php_align_multiline_extends_list = false
ij_php_align_multiline_for = true
ij_php_align_multiline_parameters = false
ij_php_align_multiline_parameters_in_calls = false
ij_php_align_multiline_ternary_operation = false
ij_php_align_phpdoc_comments = false
ij_php_align_phpdoc_param_names = false
ij_php_anonymous_brace_style = end_of_line
ij_php_api_weight = 1
ij_php_array_initializer_new_line_after_left_brace = true
ij_php_array_initializer_right_brace_on_new_line = true
ij_php_array_initializer_wrap = on_every_item
ij_php_assignment_wrap = off
ij_php_attributes_wrap = off
ij_php_author_weight = 8
ij_php_binary_operation_sign_on_next_line = false
ij_php_binary_operation_wrap = off
ij_php_blank_lines_after_class_header = 0
ij_php_blank_lines_after_function = 1
ij_php_blank_lines_after_imports = 1
ij_php_blank_lines_after_opening_tag = 0
ij_php_blank_lines_after_package = 1
ij_php_blank_lines_around_class = 1
ij_php_blank_lines_around_constants = 0
ij_php_blank_lines_around_field = 0
ij_php_blank_lines_around_method = 1
ij_php_blank_lines_before_class_end = 0
ij_php_blank_lines_before_imports = 1
ij_php_blank_lines_before_method_body = 0
ij_php_blank_lines_before_package = 1
ij_php_blank_lines_before_return_statement = 1
ij_php_blank_lines_between_imports = 0
ij_php_block_brace_style = end_of_line
ij_php_call_parameters_new_line_after_left_paren = false
ij_php_call_parameters_right_paren_on_new_line = false
ij_php_call_parameters_wrap = normal
ij_php_catch_on_new_line = true
ij_php_category_weight = 28
ij_php_class_brace_style = next_line
ij_php_comma_after_last_array_element = true
ij_php_concat_spaces = false
ij_php_copyright_weight = 28
ij_php_deprecated_weight = 2
ij_php_do_while_brace_force = always
ij_php_else_if_style = as_is
ij_php_else_on_new_line = false
ij_php_example_weight = 4
ij_php_extends_keyword_wrap = off
ij_php_extends_list_wrap = off
ij_php_fields_default_visibility = private
ij_php_filesource_weight = 28
ij_php_finally_on_new_line = true
ij_php_for_brace_force = always
ij_php_for_statement_new_line_after_left_paren = false
ij_php_for_statement_right_paren_on_new_line = false
ij_php_for_statement_wrap = off
ij_php_force_short_declaration_array_style = false
ij_php_getters_setters_naming_style = camel_case
ij_php_getters_setters_order_style = getters_first
ij_php_global_weight = 28
ij_php_group_use_wrap = on_every_item
ij_php_if_brace_force = always
ij_php_if_lparen_on_next_line = false
ij_php_if_rparen_on_next_line = false
ij_php_ignore_weight = 28
ij_php_import_sorting = alphabetic
ij_php_indent_break_from_case = true
ij_php_indent_case_from_switch = true
ij_php_indent_code_in_php_tags = false
ij_php_internal_weight = 0
ij_php_keep_blank_lines_after_lbrace = 2
ij_php_keep_blank_lines_before_right_brace = 2
ij_php_keep_blank_lines_in_code = 2
ij_php_keep_blank_lines_in_declarations = 2
ij_php_keep_control_statement_in_one_line = true
ij_php_keep_first_column_comment = true
ij_php_keep_indents_on_empty_lines = false
ij_php_keep_line_breaks = true
ij_php_keep_rparen_and_lbrace_on_one_line = false
ij_php_keep_simple_classes_in_one_line = false
ij_php_keep_simple_methods_in_one_line = false
ij_php_lambda_brace_style = end_of_line
ij_php_license_weight = 28
ij_php_line_comment_add_space = false
ij_php_line_comment_at_first_column = true
ij_php_link_weight = 28
ij_php_lower_case_boolean_const = true
ij_php_lower_case_keywords = true
ij_php_lower_case_null_const = true
ij_php_method_brace_style = next_line
ij_php_method_call_chain_wrap = off
ij_php_method_parameters_new_line_after_left_paren = true
ij_php_method_parameters_right_paren_on_new_line = true
ij_php_method_parameters_wrap = normal
ij_php_method_weight = 28
ij_php_modifier_list_wrap = false
ij_php_multiline_chained_calls_semicolon_on_new_line = false
ij_php_namespace_brace_style = 1
ij_php_new_line_after_php_opening_tag = false
ij_php_null_type_position = in_the_end
ij_php_package_weight = 28
ij_php_param_weight = 5
ij_php_parameters_attributes_wrap = off
ij_php_parentheses_expression_new_line_after_left_paren = false
ij_php_parentheses_expression_right_paren_on_new_line = false
ij_php_phpdoc_blank_line_before_tags = true
ij_php_phpdoc_blank_lines_around_parameters = true
ij_php_phpdoc_keep_blank_lines = true
ij_php_phpdoc_param_spaces_between_name_and_description = 1
ij_php_phpdoc_param_spaces_between_tag_and_type = 1
ij_php_phpdoc_param_spaces_between_type_and_name = 1
ij_php_phpdoc_use_fqcn = true
ij_php_phpdoc_wrap_long_lines = true
ij_php_place_assignment_sign_on_next_line = false
ij_php_place_parens_for_constructor = 0
ij_php_property_read_weight = 28
ij_php_property_weight = 28
ij_php_property_write_weight = 28
ij_php_return_type_on_new_line = false
ij_php_return_weight = 6
ij_php_see_weight = 3
ij_php_since_weight = 28
ij_php_sort_phpdoc_elements = true
ij_php_space_after_colon = true
ij_php_space_after_colon_in_named_argument = true
ij_php_space_after_colon_in_return_type = true
ij_php_space_after_comma = true
ij_php_space_after_for_semicolon = true
ij_php_space_after_quest = true
ij_php_space_after_type_cast = false
ij_php_space_after_unary_not = false
ij_php_space_before_array_initializer_left_brace = false
ij_php_space_before_catch_keyword = true
ij_php_space_before_catch_left_brace = true
ij_php_space_before_catch_parentheses = true
ij_php_space_before_class_left_brace = true
ij_php_space_before_closure_left_parenthesis = true
ij_php_space_before_colon = true
ij_php_space_before_colon_in_named_argument = false
ij_php_space_before_colon_in_return_type = false
ij_php_space_before_comma = false
ij_php_space_before_do_left_brace = true
ij_php_space_before_else_keyword = true
ij_php_space_before_else_left_brace = true
ij_php_space_before_finally_keyword = true
ij_php_space_before_finally_left_brace = true
ij_php_space_before_for_left_brace = true
ij_php_space_before_for_parentheses = true
ij_php_space_before_for_semicolon = false
ij_php_space_before_if_left_brace = true
ij_php_space_before_if_parentheses = true
ij_php_space_before_method_call_parentheses = false
ij_php_space_before_method_left_brace = true
ij_php_space_before_method_parentheses = false
ij_php_space_before_quest = true
ij_php_space_before_short_closure_left_parenthesis = false
ij_php_space_before_switch_left_brace = true
ij_php_space_before_switch_parentheses = true
ij_php_space_before_try_left_brace = true
ij_php_space_before_unary_not = false
ij_php_space_before_while_keyword = true
ij_php_space_before_while_left_brace = true
ij_php_space_before_while_parentheses = true
ij_php_space_between_ternary_quest_and_colon = false
ij_php_spaces_around_additive_operators = true
ij_php_spaces_around_arrow = false
ij_php_spaces_around_assignment_in_declare = false
ij_php_spaces_around_assignment_operators = true
ij_php_spaces_around_bitwise_operators = true
ij_php_spaces_around_equality_operators = true
ij_php_spaces_around_logical_operators = true
ij_php_spaces_around_multiplicative_operators = true
ij_php_spaces_around_null_coalesce_operator = true
ij_php_spaces_around_relational_operators = true
ij_php_spaces_around_shift_operators = true
ij_php_spaces_around_unary_operator = false
ij_php_spaces_around_var_within_brackets = false
ij_php_spaces_within_array_initializer_braces = false
ij_php_spaces_within_brackets = false
ij_php_spaces_within_catch_parentheses = false
ij_php_spaces_within_for_parentheses = false
ij_php_spaces_within_if_parentheses = false
ij_php_spaces_within_method_call_parentheses = false
ij_php_spaces_within_method_parentheses = false
ij_php_spaces_within_parentheses = false
ij_php_spaces_within_short_echo_tags = true
ij_php_spaces_within_switch_parentheses = false
ij_php_spaces_within_while_parentheses = false
ij_php_special_else_if_treatment = true
ij_php_subpackage_weight = 28
ij_php_ternary_operation_signs_on_next_line = false
ij_php_ternary_operation_wrap = off
ij_php_throws_weight = 7
ij_php_todo_weight = 28
ij_php_unknown_tag_weight = 28
ij_php_upper_case_boolean_const = false
ij_php_upper_case_null_const = false
ij_php_uses_weight = 28
ij_php_var_weight = 28
ij_php_variable_naming_style = mixed
ij_php_version_weight = 28
ij_php_while_brace_force = always
ij_php_while_on_new_line = false
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
indent_size = 2
ij_visual_guides = none
ij_json_keep_blank_lines_in_code = 0
ij_json_keep_indents_on_empty_lines = false
ij_json_keep_line_breaks = true
ij_json_space_after_colon = true
ij_json_space_after_comma = true
ij_json_space_before_colon = true
ij_json_space_before_comma = false
ij_json_spaces_within_braces = false
ij_json_spaces_within_brackets = false
ij_json_wrap_long_lines = false
[{*.htm,*.html,*.sht,*.shtm,*.shtml}]
indent_style = tab
ij_smart_tabs = true
ij_visual_guides = none
ij_html_add_new_line_before_tags = body,div,p,form,h1,h2,h3
ij_html_align_attributes = true
ij_html_align_text = false
ij_html_attribute_wrap = normal
ij_html_block_comment_at_first_column = true
ij_html_do_not_align_children_of_min_lines = 0
ij_html_do_not_break_if_inline_tags = title,h1,h2,h3,h4,h5,h6,p
ij_html_do_not_indent_children_of_tags = html,body,thead,tbody,tfoot,style,script,head
ij_html_enforce_quotes = false
ij_html_inline_tags = a,abbr,acronym,b,basefont,bdo,big,br,cite,cite,code,dfn,em,font,i,img,input,kbd,label,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var
ij_html_keep_blank_lines = 2
ij_html_keep_indents_on_empty_lines = false
ij_html_keep_line_breaks = true
ij_html_keep_line_breaks_in_text = true
ij_html_keep_whitespaces = false
ij_html_keep_whitespaces_inside = span,pre,textarea
ij_html_line_comment_at_first_column = true
ij_html_new_line_after_last_attribute = never
ij_html_new_line_before_first_attribute = never
ij_html_quote_style = none
ij_html_remove_new_line_before_tags = br
ij_html_space_after_tag_name = false
ij_html_space_around_equality_in_attribute = false
ij_html_space_inside_empty_tag = false
ij_html_text_wrap = normal
ij_html_uniform_ident = false
[{*.markdown,*.md}]
ij_visual_guides = none
ij_markdown_force_one_space_after_blockquote_symbol = true
ij_markdown_force_one_space_after_header_symbol = true
ij_markdown_force_one_space_after_list_bullet = true
ij_markdown_force_one_space_between_words = true
ij_markdown_keep_indents_on_empty_lines = false
ij_markdown_max_lines_around_block_elements = 1
ij_markdown_max_lines_around_header = 1
ij_markdown_max_lines_between_paragraphs = 1
ij_markdown_min_lines_around_block_elements = 1
ij_markdown_min_lines_around_header = 1
ij_markdown_min_lines_between_paragraphs = 1
[{*.yaml,*.yml}]
indent_size = 2
ij_visual_guides = none
ij_yaml_align_values_properties = do_not_align
ij_yaml_autoinsert_sequence_marker = true
ij_yaml_block_mapping_on_new_line = false
ij_yaml_indent_sequence_value = true
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_sequence_on_new_line = false
ij_yaml_space_before_colon = false
ij_yaml_spaces_within_braces = true
ij_yaml_spaces_within_brackets = true

52
.gitignore vendored
View File

@@ -1,38 +1,52 @@
/toolkit/
/conf/*
/env-*/*
# no slash at the end to handle also symlinks
/toolkit
/env-*
# maintenance mode (N°2240)
/.maintenance
# listing prevention in conf directory
/conf/**
!/conf/.htaccess
!/conf/index.php
!/conf/web.config
# composer reserver directory, from sources, populate/update using "composer install"
vendor/*
test/vendor/*
# all conf but listing prevention
/conf/**
!/conf/.htaccess
!/conf/web.config
# all datas but listing prevention
data/*
!data/.htaccess
!data/index.php
!data/web.config
/data/**
!/data/.htaccess
!/data/index.php
!/data/web.config
# iTop extensions
extensions/*
!extensions/readme.txt
/extensions/**
!/extensions/readme.txt
# all logs but listing prevention
log/*
!log/.htaccess
!log/index.php
!log/web.config
/log/**
!/log/.htaccess
!/log/index.php
!/log/web.config
# Jetbrains
.idea/**
!.idea/encodings.xml
!.idea/codeStyles
!.idea/codeStyles/*
!.idea/inspectionProfiles
!.idea/inspectionProfiles/*
/.idea/**
# doc. generation
/.doc/vendor
#phpdocumentor temp file
ast.dump
# CMake
cmake-build-*/

View File

@@ -1,45 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<PHPCodeStyleSettings>
<option name="CONCAT_SPACES" value="false" />
<option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
<option name="PHPDOC_BLANK_LINES_AROUND_PARAMETERS" value="true" />
<option name="PHPDOC_WRAP_LONG_LINES" value="true" />
<option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
<option name="LOWER_CASE_NULL_CONST" value="true" />
<option name="BLANK_LINES_BEFORE_RETURN_STATEMENT" value="1" />
<option name="KEEP_RPAREN_AND_LBRACE_ON_ONE_LINE" value="true" />
<option name="PHPDOC_USE_FQCN" value="true" />
</PHPCodeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="BRACE_STYLE" value="2" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="PHP">
<option name="BLANK_LINES_AFTER_PACKAGE" value="1" />
<option name="BRACE_STYLE" value="2" />
<option name="ELSE_ON_NEW_LINE" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" />
<option name="CALL_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_WRAP" value="1" />
<option name="METHOD_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
<option name="METHOD_PARAMETERS_RPAREN_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />
<option name="FOR_BRACE_FORCE" value="3" />
<indentOptions>
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="true" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>

View File

@@ -1,5 +0,0 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Combodo" />
</state>
</component>

6
.idea/encodings.xml generated
View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="PROJECT" charset="UTF-8" />
</component>
</project>

View File

@@ -1,154 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="BladeControlDirectives" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CheckEmptyScriptTag" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CheckImageSize" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CheckNodeTest" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CheckTagEmptyBody" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CheckValidXmlInScriptTagBody" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptArgumentsOutsideFunction" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptFunctionSignatures" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptInfiniteLoop" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptLiteralNotFunction" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptSillyAssignment" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptSwitchStatementWithNoDefaultBranch" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CoffeeScriptUnusedLocalSymbols" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ComposeFileStructure" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssFloatPxLength" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="CssInvalidAtRule" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssInvalidCharsetRule" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssInvalidElement" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssInvalidFunction" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssInvalidHtmlTagReference" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssInvalidImport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssInvalidMediaFeature" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssInvalidPropertyValue" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssInvalidPseudoSelector" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssMissingComma" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssNegativeValue" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssNoGenericFontName" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssOptimizeSimilarProperties" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="CssOverwrittenProperties" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssRedundantUnit" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssUnitlessNumber" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CssUnknownProperty" enabled="false" level="WARNING" enabled_by_default="false">
<option name="myCustomPropertiesEnabled" value="false" />
<option name="myIgnoreVendorSpecificProperties" value="false" />
<option name="myCustomPropertiesList">
<value>
<list size="0" />
</value>
</option>
</inspection_tool>
<inspection_tool class="CssUnknownTarget" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssUnresolvedClass" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssUnresolvedCustomProperty" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssUnresolvedCustomPropertySet" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CssUnusedSymbol" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CucumberExamplesColon" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CucumberMissedExamples" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="CucumberTableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="CucumberUndefinedStep" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="DockerFileArgumentCount" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="DuplicateKeyInSection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="DuplicateSectionInFile" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="EmptyEventHandler" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="FileHeaderInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="GherkinBrokenTableInspection" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="GherkinMisplacedBackground" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="HamlNestedTagContent" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HardwiredNamespacePrefix" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlDeprecatedTag" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlExtraClosingTag" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlFormInputWithoutLabel" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlMissingClosingTag" enabled="false" level="INFORMATION" enabled_by_default="false" />
<inspection_tool class="HtmlPresentationalElement" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlUnknownAnchorTarget" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlUnknownAttribute" enabled="false" level="WARNING" enabled_by_default="false">
<option name="myValues">
<value>
<list size="0" />
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
<inspection_tool class="HtmlUnknownBooleanAttribute" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="HtmlUnknownTag" enabled="false" level="WARNING" enabled_by_default="false">
<option name="myValues">
<value>
<list size="6">
<item index="0" class="java.lang.String" itemvalue="nobr" />
<item index="1" class="java.lang.String" itemvalue="noembed" />
<item index="2" class="java.lang.String" itemvalue="comment" />
<item index="3" class="java.lang.String" itemvalue="noscript" />
<item index="4" class="java.lang.String" itemvalue="embed" />
<item index="5" class="java.lang.String" itemvalue="script" />
</list>
</value>
</option>
<option name="myCustomValuesEnabled" value="true" />
</inspection_tool>
<inspection_tool class="HtmlUnknownTarget" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="ImplicitTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
<option name="BITS" value="1720" />
<option name="FLAG_EXPLICIT_CONVERSION" value="true" />
<option name="IGNORE_NODESET_TO_BOOLEAN_VIA_STRING" value="true" />
</inspection_tool>
<inspection_tool class="IndexZeroUsage" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="JSLastCommaInArrayLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="JSLastCommaInObjectLiteral" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="JSUnresolvedFunction" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="JSUnresolvedVariable" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="LossyEncoding" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="MissingSinceTagDocInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="MysqlParsingInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="NonAsciiCharacters" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpDocMissingReturnTagInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PhpDocMissingThrowsInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PhpIncludeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpRedundantClosingTagInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedClassConstantInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedClassInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedConstantInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedFieldInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedFunctionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedGotoLabelInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedMethodInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUndefinedNamespaceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="PhpUnusedParameterInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="RedundantTypeConversion" enabled="false" level="WARNING" enabled_by_default="false">
<option name="CHECK_ANY" value="false" />
</inspection_tool>
<inspection_tool class="RequiredAttributes" enabled="false" level="WARNING" enabled_by_default="false">
<option name="myAdditionalRequiredHtmlAttributes" value="" />
</inspection_tool>
<inspection_tool class="SqlAddNotNullColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlAmbiguousColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlAutoIncrementDuplicateInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlCheckUsingColumnsInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlConstantConditionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlDeprecateTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlDerivedTableAliasInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlDialectInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlDropIndexedColumnInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlIdentifierInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlInsertValuesInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlNullComparisonInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlPostgresqlSelectFromProcedureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlResolveInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlShouldBeInGroupByInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlSignatureInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlStorageInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlTypeInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="SqlUnusedVariableInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="TaskProblemsInspection" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="TypeScriptPreferShortImport" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XmlDefaultAttributeValue" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XmlUnboundNsPrefix" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XmlUnusedNamespaceDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XsltUnusedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="XsltVariableShadowing" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

View File

@@ -1,14 +0,0 @@
#!/usr/bin/env bash
set -x
# create target dirs
mkdir -p var
mkdir -p toolkit
# cleanup target dirs
rm -rf toolkit/*
# fill target dirs
curl http://www.combodo.com/documentation/iTopDataModelToolkit-2.3.zip | tar xvz --directory toolkit
cp -r .jenkins/configuration/default-environment/unattended_install/* toolkit

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env bash
set -x
# on the root dir
composer install
# under the test dir
cd test
composer install

View File

@@ -1,13 +0,0 @@
#!/usr/bin/env bash
set -x
whoami
pwd
ls
echo "$BRANCH_NAME:${BRANCH_NAME}"
echo "printenv :"
printenv

View File

@@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -x
cd test
export DEBUG_UNIT_TEST="0"
php vendor/bin/phpunit --log-junit ../var/test/phpunit-log.junit.xml --teamcity

View File

@@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -x
cd toolkit
php unattended_install.php default-params.xml

View File

@@ -1,285 +0,0 @@
<?php
/**
*
* Configuration file, generated by the iTop configuration wizard
*
* The file is used in MetaModel::LoadConfig() which does all the necessary initialization job
*
*/
$MySettings = array(
// access_message: Message displayed to the users when there is any access restriction
// default: 'iTop is temporarily frozen, please wait... (the admin team)'
'access_message' => 'iTop is temporarily frozen, please wait... (the admin team)',
// access_mode: Access mode: ACCESS_READONLY = 0, ACCESS_ADMIN_WRITE = 2, ACCESS_FULL = 3
// default: 3
'access_mode' => 3,
'allowed_login_types' => 'form|basic|external',
// apc_cache.enabled: If set, the APC cache is allowed (the PHP extension must also be active)
// default: true
'apc_cache.enabled' => true,
// apc_cache.query_ttl: Time to live set in APC for the prepared queries (seconds - 0 means no timeout)
// default: 3600
'apc_cache.query_ttl' => 3600,
// app_root_url: Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server's name)
// default: ''
'app_root_url' => 'http://127.0.0.1/itop/svn/trunk/',
// buttons_position: Position of the forms buttons: bottom | top | both
// default: 'both'
'buttons_position' => 'both',
// cas_include_path: The path where to find the phpCAS library
// default: '/usr/share/php'
'cas_include_path' => '/usr/share/php',
// cron_max_execution_time: Duration (seconds) of the page cron.php, must be shorter than php setting max_execution_time and shorter than the web server response timeout
// default: 600
'cron_max_execution_time' => 600,
// csv_file_default_charset: Character set used by default for downloading and uploading data as a CSV file. Warning: it is case sensitive (uppercase is preferable).
// default: 'ISO-8859-1'
'csv_file_default_charset' => 'ISO-8859-1',
'csv_import_charsets' => array (
),
// csv_import_history_display: Display the history tab in the import wizard
// default: false
'csv_import_history_display' => false,
// date_and_time_format: Format for date and time display (per language)
// default: array (
// 'default' =>
// array (
// 'date' => 'Y-m-d',
// 'time' => 'H:i:s',
// 'date_time' => '$date $time',
// ),
// )
'date_and_time_format' => array (
'default' =>
array (
'date' => 'Y-m-d',
'time' => 'H:i:s',
'date_time' => '$date $time',
),
'FR FR' =>
array (
'date' => 'd/m/Y',
'time' => 'H:i:s',
'date_time' => '$date $time',
),
),
'db_host' => '',
'db_name' => 'itop_ci_main',
'db_pwd' => 'c8mb0do',
'db_subname' => '',
'db_user' => 'root',
// deadline_format: The format used for displaying "deadline" attributes: any string with the following placeholders: $date$, $difference$
// default: '$difference$'
'deadline_format' => '$difference$',
'default_language' => 'EN US',
// disable_attachments_download_legacy_portal: Disable attachments download from legacy portal
// default: true
'disable_attachments_download_legacy_portal' => true,
// draft_attachments_lifetime: Lifetime (in seconds) of drafts' attachments and inline images: after this duration, the garbage collector will delete them.
// default: 3600
'draft_attachments_lifetime' => 3600,
// email_asynchronous: If set, the emails are sent off line, which requires cron.php to be activated. Exception: some features like the email test utility will force the serialized mode
// default: false
'email_asynchronous' => false,
// email_default_sender_address: Default address provided in the email from header field.
// default: ''
'email_default_sender_address' => '',
// email_default_sender_label: Default label provided in the email from header field.
// default: ''
'email_default_sender_label' => '',
// email_transport: Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocole)
// default: 'PHPMail'
'email_transport' => 'SMTP',
// email_transport_smtp.host: host name or IP address (optional)
// default: 'localhost'
'email_transport_smtp.host' => 'smtp.combodo.com',
// email_transport_smtp.password: Authentication password (optional)
// default: ''
'email_transport_smtp.password' => '++combodo++',
// email_transport_smtp.port: port number (optional)
// default: 25
'email_transport_smtp.port' => 25,
// email_transport_smtp.username: Authentication user (optional)
// default: ''
'email_transport_smtp.username' => 'test2@combodo.com',
// email_validation_pattern: Regular expression to validate/detect the format of an eMail address
// default: '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}'
'email_validation_pattern' => '[a-zA-Z0-9._&\'-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z0-9-]{2,}',
'encryption_key' => '@iT0pEncr1pti0n!',
'ext_auth_variable' => '$_SERVER[\'REMOTE_USER\']',
'fast_reload_interval' => '60',
// graphviz_path: Path to the Graphviz "dot" executable for graphing objects lifecycle
// default: '/usr/bin/dot'
'graphviz_path' => '/usr/bin/dot',
// inline_image_max_display_width: The maximum width (in pixels) when displaying images inside an HTML formatted attribute. Images will be displayed using this this maximum width.
// default: '250'
'inline_image_max_display_width' => 250,
// inline_image_max_storage_width: The maximum width (in pixels) when uploading images to be used inside an HTML formatted attribute. Images larger than the given size will be downsampled before storing them in the database.
// default: '1600'
'inline_image_max_storage_width' => 1600,
// link_set_attribute_qualifier: Link set from string: attribute qualifier (encloses both the attcode and the value)
// default: '\''
'link_set_attribute_qualifier' => '\'',
// link_set_attribute_separator: Link set from string: attribute separator
// default: ';'
'link_set_attribute_separator' => ';',
// link_set_item_separator: Link set from string: line separator
// default: '|'
'link_set_item_separator' => '|',
// link_set_value_separator: Link set from string: value separator (between the attcode and the value itself
// default: ':'
'link_set_value_separator' => ':',
'log_global' => true,
'log_issue' => true,
'log_notification' => true,
'log_web_service' => true,
// max_combo_length: The maximum number of elements in a drop-down list. If more then an autocomplete will be used
// default: 50
'max_combo_length' => 50,
'max_display_limit' => '15',
// max_linkset_output: Maximum number of items shown when getting a list of related items in an email, using the form $this->some_list$. 0 means no limit.
// default: 100
'max_linkset_output' => 100,
'min_display_limit' => '10',
// online_help: Hyperlink to the online-help web page
// default: 'http://www.combodo.com/itop-help'
'online_help' => 'http://www.combodo.com/itop-help',
// php_path: Path to the php executable in CLI mode
// default: 'php'
'php_path' => 'php',
// portal_tickets: CSV list of classes supported in the portal
// default: 'UserRequest'
'portal_tickets' => 'UserRequest',
'query_cache_enabled' => true,
// search_manual_submit: Force manual submit of search requests (class => true)
// default: false
'search_manual_submit' => array (
'Person' => true,
),
'secure_connection_required' => false,
// session_name: The name of the cookie used to store the PHP session id
// default: 'iTop'
'session_name' => 'iTop',
// shortcut_actions: Actions that are available as direct buttons next to the "Actions" menu
// default: 'UI:Menu:Modify,UI:Menu:New'
'shortcut_actions' => 'UI:Menu:Modify,UI:Menu:New',
// source_dir: Source directory for the datamodel files. (which gets compiled to env-production).
// default: ''
'source_dir' => 'datamodels/2.x/',
'standard_reload_interval' => '300',
// synchro_trace: Synchronization details: none, display, save (includes 'display')
// default: 'none'
'synchro_trace' => 'none',
// timezone: Timezone (reference: http://php.net/manual/en/timezones.php). If empty, it will be left unchanged and MUST be explicitely configured in PHP
// default: 'Europe/Paris'
'timezone' => 'Europe/Paris',
// tracking_level_linked_set_default: Default tracking level if not explicitely set at the attribute level, for AttributeLinkedSet (defaults to NONE in case of a fresh install, LIST otherwise - this to preserve backward compatibility while upgrading from a version older than 2.0.3 - see TRAC #936)
// default: 1
'tracking_level_linked_set_default' => 0,
// url_validation_pattern: Regular expression to validate/detect the format of an URL (URL attributes and Wiki formatting for Text attributes)
// default: '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?'
'url_validation_pattern' => '(https?|ftp)\\://([a-zA-Z0-9+!*(),;?&=\\$_.-]+(\\:[a-zA-Z0-9+!*(),;?&=\\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\\:[0-9]{2,5})?(/([a-zA-Z0-9%+\\$_-]\\.?)+)*/?(\\?[a-zA-Z+&\\$_.-][a-zA-Z0-9;:[\\]@&%=+/\\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\\$_.-]*)?',
);
/**
*
* Modules specific settings
*
*/
$MyModuleSettings = array(
'itop-attachments' => array (
'allowed_classes' => array (
0 => 'Ticket',
),
'position' => 'relations',
'preview_max_width' => 290,
),
'itop-backup' => array (
'mysql_bindir' => '',
'week_days' => 'monday, tuesday, wednesday, thursday, friday',
'time' => '23:30',
'retention_count' => 5,
'enabled' => true,
'debug' => false,
),
'molkobain-console-tooltips' => array (
'decoration_class' => 'fas fa-question',
'enabled' => true,
),
);
/**
*
* Data model modules to be loaded. Names are specified as relative paths
*
*/
$MyModules = array(
'addons' => array (
'user rights' => 'addons/userrights/userrightsprofile.class.inc.php',
),
);
?>

View File

@@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<installation>
<mode>upgrade</mode>
<preinstall>
<copies type="array"/>
</preinstall>
<source_dir>datamodels/2.x/</source_dir>
<datamodel_version>2.5.0</datamodel_version>
<previous_configuration_file>/var/lib/jenkins/workspace/iTop-CI/unattended_install/default-config-itop.php</previous_configuration_file>
<extensions_dir>extensions</extensions_dir>
<target_env>production</target_env>
<workspace_dir></workspace_dir>
<database>
<server></server>
<user>root</user>
<pwd>c8mb0do</pwd>
<name>itop_ci</name>
<db_tls_enabled></db_tls_enabled>
<db_tls_ca></db_tls_ca>
<prefix></prefix>
</database>
<url>http://127.0.0.1/itop/svn/trunk/</url>
<graphviz_path>/usr/bin/dot</graphviz_path>
<admin_account>
<user>admin</user>
<pwd>admin</pwd>
<language>EN US</language>
</admin_account>
<language>EN US</language>
<selected_modules type="array">
<item>authent-external</item>
<item>authent-local</item>
<item>itop-backup</item>
<item>itop-config</item>
<item>itop-profiles-itil</item>
<item>itop-sla-computation</item>
<item>itop-tickets</item>
<item>itop-welcome-itil</item>
<item>itop-config-mgmt</item>
<item>itop-attachments</item>
<item>itop-datacenter-mgmt</item>
<item>itop-endusers-devices</item>
<item>itop-storage-mgmt</item>
<item>itop-virtualization-mgmt</item>
<item>itop-bridge-virtualization-storage</item>
<item>itop-service-mgmt</item>
<item>itop-request-mgmt</item>
<item>itop-portal</item>
<item>itop-portal-base</item>
<item>itop-change-mgmt</item>
</selected_modules>
<selected_extensions type="array">
<item>itop-config-mgmt-core</item>
<item>itop-config-mgmt-datacenter</item>
<item>itop-config-mgmt-end-user</item>
<item>itop-config-mgmt-storage</item>
<item>itop-config-mgmt-virtualization</item>
<item>itop-service-mgmt-enterprise</item>
<item>itop-ticket-mgmt-simple-ticket</item>
<item>itop-ticket-mgmt-simple-ticket-enhanced-portal</item>
<item>itop-change-mgmt-simple</item>
</selected_extensions>
<sample_data>1</sample_data>
<old_addon></old_addon>
<options>
<generate_config>1</generate_config>
</options>
<mysql_bindir></mysql_bindir>
</installation>

View File

@@ -1,190 +0,0 @@
<?php
//this scrit will be run under the ./toolkit directory, relatively to the document root
require_once('../approot.inc.php');
require_once(APPROOT.'/application/utils.inc.php');
require_once(APPROOT.'/application/clipage.class.inc.php');
require_once(APPROOT.'/core/config.class.inc.php');
require_once(APPROOT.'/core/log.class.inc.php');
require_once(APPROOT.'/core/kpi.class.inc.php');
require_once(APPROOT.'/core/cmdbsource.class.inc.php');
require_once(APPROOT.'/setup/setuppage.class.inc.php');
require_once(APPROOT.'/setup/wizardcontroller.class.inc.php');
require_once(APPROOT.'/setup/wizardsteps.class.inc.php');
require_once(APPROOT.'/setup/applicationinstaller.class.inc.php');
/////////////////////////////////////////////////
$sParamFile = utils::ReadParam('response_file', 'default-params.xml', true /* CLI allowed */, 'raw_data');
$bCheckConsistency = (utils::ReadParam('check_consistency', '0', true /* CLI allowed */) == '1');
$oParams = new XMLParameters($sParamFile);
$sMode = $oParams->Get('mode');
if ($sMode == 'install')
{
echo "Installation mode detected.\n";
$bClean = utils::ReadParam('clean', false, true /* CLI allowed */);
if ($bClean)
{
echo "Cleanup mode detected.\n";
$sTargetEnvironment = $oParams->Get('target_env', '');
if ($sTargetEnvironment == '')
{
$sTargetEnvironment = 'production';
}
$sTargetDir = APPROOT.'env-'.$sTargetEnvironment;
// Configuration file
$sConfigFile = APPCONF.$sTargetEnvironment.'/'.ITOP_CONFIG_FILE;
if (file_exists($sConfigFile))
{
echo "Trying to delete the configuration file: '$sConfigFile'.\n";
@chmod($sConfigFile, 0770); // RWX for owner and group, nothing for others
unlink($sConfigFile);
}
else
{
echo "No config file to delete ($sConfigFile does not exist).\n";
}
// env-xxx directory
if (file_exists($sTargetDir))
{
if (is_dir($sTargetDir))
{
echo "Emptying the target directory '$sTargetDir'.\n";
SetupUtils::tidydir($sTargetDir);
}
else
{
die("ERROR the target dir '$sTargetDir' exists, but is NOT a directory !!!\nExiting.\n");
}
}
else
{
echo "No target directory to delete ($sTargetDir does not exist).\n";
}
// Database
$aDBSettings = $oParams->Get('database', array());
$sDBServer = $aDBSettings['server'];
$sDBUser = $aDBSettings['user'];
$sDBPwd = $aDBSettings['pwd'];
$sDBName = $aDBSettings['name'];
$sDBPrefix = $aDBSettings['prefix'];
if ($sDBPrefix != '')
{
die("Cleanup not implemented for a partial database (prefix= '$sDBPrefix')\nExiting.");
}
$oMysqli = new mysqli($sDBServer, $sDBUser, $sDBPwd);
if ($oMysqli->connect_errno)
{
die("Cannot connect to the MySQL server (".$mysqli->connect_errno . ") ".$mysqli->connect_error."\nExiting");
}
else
{
if ($oMysqli->select_db($sDBName))
{
echo "Deleting database '$sDBName'\n";
$oMysqli->query("DROP DATABASE `$sDBName`");
}
else
{
echo "The database '$sDBName' does not seem to exist. Nothing to cleanup.\n";
}
}
}
}
$bHasErrors = false;
$aChecks = SetupUtils::CheckBackupPrerequisites(APPROOT.'data'); // mmm should be the backup destination dir
$aSelectedModules = $oParams->Get('selected_modules');
$sSourceDir = $oParams->Get('source_dir', 'datamodels/latest');
$sExtensionDir = $oParams->Get('extensions_dir', 'extensions');
$aChecks = array_merge($aChecks, SetupUtils::CheckSelectedModules($sSourceDir, $sExtensionDir, $aSelectedModules));
foreach($aChecks as $oCheckResult)
{
switch($oCheckResult->iSeverity)
{
case CheckResult::ERROR:
$bHasErrors = true;
$sHeader = "Error";
break;
case CheckResult::WARNING:
$sHeader = "Warning";
break;
case CheckResult::INFO:
default:
$sHeader = "Info";
break;
}
echo $sHeader.": ".$oCheckResult->sLabel;
if (strlen($oCheckResult->sDescription))
{
echo ' - '.$oCheckResult->sDescription;
}
echo "\n";
}
if ($bHasErrors)
{
echo "Encountered stopper issues. Aborting...\n";
die;
}
$bFoundIssues = false;
$bInstall = utils::ReadParam('install', true, true /* CLI allowed */);
if ($bInstall)
{
echo "Starting the unattended installation...\n";
$oWizard = new ApplicationInstaller($oParams);
$bRes = $oWizard->ExecuteAllSteps();
if (!$bRes)
{
echo "\nencountered installation issues!";
$bFoundIssues = true;
}
}
else
{
echo "No installation requested.\n";
}
if (!$bFoundIssues && $bCheckConsistency)
{
echo "Checking data model consistency.\n";
ob_start();
$sCheckRes = '';
try
{
MetaModel::CheckDefinitions(false);
$sCheckRes = ob_get_clean();
}
catch(Exception $e)
{
$sCheckRes = ob_get_clean()."\nException: ".$e->getMessage();
}
if (strlen($sCheckRes) > 0)
{
echo $sCheckRes;
echo "\nfound consistency issues!";
$bFoundIssues = true;
}
}
if (!$bFoundIssues)
{
// last line: used to check the install
// the only way to track issues in case of Fatal error or even parsing error!
echo "\ninstalled!";
exit;
}

6
.make/README.md Normal file
View File

@@ -0,0 +1,6 @@
= Make Doc =
.make folder is meant to gather tools for releasing process. Maybe other new purposes will come as well....
== license ==
- updateLicenses.php: used to update community-licenses.xml easily based on composer.json files
- sortLicenceXml.php: used to sort licenses based on scope + product name

View File

@@ -0,0 +1,90 @@
<?php
$iBeginTime = time();
chdir(__DIR__);
$aCommands = [
'php composer/rmDeniedTestDir.php',
'php build/commands/setupCssCompiler.php',
// 'bash /tmp/gabuzomeu.sh',
];
$aFailedCommands=[];
foreach ($aCommands as $sCommand)
{
if (!ExecCommand($sCommand))
{
$aFailedCommands[] = $sCommand;
}
}
$iElapsed = time() - $iBeginTime;
if (count($aFailedCommands))
{
fwrite(STDERR, "\nafterBuild execution failed! (in ${iElapsed}s)\n");
fwrite(STDERR, "List of failling commands:\n - " . implode("\n - ", $aFailedCommands) . "\n");
exit(1);
}
echo "\nDone (${iElapsed}s)\n";
exit(0);
/**
* Executes a command and returns an array with exit code, stdout and stderr content
*
* @param string $cmd - Command to execute
*
* @return bool
* @throws \Exception
*/
function ExecCommand($cmd) {
$iBeginTime = time();
echo sprintf("command: %s", str_pad("$cmd ", 50));
$descriptorspec = array(
0 => array("pipe", "r"), // stdin
1 => array("pipe", "w"), // stdout
2 => array("pipe", "w"), // stderr
);
$process = proc_open($cmd, $descriptorspec, $pipes, __DIR__ . '/..', null);
$stdout = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$stderr = stream_get_contents($pipes[2]);
fclose($pipes[2]);
$iCode = proc_close($process);
$bSuccess = (0 === $iCode);
$iElapsed = time() - $iBeginTime;
if (!$bSuccess) {
fwrite(STDERR, sprintf(
"\nCOMMAND FAILED! (%s) \n - status:%s \n - stderr:%s \n - stdout: %s\n - elapsed:%ss\n\n",
$cmd,
$iCode,
rtrim($stderr),
rtrim($stdout),
$iElapsed
));
}
else
{
echo "| elapsed:${iElapsed}s \n";
}
if (!empty($stderr))
{
fwrite(STDERR, "$stderr\n");
}
if (!empty($stdout))
{
echo "stdout :$stdout\n\n";
}
return $bSuccess;
}

View File

@@ -0,0 +1,51 @@
<?php
/**
* Copyright (C) 2010-2020 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."/application/utils.inc.php");
if (php_sapi_name() !== 'cli')
{
throw new \Exception('This script can only run from CLI');
}
$sCssFile = APPROOT.'/css/setup.css';
if (file_exists($sCssFile))
{
fwrite(STDERR, "$sCssFile already exists (it should not), removing it.");
if (!unlink($sCssFile))
{
fwrite(STDERR, "Failed to remove $sCssFile, exiting.");
exit(1);
}
}
$sCssRelPath = utils::GetCSSFromSASS('css/setup.scss');
if (!file_exists($sCssFile))
{
fwrite(STDERR, "Failed to compile $sCssFile, exiting.");
exit(1);
}

View File

@@ -0,0 +1,98 @@
<?php
/**
* Copyright (C) 2010-2020 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/>
*
*/
$iTopFolder = __DIR__ . "/../../" ;
require_once ("$iTopFolder/approot.inc.php");
$sApproot = APPROOT;
$aTrace = array();
$aParamsConfig = array(
'composer-path' => array(
'default' => 'composer.phar',
)
);
$aParamsConfigNotFound = array_flip(array_keys($aParamsConfig));
$aGivenArgs = $argv;
unset($aGivenArgs[0]);
$aParams = array();
foreach ($aParamsConfig as $sParam => $aConfig)
{
$bParamsFound = false;
foreach ($aGivenArgs as $sGivenArg)
{
if (preg_match("/--$sParam(?:=(?<value>.*))?$/", $sGivenArg, $aMatches))
{
$aParams[$sParam] =
isset($aMatches['value'])
? $aMatches['value']
: true
;
$bParamsFound = true;
unset($aGivenArgs[$sGivenArg]);
}
}
if ($bParamsFound)
{
unset($aParamsConfigNotFound[$sParam]);
}
}
foreach ($aParamsConfigNotFound as $sParamsConfigNotFound => $void)
{
if (isset($aParamsConfig[$sParamsConfigNotFound]['default']))
{
$aParams[$sParamsConfigNotFound] = $aParamsConfig[$sParamsConfigNotFound]['default'];
$aTrace[] = "\e[1;30mUsing default value '{$aParams[$sParamsConfigNotFound]}' for '$sParamsConfigNotFound'\e[0m\n";
continue;
}
die("Missing '$sParamsConfigNotFound'");
}
echo "This command aims at helping you find upgradable dependencies\n";
echo "\e[0;33mBeware of the version colored in orange, they probably introduce BC breaks!\e[0m\n";
$sCommand = "{$aParams['composer-path']} show -loD --working-dir=$sApproot --ansi";
$execCode = exec($sCommand, $output);
$sOutput = implode("\n", $output)."\n";
if (!$execCode)
{
echo "\e[41mFailed to execute '$sCommand'\e[0m\n";
echo "Trace: \n".implode("\n", $aTrace);
}
else
{
$iCountDepdendenciesFound = count($output);
$iCountBc = substr_count($sOutput, '[33m');
echo sprintf("Found \033[44m%d\033[0m upgradable dependencies, including \e[41m%s BC break\e[0m 😱 :\n\n", $iCountDepdendenciesFound, $iCountBc);
}
echo $sOutput;

View File

@@ -0,0 +1,57 @@
<?php
/**
* Copyright (C) 2010-2020 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();
foreach ($aDeniedButStillPresent as $sDir)
{
if (! preg_match('#[tT]ests?/?$#', $sDir))
{
echo "\nfound INVALID denied test dir: '$sDir'\n";
throw new \Exception("$sDir must end with /Test/ or /test/");
}
try
{
SetupUtils::rrmdir($sDir);
echo "Remove denied test dir: '$sDir'\n";
}
catch (\Exception $e)
{
echo "\nFAILED to remove denied test dir: '$sDir'\n";
}
}

View File

@@ -0,0 +1,90 @@
#/bin/bash
#git diff --name-status 2.6.2..HEAD js |grep 'A\sjs/' |awk -F/ '{printf("lib/%s/%s\n",$2,$3)}'|sort |uniq >/tmp/toto
#git diff --name-status 2.6.2..HEAD lib |grep 'A\slib/' |awk -F/ '{printf("lib/%s/%s\n",$2,$3)}'|sort |uniq >/tmp/toto
function HELP(){
echo " Syntax: bash $0 /var/www/html/iTop"
}
if [ $# -eq 0 ]
then
echo "no iTop path provided"
HELP
exit 1
fi
iTopPath=$1
if [ ! -d $iTopPath ]
then
echo "$iTopPath is not an iTop path."
HELP
exit 1
fi
echo "<?xml version=\"1.0\"?>
<licenses>"
for subfolder in lib datamodels
do
for l in $(find $iTopPath/$subfolder/ -name composer.json|sed 's|/composer.json||')
do
if [ ! -d $l ]
then
continue
fi
if [ "$subfolder" == "datamodels" ]
then
if [ $(find $l -name module*.php|wc -l) -ne 0 -o $(echo "$l"|grep -c "itop-portal-base") -ne 0 ]
then
continue
fi
fi
dir=$(dirname $(dirname $l))
prod=$(echo $l| sed "s|$dir/||1")
echo $l $subfolder
lictype=$(cd $l && composer licenses --format json |jq .license[] |sed 's|\"||g')
authors=""
if [ -f $l/composer.json ]
then
author_nb=$(grep -c authors $l/composer.json|sed 's| ||g')
if [ "x$author_nb" != "x0" ]
then
OLDIFS=$IFS
IFS=$'\n'
for a in $(cat $l/composer.json |jq .authors[].name|sed 's|\"||g')
do
authors="$authors$a - "
done
authors="$authors#"
authors=$(echo $authors |sed 's| - #||')
IFS=$OLDIFS
fi
fi
lic=""
for licf in $(find $l -name LICEN*)
do
lic=$(cat $licf)
break
done
#if [ "x$lic" == "x" ]
#then
# echo "============== no license found $l"
#fi
echo " <license>
<product scope=\"$subfolder\">$prod</product>
<author>$authors</author>
<license_type>$lictype</license_type>
<text><![CDATA[
$lic
]]></text>
</license>"
done
done
echo "</licenses>"

View File

@@ -0,0 +1,64 @@
<?php
/**
* script used to sort license file (usefull for autogeneration)
* Example:
*/
$iTopFolder = __DIR__ . "/../../" ;
$xmlFilePath = $iTopFolder . "setup/licenses/community-licenses.xml";
$dom = new DOMDocument();
$dom->load($xmlFilePath);
$xp = new DOMXPath($dom);
$licenseList = $xp->query('/licenses/license');
$licenses = iterator_to_array($licenseList);
function get_scope($product_node)
{
$scope = $product_node->getAttribute("scope");
if ($scope === "")
{ //put iTop first
return "aaaaaaaaa";
}
return $scope;
}
function get_product_node($license_node)
{
foreach ($license_node->childNodes as $child)
{
if (is_a($child, 'DomElement') && $child->tagName === "product")
{
return $child;
}
}
return null;
}
function sort_by_product($a, $b)
{
$aProductNode = get_product_node($a);
$bProductNode = get_product_node($b);
$res = strcmp(get_scope($aProductNode), get_scope($bProductNode));
if ($res !== 0)
{
return $res;
}
//sort on node product name
return strcmp($aProductNode->nodeValue, $bProductNode->nodeValue);
}
usort($licenses, 'sort_by_product');
$newdom = new DOMDocument("1.0");
$newdom->formatOutput = true;
$root = $newdom->createElement("licenses");
$newdom->appendChild($root);
foreach ($licenses as $b) {
$node = $newdom->importNode($b,true);
$root->appendChild($newdom->importNode($b,true));
}
$newdom->save($xmlFilePath);

View File

@@ -0,0 +1,148 @@
<?php
/**
* script used to sort license file (useful for autogeneration)
*
* Requirements :
* * bash (on Windows, use Git Bash)
* * composer (if you use the phar version, mind to create a `Composer` alias !)
* * JQ command
* to install on Windows :
* `curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe`
* this is a Windows port : https://stedolan.github.io/jq/
*
* Licenses sources :
* * `composer licenses --format json` (see https://getcomposer.org/doc/03-cli.md#licenses)
* * keep every existing nodes with `/licenses/license[11]/product/@scope` not in ['lib', 'datamodels']
* ⚠ If licenses were added manually, they might be removed by this tool ! Be very careful to check for the result before pushing !
*
* To launch, check requirements and run `php updateLicenses.php`
* The target license file path is in `$xmlFilePath`
*/
$iTopFolder = __DIR__ . "/../../" ;
$xmlFilePath = $iTopFolder . "setup/licenses/community-licenses.xml";
function get_scope($product_node)
{
$scope = $product_node->getAttribute("scope");
if ($scope === "")
{ //put iTop first
return "aaaaaaaaa";
}
return $scope;
}
function get_product_node($license_node)
{
foreach ($license_node->childNodes as $child)
{
if (is_a($child, 'DomElement') && $child->tagName === "product")
{
return $child;
}
}
return null;
}
function sort_by_product($a, $b)
{
$aProductNode = get_product_node($a);
$bProductNode = get_product_node($b);
$res = strcmp(get_scope($aProductNode), get_scope($bProductNode));
if ($res !== 0)
{
return $res;
}
//sort on node product name
return strcmp($aProductNode->nodeValue, $bProductNode->nodeValue);
}
function get_license_nodes($file_path)
{
$dom = new DOMDocument();
$dom->load($file_path);
$xp = new DOMXPath($dom);
$licenseList = $xp->query('/licenses/license');
$licenses = iterator_to_array($licenseList);
usort($licenses, 'sort_by_product');
return $licenses;
}
/** @noinspection SuspiciousAssignmentsInspection */
function fix_product_name(DOMNode &$oProductNode)
{
$sProductNameOrig = $oProductNode->nodeValue;
// sample : `C:\Dev\wamp64\www\itop-27\.make\license/../..//lib/symfony/polyfill-ctype`
$sProductNameFixed = remove_dir_from_string($sProductNameOrig, 'lib/');
// sample : `C:\Dev\wamp64\www\itop-27\.make\license/../..//datamodels/2.x/authent-cas/vendor/apereo/phpcas`
$sProductNameFixed = remove_dir_from_string($sProductNameFixed, 'vendor/');
$oProductNode->nodeValue = $sProductNameFixed;
}
function remove_dir_from_string($sString, $sNeedle)
{
if (strpos($sString, $sNeedle) === false) {
return $sString;
}
$sStringTmp = strstr($sString, $sNeedle);
$sStringFixed = str_replace($sNeedle, '', $sStringTmp);
// DEBUG trace O:)
// echo "$sNeedle = $sString => $sStringFixed\n";
return $sStringFixed;
}
$old_licenses = get_license_nodes($xmlFilePath);
//generate file with updated licenses
$generated_license_file_path = __DIR__."/provfile.xml";
echo "- Generating licences...";
exec("bash ".__DIR__."/gen-community-license.sh $iTopFolder > ".$generated_license_file_path);
echo "OK!\n";
echo "- Get licenses nodes...";
$new_licenses = get_license_nodes($generated_license_file_path);
unlink($generated_license_file_path);
foreach ($old_licenses as $b) {
$aProductNode = get_product_node($b);
if (get_scope($aProductNode) !== "lib" && get_scope($aProductNode) !== "datamodels") {
$new_licenses[] = $b;
}
}
usort($new_licenses, 'sort_by_product');
echo "OK!\n";
echo "- Overwritting Combodo license file...";
$new_dom = new DOMDocument("1.0");
$new_dom->formatOutput = true;
$root = $new_dom->createElement("licenses");
$new_dom->appendChild($root);
foreach ($new_licenses as $b) {
$node = $new_dom->importNode($b, true);
// N°3870 fix when running script in Windows
// fix should be in gen-community-license.sh but it is easier to do it here !
if (strncasecmp(PHP_OS, 'WIN', 3) === 0) {
$oProductNodeOrig = get_product_node($node);
fix_product_name($oProductNodeOrig);
}
$root->appendChild($node);
}
$new_dom->save($xmlFilePath);
echo "OK!\n";

View File

@@ -0,0 +1,77 @@
<?php
/**
* Usage :
* `php changelog.php 2.7.4`
*
* As argument is passed the git ref (tag name or sha1) we want to use as reference
*
* Outputs :
*
* 1. List of bugs as CSV :
* bug ref;link
* Example :
* <code>
* Bug_ref;Bug_URL;sha1
* 1234;https://support.combodo.com/pages/UI.php?operation=details&class=Bug&id=1234;949b213f9|b1ca1f263|a1271da74
* </code>
*
* 2. List of commits sha1/message without bug ref
* Example :
* <code>
* sha1;subject
* a6aa183e2;:bookmark: Prepare 2.7.5
* </code>
*/
if (count($argv) === 1) {
echo '⚠ You must pass the base tag/sha1 as parameter';
exit(1);
}
$sBaseReference = $argv[1];
//--- Get log
$sGitLogCommand = 'git log --decorate --pretty="%h;%s" --date-order --no-merges '.$sBaseReference.'..HEAD';
$sGitLogRaw = shell_exec($sGitLogCommand);
//--- Analyze log
$aGitLogLines = preg_split('/\n/', trim($sGitLogRaw));;
$aLogLinesWithBugRef = [];
$aLogLineNoBug = [];
foreach ($aGitLogLines as $sLogLine) {
$sBugRef = preg_match('/[nN]°(\d{3,4})/', $sLogLine, $aLineBugRef);
if (($sBugRef === false) || empty($aLineBugRef)) {
$aLogLineNoBug[] = $sLogLine;
continue;
}
$iBugId = $aLineBugRef[1];
$sSha = substr($sLogLine, 0, 9);
if (array_key_exists($iBugId, $aLogLinesWithBugRef)) {
$aBugShaRefs = $aLogLinesWithBugRef[$iBugId];
$aBugShaRefs[] = $sSha;
$aLogLinesWithBugRef[$iBugId] = $aBugShaRefs;
} else {
$aLogLinesWithBugRef[$iBugId] = [$sSha];
}
}
$aBugsList = array_keys($aLogLinesWithBugRef);
sort($aBugsList, SORT_NUMERIC);
//-- Output results
echo "# Bugs included\n";
echo "Bug_ref;Bug_URL;sha1\n";
foreach ($aBugsList as $sBugRef) {
$sShaRefs = implode('|', $aLogLinesWithBugRef[$sBugRef]);
echo "{$sBugRef};https://support.combodo.com/pages/UI.php?operation=details&class=Bug&id={$sBugRef};$sShaRefs\n";
}
echo "\n";
echo "# Logs line without bug referenced\n";
echo "sha1;subject\n";
foreach ($aLogLineNoBug as $sLogLine) {
echo "$sLogLine\n";
}

View File

@@ -0,0 +1,47 @@
<?php
/*******************************************************************************
* Tool to automate version update before release
*
* Will update version in the following files :
*
* * datamodels/2.x/.../module.*.php
* * datamodels/2.x/version.xml
* * css/css-variables.scss $version
*
* Usage :
* `php .make\release\update-versions.php "2.7.0-rc"`
*
* @since 2.7.0
******************************************************************************/
require_once (__DIR__.'/../../approot.inc.php');
require_once (__DIR__.DIRECTORY_SEPARATOR.'update.classes.inc.php');
/** @var \FileVersionUpdater[] $aFilesUpdaters */
$aFilesUpdaters = array(
new iTopVersionFileUpdater(),
new CssVariablesFileUpdater(),
new DatamodelsModulesFiles(),
);
if (count($argv) === 1)
{
echo '/!\ You must pass the new version as parameter';
exit(1);
}
$sVersionLabel = $argv[1];
if (empty($sVersionLabel))
{
echo 'Version passed as parameter is empty !';
exit(2);
}
foreach ($aFilesUpdaters as $oFileVersionUpdater)
{
$oFileVersionUpdater->UpdateAllFiles($sVersionLabel);
}

View File

@@ -0,0 +1,36 @@
<?php
/*******************************************************************************
* Tool to automate datamodel version update in XML
*
* Will update version in the following files :
*
* datamodels/2.x/.../datamodel.*.xml
*
* Usage :
* `php .make\release\update-xml.php "1.7"`
*
* @since 2.7.0
******************************************************************************/
require_once (__DIR__.'/../../approot.inc.php');
require_once (__DIR__.DIRECTORY_SEPARATOR.'update.classes.inc.php');
if (count($argv) === 1)
{
echo '/!\ You must pass the new version as parameter';
exit(1);
}
$sVersionLabel = $argv[1];
if (empty($sVersionLabel))
{
echo 'Version passed as parameter is empty !';
exit(2);
}
$oFileVersionUpdater = new DatamodelsXmlFiles();
$oFileVersionUpdater->UpdateAllFiles($sVersionLabel);

View File

@@ -0,0 +1,169 @@
<?php
/*******************************************************************************
* Classes for updater tools
*
* @see update-versions.php
* @see update-xml.php
******************************************************************************/
require_once (__DIR__.'/../../approot.inc.php');
abstract class FileVersionUpdater
{
/**
* @return string[] full path of files to modify
*/
abstract public function GetFiles();
/**
* Warnign : will consume lots of memory on larger files !
*
* @param string $sVersionLabel
* @param string $sFileContent
* @param string $sFileFullPath
*
* @return string file content with replaced values
*/
abstract public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath);
public function UpdateAllFiles($sVersionLabel)
{
$aFilesToUpdate = $this->GetFiles();
$sFileUpdaterName = get_class($this);
echo "# Updater : $sFileUpdaterName\n";
foreach ($aFilesToUpdate as $sFileToUpdateFullPath)
{
try
{
$sCurrentFileContent = file_get_contents($sFileToUpdateFullPath);
$sNewFileContent = $this->UpdateFileContent($sVersionLabel, $sCurrentFileContent, $sFileToUpdateFullPath);
file_put_contents($sFileToUpdateFullPath, $sNewFileContent);
echo " - $sFileToUpdateFullPath : OK !\n";
}
catch (Exception $e)
{
echo " - $sFileToUpdateFullPath : Error :(\n";
}
}
}
}
abstract class AbstractSingleFileVersionUpdater extends FileVersionUpdater
{
private $sFileToUpdate;
public function __construct($sFileToUpdate)
{
$this->sFileToUpdate = $sFileToUpdate;
}
public function GetFiles()
{
return array(APPROOT.$this->sFileToUpdate);
}
}
class iTopVersionFileUpdater extends AbstractSingleFileVersionUpdater
{
public function __construct()
{
parent::__construct('datamodels/2.x/version.xml');
}
/**
* @inheritDoc
*/
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
{
return preg_replace(
'/(<version>)[^<]*(<\/version>)/',
'${1}'.$sVersionLabel.'${2}',
$sFileContent
);
}
}
class CssVariablesFileUpdater extends AbstractSingleFileVersionUpdater
{
public function __construct()
{
parent::__construct('css/css-variables.scss');
}
/**
* @inheritDoc
*/
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
{
return preg_replace(
'/(\$version: "v)[^"]*(";)/',
'${1}'.$sVersionLabel.'${2}',
$sFileContent
);
}
}
abstract class AbstractGlobFileVersionUpdater extends FileVersionUpdater
{
protected $sGlobPattern;
public function __construct($sGlobPattern)
{
$this->sGlobPattern = $sGlobPattern;
}
public function GetFiles()
{
return glob($this->sGlobPattern);
}
}
class DatamodelsModulesFiles extends AbstractGlobFileVersionUpdater
{
public function __construct()
{
parent::__construct(APPROOT.'datamodels/2.x/*/module.*.php');
}
/**
* @inheritDoc
*/
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
{
$sModulePath = realpath($sFileFullPath);
$sModuleFileName = basename($sModulePath, 1);
$sModuleName = preg_replace('/[^.]+\.([^.]+)\.php/', '$1', $sModuleFileName);
return preg_replace(
"/('$sModuleName\/)[^']+(')/",
'${1}'.$sVersionLabel.'${2}',
$sFileContent
);
}
}
class DatamodelsXmlFiles extends AbstractGlobFileVersionUpdater
{
public function __construct()
{
parent::__construct(APPROOT.'datamodels/2.x/*/datamodel.*.xml');
}
/**
* @inheritDoc
*/
public function UpdateFileContent($sVersionLabel, $sFileContent, $sFileFullPath)
{
return preg_replace(
'/(<itop_design .* version=")[^"]+(">)/',
'${1}'.$sVersionLabel.'${2}',
$sFileContent
);
}
}

139
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,139 @@
# Contributing to iTop
You want to contribute to iTop? Many thanks to you! 🎉 👍
Here are some guidelines that will help us integrate your work!
## Contributions
### Subjects
You are welcome to create pull requests on any of those subjects:
* 🐛 bug fix
* 🌐 translation / i18n / l10n
If you want to implement a **new feature**, please [create a corresponding ticket](https://sourceforge.net/p/itop/tickets/new/) for review.
If you ever want to begin implementation, do so in a fork, and add a link to the corresponding commits in the ticket.
For all **security related subjects**, please see our [security policy](SECURITY.md).
All **datamodel modification** should be done in an extension. Beware that such change would
impact all existing customers, and could prevent them from
upgrading!
Combodo has a long experience of datamodel changes: they are very disruptive!
This is why we avoid them in iTop core, especially the changes on existing objects/fields.
If you have an idea you're sure would benefit to all of iTop users, you may
[create a corresponding ticket](https://sourceforge.net/p/itop/tickets/new/) to submit it, but be warned that there are lots of good
reasons to refuse such changes.
### 📄 License
iTop is distributed under the AGPL-3.0 license (see the [license.txt] file),
your code must comply with this license.
If you want to use another license, you may [create an extension][wiki new ext].
[license.txt]: https://github.com/Combodo/iTop/blob/develop/license.txt
[wiki new ext]: https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Astart#by_writing_your_own_extension
## 🔀 iTop branch model
When we first start with Git, we were using the [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) branch model. As
there was some confusions about branches to use for current developed release and previous maintained release, and also because we were
using just a very few of the GitFlow commands, we decided to add just a little modification to this branch model : since april 2020
we don't have anymore a `master` branch.
Here are the branches we use and their meaning :
- `develop`: ongoing development version
- `release/*`: if present, that means we are working on a alpha/beta/rc version for shipping
- `support/*`: maintenance branches for older versions
For example, if no version is currently prepared for shipping we could have:
- `develop` containing future 2.8.0 version
- `support/2.7`: 2.7.x maintenance version
- `support/2.6`: 2.6.x maintenance version
- `support/2.5`: 2.5.x maintenance version
In this example, when 2.8.0-beta is shipped that will become:
- `develop`: future 2.9.0 version
- `release/2.8`: 2.8.0-beta
- `support/2.7`: 2.7.x maintenance version
- `support/2.6`: 2.6.x maintenance version
- `support/2.5`: 2.5.x maintenance version
And when 2.8.0 final will be out:
- `develop`: future 2.9.0 version
- `support/2.8`: 2.8.x maintenance version (will host developments for 2.8.1)
- `support/2.7`: 2.7.x maintenance version
- `support/2.6`: 2.6.x maintenance version
- `support/2.5`: 2.5.x maintenance version
Also note that we have a "micro-version" concept : each of those versions have a very small amount of modifications. They are made from
`support/*` branches as well. For example 2.6.2-1 and 2.6.2-2 were made from the `support/2.6.2` branch.
## Coding
### 🌐 Translations
A [dedicated page](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Atranslation) is available in the official wiki.
### Where to start ?
1. Create a fork from our repository (see [Working with forks - GitHub Help](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/working-with-forks))
2. Create a branch in this fork, based on the develop branch
3. Code !
Do create a dedicated branch for each modification you want to propose : if you don't it will be very hard to merge back your work !
Most of the time you should based your developments on the develop branch.
That may be different if you want to fix a bug, please use develop anyway and ask in your PR if rebase is possible.
### 🎨 PHP styleguide
Please follow [our guidelines](https://www.itophub.io/wiki/page?id=latest%3Acustomization%3Acoding_standards).
### ✅ Tests
Please create tests that covers as much as possible the code you're submitting.
Our tests are located in the `test/` directory, containing a PHPUnit config file : `phpunit.xml.dist`.
### Git Commit Messages
* Describe the functional change instead of the technical modifications
* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Please start the commit message with an applicable emoji code (following the [Gitmoji guide](https://gitmoji.carloscuesta.me/)).
Beware to use the code (for example `:bug:`) and not the character (🐛) as Unicode support in git clients is very poor for now...
Emoji examples :
* 🌐 `:globe_with_meridians:` for translations
* 🎨 `:art:` when improving the format/structure of the code
* ⚡️ `:zap:` when improving performance
* 🐛 `:bug:` when fixing a bug
* 🔥 `:fire:` when removing code or files
* 💚 `:green_heart:` when fixing the CI build
*`:white_check_mark:` when adding tests
* 🔒 `:lock:` when dealing with security
* ⬆️ `:arrow_up:` when upgrading dependencies
* ⬇️ `:arrow_down:` when downgrading dependencies
* ♻️ `:recycle:` code refactoring
* 💄 `:lipstick:` Updating the UI and style files.
## 👥 Pull request
When your code is working, please:
* stash as much as possible your commits,
* rebase your branch on our repo last commit,
* create a pull request.
Detailed procedure to work on fork and create PR is available [in GitHub help pages](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).

63
Jenkinsfile vendored
View File

@@ -1,62 +1,11 @@
pipeline {
agent any
stages {
def infra
stage('init') {
parallel {
stage('debug') {
steps {
sh './.jenkins/bin/init/debug.sh'
}
}
stage('append files to project') {
steps {
sh './.jenkins/bin/init/append_files.sh'
}
}
stage('composer install') {
steps {
sh './.jenkins/bin/init/composer_install.sh'
}
}
}
}
node(){
checkout scm
stage('unattended_install') {
parallel {
stage('unattended_install default env') {
steps {
sh './.jenkins/bin/unattended_install/default_env.sh'
}
}
}
}
infra = load '/var/lib/jenkins/workspace/itop-test-infra_master/src/Infra.groovy'
}
stage('test') {
parallel {
stage('phpunit') {
steps {
sh './.jenkins/bin/tests/phpunit.sh'
}
}
}
}
}
infra.call()
post {
always {
junit 'var/test/phpunit-log.junit.xml'
}
failure {
slackSend(channel: "#jenkins-itop", color: '#FF0000', message: "Ho no! Build failed! (${currentBuild.result}), Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
environment {
DEBUG_UNIT_TEST = '0'
}
options {
timeout(time: 20, unit: 'MINUTES')
}
}

149
README.md Normal file
View File

@@ -0,0 +1,149 @@
<p align="center"><a href="https://www.combodo.com/itop-193" target="_blank">
<img src="https://www.combodo.com/logos/logo-itop.svg">
</a></p>
# iTop - ITSM & CMDB
iTop stands for *IT Operations Portal*.
It is a complete open source, ITIL, web based service management tool including a fully customizable CMDB, a helpdesk system and a document management tool.
iTop also offers mass import tools and web services to integrate with your IT
## Features
- Fully configurable [Configuration Management (CMDB)][10]
- [HelpDesk][11] and Incident Management
- [Service and Contract Management][12]
- [Change][13] Management
- Configurable [SLA][14] Management
- Graphical [impact analysis][15]
- [CSV import][16] tool for any data
- Consistency [audit][17] to check data quality
- [Data synchronization][18] (for data federation)
## Resources
- [iTop Forums][1]: community support
- [iTop Tickets][2]: for feature requests and bug reports
- [Releases download][3]
- [Documentation][4] covering both iTop and its official extensions
- [iTop Hub][5] : discover and install extensions !
[1]: https://sourceforge.net/p/itop/discussion/
[2]: https://sourceforge.net/p/itop/tickets/
[3]: https://sourceforge.net/projects/itop/files/itop/
[4]: https://www.itophub.io/wiki
[5]: https://store.itophub.io/en_US/
[10]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#configuration_management_cmdb
[11]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#ticketing
[12]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#service_management
[13]: https://www.itophub.io/wiki/page?id=latest%3Adatamodel%3Astart#change_management
[14]: https://www.itophub.io/wiki/page?id=latest%3Aimplementation%3Astart#service_level_agreements_and_targets
[15]: https://www.itophub.io/wiki/page?id=latest%3Auser%3Aactions#relations
[16]: https://www.itophub.io/wiki/page?id=latest%3Auser%3Abulk_modify#uploading_data
[17]: https://www.itophub.io/wiki/page?id=latest%3Aadmin%3Aaudit
[18]: https://www.itophub.io/wiki/page?id=latest%3Aadvancedtopics%3Adata_synchro_overview
## Last releases
### Versions 2.7.*
- 2.7.1 published on April 8, 2020
- [Changes since the previous version][62]
- [New features][63]
- [Migration notes][64]
- [Download iTop 2.7.0-2][65]
[62]: https://www.itophub.io/wiki/page?id=2_7_0:release:change_log
[63]: https://www.itophub.io/wiki/page?id=2_7_0:release:2_7_whats_new
[64]: https://www.itophub.io/wiki/page?id=2_7_0:install:260_to_270_migration_notes
[65]: https://sourceforge.net/projects/itop/files/itop/2.7.0-2
### Versions 2.6.*
- 2.6.0 published on January 9, 2019
- [Changes since the previous version][58]
- [New features][59]
- [Migration notes][60]
- [Download iTop 2.6.3][61]
[58]: https://www.itophub.io/wiki/page?id=2_6_0:release:change_log
[59]: https://www.itophub.io/wiki/page?id=2_6_0:release:2_6_whats_new
[60]: https://www.itophub.io/wiki/page?id=2_6_0:install:250_to_260_migration_notes
[61]: https://sourceforge.net/projects/itop/files/itop/2.6.3
### Versions 2.5.*
- 2.5.0 published on July 11, 2018
- [Changes since the previous version][54]
- [New features][55]
- [Migration notes][56]
- [Download iTop 2.5.1][57]
[54]: https://www.itophub.io/wiki/page?id=2_5_0:release:change_log
[55]: https://www.itophub.io/wiki/page?id=2_5_0:release:2_5_whats_new
[56]: https://www.itophub.io/wiki/page?id=2_5_0:install:240_to_250_migration_notes
[57]: https://sourceforge.net/projects/itop/files/itop/2.5.1
## About Us
iTop development is sponsored, led and supported by [Combodo][0].
[0]: https://www.combodo.com
## Contributors
We would like to give a special thank you to the people from the community who contributed to this project, including:
### Names
- Alves, David
- Beck, Pedro
- Bilger, Jean-François
- Bostoen, Jeffrey
- Cardoso, Anderson
- Cassaro, Bruno
- Casteleyn, Thomas
- Castro, Randall Badilla
- Colantoni, Maria Laura
- Couronné, Guy
- Dvořák, Lukáš
- Goethals, Stefan
- Gumble, David
- Hippler, Lars
- Khamit, Shamil
- Kincel, Martin
- Konečný, Kamil
- Kunin, Vladimir
- Lassiter, Dennis
- Lazcano, Federico
- Lucas, Jonathan
- Malik, Remie
- Mindêllo de Andrade, Lucas (a.k.a @rokam)
- Rosenke, Stephan
- Seki, Shoji
- Shilov, Vladimir
- Tulio, Marco
- Turrubiates, Miguel
### Aliases
- chifu1234
- cprobst
- Karkoff1212
- larhip
- Laura
- Purple Grape
- Schlobinux
- theBigOne
- ulmerspatz
### Companies
- Hardis
- ITOMIG
- Pimkie

36
SECURITY.md Normal file
View File

@@ -0,0 +1,36 @@
# 🔒 Reporting vulnerabilities
We take all security bugs seriously. Thank you for improving the security of iTop! We appreciate your efforts and
responsible disclosure and will make every effort to acknowledge your contributions.
## ✉️ How to report
### iTop vulnerabilities
Please send a procedure to reproduce iTop vulnerabilities to [itop-security@combodo.com](mailto:itop-security@combodo.com).
You can send us a standard "given / then / when" report, including iTop version, impacts, and maybe installed modules or data if they are
needed to reproduce.
### Dependencies vulnerabilities
Report security bugs in third-party modules to the person or team maintaining the module, and notify us of this report by sending an email
to [itop-security@combodo.com](mailto:itop-security@combodo.com).
## 📆 Disclosure Policy
Report sent to us will be acknowledged within the week.
Then, a Combodo developer will be assigned to the reported issue and will:
* confirm the problem and determine the affected iTop versions
* audit the code to search any potential similar problems
* try to find a workaround if any
* create fixes for all releases still under maintenance
* send you the commit(s) for review
* send you the next version(s) that will contain the fix, and the estimated release dates
Security issues always take precedence over bug fixes and feature work.
The assignee will keep you informed of the resolution progress, and may ask you for additional information or guidance.

View File

@@ -1,368 +1,363 @@
<?php
// Copyright (C) 2010-2012 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/>
/**
* UserRightsMatrix (User management Module)
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class UserRightsMatrixClassGrant extends DBObject
{
public static function Init()
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_ur_matrixclasses",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
}
}
class UserRightsMatrixClassStimulusGrant extends DBObject
{
public static function Init()
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_ur_matrixclassesstimulus",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("stimulus", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
}
}
class UserRightsMatrixAttributeGrant extends DBObject
{
public static function Init()
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_ur_matrixattributes",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("attcode", array("allowed_values"=>null, "sql"=>"attcode", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
}
}
class UserRightsMatrix extends UserRightsAddOnAPI
{
static public $m_aActionCodes = array(
UR_ACTION_READ => 'read',
UR_ACTION_MODIFY => 'modify',
UR_ACTION_DELETE => 'delete',
UR_ACTION_BULK_READ => 'bulk read',
UR_ACTION_BULK_MODIFY => 'bulk modify',
UR_ACTION_BULK_DELETE => 'bulk delete',
);
// Installation: create the very first user
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
{
// Maybe we should check that no other user with userid == 0 exists
$oUser = new UserLocal();
$oUser->Set('login', $sAdminUser);
$oUser->Set('password', $sAdminPwd);
$oUser->Set('contactid', 1); // one is for root !
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
// Create a change to record the history of the User object
$oChange = MetaModel::NewObject("CMDBChange");
$oChange->Set("date", time());
$oChange->Set("userinfo", "Initialization");
$iChangeId = $oChange->DBInsert();
// Now record the admin user object
$iUserId = $oUser->DBInsertTrackedNoReload($oChange, true /* skip security */);
$this->SetupUser($iUserId, true);
return true;
}
public function IsAdministrator($oUser)
{
return ($oUser->GetKey() == 1);
}
public function IsPortalUser($oUser)
{
return ($oUser->GetKey() == 1);
}
// Deprecated - create a new module !
public function Setup()
{
// Users must be added manually
// This procedure will then update the matrix when a new user is found or a new class/attribute appears
$oUserSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT User"));
while ($oUser = $oUserSet->Fetch())
{
$this->SetupUser($oUser->GetKey());
}
return true;
}
protected function SetupUser($iUserId, $bNewUser = false)
{
foreach(array('bizmodel', 'application', 'gui', 'core/cmdb') as $sCategory)
{
foreach (MetaModel::GetClasses($sCategory) as $sClass)
{
foreach (self::$m_aActionCodes as $iActionCode => $sAction)
{
if ($bNewUser)
{
$bAddCell = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassGrant WHERE class = '$sClass' AND action = '$sAction' AND userid = $iUserId"));
$bAddCell = ($oSet->Count() < 1);
}
if ($bAddCell)
{
// Create a new entry
$oMyClassGrant = MetaModel::NewObject("UserRightsMatrixClassGrant");
$oMyClassGrant->Set("userid", $iUserId);
$oMyClassGrant->Set("class", $sClass);
$oMyClassGrant->Set("action", $sAction);
$oMyClassGrant->Set("permission", "yes");
$iId = $oMyClassGrant->DBInsertNoReload();
}
}
foreach (MetaModel::EnumStimuli($sClass) as $sStimulusCode => $oStimulus)
{
if ($bNewUser)
{
$bAddCell = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassStimulusGrant WHERE class = '$sClass' AND stimulus = '$sStimulusCode' AND userid = $iUserId"));
$bAddCell = ($oSet->Count() < 1);
}
if ($bAddCell)
{
// Create a new entry
$oMyClassGrant = MetaModel::NewObject("UserRightsMatrixClassStimulusGrant");
$oMyClassGrant->Set("userid", $iUserId);
$oMyClassGrant->Set("class", $sClass);
$oMyClassGrant->Set("stimulus", $sStimulusCode);
$oMyClassGrant->Set("permission", "yes");
$iId = $oMyClassGrant->DBInsertNoReload();
}
}
foreach (MetaModel::GetAttributesList($sClass) as $sAttCode)
{
if ($bNewUser)
{
$bAddCell = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixAttributeGrant WHERE class = '$sClass' AND attcode = '$sAttCode' AND userid = $iUserId"));
$bAddCell = ($oSet->Count() < 1);
}
if ($bAddCell)
{
foreach (array('read', 'modify') as $sAction)
{
// Create a new entry
$oMyAttGrant = MetaModel::NewObject("UserRightsMatrixAttributeGrant");
$oMyAttGrant->Set("userid", $iUserId);
$oMyAttGrant->Set("class", $sClass);
$oMyAttGrant->Set("attcode", $sAttCode);
$oMyAttGrant->Set("action", $sAction);
$oMyAttGrant->Set("permission", "yes");
$iId = $oMyAttGrant->DBInsertNoReload();
}
}
}
}
}
/*
// Create the "My Bookmarks" menu item (parent_id = 0, rank = 6)
if ($bNewUser)
{
$bAddMenu = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT menuNode WHERE type = 'user' AND parent_id = 0 AND user_id = $iUserId"));
$bAddMenu = ($oSet->Count() < 1);
}
if ($bAddMenu)
{
$oMenu = MetaModel::NewObject('menuNode');
$oMenu->Set('type', 'user');
$oMenu->Set('parent_id', 0); // It's a toplevel entry
$oMenu->Set('rank', 6); // Located just above the Admin Tools section (=7)
$oMenu->Set('name', 'My Bookmarks');
$oMenu->Set('label', 'My Favorite Items');
$oMenu->Set('hyperlink', 'UI.php');
$oMenu->Set('template', '<p></p><p></p><p style="text-align:center; font-family:Georgia, Times, serif; font-size:32px;">My bookmarks</p><p style="text-align:center; font-family:Georgia, Times, serif; font-size:14px;"><i>This section contains my most favorite search results</i></p>');
$oMenu->Set('user_id', $iUserId);
$oMenu->DBInsert();
}
*/
}
public function Init()
{
// Could be loaded in a shared memory (?)
return true;
}
public function GetSelectFilter($oUser, $sClass, $aSettings = array())
{
$oNullFilter = new DBObjectSearch($sClass);
return $oNullFilter;
}
public function IsActionAllowed($oUser, $sClass, $iActionCode, $oInstanceSet = null)
{
if (!array_key_exists($iActionCode, self::$m_aActionCodes))
{
return UR_ALLOWED_NO;
}
$sAction = self::$m_aActionCodes[$iActionCode];
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassGrant WHERE class = '$sClass' AND action = '$sAction' AND userid = '{$oUser->GetKey()}'"));
if ($oSet->Count() < 1)
{
return UR_ALLOWED_NO;
}
$oGrantRecord = $oSet->Fetch();
switch ($oGrantRecord->Get('permission'))
{
case 'yes':
$iRetCode = UR_ALLOWED_YES;
break;
case 'no':
default:
$iRetCode = UR_ALLOWED_NO;
break;
}
return $iRetCode;
}
public function IsActionAllowedOnAttribute($oUser, $sClass, $sAttCode, $iActionCode, $oInstanceSet = null)
{
if (!array_key_exists($iActionCode, self::$m_aActionCodes))
{
return UR_ALLOWED_NO;
}
$sAction = self::$m_aActionCodes[$iActionCode];
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixAttributeGrant WHERE class = '$sClass' AND attcode = '$sAttCode' AND action = '$sAction' AND userid = '{$oUser->GetKey()}'"));
if ($oSet->Count() < 1)
{
return UR_ALLOWED_NO;
}
$oGrantRecord = $oSet->Fetch();
switch ($oGrantRecord->Get('permission'))
{
case 'yes':
$iRetCode = UR_ALLOWED_YES;
break;
case 'no':
default:
$iRetCode = UR_ALLOWED_NO;
break;
}
return $iRetCode;
}
public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, $oInstanceSet = null)
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassStimulusGrant WHERE class = '$sClass' AND stimulus = '$sStimulusCode' AND userid = '{$oUser->GetKey()}'"));
if ($oSet->Count() < 1)
{
return UR_ALLOWED_NO;
}
$oGrantRecord = $oSet->Fetch();
switch ($oGrantRecord->Get('permission'))
{
case 'yes':
$iRetCode = UR_ALLOWED_YES;
break;
case 'no':
default:
$iRetCode = UR_ALLOWED_NO;
break;
}
return $iRetCode;
}
public function FlushPrivileges()
{
}
}
UserRights::SelectModule('UserRightsMatrix');
?>
<?php
// Copyright (C) 2010-2012 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/>
/**
* UserRightsMatrix (User management Module)
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class UserRightsMatrixClassGrant extends DBObject
{
public static function Init()
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_ur_matrixclasses",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
}
}
class UserRightsMatrixClassStimulusGrant extends DBObject
{
public static function Init()
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_ur_matrixclassesstimulus",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("stimulus", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
}
}
class UserRightsMatrixAttributeGrant extends DBObject
{
public static function Init()
{
$aParams = array
(
"category" => "addon/userrights",
"key_type" => "autoincrement",
"name_attcode" => "",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_ur_matrixattributes",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
//MetaModel::Init_InheritAttributes();
MetaModel::Init_AddAttribute(new AttributeExternalKey("userid", array("targetclass"=>"User", "jointype"=> "", "allowed_values"=>null, "sql"=>"userid", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("login", array("allowed_values"=>null, "extkey_attcode"=> 'userid', "target_attcode"=>"login")));
MetaModel::Init_AddAttribute(new AttributeString("class", array("allowed_values"=>null, "sql"=>"class", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("attcode", array("allowed_values"=>null, "sql"=>"attcode", "default_value"=>null, "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("action", array("allowed_values"=>null, "sql"=>"action", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("permission", array("allowed_values"=>new ValueSetEnum('yes,no'), "sql"=>"permission", "default_value"=>"yes", "is_null_allowed"=>false, "depends_on"=>array())));
}
}
class UserRightsMatrix extends UserRightsAddOnAPI
{
static public $m_aActionCodes = array(
UR_ACTION_READ => 'read',
UR_ACTION_MODIFY => 'modify',
UR_ACTION_DELETE => 'delete',
UR_ACTION_BULK_READ => 'bulk read',
UR_ACTION_BULK_MODIFY => 'bulk modify',
UR_ACTION_BULK_DELETE => 'bulk delete',
);
// Installation: create the very first user
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
{
// Maybe we should check that no other user with userid == 0 exists
CMDBObject::SetTrackInfo('Initialization');
$oUser = new UserLocal();
$oUser->Set('login', $sAdminUser);
$oUser->Set('password', $sAdminPwd);
$oUser->Set('contactid', 1); // one is for root !
$oUser->Set('language', $sLanguage); // Language was chosen during the installation
// Now record the admin user object
$iUserId = $oUser->DBInsertNoReload();
$this->SetupUser($iUserId, true);
return true;
}
public function IsAdministrator($oUser)
{
return ($oUser->GetKey() == 1);
}
public function IsPortalUser($oUser)
{
return ($oUser->GetKey() == 1);
}
// Deprecated - create a new module !
public function Setup()
{
// Users must be added manually
// This procedure will then update the matrix when a new user is found or a new class/attribute appears
$oUserSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT User"));
while ($oUser = $oUserSet->Fetch())
{
$this->SetupUser($oUser->GetKey());
}
return true;
}
protected function SetupUser($iUserId, $bNewUser = false)
{
foreach(array('bizmodel', 'application', 'gui', 'core/cmdb') as $sCategory)
{
foreach (MetaModel::GetClasses($sCategory) as $sClass)
{
foreach (self::$m_aActionCodes as $iActionCode => $sAction)
{
if ($bNewUser)
{
$bAddCell = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassGrant WHERE class = '$sClass' AND action = '$sAction' AND userid = $iUserId"));
$bAddCell = ($oSet->Count() < 1);
}
if ($bAddCell)
{
// Create a new entry
$oMyClassGrant = MetaModel::NewObject("UserRightsMatrixClassGrant");
$oMyClassGrant->Set("userid", $iUserId);
$oMyClassGrant->Set("class", $sClass);
$oMyClassGrant->Set("action", $sAction);
$oMyClassGrant->Set("permission", "yes");
$iId = $oMyClassGrant->DBInsertNoReload();
}
}
foreach (MetaModel::EnumStimuli($sClass) as $sStimulusCode => $oStimulus)
{
if ($bNewUser)
{
$bAddCell = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassStimulusGrant WHERE class = '$sClass' AND stimulus = '$sStimulusCode' AND userid = $iUserId"));
$bAddCell = ($oSet->Count() < 1);
}
if ($bAddCell)
{
// Create a new entry
$oMyClassGrant = MetaModel::NewObject("UserRightsMatrixClassStimulusGrant");
$oMyClassGrant->Set("userid", $iUserId);
$oMyClassGrant->Set("class", $sClass);
$oMyClassGrant->Set("stimulus", $sStimulusCode);
$oMyClassGrant->Set("permission", "yes");
$iId = $oMyClassGrant->DBInsertNoReload();
}
}
foreach (MetaModel::GetAttributesList($sClass) as $sAttCode)
{
if ($bNewUser)
{
$bAddCell = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixAttributeGrant WHERE class = '$sClass' AND attcode = '$sAttCode' AND userid = $iUserId"));
$bAddCell = ($oSet->Count() < 1);
}
if ($bAddCell)
{
foreach (array('read', 'modify') as $sAction)
{
// Create a new entry
$oMyAttGrant = MetaModel::NewObject("UserRightsMatrixAttributeGrant");
$oMyAttGrant->Set("userid", $iUserId);
$oMyAttGrant->Set("class", $sClass);
$oMyAttGrant->Set("attcode", $sAttCode);
$oMyAttGrant->Set("action", $sAction);
$oMyAttGrant->Set("permission", "yes");
$iId = $oMyAttGrant->DBInsertNoReload();
}
}
}
}
}
/*
// Create the "My Bookmarks" menu item (parent_id = 0, rank = 6)
if ($bNewUser)
{
$bAddMenu = true;
}
else
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT menuNode WHERE type = 'user' AND parent_id = 0 AND user_id = $iUserId"));
$bAddMenu = ($oSet->Count() < 1);
}
if ($bAddMenu)
{
$oMenu = MetaModel::NewObject('menuNode');
$oMenu->Set('type', 'user');
$oMenu->Set('parent_id', 0); // It's a toplevel entry
$oMenu->Set('rank', 6); // Located just above the Admin Tools section (=7)
$oMenu->Set('name', 'My Bookmarks');
$oMenu->Set('label', 'My Favorite Items');
$oMenu->Set('hyperlink', 'UI.php');
$oMenu->Set('template', '<p></p><p></p><p style="text-align:center; font-family:Georgia, Times, serif; font-size:32px;">My bookmarks</p><p style="text-align:center; font-family:Georgia, Times, serif; font-size:14px;"><i>This section contains my most favorite search results</i></p>');
$oMenu->Set('user_id', $iUserId);
$oMenu->DBInsert();
}
*/
}
public function Init()
{
// Could be loaded in a shared memory (?)
return true;
}
public function GetSelectFilter($oUser, $sClass, $aSettings = array())
{
$oNullFilter = new DBObjectSearch($sClass);
return $oNullFilter;
}
public function IsActionAllowed($oUser, $sClass, $iActionCode, $oInstanceSet = null)
{
if (!array_key_exists($iActionCode, self::$m_aActionCodes))
{
return UR_ALLOWED_NO;
}
$sAction = self::$m_aActionCodes[$iActionCode];
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassGrant WHERE class = '$sClass' AND action = '$sAction' AND userid = '{$oUser->GetKey()}'"));
if ($oSet->Count() < 1)
{
return UR_ALLOWED_NO;
}
$oGrantRecord = $oSet->Fetch();
switch ($oGrantRecord->Get('permission'))
{
case 'yes':
$iRetCode = UR_ALLOWED_YES;
break;
case 'no':
default:
$iRetCode = UR_ALLOWED_NO;
break;
}
return $iRetCode;
}
public function IsActionAllowedOnAttribute($oUser, $sClass, $sAttCode, $iActionCode, $oInstanceSet = null)
{
if (!array_key_exists($iActionCode, self::$m_aActionCodes))
{
return UR_ALLOWED_NO;
}
$sAction = self::$m_aActionCodes[$iActionCode];
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixAttributeGrant WHERE class = '$sClass' AND attcode = '$sAttCode' AND action = '$sAction' AND userid = '{$oUser->GetKey()}'"));
if ($oSet->Count() < 1)
{
return UR_ALLOWED_NO;
}
$oGrantRecord = $oSet->Fetch();
switch ($oGrantRecord->Get('permission'))
{
case 'yes':
$iRetCode = UR_ALLOWED_YES;
break;
case 'no':
default:
$iRetCode = UR_ALLOWED_NO;
break;
}
return $iRetCode;
}
public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, $oInstanceSet = null)
{
$oSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT UserRightsMatrixClassStimulusGrant WHERE class = '$sClass' AND stimulus = '$sStimulusCode' AND userid = '{$oUser->GetKey()}'"));
if ($oSet->Count() < 1)
{
return UR_ALLOWED_NO;
}
$oGrantRecord = $oSet->Fetch();
switch ($oGrantRecord->Get('permission'))
{
case 'yes':
$iRetCode = UR_ALLOWED_YES;
break;
case 'no':
default:
$iRetCode = UR_ALLOWED_NO;
break;
}
return $iRetCode;
}
public function FlushPrivileges()
{
}
}
UserRights::SelectModule('UserRightsMatrix');
?>

View File

@@ -1,78 +1,78 @@
<?php
// Copyright (C) 2010-2012 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/>
/**
* UserRightsNull
* User management Module - say Yeah! to everything
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class UserRightsNull extends UserRightsAddOnAPI
{
// Installation: create the very first user
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
{
return true;
}
public function IsAdministrator($oUser)
{
return true;
}
public function IsPortalUser($oUser)
{
return true;
}
public function Init()
{
return true;
}
public function GetSelectFilter($oUser, $sClass, $aSettings = array())
{
$oNullFilter = new DBObjectSearch($sClass);
return $oNullFilter;
}
public function IsActionAllowed($oUser, $sClass, $iActionCode, $oInstanceSet = null)
{
return UR_ALLOWED_YES;
}
public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, $oInstanceSet = null)
{
return UR_ALLOWED_YES;
}
public function IsActionAllowedOnAttribute($oUser, $sClass, $sAttCode, $iActionCode, $oInstanceSet = null)
{
return UR_ALLOWED_YES;
}
public function FlushPrivileges()
{
}
}
UserRights::SelectModule('UserRightsNull');
?>
<?php
// Copyright (C) 2010-2012 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/>
/**
* UserRightsNull
* User management Module - say Yeah! to everything
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class UserRightsNull extends UserRightsAddOnAPI
{
// Installation: create the very first user
public function CreateAdministrator($sAdminUser, $sAdminPwd, $sLanguage = 'EN US')
{
return true;
}
public function IsAdministrator($oUser)
{
return true;
}
public function IsPortalUser($oUser)
{
return true;
}
public function Init()
{
return true;
}
public function GetSelectFilter($oUser, $sClass, $aSettings = array())
{
$oNullFilter = new DBObjectSearch($sClass);
return $oNullFilter;
}
public function IsActionAllowed($oUser, $sClass, $iActionCode, $oInstanceSet = null)
{
return UR_ALLOWED_YES;
}
public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, $oInstanceSet = null)
{
return UR_ALLOWED_YES;
}
public function IsActionAllowedOnAttribute($oUser, $sClass, $sAttCode, $iActionCode, $oInstanceSet = null)
{
return UR_ALLOWED_YES;
}
public function FlushPrivileges()
{
}
}
UserRights::SelectModule('UserRightsNull');
?>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,391 +1,415 @@
<?php
// Copyright (C) 2010-2018 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/>
/**
* Simple web page with no includes, header or fancy formatting, useful to
* generate HTML fragments when called by an AJAX method
*
* @copyright Copyright (C) 2010-2017 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class ajax_page extends WebPage implements iTabbedPage
{
/**
* Jquery style ready script
* @var Hash
*/
protected $m_sReadyScript;
protected $m_oTabs;
private $m_sMenu; // If set, then the menu will be updated
/**
* constructor for the web page
* @param string $s_title Not used
*/
function __construct($s_title)
{
$sPrintable = utils::ReadParam('printable', '0');
$bPrintable = ($sPrintable == '1');
parent::__construct($s_title, $bPrintable);
$this->m_sReadyScript = "";
//$this->add_header("Content-type: text/html; charset=utf-8");
$this->add_header("Cache-control: no-cache");
$this->m_oTabs = new TabManager();
$this->sContentType = 'text/html';
$this->sContentDisposition = 'inline';
$this->m_sMenu = "";
utils::InitArchiveMode();
}
public function AddTabContainer($sTabContainer, $sPrefix = '')
{
$this->add($this->m_oTabs->AddTabContainer($sTabContainer, $sPrefix));
}
public function AddToTab($sTabContainer, $sTabLabel, $sHtml)
{
$this->add($this->m_oTabs->AddToTab($sTabContainer, $sTabLabel, $sHtml));
}
public function SetCurrentTabContainer($sTabContainer = '')
{
return $this->m_oTabs->SetCurrentTabContainer($sTabContainer);
}
public function SetCurrentTab($sTabLabel = '')
{
return $this->m_oTabs->SetCurrentTab($sTabLabel);
}
/**
* Add a tab which content will be loaded asynchronously via the supplied URL
*
* Limitations:
* Cross site scripting is not not allowed for security reasons. Use a normal tab with an IFRAME if you want to pull content from another server.
* Static content cannot be added inside such tabs.
*
* @param string $sTabLabel The (localised) label of the tab
* @param string $sUrl The URL to load (on the same server)
* @param boolean $bCache Whether or not to cache the content of the tab once it has been loaded. flase will cause the tab to be reloaded upon each activation.
* @since 2.0.3
*/
public function AddAjaxTab($sTabLabel, $sUrl, $bCache = true)
{
$this->add($this->m_oTabs->AddAjaxTab($sTabLabel, $sUrl, $bCache));
}
public function GetCurrentTab()
{
return $this->m_oTabs->GetCurrentTab();
}
public function RemoveTab($sTabLabel, $sTabContainer = null)
{
$this->m_oTabs->RemoveTab($sTabLabel, $sTabContainer);
}
/**
* Finds the tab whose title matches a given pattern
* @return mixed The name of the tab as a string or false if not found
*/
public function FindTab($sPattern, $sTabContainer = null)
{
return $this->m_oTabs->FindTab($sPattern, $sTabContainer);
}
/**
* Make the given tab the active one, as if it were clicked
* DOES NOT WORK: apparently in the *old* version of jquery
* that we are using this is not supported... TO DO upgrade
* the whole jquery bundle...
*/
public function SelectTab($sTabContainer, $sTabLabel)
{
$this->add_ready_script($this->m_oTabs->SelectTab($sTabContainer, $sTabLabel));
}
public function AddToMenu($sHtml)
{
$this->m_sMenu .= $sHtml;
}
/**
* Echoes the content of the whole page
* @return void
*/
public function output()
{
if (!empty($this->sContentType))
{
$this->add_header('Content-type: '.$this->sContentType);
}
if (!empty($this->sContentDisposition))
{
$this->add_header('Content-Disposition: '.$this->sContentDisposition.'; filename="'.$this->sContentFileName.'"');
}
foreach($this->a_headers as $s_header)
{
header($s_header);
}
if ($this->m_oTabs->TabsContainerCount() > 0)
{
$this->add_ready_script(
<<<EOF
// The "tab widgets" to handle.
var tabs = $('div[id^=tabbedContent]');
// Ugly patch for a change in the behavior of jQuery UI:
// Before jQuery UI 1.9, tabs were always considered as "local" (opposed to Ajax)
// when their href was beginning by #. Starting with 1.9, a <base> tag in the page
// is taken into account and causes "local" tabs to be considered as Ajax
// unless their URL is equal to the URL of the page...
if ($('base').length > 0)
{
$('div[id^=tabbedContent] > ul > li > a').each(function() {
var sHash = location.hash;
var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, '');
$(this).attr("href", sCleanLocation+$(this).attr("href"));
});
}
if ($.bbq)
{
// This selector will be reused when selecting actual tab widget A elements.
var tab_a_selector = 'ul.ui-tabs-nav a';
// Enable tabs on all tab widgets. The `event` property must be overridden so
// that the tabs aren't changed on click, and any custom event name can be
// specified. Note that if you define a callback for the 'select' event, it
// will be executed for the selected tab whenever the hash changes.
tabs.tabs({ event: 'change' });
// Define our own click handler for the tabs, overriding the default.
tabs.find( tab_a_selector ).click(function()
{
var state = {};
// Get the id of this tab widget.
var id = $(this).closest( 'div[id^=tabbedContent]' ).attr( 'id' );
// Get the index of this tab.
var idx = $(this).parent().prevAll().length;
// Set the state!
state[ id ] = idx;
$.bbq.pushState( state );
});
}
else
{
tabs.tabs();
}
EOF
);
}
// Render the tabs in the page (if any)
$this->s_content = $this->m_oTabs->RenderIntoContent($this->s_content, $this);
// Additional UI widgets to be activated inside the ajax fragment
// Important: Testing the content type is not enough because some ajax handlers have not correctly positionned the flag (e.g json response corrupted by the script)
if (($this->sContentType == 'text/html') && (preg_match('/class="date-pick"/', $this->s_content) || preg_match('/class="datetime-pick"/', $this->s_content)) )
{
$this->add_ready_script(
<<<EOF
PrepareWidgets();
EOF
);
}
$s_captured_output = $this->ob_get_clean_safe();
if (($this->sContentType == 'text/html') && ($this->sContentDisposition == 'inline'))
{
// inline content != attachment && html => filter all scripts for malicious XSS scripts
echo self::FilterXSS($this->s_content);
}
else
{
echo $this->s_content;
}
if (!empty($this->m_sMenu))
{
$uid = time();
echo "<div id=\"accordion_temp_$uid\">\n";
echo "<div id=\"accordion\">\n";
echo "<!-- Beginning of the accordion menu -->\n";
echo self::FilterXSS($this->m_sMenu);
echo "<!-- End of the accordion menu-->\n";
echo "</div>\n";
echo "</div>\n";
echo "<script type=\"text/javascript\">\n";
echo "$('#inner_menu').html($('#accordion_temp_$uid').html());\n";
echo "$('#accordion_temp_$uid').remove();\n";
echo "\n</script>\n";
}
//echo $this->s_deferred_content;
if (count($this->a_scripts) > 0)
{
echo "<script type=\"text/javascript\">\n";
echo implode("\n", $this->a_scripts);
echo "\n</script>\n";
}
if (count($this->a_linked_scripts) > 0)
{
echo "<script type=\"text/javascript\">\n";
foreach($this->a_linked_scripts as $sScriptUrl)
{
echo '$.getScript('.json_encode($sScriptUrl).");\n";
}
echo "\n</script>\n";
}
if (!empty($this->s_deferred_content))
{
echo "<script type=\"text/javascript\">\n";
echo "\$('body').append('".addslashes(str_replace("\n", '', $this->s_deferred_content))."');\n";
echo "\n</script>\n";
}
if (!empty($this->m_sReadyScript))
{
echo "<script type=\"text/javascript\">\n";
echo $this->m_sReadyScript; // Ready Scripts are output as simple scripts
echo "\n</script>\n";
}
if (trim($s_captured_output) != "")
{
echo self::FilterXSS($s_captured_output);
}
if (class_exists('DBSearch'))
{
DBSearch::RecordQueryTrace();
}
}
/**
* Adds a paragraph with a smaller font into the page
* NOT implemented (i.e does nothing)
* @param string $sText Content of the (small) paragraph
* @return void
*/
public function small_p($sText)
{
}
public function add($sHtml)
{
if (($this->m_oTabs->GetCurrentTabContainer() != '') && ($this->m_oTabs->GetCurrentTab() != ''))
{
$this->m_oTabs->AddToTab($this->m_oTabs->GetCurrentTabContainer(), $this->m_oTabs->GetCurrentTab(), $sHtml);
}
else
{
parent::add($sHtml);
}
}
/**
* Records the current state of the 'html' part of the page output
* @return mixed The current state of the 'html' output
*/
public function start_capture()
{
$sCurrentTabContainer = $this->m_oTabs->GetCurrentTabContainer();
$sCurrentTab = $this->m_oTabs->GetCurrentTab();
if (!empty($sCurrentTabContainer) && !empty($sCurrentTab))
{
$iOffset = $this->m_oTabs->GetCurrentTabLength();
return array('tc' => $sCurrentTabContainer, 'tab' => $sCurrentTab, 'offset' => $iOffset);
}
else
{
return parent::start_capture();
}
}
/**
* Returns the part of the html output that occurred since the call to start_capture
* and removes this part from the current html output
* @param $offset mixed The value returned by start_capture
* @return string The part of the html output that was added since the call to start_capture
*/
public function end_capture($offset)
{
if (is_array($offset))
{
if ($this->m_oTabs->TabExists($offset['tc'], $offset['tab']))
{
$sCaptured = $this->m_oTabs->TruncateTab($offset['tc'], $offset['tab'], $offset['offset']);
}
else
{
$sCaptured = '';
}
}
else
{
$sCaptured = parent::end_capture($offset);
}
return $sCaptured;
}
/**
* Add any text or HTML fragment (identified by an ID) at the end of the body of the page
* This is useful to add hidden content, DIVs or FORMs that should not
* be embedded into each other.
*/
public function add_at_the_end($s_html, $sId = '')
{
if ($sId != '')
{
$this->add_script("$('#{$sId}').remove();"); // Remove any previous instance of the same Id
}
$this->s_deferred_content .= $s_html;
}
/**
* Adds a script to be executed when the DOM is ready (typical JQuery use)
* NOT implemented in this version of the class.
* @return void
*/
public function add_ready_script($sScript)
{
$this->m_sReadyScript .= $sScript."\n";
}
/**
* Cannot be called in this context, since Ajax pages do not share
* any context with the calling page !!
*/
public function GetUniqueId()
{
assert(false);
return 0;
}
public static function FilterXSS($sHTML)
{
return str_ireplace(array('<script', '</script>'), array('<!-- <removed-script', '</removed-script> -->'), $sHTML);
}
}
<?php
/**
* Copyright (C) 2013-2020 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
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class ajax_page extends WebPage implements iTabbedPage
{
/**
* Jquery style ready script
* @var array
*/
protected $m_sReadyScript;
protected $m_oTabs;
private $m_sMenu; // If set, then the menu will be updated
/**
* constructor for the web page
*
* @param string $s_title Not used
*/
function __construct($s_title) {
$sPrintable = utils::ReadParam('printable', '0');
$bPrintable = ($sPrintable == '1');
parent::__construct($s_title, $bPrintable);
$this->m_sReadyScript = "";
//$this->add_header("Content-type: text/html; charset=utf-8");
$this->no_cache();
$this->add_xframe_options();
$this->m_oTabs = new TabManager();
$this->sContentType = 'text/html';
$this->sContentDisposition = 'inline';
$this->m_sMenu = "";
utils::InitArchiveMode();
}
/**
* @inheritDoc
* @throws \Exception
*/
public function AddTabContainer($sTabContainer, $sPrefix = '')
{
$this->add($this->m_oTabs->AddTabContainer($sTabContainer, $sPrefix));
}
/**
* @inheritDoc
* @throws \Exception
*/
public function AddToTab($sTabContainer, $sTabCode, $sHtml)
{
$this->add($this->m_oTabs->AddToTab($sTabContainer, $sTabCode, $sHtml));
}
/**
* @inheritDoc
*/
public function SetCurrentTabContainer($sTabContainer = '')
{
return $this->m_oTabs->SetCurrentTabContainer($sTabContainer);
}
/**
* @inheritDoc
*/
public function SetCurrentTab($sTabCode = '', $sTabTitle = null)
{
return $this->m_oTabs->SetCurrentTab($sTabCode, $sTabTitle);
}
/**
* @inheritDoc
* @throws \Exception
*/
public function AddAjaxTab($sTabCode, $sUrl, $bCache = true, $sTabTitle = null)
{
$this->add($this->m_oTabs->AddAjaxTab($sTabCode, $sUrl, $bCache, $sTabTitle));
}
/**
* @inheritDoc
*/
public function GetCurrentTab()
{
return $this->m_oTabs->GetCurrentTab();
}
/**
* @inheritDoc
*/
public function RemoveTab($sTabCode, $sTabContainer = null)
{
$this->m_oTabs->RemoveTab($sTabCode, $sTabContainer);
}
/**
* @inheritDoc
*/
public function FindTab($sPattern, $sTabContainer = null)
{
return $this->m_oTabs->FindTab($sPattern, $sTabContainer);
}
/**
* Make the given tab the active one, as if it were clicked
* DOES NOT WORK: apparently in the *old* version of jquery
* that we are using this is not supported... TO DO upgrade
* the whole jquery bundle...
*/
public function SelectTab($sTabContainer, $sTabCode)
{
$this->add_ready_script($this->m_oTabs->SelectTab($sTabContainer, $sTabCode));
}
/**
* @param string $sHtml
*/
public function AddToMenu($sHtml)
{
$this->m_sMenu .= $sHtml;
}
/**
* @inheritDoc
*/
public function output()
{
if (!empty($this->sContentType))
{
$this->add_header('Content-type: '.$this->sContentType);
}
if (!empty($this->sContentDisposition))
{
$this->add_header('Content-Disposition: '.$this->sContentDisposition.'; filename="'.$this->sContentFileName.'"');
}
foreach($this->a_headers as $s_header)
{
header($s_header);
}
if ($this->m_oTabs->TabsContainerCount() > 0)
{
$this->add_ready_script(
<<<EOF
// The "tab widgets" to handle.
var tabs = $('div[id^=tabbedContent]');
// Ugly patch for a change in the behavior of jQuery UI:
// Before jQuery UI 1.9, tabs were always considered as "local" (opposed to Ajax)
// when their href was beginning by #. Starting with 1.9, a <base> tag in the page
// is taken into account and causes "local" tabs to be considered as Ajax
// unless their URL is equal to the URL of the page...
if ($('base').length > 0)
{
$('div[id^=tabbedContent] > ul > li > a').each(function() {
var sHash = location.hash;
var sCleanLocation = location.href.toString().replace(sHash, '').replace(/#$/, '');
$(this).attr("href", sCleanLocation+$(this).attr("href"));
});
}
if ($.bbq)
{
// This selector will be reused when selecting actual tab widget A elements.
var tab_a_selector = 'ul.ui-tabs-nav a';
// Enable tabs on all tab widgets. The `event` property must be overridden so
// that the tabs aren't changed on click, and any custom event name can be
// specified. Note that if you define a callback for the 'select' event, it
// will be executed for the selected tab whenever the hash changes.
tabs.tabs({ event: 'change' });
// Define our own click handler for the tabs, overriding the default.
tabs.find( tab_a_selector ).click(function()
{
var state = {};
// Get the id of this tab widget.
var id = $(this).closest( 'div[id^=tabbedContent]' ).attr( 'id' );
// Get the index of this tab.
var idx = $(this).parent().prevAll().length;
// Set the state!
state[ id ] = idx;
$.bbq.pushState( state );
});
}
else
{
tabs.tabs();
}
EOF
);
}
// Render the tabs in the page (if any)
$this->s_content = $this->m_oTabs->RenderIntoContent($this->s_content, $this);
// Additional UI widgets to be activated inside the ajax fragment
// Important: Testing the content type is not enough because some ajax handlers have not correctly positionned the flag (e.g json response corrupted by the script)
if (($this->sContentType == 'text/html') && (preg_match('/class="date-pick"/', $this->s_content) || preg_match('/class="datetime-pick"/', $this->s_content)) )
{
$this->add_ready_script(
<<<EOF
PrepareWidgets();
EOF
);
}
$this->outputCollapsibleSectionInit();
$oKPI = new ExecutionKPI();
$s_captured_output = $this->ob_get_clean_safe();
if (($this->sContentType == 'text/html') && ($this->sContentDisposition == 'inline'))
{
// inline content != attachment && html => filter all scripts for malicious XSS scripts
echo self::FilterXSS($this->s_content);
}
else
{
echo $this->s_content;
}
if (!empty($this->m_sMenu))
{
$uid = time();
echo "<div id=\"accordion_temp_$uid\">\n";
echo "<div id=\"accordion\">\n";
echo "<!-- Beginning of the accordion menu -->\n";
echo self::FilterXSS($this->m_sMenu);
echo "<!-- End of the accordion menu-->\n";
echo "</div>\n";
echo "</div>\n";
echo "<script type=\"text/javascript\">\n";
echo "$('#inner_menu').html($('#accordion_temp_$uid').html());\n";
echo "$('#accordion_temp_$uid').remove();\n";
echo "\n</script>\n";
}
//echo $this->s_deferred_content;
if (count($this->a_scripts) > 0)
{
echo "<script type=\"text/javascript\">\n";
echo implode("\n", $this->a_scripts);
echo "\n</script>\n";
}
if (count($this->a_linked_scripts) > 0)
{
echo "<script type=\"text/javascript\">\n";
foreach($this->a_linked_scripts as $sScriptUrl)
{
echo '$.getScript('.json_encode($sScriptUrl).");\n";
}
echo "\n</script>\n";
}
if (!empty($this->s_deferred_content))
{
echo "<script type=\"text/javascript\">\n";
echo "\$('body').append('".addslashes(str_replace("\n", '', $this->s_deferred_content))."');\n";
echo "\n</script>\n";
}
if (!empty($this->m_sReadyScript))
{
echo "<script type=\"text/javascript\">\n";
echo $this->m_sReadyScript; // Ready Scripts are output as simple scripts
echo "\n</script>\n";
}
if(count($this->a_linked_stylesheets) > 0)
{
echo "<script type=\"text/javascript\">";
foreach($this->a_linked_stylesheets as $aStylesheet)
{
$sStylesheetUrl = $aStylesheet['link'];
echo "if (!$('link[href=\"{$sStylesheetUrl}\"]').length) $('<link href=\"{$sStylesheetUrl}\" rel=\"stylesheet\">').appendTo('head');\n";
}
echo "\n</script>\n";
}
if (trim($s_captured_output) != "")
{
echo self::FilterXSS($s_captured_output);
}
$oKPI->ComputeAndReport('Echoing');
if (class_exists('DBSearch'))
{
DBSearch::RecordQueryTrace();
}
if (class_exists('ExecutionKPI'))
{
ExecutionKPI::ReportStats();
}
}
/**
* Adds a paragraph with a smaller font into the page
* NOT implemented (i.e does nothing)
* @param string $sText Content of the (small) paragraph
* @return void
*/
public function small_p($sText)
{
}
/**
* @inheritDoc
* @throws \Exception
*/
public function add($sHtml)
{
if (($this->m_oTabs->GetCurrentTabContainer() != '') && ($this->m_oTabs->GetCurrentTab() != ''))
{
$this->m_oTabs->AddToTab($this->m_oTabs->GetCurrentTabContainer(), $this->m_oTabs->GetCurrentTab(), $sHtml);
}
else
{
parent::add($sHtml);
}
}
/**
* @inheritDoc
*/
public function start_capture()
{
$sCurrentTabContainer = $this->m_oTabs->GetCurrentTabContainer();
$sCurrentTab = $this->m_oTabs->GetCurrentTab();
if (!empty($sCurrentTabContainer) && !empty($sCurrentTab))
{
$iOffset = $this->m_oTabs->GetCurrentTabLength();
return array('tc' => $sCurrentTabContainer, 'tab' => $sCurrentTab, 'offset' => $iOffset);
}
else
{
return parent::start_capture();
}
}
/**
* @inheritDoc
*/
public function end_capture($offset)
{
if (is_array($offset))
{
if ($this->m_oTabs->TabExists($offset['tc'], $offset['tab']))
{
$sCaptured = $this->m_oTabs->TruncateTab($offset['tc'], $offset['tab'], $offset['offset']);
}
else
{
$sCaptured = '';
}
}
else
{
$sCaptured = parent::end_capture($offset);
}
return $sCaptured;
}
/**
* @inheritDoc
*/
public function add_at_the_end($s_html, $sId = '')
{
if ($sId != '')
{
$this->add_script("$('#{$sId}').remove();"); // Remove any previous instance of the same Id
}
$this->s_deferred_content .= $s_html;
}
/**
* @inheritDoc
*/
public function add_ready_script($sScript)
{
$this->m_sReadyScript .= $sScript."\n";
}
/**
* @inheritDoc
*/
public function GetUniqueId()
{
assert(false);
return 0;
}
/**
* @inheritDoc
*/
public static function FilterXSS($sHTML)
{
return str_ireplace(array('<script', '</script>'), array('<!-- <removed-script', '</removed-script> -->'), $sHTML);
}
}

View File

@@ -1,40 +1,40 @@
<?php
// Copyright (C) 2010-2012 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/>
/**
* Includes all the classes to have the application up and running
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/applicationcontext.class.inc.php');
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
require_once(APPROOT.'/application/displayblock.class.inc.php');
require_once(APPROOT.'/application/audit.category.class.inc.php');
require_once(APPROOT.'/application/audit.rule.class.inc.php');
require_once(APPROOT.'/application/query.class.inc.php');
require_once(APPROOT.'/setup/moduleinstallation.class.inc.php');
//require_once(APPROOT.'/application/menunode.class.inc.php');
require_once(APPROOT.'/application/utils.inc.php');
class ApplicationException extends CoreException
{
}
?>
<?php
// Copyright (C) 2010-2012 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/>
/**
* Includes all the classes to have the application up and running
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/applicationcontext.class.inc.php');
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
require_once(APPROOT.'/application/displayblock.class.inc.php');
require_once(APPROOT.'/application/audit.category.class.inc.php');
require_once(APPROOT.'/application/audit.rule.class.inc.php');
require_once(APPROOT.'/application/query.class.inc.php');
require_once(APPROOT.'/setup/moduleinstallation.class.inc.php');
//require_once(APPROOT.'/application/menunode.class.inc.php');
require_once(APPROOT.'/application/utils.inc.php');
class ApplicationException extends CoreException
{
}
?>

View File

@@ -1,5 +1,5 @@
<?php
// Copyright (C) 2010-2012 Combodo SARL
// Copyright (C) 2010-2018 Combodo SARL
//
// This file is part of iTop.
//
@@ -20,7 +20,7 @@
/**
* Class ApplicationContext
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @copyright Copyright (C) 2010-2018 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
@@ -31,6 +31,12 @@ require_once(APPROOT."/application/utils.inc.php");
*/
interface iDBObjectURLMaker
{
/**
* @param string $sClass
* @param string $iId
*
* @return string
*/
public static function MakeObjectURL($sClass, $iId);
}
@@ -39,6 +45,13 @@ interface iDBObjectURLMaker
*/
class iTopStandardURLMaker implements iDBObjectURLMaker
{
/**
* @param string $sClass
* @param string $iId
*
* @return string
* @throws \Exception
*/
public static function MakeObjectURL($sClass, $iId)
{
$sPage = DBObject::ComputeStandardUIPage($sClass);
@@ -53,6 +66,13 @@ class iTopStandardURLMaker implements iDBObjectURLMaker
*/
class PortalURLMaker implements iDBObjectURLMaker
{
/**
* @param string $sClass
* @param string $iId
*
* @return string
* @throws \Exception
*/
public static function MakeObjectURL($sClass, $iId)
{
$sAbsoluteUrl = utils::GetAbsoluteUrlAppRoot();
@@ -74,10 +94,20 @@ class PortalURLMaker implements iDBObjectURLMaker
*/
class ApplicationContext
{
public static $m_sUrlMakerClass = null;
protected static $m_aPluginProperties = null;
protected static $aDefaultValues; // Cache shared among all instances
protected $aNames;
protected $aValues;
protected static $aDefaultValues; // Cache shared among all instances
/**
* ApplicationContext constructor.
*
* @param bool $bReadContext
*
* @throws \Exception
*/
public function __construct($bReadContext = true)
{
$this->aNames = array(
@@ -89,11 +119,13 @@ class ApplicationContext
}
}
/**
* Read the context directly in the PHP parameters (either POST or GET)
* return nothing
*/
/**
* Read the context directly in the PHP parameters (either POST or GET)
* return nothing
*
* @throws \Exception
*/
protected function ReadContext()
{
if (!isset(self::$aDefaultValues))
@@ -110,20 +142,26 @@ class ApplicationContext
}
// Hmm, there must be a better (more generic) way to handle the case below:
// When there is only one possible (allowed) organization, the context must be
// fixed to this org
// fixed to this org unless there is only one organization in the system then
// no filter is applied
if ($sName == 'org_id')
{
if (MetaModel::IsValidClass('Organization'))
{
$oSearchFilter = new DBObjectSearch('Organization');
$oSearchFilter->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', true);
$oSet = new CMDBObjectSet($oSearchFilter);
$iCount = $oSet->CountWithLimit(2);
if ($iCount == 1)
if ($iCount > 1)
{
// Only one possible value for org_id, set it in the context
$oOrg = $oSet->Fetch();
self::$aDefaultValues[$sName] = $oOrg->GetKey();
$oSearchFilter->SetModifierProperty('UserRightsGetSelectFilter', 'bSearchMode', true);
$oSet = new CMDBObjectSet($oSearchFilter);
$iCount = $oSet->CountWithLimit(2);
if ($iCount == 1)
{
// Only one possible value for org_id, set it in the context
$oOrg = $oSet->Fetch();
self::$aDefaultValues[$sName] = $oOrg->GetKey();
}
}
}
}
@@ -131,12 +169,15 @@ class ApplicationContext
}
$this->aValues = self::$aDefaultValues;
}
/**
* Returns the current value for the given parameter
* @param string $sParamName Name of the parameter to read
* @return mixed The value for this parameter
*/
/**
* Returns the current value for the given parameter
*
* @param string $sParamName Name of the parameter to read
* @param string $defaultValue
*
* @return mixed The value for this parameter
*/
public function GetCurrentValue($sParamName, $defaultValue = '')
{
if (isset($this->aValues[$sParamName]))
@@ -148,7 +189,7 @@ class ApplicationContext
/**
* Returns the context as string with the format name1=value1&name2=value2....
* return string The context as a string to be appended to an href property
* @return string The context as a string to be appended to an href property
*/
public function GetForLink()
{
@@ -162,7 +203,7 @@ class ApplicationContext
/**
* Returns the context as sequence of input tags to be inserted inside a <form> tag
* return string The context as a sequence of <input type="hidden" /> tags
* @return string The context as a sequence of <input type="hidden" /> tags
*/
public function GetForForm()
{
@@ -176,7 +217,7 @@ class ApplicationContext
/**
* Returns the context as a hash array 'parameter_name' => value
* return array The context information
* @return array The context information
*/
public function GetAsHash()
{
@@ -199,8 +240,7 @@ class ApplicationContext
/**
* Removes the specified parameter from the context, for example when the same parameter
* is already a search parameter
* @param string $sParamName Name of the parameter to remove
* @return none
* @param string $sParamName Name of the parameter to remove
*/
public function Reset($sParamName)
{
@@ -212,6 +252,11 @@ class ApplicationContext
/**
* Initializes the given object with the default values provided by the context
*
* @param \DBObject $oObj
*
* @throws \Exception
* @throws \CoreUnexpectedValue
*/
public function InitObjectFromContext(DBObject &$oObj)
{
@@ -238,13 +283,11 @@ class ApplicationContext
}
}
}
static $m_sUrlMakerClass = null;
/**
* Set the current application url provider
* @param sClass string Class implementing iDBObjectURLMaker
* @return void
* @param string $sClass Class implementing iDBObjectURLMaker
* @return string
*/
public static function SetUrlMakerClass($sClass = 'iTopStandardURLMaker')
{
@@ -278,7 +321,14 @@ class ApplicationContext
/**
* Get the current application url provider
*
* @param string $sObjClass
* @param string $sObjKey
* @param null $sUrlMakerClass
* @param bool $bWithNavigationContext
*
* @return string the name of the class
* @throws \Exception
*/
public static function MakeObjectUrl($sObjClass, $sObjKey, $sUrlMakerClass = null, $bWithNavigationContext = true)
{
@@ -306,8 +356,6 @@ class ApplicationContext
}
}
protected static $m_aPluginProperties = null;
/**
* Load plugin properties for the current session
* @return void
@@ -326,9 +374,9 @@ class ApplicationContext
/**
* Set plugin properties
* @param sPluginClass string Class implementing any plugin interface
* @param sProperty string Name of the property
* @param value scalar Value (numeric or string)
* @param string $sPluginClass Class implementing any plugin interface
* @param string $sProperty Name of the property
* @param mixed $value Value (numeric or string)
* @return void
*/
public static function SetPluginProperty($sPluginClass, $sProperty, $value)
@@ -341,7 +389,7 @@ class ApplicationContext
/**
* Get plugin properties
* @param sPluginClass string Class implementing any plugin interface
* @param string $sPluginClass Class implementing any plugin interface
* @return array of sProperty=>value pairs
*/
public static function GetPluginProperties($sPluginClass)
@@ -359,4 +407,3 @@ class ApplicationContext
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,60 +1,60 @@
<?php
// Copyright (C) 2010-2012 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/>
/**
* This class manages the audit "categories". Each category defines a set of objects
* to check and is linked to a set of rules that determine the valid or invalid objects
* inside the set
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
class AuditCategory extends cmdbAbstractObject
{
public static function Init()
{
$aParams = array
(
"category" => "application, grant_by_profile",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array('name'),
"db_table" => "priv_auditcategory",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_AddAttribute(new AttributeString("name", array("description"=>"Short name for this category", "allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeOQL("definition_set", array("allowed_values"=>null, "sql"=>"definition_set", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeLinkedSet("rules_list", array("linked_class"=>"AuditRule", "ext_key_to_me"=>"category_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array(), "edit_mode" => LINKSET_EDITMODE_INPLACE, "tracking_level" => LINKSET_TRACKING_ALL)));
// Display lists
MetaModel::Init_SetZListItems('details', array('name', 'description', 'definition_set', 'rules_list')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('description', )); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('description', 'definition_set')); // Criteria of the std search form
MetaModel::Init_SetZListItems('default_search', array('name', 'description')); // Criteria of the default search form
}
}
?>
<?php
// Copyright (C) 2010-2012 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/>
/**
* This class manages the audit "categories". Each category defines a set of objects
* to check and is linked to a set of rules that determine the valid or invalid objects
* inside the set
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
class AuditCategory extends cmdbAbstractObject
{
public static function Init()
{
$aParams = array
(
"category" => "application, grant_by_profile",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array('name'),
"db_table" => "priv_auditcategory",
"db_key_field" => "id",
"db_finalclass_field" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_AddAttribute(new AttributeString("name", array("description"=>"Short name for this category", "allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeOQL("definition_set", array("allowed_values"=>null, "sql"=>"definition_set", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeLinkedSet("rules_list", array("linked_class"=>"AuditRule", "ext_key_to_me"=>"category_id", "allowed_values"=>null, "count_min"=>0, "count_max"=>0, "depends_on"=>array(), "edit_mode" => LINKSET_EDITMODE_INPLACE, "tracking_level" => LINKSET_TRACKING_ALL)));
// Display lists
MetaModel::Init_SetZListItems('details', array('name', 'description', 'definition_set', 'rules_list')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('description', )); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('description', 'definition_set')); // Criteria of the std search form
MetaModel::Init_SetZListItems('default_search', array('name', 'description')); // Criteria of the default search form
}
}
?>

View File

@@ -1,64 +1,64 @@
<?php
// Copyright (C) 2010-2012 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/>
/**
* This class manages the audit "rule" linked to a given audit category.
* Each rule is based on an OQL expression that returns either the "good" objects
* 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-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/audit.category.class.inc.php');
class AuditRule extends cmdbAbstractObject
{
public static function Init()
{
$aParams = array
(
"category" => "application, grant_by_profile",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array('name'),
"db_table" => "priv_auditrule",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeOQL("query", array("allowed_values"=>null, "sql"=>"query", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("valid_flag", array("allowed_values"=>new ValueSetEnum('true,false'), "sql"=>"valid_flag", "default_value"=>"true", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("category_id", array("allowed_values"=>null, "sql"=>"category_id", "targetclass"=>"AuditCategory", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("category_name", array("allowed_values"=>null, "extkey_attcode"=> 'category_id', "target_attcode"=>"name")));
// Display lists
MetaModel::Init_SetZListItems('details', array('category_id', 'name', 'description', 'query', 'valid_flag')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('category_id', 'description', 'valid_flag')); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('category_id', 'name', 'description', 'valid_flag', 'query')); // Criteria of the std search form
MetaModel::Init_SetZListItems('default_search', array('name', 'description', 'category_id')); // Criteria of the advanced search form
}
}
?>
<?php
// Copyright (C) 2010-2012 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/>
/**
* This class manages the audit "rule" linked to a given audit category.
* Each rule is based on an OQL expression that returns either the "good" objects
* 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-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/audit.category.class.inc.php');
class AuditRule extends cmdbAbstractObject
{
public static function Init()
{
$aParams = array
(
"category" => "application, grant_by_profile",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array('name'),
"db_table" => "priv_auditrule",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeOQL("query", array("allowed_values"=>null, "sql"=>"query", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("valid_flag", array("allowed_values"=>new ValueSetEnum('true,false'), "sql"=>"valid_flag", "default_value"=>"true", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalKey("category_id", array("allowed_values"=>null, "sql"=>"category_id", "targetclass"=>"AuditCategory", "is_null_allowed"=>false, "on_target_delete"=>DEL_MANUAL, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeExternalField("category_name", array("allowed_values"=>null, "extkey_attcode"=> 'category_id', "target_attcode"=>"name")));
// Display lists
MetaModel::Init_SetZListItems('details', array('category_id', 'name', 'description', 'query', 'valid_flag')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('category_id', 'description', 'valid_flag')); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('category_id', 'name', 'description', 'valid_flag', 'query')); // Criteria of the std search form
MetaModel::Init_SetZListItems('default_search', array('name', 'description', 'category_id')); // Criteria of the advanced search form
}
}
?>

View File

@@ -1,84 +1,84 @@
<?php
// Copyright (C) 2016 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/>
/**
* Adapter class: when an API requires WebPage and you want to produce something else
*
* @copyright Copyright (C) 2016 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class CaptureWebPage extends WebPage
{
protected $aReadyScripts;
function __construct()
{
parent::__construct('capture web page');
$this->aReadyScripts = array();
}
public function GetHtml()
{
$trash = $this->ob_get_clean_safe();
return $this->s_content;
}
public function GetJS()
{
$sRet = implode("\n", $this->a_scripts);
if (!empty($this->s_deferred_content))
{
$sRet .= "\n\$('body').append('".addslashes(str_replace("\n", '', $this->s_deferred_content))."');";
}
return $sRet;
}
public function GetReadyJS()
{
return "\$(document).ready(function() {\n".implode("\n", $this->aReadyScripts)."\n});";
}
public function GetCSS()
{
return $this->a_styles;
}
public function GetJSFiles()
{
return $this->a_linked_scripts;
}
public function GetCSSFiles()
{
return $this->a_linked_stylesheets;
}
public function output()
{
throw new Exception(__method__.' should not be called');
}
public function add_ready_script($sScript)
{
$this->aReadyScripts[] = $sScript;
}
}
<?php
// Copyright (C) 2016 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/>
/**
* Adapter class: when an API requires WebPage and you want to produce something else
*
* @copyright Copyright (C) 2016 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class CaptureWebPage extends WebPage
{
protected $aReadyScripts;
function __construct()
{
parent::__construct('capture web page');
$this->aReadyScripts = array();
}
public function GetHtml()
{
$trash = $this->ob_get_clean_safe();
return $this->s_content;
}
public function GetJS()
{
$sRet = implode("\n", $this->a_scripts);
if (!empty($this->s_deferred_content))
{
$sRet .= "\n\$('body').append('".addslashes(str_replace("\n", '', $this->s_deferred_content))."');";
}
return $sRet;
}
public function GetReadyJS()
{
return "\$(document).ready(function() {\n".implode("\n", $this->aReadyScripts)."\n});";
}
public function GetCSS()
{
return $this->a_styles;
}
public function GetJSFiles()
{
return $this->a_linked_scripts;
}
public function GetCSSFiles()
{
return $this->a_linked_stylesheets;
}
public function output()
{
throw new Exception(__method__.' should not be called');
}
public function add_ready_script($sScript)
{
$this->aReadyScripts[] = $sScript;
}
}

View File

@@ -1,97 +1,97 @@
<?php
// Copyright (C) 2010-2015 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/>
/**
* CLI page
* The page adds the content-type text/XML and the encoding into the headers
*
* @copyright Copyright (C) 2010-2015 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class CLIPage implements Page
{
function __construct($s_title)
{
}
public function output()
{
if (class_exists('DBSearch'))
{
DBSearch::RecordQueryTrace();
}
if (class_exists('ExecutionKPI'))
{
ExecutionKPI::ReportStats();
}
}
public function add($sText)
{
echo $sText;
}
public function p($sText)
{
echo $sText."\n";
}
public function pre($sText)
{
echo $sText."\n";
}
public function add_comment($sText)
{
echo "#".$sText."\n";
}
public function table($aConfig, $aData, $aParams = array())
{
$aCells = array();
foreach($aConfig as $sName=>$aDef)
{
if (strlen($aDef['description']) > 0)
{
$aCells[] = $aDef['label'].' ('.$aDef['description'].')';
}
else
{
$aCells[] = $aDef['label'];
}
}
echo implode(';', $aCells)."\n";
foreach($aData as $aRow)
{
$aCells = array();
foreach($aConfig as $sName=>$aAttribs)
{
$sValue = $aRow["$sName"];
$aCells[] = $sValue;
}
echo implode(';', $aCells)."\n";
}
}
}
?>
<?php
// Copyright (C) 2010-2015 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/>
/**
* CLI page
* The page adds the content-type text/XML and the encoding into the headers
*
* @copyright Copyright (C) 2010-2015 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class CLIPage implements Page
{
function __construct($s_title)
{
}
public function output()
{
if (class_exists('DBSearch'))
{
DBSearch::RecordQueryTrace();
}
if (class_exists('ExecutionKPI'))
{
ExecutionKPI::ReportStats();
}
}
public function add($sText)
{
echo $sText;
}
public function p($sText)
{
echo $sText."\n";
}
public function pre($sText)
{
echo $sText."\n";
}
public function add_comment($sText)
{
echo "#".$sText."\n";
}
public function table($aConfig, $aData, $aParams = array())
{
$aCells = array();
foreach($aConfig as $sName=>$aDef)
{
if (strlen($aDef['description']) > 0)
{
$aCells[] = $aDef['label'].' ('.$aDef['description'].')';
}
else
{
$aCells[] = $aDef['label'];
}
}
echo implode(';', $aCells)."\n";
foreach($aData as $aRow)
{
$aCells = array();
foreach($aConfig as $sName=>$aAttribs)
{
$sValue = $aRow["$sName"];
$aCells[] = $sValue;
}
echo implode(';', $aCells)."\n";
}
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,111 +1,111 @@
<?php
// Copyright (C) 2010-2015 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/>
/**
* Simple web page with no includes or fancy formatting, useful to generateXML documents
* The page adds the content-type text/XML and the encoding into the headers
*
* @copyright Copyright (C) 2010-2015 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class CSVPage extends WebPage
{
function __construct($s_title)
{
parent::__construct($s_title);
$this->add_header("Content-type: text/plain; charset=utf-8");
$this->add_header("Cache-control: no-cache");
//$this->add_header("Content-Transfer-Encoding: binary");
}
public function output()
{
$this->add_header("Content-Length: ".strlen(trim($this->s_content)));
// Get the unexpected output but do nothing with it
$sTrash = $this->ob_get_clean_safe();
foreach($this->a_headers as $s_header)
{
header($s_header);
}
echo trim($this->s_content);
echo "\n";
if (class_exists('DBSearch'))
{
DBSearch::RecordQueryTrace();
}
if (class_exists('ExecutionKPI'))
{
ExecutionKPI::ReportStats();
}
}
public function small_p($sText)
{
}
public function add($sText)
{
$this->s_content .= $sText;
}
public function p($sText)
{
$this->s_content .= $sText."\n";
}
public function add_comment($sText)
{
$this->s_content .= "#".$sText."\n";
}
public function table($aConfig, $aData, $aParams = array())
{
$aCells = array();
foreach($aConfig as $sName=>$aDef)
{
if (strlen($aDef['description']) > 0)
{
$aCells[] = $aDef['label'].' ('.$aDef['description'].')';
}
else
{
$aCells[] = $aDef['label'];
}
}
$this->s_content .= implode(';', $aCells)."\n";
foreach($aData as $aRow)
{
$aCells = array();
foreach($aConfig as $sName=>$aAttribs)
{
$sValue = $aRow["$sName"];
$aCells[] = $sValue;
}
$this->s_content .= implode(';', $aCells)."\n";
}
}
}
<?php
// Copyright (C) 2010-2015 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/>
/**
* Simple web page with no includes or fancy formatting, useful to generateXML documents
* The page adds the content-type text/XML and the encoding into the headers
*
* @copyright Copyright (C) 2010-2015 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
class CSVPage extends WebPage
{
function __construct($s_title) {
parent::__construct($s_title);
$this->add_header("Content-type: text/plain; charset=".self::PAGES_CHARSET);
$this->no_cache();
$this->add_xframe_options();
//$this->add_header("Content-Transfer-Encoding: binary");
}
public function output()
{
$this->add_header("Content-Length: ".strlen(trim($this->s_content)));
// Get the unexpected output but do nothing with it
$sTrash = $this->ob_get_clean_safe();
foreach($this->a_headers as $s_header)
{
header($s_header);
}
echo trim($this->s_content);
echo "\n";
if (class_exists('DBSearch'))
{
DBSearch::RecordQueryTrace();
}
if (class_exists('ExecutionKPI'))
{
ExecutionKPI::ReportStats();
}
}
public function small_p($sText)
{
}
public function add($sText)
{
$this->s_content .= $sText;
}
public function p($sText)
{
$this->s_content .= $sText."\n";
}
public function add_comment($sText)
{
$this->s_content .= "#".$sText."\n";
}
public function table($aConfig, $aData, $aParams = array())
{
$aCells = array();
foreach($aConfig as $sName=>$aDef)
{
if (strlen($aDef['description']) > 0)
{
$aCells[] = $aDef['label'].' ('.$aDef['description'].')';
}
else
{
$aCells[] = $aDef['label'];
}
}
$this->s_content .= implode(';', $aCells)."\n";
foreach($aData as $aRow)
{
$aCells = array();
foreach($aConfig as $sName=>$aAttribs)
{
$sValue = $aRow["$sName"];
$aCells[] = $sValue;
}
$this->s_content .= implode(';', $aCells)."\n";
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -26,14 +26,17 @@
abstract class DashboardLayout
{
public function __construct()
{
}
abstract public function Render($oPage, $aDashlets, $bEditMode = false);
/**
* @param int $iCellIdx
*
* @return array Containing 2 scalars: Col number and row number (starting from 0)
* @since 2.7.0
*/
abstract public function GetDashletCoordinates($iCellIdx);
static public function GetInfo()
public static function GetInfo()
{
return array(
'label' => '',
@@ -51,7 +54,7 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
{
$this->iNbCols = 1;
}
protected function TrimCell($aDashlets)
{
$aKeys = array_reverse(array_keys($aDashlets));
@@ -59,8 +62,9 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
$bNoVisibleFound = true;
while($idx < count($aKeys) && $bNoVisibleFound)
{
/** @var \Dashlet $oDashlet */
$oDashlet = $aDashlets[$aKeys[$idx]];
if ($oDashlet->IsVisible())
if ($oDashlet::IsVisible())
{
$bNoVisibleFound = false;
}
@@ -98,33 +102,41 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
return $aCells;
}
/**
* @param \WebPage $oPage
* @param $aCells
* @param bool $bEditMode
* @param array $aExtraParams
*/
public function Render($oPage, $aCells, $bEditMode = false, $aExtraParams = array())
{
// Trim the list of cells to remove the invisible/empty ones at the end of the array
$aCells = $this->TrimCellsArray($aCells);
$oPage->add('<table style="width:100%;table-layout:fixed;"><tbody>');
$iCellIdx = 0;
$fColSize = 100 / $this->iNbCols;
$sStyle = $bEditMode ? 'border: 1px #ccc dashed; width:'.$fColSize.'%;' : 'width: '.$fColSize.'%;';
$sClass = $bEditMode ? 'layout_cell edit_mode' : 'dashboard';
$iNbRows = ceil(count($aCells) / $this->iNbCols);
for($iRows = 0; $iRows < $iNbRows; $iRows++)
{
$oPage->add('<tr>');
$oPage->add("<tr data-dashboard-row-index=\"$iRows\">");
for($iCols = 0; $iCols < $this->iNbCols; $iCols++)
{
$sCellClass = ($iRows == $iNbRows-1) ? $sClass.' layout_last_used_rank' : $sClass;
$oPage->add("<td style=\"$sStyle\" class=\"$sCellClass\" data-dashboard-cell-index=\"$iCellIdx\">");
$oPage->add("<td style=\"$sStyle\" class=\"$sCellClass\" data-dashboard-column-index=\"$iCols\" data-dashboard-cell-index=\"$iCellIdx\">");
if (array_key_exists($iCellIdx, $aCells))
{
$aDashlets = $aCells[$iCellIdx];
if (count($aDashlets) > 0)
{
/** @var \Dashlet $oDashlet */
foreach($aDashlets as $oDashlet)
{
if ($oDashlet->IsVisible())
if ($oDashlet::IsVisible())
{
$oDashlet->DoRender($oPage, $bEditMode, true /* bEnclosingDiv */, $aExtraParams);
}
@@ -147,10 +159,10 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
if ($bEditMode) // Add one row for extensibility
{
$sStyle = 'style="border: 1px #ccc dashed; width:'.$fColSize.'%;" class="layout_cell edit_mode layout_extension" data-dashboard-cell-index="'.$iCellIdx.'"';
$oPage->add('<tr>');
$oPage->add("<tr data-dashboard-row-index=\"$iRows\">");
for($iCols = 0; $iCols < $this->iNbCols; $iCols++)
{
$oPage->add("<td $sStyle>");
$oPage->add("<td $sStyle data-dashboard-column-index=\"$iCols\">");
$oPage->add('&nbsp;');
$oPage->add('</td>');
}
@@ -158,6 +170,17 @@ abstract class DashboardLayoutMultiCol extends DashboardLayout
}
$oPage->add('</tbody></table>');
}
/**
* @inheritDoc
*/
public function GetDashletCoordinates($iCellIdx)
{
$iColNumber = (int) $iCellIdx % $this->iNbCols;
$iRowNumber = (int) floor($iCellIdx / $this->iNbCols);
return array($iColNumber, $iRowNumber);
}
}
class DashboardLayoutOneCol extends DashboardLayoutMultiCol

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.5">
<itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.7">
<portals>
<portal id="legacy_portal" _delta="define">
<url>portal/index.php</url>
<rank>1.0</rank>
<handler/>
<allow>
</allow>
<deny/>
</portal>
<portal id="backoffice" _delta="define">
<url>pages/UI.php</url>
<rank>2.0</rank>
@@ -23,5 +15,10 @@
<menu id="AdminTools" xsi:type="MenuGroup" _delta="define">
<rank>80</rank>
</menu>
<menu id="SystemTools" xsi:type="MenuGroup" _delta="define">
<rank>100</rank>
<enable_class>ResourceSystemMenu</enable_class>
<enable_action>UR_ACTION_MODIFY</enable_action>
</menu>
</menus>
</itop_design>

View File

@@ -1,30 +1,27 @@
<?php
// Copyright (C) 2010-2017 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/>
/**
* Data Table to display a set of objects in a tabular manner in HTML
* Copyright (C) 2013-2020 Combodo SARL
*
* @copyright Copyright (C) 2010-2017 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
* 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
*/
class DataTable
{
protected $iListId; // Unique ID inside the web page
/** @var string */
private $sDatatableContainerId;
protected $sTableId; // identifier for saving the settings (combined with the class aliases)
protected $oSet; // The set of objects to display
protected $aClassAliases; // The aliases (alias => class) inside the set
@@ -34,14 +31,20 @@ class DataTable
protected $bShowObsoleteData;
/**
* @param $iListId mixed Unique ID for this div/table in the page
* @param $oSet DBObjectSet The set of data to display
* @param $aClassAliases Hash The list of classes/aliases to be displayed in this set $sAlias => $sClassName
* @param $sTableId mixed A string (or null) identifying this table in order to persist its settings
* @param string $iListId Unique ID for this div/table in the page
* @param DBObjectSet $oSet The set of data to display
* @param array$aClassAliases The list of classes/aliases to be displayed in this set $sAlias => $sClassName
* @param string $sTableId A string (or null) identifying this table in order to persist its settings
*
* @throws \CoreException
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
*/
public function __construct($iListId, $oSet, $aClassAliases, $sTableId = null)
{
$this->iListId = utils::GetSafeId($iListId); // Make a "safe" ID for jQuery
$this->sDatatableContainerId = 'datatable_'.utils::GetSafeId($iListId);
$this->oSet = $oSet;
$this->aClassAliases = $aClassAliases;
$this->sTableId = $sTableId;
@@ -50,7 +53,19 @@ class DataTable
$this->oDefaultSettings = null;
$this->bShowObsoleteData = $oSet->GetShowObsoleteData();
}
/**
* @param \WebPage $oPage
* @param \DataTableSettings $oSettings
* @param $bActionsMenu
* @param $sSelectMode
* @param $bViewLink
* @param $aExtraParams
*
* @return string
* @throws \CoreException
* @throws \MySQLException
*/
public function Display(WebPage $oPage, DataTableSettings $oSettings, $bActionsMenu, $sSelectMode, $bViewLink, $aExtraParams)
{
$this->oDefaultSettings = $oSettings;
@@ -119,7 +134,23 @@ class DataTable
return $this->GetAsHTML($oPage, $oCustomSettings->iDefaultPageSize, $oCustomSettings->iDefaultPageSize, 0, $oCustomSettings->aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams);
}
/**
* @param \WebPage $oPage
* @param $iPageSize
* @param $iDefaultPageSize
* @param $iPageIndex
* @param $aColumns
* @param $bActionsMenu
* @param $bToolkitMenu
* @param $sSelectMode
* @param $bViewLink
* @param $aExtraParams
*
* @return string
* @throws \ArchivedObjectException
* @throws \CoreException
*/
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
{
$sObjectsCount = $this->GetObjectCount($oPage, $sSelectMode);
@@ -137,7 +168,7 @@ class DataTable
$sDataTable = $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
$sConfigDlg = $this->GetTableConfigDlg($oPage, $aColumns, $bViewLink, $iDefaultPageSize);
$sHtml = "<table id=\"datatable_{$this->iListId}\" class=\"datatable\">";
$sHtml = "<table id=\"{$this->sDatatableContainerId}\" class=\"datatable\">";
$sHtml .= "<tr><td>";
$sHtml .= "<table style=\"width:100%;\">";
$sHtml .= "<tr><td class=\"pagination_container\">$sObjectsCount</td><td class=\"menucontainer\">$sToolkitMenu $sActionsMenu</td></tr>";
@@ -173,7 +204,7 @@ class DataTable
$aOptions['oDefaultSettings'] = $this->GetAsHash($this->oDefaultSettings);
}
$sJSOptions = json_encode($aOptions);
$oPage->add_ready_script("$('#datatable_{$this->iListId}').datatable($sJSOptions);");
$oPage->add_ready_script("$('#{$this->sDatatableContainerId}').datatable($sJSOptions);");
return $sHtml;
}
@@ -184,6 +215,10 @@ class DataTable
*/
public function GetAsHTMLTableRows(WebPage $oPage, $iPageSize, $aColumns, $sSelectMode, $bViewLink, $aExtraParams)
{
if ($iPageSize < 1)
{
$iPageSize = -1; // convention: no pagination
}
$aAttribs = $this->GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink);
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
@@ -194,7 +229,13 @@ class DataTable
}
return $sHtml;
}
/**
* @param \WebPage $oPage
* @param $sSelectMode
*
* @return string
*/
protected function GetObjectCount(WebPage $oPage, $sSelectMode)
{
if (($sSelectMode == 'single') || ($sSelectMode == 'multiple'))
@@ -207,6 +248,15 @@ class DataTable
}
return $sHtml;
}
/**
* @param \WebPage $oPage
* @param $iPageSize
* @param $iDefaultPageSize
* @param $iPageIndex
*
* @return string
*/
protected function GetPager(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex)
{
$sHtml = '';
@@ -222,14 +272,21 @@ class DataTable
}
$sCombo = '<select class="pagesize">';
for($iPage = 1; $iPage < 5; $iPage++)
if($iPageSize < 1)
{
$iNbItems = $iPage * $iDefaultPageSize;
$sSelected = ($iNbItems == $iPageSize) ? 'selected="selected"' : '';
$sCombo .= "<option $sSelected value=\"$iNbItems\">$iNbItems</option>";
$sCombo .= "<option selected=\"selected\" value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
}
$sSelected = ($iPageSize < 1) ? 'selected="selected"' : '';
$sCombo .= "<option $sSelected value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
else
{
for($iPage = 1; $iPage < 5; $iPage++)
{
$iNbItems = $iPage * $iDefaultPageSize;
$sSelected = ($iNbItems == $iPageSize) ? 'selected="selected"' : '';
$sCombo .= "<option $sSelected value=\"$iNbItems\">$iNbItems</option>";
}
$sCombo .= "<option value=\"-1\">".Dict::S('UI:Pagination:All')."</option>";
}
$sCombo .= '</select>';
$sPages = Dict::S('UI:Pagination:PagesLabel');
@@ -284,7 +341,17 @@ class DataTable
EOF;
return $sHtml;
}
/**
* @param \WebPage $oPage
* @param $aExtraParams
*
* @return string
* @throws \CoreException
* @throws \DictExceptionMissingString
* @throws \MissingQueryArgument
* @throws \MySQLException
*/
protected function GetActionsMenu(WebPage $oPage, $aExtraParams)
{
$oMenuBlock = new MenuBlock($this->oSet->GetFilter(), 'list');
@@ -292,13 +359,20 @@ EOF;
$sHtml = $oMenuBlock->GetRenderContent($oPage, $aExtraParams, $this->iListId);
return $sHtml;
}
/**
* @param \WebPage $oPage
* @param $aExtraParams
*
* @return string
* @throws \Exception
*/
protected function GetToolkitMenu(WebPage $oPage, $aExtraParams)
{
if (!$oPage->IsPrintableVersion())
{
$sMenuTitle = Dict::S('UI:ConfigureThisList');
$sHtml = '<div class="itop_popup toolkit_menu" id="tk_'.$this->iListId.'"><ul><li><img src="../images/toolkit_menu.png?t='.utils::GetCacheBusterTimestamp().'"><ul>';
$sHtml = '<div class="itop_popup toolkit_menu" id="tk_'.$this->iListId.'"><ul><li><i class="fas fa-tools"></i><i class="fas fa-caret-down"></i><ul>';
$oMenuItem1 = new JSPopupMenuItem('iTop::ConfigureList', $sMenuTitle, "$('#datatable_dlg_".$this->iListId."').dialog('open');");
$aActions = array(
@@ -315,7 +389,15 @@ EOF;
}
return $sHtml;
}
/**
* @param \WebPage $oPage
* @param $aColumns
* @param $bViewLink
* @param $iDefaultPageSize
*
* @return string
*/
protected function GetTableConfigDlg(WebPage $oPage, $aColumns, $bViewLink, $iDefaultPageSize)
{
$sHtml = "<div id=\"datatable_dlg_{$this->iListId}\" style=\"display: none;\">";
@@ -339,35 +421,54 @@ EOF;
$sHtml .= "<input id=\"dtbl_dlg_all_{$this->iListId}\" type=\"radio\" name=\"scope\" $sGenericChecked value=\"defaults\"><label for=\"dtbl_dlg_all_{$this->iListId}\">&nbsp;".Dict::S('UI:ForAllLists').'</label></p>';
$sHtml .= "</fieldset>";
$sHtml .= '<table style="width:100%"><tr><td style="text-align:center;">';
$sHtml .= '<button type="button" onclick="$(\'#datatable_'.$this->iListId.'\').datatable(\'onDlgCancel\'); $(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\')">'.Dict::S('UI:Button:Cancel').'</button>';
$sHtml .= '<button type="button" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgCancel\'); $(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\')">'.Dict::S('UI:Button:Cancel').'</button>';
$sHtml .= '</td><td style="text-align:center;">';
$sHtml .= '<button type="submit" onclick="$(\'#datatable_'.$this->iListId.'\').datatable(\'onDlgOk\');$(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\');">'.Dict::S('UI:Button:Ok').'</button>';
$sHtml .= '<button type="submit" onclick="$(\'#'.$this->sDatatableContainerId.'\').datatable(\'onDlgOk\');$(\'#datatable_dlg_'.$this->iListId.'\').dialog(\'close\');">'.Dict::S('UI:Button:Ok').'</button>';
$sHtml .= '</td></tr></table>';
$sHtml .= "</form>";
$sHtml .= "</div>";
$sDlgTitle = addslashes(Dict::S('UI:ListConfigurationTitle'));
$oPage->add_ready_script("$('#datatable_dlg_{$this->iListId}').dialog({autoOpen: false, title: '$sDlgTitle', width: 500, close: function() { $('#datatable_{$this->iListId}').datatable('onDlgCancel'); } });");
$oPage->add_ready_script("$('#datatable_dlg_{$this->iListId}').dialog({autoOpen: false, title: '$sDlgTitle', width: 500, close: function() { $('#{$this->sDatatableContainerId}').datatable('onDlgCancel'); } });");
return $sHtml;
}
/**
* @param $oSetting
*
* @return array
*/
public function GetAsHash($oSetting)
{
$aSettings = array('iDefaultPageSize' => $oSetting->iDefaultPageSize, 'oColumns' => $oSetting->aColumns);
return $aSettings;
}
/**
* @param array $aColumns
* @param string $sSelectMode
* @param bool $bViewLink
*
* @return array
* @throws \CoreException
* @throws \DictExceptionMissingString
* @throws \Exception
*/
protected function GetHTMLTableConfig($aColumns, $sSelectMode, $bViewLink)
{
$aAttribs = array();
if ($sSelectMode == 'multiple')
{
$aAttribs['form::select'] = array('label' => "<input type=\"checkbox\" onClick=\"CheckAll('.selectList{$this->iListId}:not(:disabled)', this.checked);\" class=\"checkAll\"></input>", 'description' => Dict::S('UI:SelectAllToggle+'));
$aAttribs['form::select'] = array(
'label' => "<input type=\"checkbox\" onClick=\"CheckAll('.selectList{$this->iListId}:not(:disabled)', this.checked);\" class=\"checkAll\"></input>",
'description' => Dict::S('UI:SelectAllToggle+'),
'metadata' => array(),
);
}
else if ($sSelectMode == 'single')
{
$aAttribs['form::select'] = array('label' => "", 'description' => '');
$aAttribs['form::select'] = array('label' => '', 'description' => '', 'metadata' => array());
}
foreach($this->aClassAliases as $sAlias => $sClassName)
@@ -378,19 +479,55 @@ EOF;
{
if ($sAttCode == '_key_')
{
$aAttribs['key_'.$sAlias] = array('label' => MetaModel::GetName($sClassName), 'description' => '');
$sAttLabel = MetaModel::GetName($sClassName);
$aAttribs['key_'.$sAlias] = array(
'label' => $sAttLabel,
'description' => '',
'metadata' => array(
'object_class' => $sClassName,
'attribute_label' => $sAttLabel,
),
);
}
else
{
$oAttDef = MetaModel::GetAttributeDef($sClassName, $sAttCode);
$aAttribs[$sAttCode.'_'.$sAlias] = array('label' => MetaModel::GetLabel($sClassName, $sAttCode), 'description' => $oAttDef->GetOrderByHint());
$sAttDefClass = get_class($oAttDef);
$sAttLabel = MetaModel::GetLabel($sClassName, $sAttCode);
$aAttribs[$sAttCode.'_'.$sAlias] = array(
'label' => $sAttLabel,
'description' => $oAttDef->GetOrderByHint(),
'metadata' => array(
'object_class' => $sClassName,
'attribute_code' => $sAttCode,
'attribute_type' => $sAttDefClass,
'attribute_label' => $sAttLabel,
),
);
}
}
}
}
return $aAttribs;
}
/**
* @param $aColumns
* @param $sSelectMode
* @param $iPageSize
* @param $bViewLink
* @param $aExtraParams
*
* @return array
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
* @throws \Exception
*/
protected function GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
{
$bLocalize = true;
@@ -400,6 +537,7 @@ EOF;
}
$aValues = array();
$aAttDefsCache = array();
$this->oSet->Seek(0);
$iMaxObjects = $iPageSize;
while (($aObjects = $this->oSet->FetchAssoc()) && ($iMaxObjects != 0))
@@ -431,7 +569,7 @@ EOF;
}
else
{
$aRow['form::select'] = "<input type=\"checkBox\" $sDisabled class=\"selectList{$this->iListId}\" name=\"selectObject[]\" value=\"".$aObjects[$sAlias]->GetKey()."\"></input>";
$aRow['form::select'] = "<input type=\"checkbox\" $sDisabled class=\"selectList{$this->iListId}\" name=\"selectObject[]\" value=\"".$aObjects[$sAlias]->GetKey()."\"></input>";
}
}
foreach($aColumns[$sAlias] as $sAttCode => $aData)
@@ -440,11 +578,41 @@ EOF;
{
if ($sAttCode == '_key_')
{
$aRow['key_'.$sAlias] = $aObjects[$sAlias]->GetHyperLink();
$aRow['key_'.$sAlias] = array(
'value_raw' => $aObjects[$sAlias]->GetKey(),
'value_html' => $aObjects[$sAlias]->GetHyperLink(),
);
}
else
{
$aRow[$sAttCode.'_'.$sAlias] = $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize);
// Prepare att. def. classes cache to avoid retrieving AttDef for each row
if(!isset($aAttDefsCache[$sClassName][$sAttCode]))
{
$aAttDefClassesCache[$sClassName][$sAttCode] = get_class(MetaModel::GetAttributeDef($sClassName, $sAttCode));
}
// Only retrieve raw (stored) value for simple fields
$bExcludeRawValue = false;
foreach (cmdbAbstractObject::GetAttDefClassesToExcludeFromMarkupMetadataRawValue() as $sAttDefClassToExclude)
{
if (is_a($aAttDefClassesCache[$sClassName][$sAttCode], $sAttDefClassToExclude, true))
{
$bExcludeRawValue = true;
break;
}
}
if($bExcludeRawValue)
{
$aRow[$sAttCode.'_'.$sAlias] = $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize);
}
else
{
$aRow[$sAttCode.'_'.$sAlias] = array(
'value_raw' => $aObjects[$sAlias]->Get($sAttCode),
'value_html' => $aObjects[$sAlias]->GetAsHTML($sAttCode, $bLocalize),
);
}
}
}
}
@@ -473,7 +641,25 @@ EOF;
}
return $aValues;
}
/**
* @param \WebPage $oPage
* @param $aColumns
* @param $sSelectMode
* @param $iPageSize
* @param $bViewLink
* @param $aExtraParams
*
* @return string
* @throws \ArchivedObjectException
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \DictExceptionMissingString
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
* @throws \Exception
*/
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
{
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
@@ -485,7 +671,7 @@ EOF;
$aValues = $this->GetHTMLTableValues($aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams);
$sHtml = '<table class="listContainer">';
$sHtml = '<table class="listContainer object-list">';
foreach($this->oSet->GetFilter()->GetInternalParams() as $sName => $sValue)
{
@@ -562,23 +748,41 @@ EOF;
}
$sOQL = addslashes($this->oSet->GetFilter()->serialize());
$oPage->add_ready_script(
<<<EOF
var oTable = $('#{$this->iListId} table.listResults');
<<<JS
var oTable = $('#{$this->sDatatableContainerId} table.listResults');
oTable.tableHover();
oTable.tablesorter( { $sHeaders widgets: ['myZebra', 'truncatedList']} ).tablesorterPager({container: $('#pager{$this->iListId}'), totalRows:$iCount, size: $iPageSize, filter: '$sOQL', extra_params: '$sExtraParams', select_mode: '$sSelectModeJS', displayKey: $sDisplayKey, columns: $sJSColumns, class_aliases: $sJSClassAliases $sCssCount});
EOF
);
oTable
.tablesorter({ $sHeaders widgets: ['myZebra', 'truncatedList']})
.tablesorterPager({
container: $('#pager{$this->iListId}'),
totalRows:$iCount,
size: $iPageSize,
filter: '$sOQL',
extra_params: '$sExtraParams',
select_mode: '$sSelectModeJS',
displayKey: $sDisplayKey,
table_id: '{$this->sDatatableContainerId}',
columns: $sJSColumns,
class_aliases: $sJSClassAliases $sCssCount
});
JS
);
if ($sFakeSortList != '')
{
$oPage->add_ready_script("oTable.trigger(\"fakesorton\", [$sFakeSortList]);");
}
return $sHtml;
}
/**
* @param \WebPage $oPage
* @param $iDefaultPageSize
* @param $iStart
*/
public function UpdatePager(WebPage $oPage, $iDefaultPageSize, $iStart)
{
$iPageSize = ($iDefaultPageSize < 1) ? 1 : $iDefaultPageSize;
$iPageIndex = 1 + floor($iStart / $iPageSize);
$iPageSize = $iDefaultPageSize;
$iPageIndex = 0;
$sHtml = $this->GetPager($oPage, $iPageSize, $iDefaultPageSize, $iPageIndex);
$oPage->add_ready_script("$('#pager{$this->iListId}').html('".json_encode($sHtml)."');");
if ($iDefaultPageSize < 1)
@@ -598,11 +802,48 @@ EOF
*/
class PrintableDataTable extends DataTable
{
/**
* @param \WebPage $oPage
* @param $iPageSize
* @param $iDefaultPageSize
* @param $iPageIndex
* @param $aColumns
* @param $bActionsMenu
* @param $bToolkitMenu
* @param $sSelectMode
* @param $bViewLink
* @param $aExtraParams
*
* @return string
* @throws \ArchivedObjectException
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \DictExceptionMissingString
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
*/
public function GetAsHTML(WebPage $oPage, $iPageSize, $iDefaultPageSize, $iPageIndex, $aColumns, $bActionsMenu, $bToolkitMenu, $sSelectMode, $bViewLink, $aExtraParams)
{
return $this->GetHTMLTable($oPage, $aColumns, $sSelectMode, -1, $bViewLink, $aExtraParams);
}
/**
* @param \WebPage $oPage
* @param $aColumns
* @param $sSelectMode
* @param $iPageSize
* @param $bViewLink
* @param $aExtraParams
*
* @return string
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \DictExceptionMissingString
* @throws \MissingQueryArgument
* @throws \MySQLException
* @throws \MySQLHasGoneAwayException
*/
public function GetHTMLTable(WebPage $oPage, $aColumns, $sSelectMode, $iPageSize, $bViewLink, $aExtraParams)
{
$iNbPages = ($iPageSize < 1) ? 1 : ceil($this->iNbObjects / $iPageSize);
@@ -627,7 +868,13 @@ class DataTableSettings implements Serializable
public $iDefaultPageSize;
public $aColumns;
/**
* DataTableSettings constructor.
*
* @param $aClassAliases
* @param null $sTableId
*/
public function __construct($aClassAliases, $sTableId = null)
{
$this->aClassAliases = $aClassAliases;
@@ -635,14 +882,22 @@ class DataTableSettings implements Serializable
$this->iDefaultPageSize = 10;
$this->aColumns = array();
}
/**
* @param $iDefaultPageSize
* @param $aSortOrder
* @param $aColumns
*/
protected function Init($iDefaultPageSize, $aSortOrder, $aColumns)
{
$this->iDefaultPageSize = $iDefaultPageSize;
$this->aColumns = $aColumns;
$this->FixVisibleColumns();
}
/**
* @return string
*/
public function serialize()
{
// Save only the 'visible' columns
@@ -668,7 +923,12 @@ class DataTableSettings implements Serializable
)
);
}
/**
* @param string $sData
*
* @throws \Exception
*/
public function unserialize($sData)
{
$aData = unserialize($sData);
@@ -701,7 +961,16 @@ class DataTableSettings implements Serializable
}
$this->FixVisibleColumns();
}
/**
* @param $aClassAliases
* @param $bViewLink
* @param $aDefaultLists
*
* @return \DataTableSettings
* @throws \CoreException
* @throws \DictExceptionMissingString
*/
static public function GetDataModelSettings($aClassAliases, $bViewLink, $aDefaultLists)
{
$oSettings = new DataTableSettings($aClassAliases);
@@ -751,11 +1020,18 @@ class DataTableSettings implements Serializable
$oSettings->Init($iDefaultPageSize, $aSortOrder, $aColumns);
return $oSettings;
}
/**
* @throws \CoreException
*/
protected function FixVisibleColumns()
{
foreach($this->aClassAliases as $sAlias => $sClass)
{
if (!isset($this->aColumns[$sAlias]))
{
continue;
}
foreach($this->aColumns[$sAlias] as $sAttCode => $aData)
{
// Remove non-existent columns
@@ -771,7 +1047,7 @@ class DataTableSettings implements Serializable
$aTempData = array();
foreach($aList as $sAttCode => $oAttDef)
{
if ( (!array_key_exists($sAttCode, $this->aColumns[$sAlias])) && (!$oAttDef instanceof AttributeLinkSet))
if ( (!array_key_exists($sAttCode, $this->aColumns[$sAlias])) && (!($oAttDef instanceof AttributeLinkedSet || $oAttDef instanceof AttributeDashboard)))
{
$aFieldData = $this->GetFieldData($sAlias, $sAttCode, $oAttDef, false /* bChecked */, 'none');
if ($aFieldData) $aTempData[$aFieldData['label']] = $aFieldData;
@@ -784,7 +1060,15 @@ class DataTableSettings implements Serializable
}
}
}
/**
* @param $aClassAliases
* @param null $sTableId
* @param bool $bOnlyOnTable
*
* @return \DataTableSettings|null
* @throws \Exception
*/
static public function GetTableSettings($aClassAliases, $sTableId = null, $bOnlyOnTable = false)
{
$pref = null;
@@ -813,7 +1097,10 @@ class DataTableSettings implements Serializable
return $oSettings;
}
/**
* @return array
*/
public function GetSortOrder()
{
$aSortOrder = array();
@@ -831,7 +1118,12 @@ class DataTableSettings implements Serializable
}
return $aSortOrder;
}
/**
* @param null $sTargetTableId
*
* @return bool
*/
public function Save($sTargetTableId = null)
{
$sSaveId = is_null($sTargetTableId) ? $this->sTableId : $sTargetTableId;
@@ -842,6 +1134,9 @@ class DataTableSettings implements Serializable
return true;
}
/**
* @return bool
*/
public function SaveAsDefault()
{
$sSettings = $this->serialize();
@@ -871,18 +1166,43 @@ class DataTableSettings implements Serializable
}
return true;
}
/**
* @param null $sTableId
*
* @return string
*/
protected function GetPrefsKey($sTableId = null)
{
if ($sTableId == null) $sTableId = '*';
return static::GetAppUserPreferenceKey($this->aClassAliases, $sTableId);
}
public static function GetAppUserPreferenceKey($aClassAliases, $sTableId)
{
if ($sTableId === null)
{
$sTableId = '*';
}
$aKeys = array();
foreach($this->aClassAliases as $sAlias => $sClass)
foreach($aClassAliases as $sAlias => $sClass)
{
$aKeys[] = $sAlias.'-'.$sClass;
}
return implode('/', $aKeys).'|'.$sTableId;
}
/**
* @param $sAlias
* @param $sAttCode
* @param $oAttDef
* @param $bChecked
* @param $sSort
*
* @return array|bool
* @throws \CoreException
* @throws \DictExceptionMissingString
*/
protected function GetFieldData($sAlias, $sAttCode, $oAttDef, $bChecked, $sSort)
{
$ret = false;
@@ -932,4 +1252,4 @@ class DataTableSettings implements Serializable
}
return $ret;
}
}
}

View File

@@ -1,26 +1,20 @@
<?php
// Copyright (C) 2010-2017 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/>
/**
* DisplayBlock and derived class
* Copyright (C) 2013-2019 Combodo SARL
*
* @copyright Copyright (C) 2010-2017 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
* 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
*/
require_once(APPROOT.'/application/webpage.class.inc.php');
@@ -91,7 +85,7 @@ class DisplayBlock
{
$oDummyFilter = new DBObjectSearch($oSet->GetClass());
$aKeys = array();
$oSet->OptimizeColumnLoad(array('id')); // No need to load all the columns just to get the id
$oSet->OptimizeColumnLoad(array($oSet->GetClassAlias() => array())); // No need to load all the columns just to get the id
while($oObject = $oSet->Fetch())
{
$aKeys[] = $oObject->GetKey();
@@ -220,9 +214,26 @@ class DisplayBlock
$aExtraParams['currentId'] = $sId;
$sExtraParams = addslashes(str_replace('"', "'", json_encode($aExtraParams))); // JSON encode, change the style of the quotes and escape them
if (isset($aExtraParams['query_params']))
{
$aQueryParams = $aExtraParams['query_params'];
}
else
{
if (isset($aExtraParams['this->id']) && isset($aExtraParams['this->class']))
{
$sClass = $aExtraParams['this->class'];
$iKey = $aExtraParams['this->id'];
$oObj = MetaModel::GetObject($sClass, $iKey);
$aQueryParams = array('this->object()' => $oObj);
}
else
{
$aQueryParams = array();
}
}
$sFilter = $this->m_oFilter->serialize(); // Used either for asynchronous or auto_reload
$sFilter = addslashes($this->m_oFilter->serialize(false, $aQueryParams)); // Used either for asynchronous or auto_reload
if (!$this->m_bAsynchronous)
{
// render now
@@ -232,7 +243,7 @@ class DisplayBlock
$sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId);
} catch (Exception $e)
{
IssueLog::Error('Exception during GetDisplay: ' . $e->getMessage());
}
$sHtml .= "</div>\n";
}
@@ -314,20 +325,31 @@ class DisplayBlock
* @throws MySQLException
* @throws Exception
*/
public function GetRenderContent(WebPage $oPage, $aExtraParams = array(), $sId)
public function GetRenderContent(WebPage $oPage, $aExtraParams, $sId)
{
$sHtml = '';
// Add the extra params into the filter if they make sense for such a filter
$bDoSearch = utils::ReadParam('dosearch', false);
$aQueryParams = array();
if (isset($aExtraParams['query_params']))
{
$aQueryParams = $aExtraParams['query_params'];
}
else
{
if (isset($aExtraParams['this->id']) && isset($aExtraParams['this->class']))
{
$sClass = $aExtraParams['this->class'];
$iKey = $aExtraParams['this->id'];
$oObj = MetaModel::GetObject($sClass, $iKey);
$aQueryParams = array('this->object()' => $oObj);
}
}
if ($this->m_oSet == null)
{
$aQueryParams = array();
if (isset($aExtraParams['query_params']))
{
$aQueryParams = $aExtraParams['query_params'];
}
// In case of search, the context filtering is done by the search itself
if (($this->m_sStyle != 'links') && ($this->m_sStyle != 'search'))
if (($this->m_sStyle != 'links') && ($this->m_sStyle != 'search') && ($this->m_sStyle != 'list_search'))
{
$oAppContext = new ApplicationContext();
$sClass = $this->m_oFilter->GetClass();
@@ -424,8 +446,21 @@ class DisplayBlock
$this->m_oSet = new CMDBObjectSet($this->m_oFilter, $aOrderBy, $aQueryParams);
}
$this->m_oSet->SetShowObsoleteData($this->m_bShowObsoleteData);
switch($this->m_sStyle)
{
switch($this->m_sStyle) {
case 'list_search':
case 'list':
break;
default:
// N°3473: except for 'list_search' and 'list' (which have more granularity, see the other switch below),
// refuse to render if the user is not allowed to see the class.
if (! UserRights::IsActionAllowed($this->m_oSet->GetClass(), UR_ACTION_READ, $this->m_oSet) == UR_ALLOWED_YES) {
$sHtml .= $oPage->GetP(Dict::Format('UI:Error:ReadNotAllowedOn_Class', $this->m_oSet->GetClass()));
return $sHtml;
}
}
switch ($this->m_sStyle) {
case 'count':
if (isset($aExtraParams['group_by']))
{
@@ -457,14 +492,25 @@ class DisplayBlock
$oSubsetSearch = $this->m_oFilter->DeepClone();
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($aValues[$iRow]));
$oSubsetSearch->AddConditionExpression($oCondition);
$sFilter = urlencode($oSubsetSearch->serialize());
if (isset($aExtraParams['query_params']))
{
$aQueryParams = $aExtraParams['query_params'];
}
else
{
$aQueryParams = array();
}
$sFilter = rawurlencode($oSubsetSearch->serialize(false, $aQueryParams));
$aData[] = array ('group' => $aLabels[$iRow],
'value' => "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&dosearch=1&$sParams&filter=$sFilter\">$iCount</a>"); // TO DO: add the context information
}
$aAttribs =array(
'group' => array('label' => $sGroupByLabel, 'description' => ''),
'value' => array('label'=> Dict::S('UI:GroupBy:'.$sAggregationFunction), 'description' => Dict::Format('UI:GroupBy:'.$sAggregationFunction.'+', $sAggregationAttr))
'value' => array(
'label' => Dict::S('UI:GroupBy:'.$sAggregationFunction),
'description' => Dict::Format('UI:GroupBy:'.$sAggregationFunction.'+', $sAggregationAttr),
),
);
$sFormat = isset($aExtraParams['format']) ? $aExtraParams['format'] : 'UI:Pagination:HeaderNoSelection';
$sHtml .= $oPage->GetP(Dict::Format($sFormat, $iTotalCount));
@@ -580,6 +626,7 @@ class DisplayBlock
}
break;
case 'list_search':
case 'list':
$aClasses = $this->m_oSet->GetSelectedClasses();
$aAuthorizedClasses = array();
@@ -662,7 +709,7 @@ class DisplayBlock
'breadcrumb_label' => MetaModel::GetName($this->m_oSet->GetClass()),
'breadcrumb_max_count' => utils::GetConfig()->Get('breadcrumb.max_count'),
'breadcrumb_instance_id' => MetaModel::GetConfig()->GetItopInstanceid(),
'breadcrumb_icon' => utils::GetAbsoluteUrlAppRoot().'images/breadcrumb-search.png'
'breadcrumb_icon' => utils::GetAbsoluteUrlAppRoot().'images/breadcrumb-search.png',
));
$oPage->add_ready_script("$('body').trigger('update_history.itop', [$seventAttachedData])");
@@ -715,7 +762,7 @@ class DisplayBlock
$sClass = $this->m_oFilter->GetClass();
$oAppContext = new ApplicationContext();
$bContextFilter = isset($aExtraParams['context_filter']) ? isset($aExtraParams['context_filter']) != 0 : false;
if ($bContextFilter)
if ($bContextFilter && is_null($this->m_oSet))
{
foreach($oAppContext->GetNames() as $sFilterCode)
{
@@ -734,7 +781,7 @@ class DisplayBlock
$this->m_oSet->SetShowObsoleteData($this->m_bShowObsoleteData);
}
$iCount = $this->m_oSet->Count();
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.urlencode($this->m_oFilter->serialize());
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize());
$sHtml .= '<p><a class="actions" href="'.$sHyperlink.'">';
// Note: border set to 0 due to various browser interpretations (IE9 adding a 2px border)
$sHtml .= MetaModel::GetClassIcon($sClass, true, 'float;left;margin-right:10px;border:0;');
@@ -803,7 +850,8 @@ class DisplayBlock
foreach($aStates as $sStateValue)
{
$aStateLabels[$sStateValue] = htmlentities($oAttDef->GetValueLabel($sStateValue), ENT_QUOTES, 'UTF-8');
$sHtmlValue=$aGroupBy['group1']->MakeValueLabel($this->m_oFilter, $sStateValue, $sStateValue);
$aStateLabels[$sStateValue] = html_entity_decode(strip_tags($sHtmlValue), ENT_QUOTES, 'UTF-8');
$aCounts[$sStateValue] = (array_key_exists($sStateValue, $aCountsQueryResults))
? $aCountsQueryResults[$sStateValue]
@@ -823,7 +871,7 @@ class DisplayBlock
}
$sHyperlink = utils::GetAbsoluteUrlAppRoot()
.'pages/UI.php?operation=search&'.$oAppContext->GetForLink()
.'&filter='.urlencode($oSingleGroupByValueFilter->serialize());
.'&filter='.rawurlencode($oSingleGroupByValueFilter->serialize());
$aCounts[$sStateValue] = "<a href=\"$sHyperlink\">{$aCounts[$sStateValue]}</a>";
}
}
@@ -832,7 +880,7 @@ class DisplayBlock
$sHtml .= '<tr><td>'.implode('</td><td>', $aCounts).'</td></tr></table></div>';
// Title & summary
$iCount = $this->m_oSet->Count();
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.urlencode($this->m_oFilter->serialize());
$sHyperlink = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize());
$sHtml .= '<h1>'.Dict::S(str_replace('_', ':', $sTitle)).'</h1>';
$sHtml .= '<a class="summary" href="'.$sHyperlink.'">'.Dict::Format(str_replace('_', ':', $sLabel), $iCount).'</a>';
$sHtml .= '<div style="clear:both;"></div>';
@@ -843,7 +891,7 @@ class DisplayBlock
$sCsvFile = strtolower($this->m_oFilter->GetClass()).'.csv';
$sDownloadLink = utils::GetAbsoluteUrlAppRoot().'webservices/export.php?expression='.urlencode($this->m_oFilter->ToOQL(true)).'&format=csv&filename='.urlencode($sCsvFile);
$sLinkToToggle = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.urlencode($this->m_oFilter->serialize()).'&format=csv';
$sLinkToToggle = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search&'.$oAppContext->GetForLink().'&filter='.rawurlencode($this->m_oFilter->serialize()).'&format=csv';
// Pass the parameters via POST, since expression may be very long
$aParamsToPost = array(
'expression' => $this->m_oFilter->ToOQL(true),
@@ -912,11 +960,11 @@ class DisplayBlock
$iChartCounter++;
$sChartType = isset($aExtraParams['chart_type']) ? $aExtraParams['chart_type'] : 'pie';
$sTitle = isset($aExtraParams['chart_title']) ? '<h1 style="text-align:center">'.htmlentities(Dict::S($aExtraParams['chart_title']), ENT_QUOTES, 'UTF-8').'</h1>' : '';
$sHtml = "$sTitle<div style=\"height:200px;width:100%\" id=\"my_chart_$sId{$iChartCounter}\"><div style=\"height:200px;line-height:200px;vertical-align:center;text-align:center;width:100%\"><img src=\"../images/indicator.gif\"></div></div>\n";
$sTitle = isset($aExtraParams['chart_title']) ? '<div class="main_header"><h1>&#160;'.htmlentities(Dict::S($aExtraParams['chart_title']), ENT_QUOTES, 'UTF-8').'</h1></div>' : '';
$sHtml = "$sTitle<div style=\"height:200px;width:100%\" class=\"dashboard_chart\" id=\"my_chart_$sId{$iChartCounter}\"><div style=\"height:200px;line-height:200px;vertical-align:center;text-align:center;width:100%\"><img src=\"../images/indicator.gif\"></div></div>\n";
$sGroupBy = isset($aExtraParams['group_by']) ? $aExtraParams['group_by'] : '';
$sGroupByExpr = isset($aExtraParams['group_by_expr']) ? '&params[group_by_expr]='.$aExtraParams['group_by_expr'] : '';
$sFilter = $this->m_oFilter->serialize();
$sFilter = $this->m_oFilter->serialize(false, $aQueryParams);
$oContext = new ApplicationContext();
$sContextParam = $oContext->GetForLink();
$sAggregationFunction = isset($aExtraParams['aggregation_function']) ? $aExtraParams['aggregation_function'] : '';
@@ -927,11 +975,11 @@ class DisplayBlock
if (isset($aExtraParams['group_by_label']))
{
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart&params[group_by]=$sGroupBy{$sGroupByExpr}&params[group_by_label]={$aExtraParams['group_by_label']}&params[chart_type]=$sChartType&params[currentId]=$sId{$iChartCounter}&params[order_direction]=$sOrderDirection&params[order_by]=$sOrderBy&params[limit]=$sLimit&params[aggregation_function]=$sAggregationFunction&params[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".urlencode($sFilter).'&'.$sContextParam);
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart&params[group_by]=$sGroupBy{$sGroupByExpr}&params[group_by_label]={$aExtraParams['group_by_label']}&params[chart_type]=$sChartType&params[currentId]=$sId{$iChartCounter}&params[order_direction]=$sOrderDirection&params[order_by]=$sOrderBy&params[limit]=$sLimit&params[aggregation_function]=$sAggregationFunction&params[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".rawurlencode($sFilter).'&'.$sContextParam);
}
else
{
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart&params[group_by]=$sGroupBy{$sGroupByExpr}&params[chart_type]=$sChartType&params[currentId]=$sId{$iChartCounter}&params[order_direction]=$sOrderDirection&params[order_by]=$sOrderBy&params[limit]=$sLimit&params[aggregation_function]=$sAggregationFunction&params[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".urlencode($sFilter).'&'.$sContextParam);
$sUrl = json_encode(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=chart&params[group_by]=$sGroupBy{$sGroupByExpr}&params[chart_type]=$sChartType&params[currentId]=$sId{$iChartCounter}&params[order_direction]=$sOrderDirection&params[order_by]=$sOrderBy&params[limit]=$sLimit&params[aggregation_function]=$sAggregationFunction&params[aggregation_attribute]=$sAggregationAttr&id=$sId{$iChartCounter}&filter=".rawurlencode($sFilter).'&'.$sContextParam);
}
$oPage->add_ready_script(
@@ -971,7 +1019,7 @@ EOF
$oSubsetSearch = $this->m_oFilter->DeepClone();
$oCondition = new BinaryExpression($oGroupByExp, '=', new ScalarExpression($sValue));
$oSubsetSearch->AddConditionExpression($oCondition);
$aURLs[] = utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&format=html&filter=".urlencode($oSubsetSearch->serialize()).'&'.$sContextParam;
$aURLs[] = utils::GetAbsoluteUrlAppRoot()."pages/UI.php?operation=search&format=html&filter=".rawurlencode($oSubsetSearch->serialize()).'&'.$sContextParam;
}
$sJSURLs = json_encode($aURLs);
}
@@ -989,6 +1037,7 @@ EOF
$sJson = json_encode($aValues);
$oPage->add_ready_script(
<<<EOF
var chart = c3.generate({
bindto: d3.select('#my_chart_$sId'),
data: {
@@ -1036,6 +1085,12 @@ var chart = c3.generate({
}
}
});
if (typeof(charts) === "undefined")
{
charts = [];
}
charts.push(chart);
EOF
);
break;
@@ -1074,6 +1129,12 @@ var chart = c3.generate({
}
}
});
if (typeof(charts) === "undefined")
{
charts = [];
}
charts.push(chart);
EOF
);
break;
@@ -1122,16 +1183,26 @@ EOF
}
if (($bAutoReload) && ($this->m_sStyle != 'search')) // Search form do NOT auto-reload
{
$sFilter = $this->m_oFilter->serialize(); // Used either for asynchronous or auto_reload
$sExtraParams = addslashes(str_replace('"', "'", json_encode($aExtraParams))); // JSON encode, change the style of the quotes and escape them
// Used either for asynchronous or auto_reload
// does a json_encode twice to get a string usable as function parameter
$sFilterBefore = $this->m_oFilter->serialize();
$sFilter = json_encode($sFilterBefore);
$sExtraParams = json_encode(json_encode($aExtraParams));
$oPage->add_script('if (typeof window.oAutoReloadBlock == "undefined") {
window.oAutoReloadBlock = {};
}
if (typeof window.oAutoReloadBlock[\''.$sId.'\'] != "undefined") {
clearInterval(window.oAutoReloadBlock[\''.$sId.'\']);
}
window.oAutoReloadBlock[\''.$sId.'\'] = setInterval("ReloadBlock(\''.$sId.'\', \''.$this->m_sStyle.'\', \''.$sFilter.'\', \"'.$sExtraParams.'\")", '.$iReloadInterval.');');
$oPage->add_script(
<<<JS
if (typeof window.oAutoReloadBlock == "undefined") {
window.oAutoReloadBlock = {};
}
if (typeof window.oAutoReloadBlock['$sId'] != "undefined") {
clearInterval(window.oAutoReloadBlock['$sId']);
}
window.oAutoReloadBlock['$sId'] = setInterval(function() {
ReloadBlock('$sId', '{$this->m_sStyle}', $sFilter, $sExtraParams);
}, '$iReloadInterval');
JS
);
}
return $sHtml;
@@ -1391,7 +1462,7 @@ class HistoryBlock extends DisplayBlock
default:
if ($bTruncated)
{
$sFilter = $this->m_oFilter->serialize();
$sFilter = htmlentities($this->m_oFilter->serialize(), ENT_QUOTES, 'UTF-8');
$sHtml .= '<div id="history_container"><p>';
$sHtml .= Dict::Format('UI:TruncatedResults', $this->iLimitCount, $oSet->Count());
$sHtml .= ' ';
@@ -1669,6 +1740,7 @@ class MenuBlock extends DisplayBlock
*/
}
$this->AddMenuSeparator($aActions);
/** @var \iApplicationUIExtension $oExtensionInstance */
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
{
$oSet->Rewind();
@@ -1764,6 +1836,7 @@ class MenuBlock extends DisplayBlock
}
$this->AddMenuSeparator($aActions);
/** @var \iApplicationUIExtension $oExtensionInstance */
foreach (MetaModel::EnumPlugins('iApplicationUIExtension') as $oExtensionInstance)
{
$oSet->Rewind();
@@ -1821,11 +1894,11 @@ class MenuBlock extends DisplayBlock
{
if (count($aFavoriteActions) > 0)
{
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:OtherActions')."\n<ul>\n";
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:OtherActions')."<i class=\"fas fa-caret-down\"></i>"."\n<ul>\n";
}
else
{
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:Actions')."\n<ul>\n";
$sHtml .= "<div class=\"itop_popup actions_menu\"><ul>\n<li>".Dict::S('UI:Menu:Actions')."<i class=\"fas fa-caret-down\"></i>"."\n<ul>\n";
}
$sHtml .= $oPage->RenderPopupMenuItems($aActions, $aFavoriteActions);
@@ -1833,7 +1906,8 @@ class MenuBlock extends DisplayBlock
if ($this->m_sStyle == 'details')
{
$sSearchAction = "window.location=\"{$sRootUrl}pages/UI.php?operation=search_form&do_search=0&class=$sClass{$sContext}\"";
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::Format('UI:SearchFor_Class', MetaModel::GetName($sClass)), ENT_QUOTES, 'UTF-8')."\"><span class=\"search-button fa fa-search\" onclick='$sSearchAction'></span></div>";
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::Format('UI:SearchFor_Class',
MetaModel::GetName($sClass)), ENT_QUOTES, 'UTF-8')."\"><span class=\"search-button fas fa-search\" onclick='$sSearchAction'></span></div>";
}
@@ -1844,7 +1918,8 @@ class MenuBlock extends DisplayBlock
}
if (!$oPage->IsPrintableVersion() && ($sRefreshAction!=''))
{
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::S('UI:Button:Refresh'), ENT_QUOTES, 'UTF-8')."\"><span class=\"refresh-button fa fa-refresh\" onclick=\"$sRefreshAction\"></span></div>";
$sHtml .= "<div class=\"actions_button icon_actions_button\" title=\"".htmlentities(Dict::S('UI:Button:Refresh'),
ENT_QUOTES, 'UTF-8')."\"><span class=\"refresh-button fas fa-sync\" onclick=\"$sRefreshAction\"></span></div>";
}

View File

@@ -0,0 +1,82 @@
<?php
/**
* @copyright Copyright (C) 2010-2020 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class ErrorPage extends NiceWebPage
{
public function __construct($sTitle)
{
parent::__construct($sTitle);
$this->add_linked_script("../js/jquery.blockUI.js");
$this->add_linked_script("../setup/setup.js");
$this->add_saas("css/setup.scss");
}
public function info($sText)
{
$this->add("<p class=\"info\">$sText</p>\n");
$this->log_info($sText);
}
public function ok($sText)
{
$this->add("<div class=\"message message-valid\"><span class=\"message-title\">Success:</span>$sText</div>");
$this->log_ok($sText);
}
public function warning($sText)
{
$this->add("<div class=\"message message-warning\"><span class=\"message-title\">Warning:</span>$sText</div>");
$this->log_warning($sText);
}
public function error($sText)
{
$this->add("<div class=\"message message-error\">$sText</div>");
$this->log_error($sText);
}
public function output()
{
$sLogo = utils::GetAbsoluteUrlAppRoot().'/images/itop-logo.png';
$sTimeStamp = utils::GetCacheBusterTimestamp();
$sTitle = utils::HtmlEntities($this->s_title);
$this->s_content = <<<HTML
<div id="header" class="error_page">
<h1><a href="http://www.combodo.com/itop" target="_blank"><img title="iTop by Combodo" alt=" " src="{$sLogo}?t={$sTimeStamp}"></a>&nbsp;{$sTitle}</h1>
</div>
<div id="setup" class="error_page">
{$this->s_content}
</div>
HTML;
return parent::output();
}
public static function log_error($sText)
{
IssueLog::Error($sText);
}
public static function log_warning($sText)
{
IssueLog::Warning($sText);
}
public static function log_info($sText)
{
IssueLog::Info($sText);
}
public static function log_ok($sText)
{
IssueLog::Ok($sText);
}
public static function log($sText)
{
IssueLog::Ok($sText);
}
}

View File

@@ -378,9 +378,9 @@ $('#$sDialogId').dialog({
}
}
} },
{ text: "$sCancelButtonLabel", click: function() { KillAllMenus(); $(this).dialog( "close" ); $(this).remove(); } },
{ text: "$sCancelButtonLabel", click: function() { $(this).dialog( "close" ); $(this).remove(); } },
],
close: function() { KillAllMenus(); $(this).remove(); }
close: function() { $(this).remove(); }
});
var oForm = $('#$sDialogId form');
var sFormId = oForm.attr('id');
@@ -395,6 +395,7 @@ EOF
{
foreach($aFields as $oField)
{
/** @var \DesignerFormField $oField */
$oField->ReadParam($aValues);
}
}
@@ -679,17 +680,34 @@ class DesignerTabularForm extends DesignerForm
class DesignerFormField
{
/** @var string $sLabel */
protected $sLabel;
/** @var string $sCode */
protected $sCode;
/** @var mixed $defaultValue */
protected $defaultValue;
/** @var \DesignerForm $oForm */
protected $oForm;
/** @var bool $bMandatory */
protected $bMandatory;
/** @var bool $bReadOnly */
protected $bReadOnly;
/** @var bool $bAutoApply */
protected $bAutoApply;
/** @var array $aCSSClasses */
protected $aCSSClasses;
/** @var bool $bDisplayed */
protected $bDisplayed;
/** @var array $aWidgetExtraParams */
protected $aWidgetExtraParams;
/**
* DesignerFormField constructor.
*
* @param string $sCode
* @param string $sLabel
* @param mixed $defaultValue
*/
public function __construct($sCode, $sLabel, $defaultValue)
{
$this->sLabel = $sLabel;
@@ -702,75 +720,120 @@ class DesignerFormField
$this->bDisplayed = true;
$this->aWidgetExtraParams = array();
}
/**
* @return string
*/
public function GetCode()
{
return $this->sCode;
}
public function SetForm($oForm)
/**
* @param \DesignerForm $oForm
*/
public function SetForm(DesignerForm $oForm)
{
$this->oForm = $oForm;
}
/**
* @param bool $bMandatory
*/
public function SetMandatory($bMandatory = true)
{
$this->bMandatory = $bMandatory;
}
/**
* @param bool $bReadOnly
*/
public function SetReadOnly($bReadOnly = true)
{
$this->bReadOnly = $bReadOnly;
}
/**
* @return bool
*/
public function IsReadOnly()
{
return ($this->oForm->IsReadOnly() || $this->bReadOnly);
}
/**
* @param bool $bAutoApply
*/
public function SetAutoApply($bAutoApply)
{
$this->bAutoApply = $bAutoApply;
}
/**
* @return bool
*/
public function IsAutoApply()
{
return $this->bAutoApply;
}
/**
* @param bool $bDisplayed
*/
public function SetDisplayed($bDisplayed)
{
$this->bDisplayed = $bDisplayed;
}
/**
* @return bool
*/
public function IsDisplayed()
{
return $this->bDisplayed;
}
/**
* @return string
*/
public function GetFieldId()
{
return $this->oForm->GetFieldId($this->sCode);
}
/**
* @return string
*/
public function GetWidgetClass()
{
return 'property_field';
}
/**
* @return array
*/
public function GetWidgetExtraParams()
{
return $this->aWidgetExtraParams;
}
/**
* @param \WebPage $oP
* @param string $sFormId
* @param string $sRenderMode
*
* @return array
*/
public function Render(WebPage $oP, $sFormId, $sRenderMode='dialog')
{
$sId = $this->oForm->GetFieldId($this->sCode);
$sName = $this->oForm->GetFieldName($this->sCode);
return array('label' => $this->sLabel, 'value' => "<input type=\"text\" id=\"$sId\" name=\"$sName\" value=\"".htmlentities($this->defaultValue, ENT_QUOTES, 'UTF-8')."\">");
}
/**
* @param array $aValues
*/
public function ReadParam(&$aValues)
{
if ($this->IsReadOnly())
@@ -797,12 +860,18 @@ class DesignerFormField
}
}
}
/**
* @return bool
*/
public function IsVisible()
{
return true;
}
/**
* @param string $sCSSClass
*/
public function AddCSSClass($sCSSClass)
{
$this->aCSSClasses[] = $sCSSClass;
@@ -810,6 +879,8 @@ class DesignerFormField
/**
* A way to set/change the default value after constructing the field
*
* @param array $aAllDefaultValue
*/
public function SetDefaultValueFrom($aAllDefaultValue)
{
@@ -818,7 +889,12 @@ class DesignerFormField
$this->defaultValue = $aAllDefaultValue[$this->GetCode()];
}
}
/**
* @param $sFieldCode
*
* @return \DesignerFormField|false
*/
public function FindField($sFieldCode)
{
if ($this->sCode == $sFieldCode)
@@ -828,11 +904,17 @@ class DesignerFormField
return false;
}
/**
* @return string
*/
public function GetHandlerEquals()
{
return 'null';
}
/**
* @return string
*/
public function GetHandlerGetValue()
{
return 'null';
@@ -841,25 +923,43 @@ class DesignerFormField
class DesignerLabelField extends DesignerFormField
{
/** @var int $iCount A counter to automatically make the field code */
protected static $iCount = 0;
/** @var string $sDescription */
protected $sDescription;
/**
* @inheritdoc
*/
public function __construct($sLabel, $sDescription)
{
parent::__construct('', $sLabel, '');
// Increase counter
static::$iCount++;
parent::__construct('label_number_' . static::$iCount, $sLabel, '');
$this->sDescription = $sDescription;
}
/**
* @inheritdoc
*/
public function Render(WebPage $oP, $sFormId, $sRenderMode='dialog')
{
$sId = $this->oForm->GetFieldId($this->sCode);
$sName = $this->oForm->GetFieldName($this->sCode);
return array('label' => $this->sLabel, 'value' => $this->sDescription);
}
/**
* @inheritdoc
*/
public function ReadParam(&$aValues)
{
}
/**
* @inheritdoc
*/
public function IsVisible()
{
return true;
@@ -1330,7 +1430,8 @@ class DesignerIconSelectionField extends DesignerFormField
$sPostUploadTo = ($this->sUploadUrl == null) ? 'null' : "'{$this->sUploadUrl}'";
if (!$this->IsReadOnly())
{
$sValue = "<input type=\"hidden\" id=\"$sId\" name=\"$sName\" value=\"{$this->defaultValue}\"/>";
$sDefaultValue = ($this->defaultValue !== '') ? $this->defaultValue : $this->aAllowedValues[$idx]['value'];
$sValue = "<input type=\"hidden\" id=\"$sId\" name=\"$sName\" value=\"{$sDefaultValue}\"/>";
$oP->add_ready_script(
<<<EOF
$('#$sId').icon_select({current_idx: $idx, items: $sJSItems, post_upload_to: $sPostUploadTo});
@@ -1392,6 +1493,7 @@ class RunTimeIconSelectionField extends DesignerIconSelectionField
$sAvailableIcons .= ' static $sKey = '.var_export($sKey, true).';'.PHP_EOL;
$sAvailableIcons .= ' static $aIconFiles = '.var_export($aFiles, true).';'.PHP_EOL;
$sAvailableIcons .= '}'.PHP_EOL;
SetupUtils::builddir(dirname($sCacheFile));
file_put_contents($sCacheFile, $sAvailableIcons, LOCK_EX);
}
return $aFiles;

View File

@@ -1,69 +1,69 @@
<?php
// Copyright (C) 2010-2012 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/>
/**
* Persistent class InputOutputTask
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
/**
* This class manages the input/output tasks
* for synchronizing information with external data sources
*/
class InputOutputTask extends cmdbAbstractObject
{
public static function Init()
{
$aParams = array
(
"category" => "application",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_iotask",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values"=>new ValueSetEnum('Input, Ouput'), "sql"=>"category", "default_value"=>"Input", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_type", array("allowed_values"=>new ValueSetEnum('File, Database, Web Service'), "sql"=>"source_type", "default_value"=>"File", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_subtype", array("allowed_values"=>new ValueSetEnum('Oracle, MySQL, Postgress, MSSQL, SOAP, HTTP-Get, HTTP-Post, XML/RPC, CSV, XML, Excel'), "sql"=>"source_subtype", "default_value"=>"CSV", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("source_path", array("allowed_values"=>null, "sql"=>"source_path", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeClass("objects_class", array("class_category"=>"", "more_values"=>"", "sql"=>"objects_class", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("test_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"test_mode", "default_value"=>'No', "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("verbose_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"verbose_mode", "default_value" => 'No', "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("options", array("allowed_values"=>new ValueSetEnum('Full, Update Only, Creation Only'), "sql"=>"options", "default_value"=> 'Full', "is_null_allowed"=>true, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype', 'source_path' , 'options', 'test_mode', 'verbose_mode')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('description', 'category', 'objects_class', 'source_type', 'source_subtype', 'options')); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('name', 'category', 'objects_class', 'source_type', 'source_subtype')); // Criteria of the std search form
MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype')); // Criteria of the advanced search form
}
}
?>
<?php
// Copyright (C) 2010-2012 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/>
/**
* Persistent class InputOutputTask
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT.'/application/cmdbabstract.class.inc.php');
/**
* This class manages the input/output tasks
* for synchronizing information with external data sources
*/
class InputOutputTask extends cmdbAbstractObject
{
public static function Init()
{
$aParams = array
(
"category" => "application",
"key_type" => "autoincrement",
"name_attcode" => "name",
"state_attcode" => "",
"reconc_keys" => array(),
"db_table" => "priv_iotask",
"db_key_field" => "id",
"db_finalclass_field" => "",
"display_template" => "",
);
MetaModel::Init_Params($aParams);
MetaModel::Init_AddAttribute(new AttributeString("name", array("allowed_values"=>null, "sql"=>"name", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("description", array("allowed_values"=>null, "sql"=>"description", "default_value"=>"", "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("category", array("allowed_values"=>new ValueSetEnum('Input, Ouput'), "sql"=>"category", "default_value"=>"Input", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_type", array("allowed_values"=>new ValueSetEnum('File, Database, Web Service'), "sql"=>"source_type", "default_value"=>"File", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("source_subtype", array("allowed_values"=>new ValueSetEnum('Oracle, MySQL, Postgress, MSSQL, SOAP, HTTP-Get, HTTP-Post, XML/RPC, CSV, XML, Excel'), "sql"=>"source_subtype", "default_value"=>"CSV", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeString("source_path", array("allowed_values"=>null, "sql"=>"source_path", "default_value"=>"", "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeClass("objects_class", array("class_category"=>"", "more_values"=>"", "sql"=>"objects_class", "default_value"=>null, "is_null_allowed"=>true, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("test_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"test_mode", "default_value"=>'No', "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("verbose_mode", array("allowed_values"=>new ValueSetEnum('Yes,No'), "sql"=>"verbose_mode", "default_value" => 'No', "is_null_allowed"=>false, "depends_on"=>array())));
MetaModel::Init_AddAttribute(new AttributeEnum("options", array("allowed_values"=>new ValueSetEnum('Full, Update Only, Creation Only'), "sql"=>"options", "default_value"=> 'Full', "is_null_allowed"=>true, "depends_on"=>array())));
// Display lists
MetaModel::Init_SetZListItems('details', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype', 'source_path' , 'options', 'test_mode', 'verbose_mode')); // Attributes to be displayed for the complete details
MetaModel::Init_SetZListItems('list', array('description', 'category', 'objects_class', 'source_type', 'source_subtype', 'options')); // Attributes to be displayed for a list
// Search criteria
MetaModel::Init_SetZListItems('standard_search', array('name', 'category', 'objects_class', 'source_type', 'source_subtype')); // Criteria of the std search form
MetaModel::Init_SetZListItems('advanced_search', array('name', 'description', 'category', 'objects_class', 'source_type', 'source_subtype')); // Criteria of the advanced search form
}
}
?>

File diff suppressed because it is too large Load Diff

View File

@@ -1,57 +1,57 @@
<?php
// Copyright (C) 2010-2012 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/>
/**
* Class iTopWizardWebPage
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once('itopwebpage.class.inc.php');
/**
* Web page to display a wizard in the iTop framework
*/
class iTopWizardWebPage extends iTopWebPage
{
var $m_iCurrentStep;
var $m_aSteps;
public function __construct($sTitle, $currentOrganization, $iCurrentStep, $aSteps)
{
parent::__construct($sTitle." - step $iCurrentStep of ".count($aSteps)." - ".$aSteps[$iCurrentStep - 1], $currentOrganization);
$this->m_iCurrentStep = $iCurrentStep;
$this->m_aSteps = $aSteps;
}
public function output()
{
$aSteps = array();
$iIndex = 0;
foreach($this->m_aSteps as $sStepTitle)
{
$iIndex++;
$sStyle = ($iIndex == $this->m_iCurrentStep) ? 'wizActiveStep' : 'wizStep';
$aSteps[] = "<div class=\"$sStyle\"><span>$sStepTitle</span></div>";
}
$sWizardHeader = "<div class=\"wizHeader\"><h1>".htmlentities($this->s_title, ENT_QUOTES, 'UTF-8')."</h1>\n".implode("<div class=\"wizSeparator\"><img align=\"bottom\" src=\"../images/wizArrow.gif\"></div>", $aSteps)."<br style=\"clear:both;\"/></div>\n";
$this->s_content = "$sWizardHeader<div class=\"wizContainer\">".$this->s_content."</div>";
parent::output();
}
}
?>
<?php
// Copyright (C) 2010-2012 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/>
/**
* Class iTopWizardWebPage
*
* @copyright Copyright (C) 2010-2012 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once('itopwebpage.class.inc.php');
/**
* Web page to display a wizard in the iTop framework
*/
class iTopWizardWebPage extends iTopWebPage
{
var $m_iCurrentStep;
var $m_aSteps;
public function __construct($sTitle, $currentOrganization, $iCurrentStep, $aSteps)
{
parent::__construct($sTitle." - step $iCurrentStep of ".count($aSteps)." - ".$aSteps[$iCurrentStep - 1], $currentOrganization);
$this->m_iCurrentStep = $iCurrentStep;
$this->m_aSteps = $aSteps;
}
public function output()
{
$aSteps = array();
$iIndex = 0;
foreach($this->m_aSteps as $sStepTitle)
{
$iIndex++;
$sStyle = ($iIndex == $this->m_iCurrentStep) ? 'wizActiveStep' : 'wizStep';
$aSteps[] = "<div class=\"$sStyle\"><span>$sStepTitle</span></div>";
}
$sWizardHeader = "<div class=\"wizHeader\"><h1>".htmlentities($this->s_title, ENT_QUOTES, 'UTF-8')."</h1>\n".implode("<div class=\"wizSeparator\"><img align=\"bottom\" src=\"../images/wizArrow.gif\"></div>", $aSteps)."<br style=\"clear:both;\"/></div>\n";
$this->s_content = "$sWizardHeader<div class=\"wizContainer\">".$this->s_content."</div>";
parent::output();
}
}
?>

View File

@@ -0,0 +1,138 @@
<?php
/**
* Class LoginBasic
*
* @copyright Copyright (C) 2010-2019 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class LoginBasic extends AbstractLoginFSMExtension
{
/**
* Return the list of supported login modes for this plugin
*
* @return array of supported login modes
*/
public function ListSupportedLoginModes()
{
return array('basic');
}
protected function OnModeDetection(&$iErrorCode)
{
if (!isset($_SESSION['login_mode']))
{
if (isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION']))
{
$_SESSION['login_mode'] = 'basic';
}
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) && !empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
{
$_SESSION['login_mode'] = 'basic';
}
elseif (isset($_SERVER['PHP_AUTH_USER']))
{
$_SESSION['login_mode'] = 'basic';
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnReadCredentials(&$iErrorCode)
{
if (!isset($_SESSION['login_mode']) || $_SESSION['login_mode'] == 'basic')
{
list($sAuthUser, $sAuthPwd) = $this->GetAuthUserAndPassword();
$_SESSION['login_temp_auth_user'] = $sAuthUser;
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnCheckCredentials(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'basic')
{
list($sAuthUser, $sAuthPwd) = $this->GetAuthUserAndPassword();
if (!UserRights::CheckCredentials($sAuthUser, $sAuthPwd, $_SESSION['login_mode'], 'internal'))
{
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
return LoginWebPage::LOGIN_FSM_ERROR;
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnCredentialsOK(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'basic')
{
list($sAuthUser) = $this->GetAuthUserAndPassword();
LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnError(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'basic')
{
LoginWebPage::HTTP401Error();
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnConnected(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'basic')
{
$_SESSION['can_logoff'] = true;
return LoginWebPage::CheckLoggedUser($iErrorCode);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
private function GetAuthUserAndPassword()
{
$sAuthUser = '';
$sAuthPwd = null;
$sAuthorization = '';
if (isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION']))
{
$sAuthorization = $_SERVER['HTTP_AUTHORIZATION'];
}
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']) && !empty($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
{
$sAuthorization = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
}
if (!empty($sAuthorization))
{
list($sAuthUser, $sAuthPwd) = explode(':', base64_decode(substr($sAuthorization, 6)));
}
else
{
if (isset($_SERVER['PHP_AUTH_USER']))
{
$sAuthUser = $_SERVER['PHP_AUTH_USER'];
// Unfortunately, the RFC is not clear about the encoding...
// IE and FF supply the user and password encoded in ISO-8859-1 whereas Chrome provides them encoded in UTF-8
// So let's try to guess if it's an UTF-8 string or not... fortunately all encodings share the same ASCII base
if (!LoginWebPage::LooksLikeUTF8($sAuthUser))
{
// Does not look like and UTF-8 string, try to convert it from iso-8859-1 to UTF-8
// Supposed to be harmless in case of a plain ASCII string...
$sAuthUser = iconv('iso-8859-1', 'utf-8', $sAuthUser);
}
$sAuthPwd = $_SERVER['PHP_AUTH_PW'];
if (!LoginWebPage::LooksLikeUTF8($sAuthPwd))
{
// Does not look like and UTF-8 string, try to convert it from iso-8859-1 to UTF-8
// Supposed to be harmless in case of a plain ASCII string...
$sAuthPwd = iconv('iso-8859-1', 'utf-8', $sAuthPwd);
}
}
}
return array($sAuthUser, $sAuthPwd);
}
}

View File

@@ -0,0 +1,129 @@
<?php
/**
* @copyright Copyright (C) 2010-2019 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
/**
* Class LoginDefaultBefore
*/
class LoginDefaultBefore extends AbstractLoginFSMExtension
{
/**
* Must be executed before the other login plugins
*
* @return array of supported login modes
*/
public function ListSupportedLoginModes()
{
return array('before');
}
protected function OnStart(&$iErrorCode)
{
$iErrorCode = LoginWebPage::EXIT_CODE_OK;
unset($_SESSION['login_temp_auth_user']);
// Check if proposed login mode is present and allowed
$aAllowedLoginTypes = MetaModel::GetConfig()->GetAllowedLoginTypes();
$sProposedLoginMode = utils::ReadParam('login_mode', '');
$index = array_search($sProposedLoginMode, $aAllowedLoginTypes);
if ($index !== false)
{
// Force login mode
$_SESSION['login_mode'] = $sProposedLoginMode;
}
else
{
unset($_SESSION['login_mode']);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnReadCredentials(&$iErrorCode)
{
// Check if proposed login mode is present and allowed
$aAllowedLoginTypes = MetaModel::GetConfig()->GetAllowedLoginTypes();
$sProposedLoginMode = utils::ReadParam('login_mode', '');
$index = array_search($sProposedLoginMode, $aAllowedLoginTypes);
if ($index !== false)
{
// Force login mode
LoginWebPage::SetLoginModeAndReload($sProposedLoginMode);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
}
/**
* Class LoginDefaultAfter
*/
class LoginDefaultAfter extends AbstractLoginFSMExtension implements iLogoutExtension
{
/**
* Must be executed after the other login plugins
*
* @return array of supported login modes
*/
public function ListSupportedLoginModes()
{
return array('after');
}
protected function OnError(&$iErrorCode)
{
self::ResetLoginSession();
$iOnExit = LoginWebPage::getIOnExit();
if ($iOnExit == LoginWebPage::EXIT_RETURN)
{
return LoginWebPage::LOGIN_FSM_RETURN; // Error, exit FSM
}
elseif ($iOnExit == LoginWebPage::EXIT_HTTP_401)
{
LoginWebPage::HTTP401Error(); // Error, exit
}
// LoginWebPage::EXIT_PROMPT
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnCredentialsOk(&$iErrorCode)
{
if (!isset($_SESSION['login_mode']))
{
// If no plugin validated the user, exit
self::ResetLoginSession();
exit();
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
/**
* Execute all actions to log out properly
*/
public function LogoutAction()
{
self::ResetLoginSession();
}
protected function OnConnected(&$iErrorCode)
{
unset($_SESSION['login_temp_auth_user']);
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
// Hard reset of the session
private static function ResetLoginSession()
{
LoginWebPage::ResetSession();
foreach (array_keys($_SESSION) as $sKey)
{
if (utils::StartsWith($sKey, 'login_'))
{
unset($_SESSION[$sKey]);
}
}
}
}

View File

@@ -0,0 +1,89 @@
<?php
/**
* Class LoginExternal
*
* @copyright Copyright (C) 2010-2019 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class LoginExternal extends AbstractLoginFSMExtension
{
/**
* Return the list of supported login modes for this plugin
*
* @return array of supported login modes
*/
public function ListSupportedLoginModes()
{
return array('external');
}
protected function OnModeDetection(&$iErrorCode)
{
if (!isset($_SESSION['login_mode']))
{
$sAuthUser = $this->GetAuthUser();
if ($sAuthUser && (strlen($sAuthUser) > 0))
{
$_SESSION['login_mode'] = 'external';
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnCheckCredentials(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'external')
{
$sAuthUser = $this->GetAuthUser();
if (!UserRights::CheckCredentials($sAuthUser, '', $_SESSION['login_mode'], 'external'))
{
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
return LoginWebPage::LOGIN_FSM_ERROR;
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnCredentialsOK(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'external')
{
$sAuthUser = $this->GetAuthUser();
LoginWebPage::OnLoginSuccess($sAuthUser, 'external', $_SESSION['login_mode']);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnConnected(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'external')
{
$_SESSION['can_logoff'] = false;
return LoginWebPage::CheckLoggedUser($iErrorCode);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnError(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'external')
{
LoginWebPage::HTTP401Error();
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
/**
* @return bool
*/
private function GetAuthUser()
{
$sExtAuthVar = MetaModel::GetConfig()->GetExternalAuthenticationVariable(); // In which variable is the info passed ?
eval('$sAuthUser = isset('.$sExtAuthVar.') ? '.$sExtAuthVar.' : false;'); // Retrieve the value
/** @var string $sAuthUser */
return $sAuthUser; // Retrieve the value
}
}

View File

@@ -0,0 +1,156 @@
<?php
/**
* @copyright Copyright (C) 2010-2019 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
/**
* Class LoginForm
*
* @since 2.7.0
*/
class LoginForm extends AbstractLoginFSMExtension implements iLoginUIExtension
{
private $bForceFormOnError = false;
/**
* Return the list of supported login modes for this plugin
*
* @return array of supported login modes
*/
public function ListSupportedLoginModes()
{
return array('form');
}
/**
* @inheritDoc
*/
protected function OnReadCredentials(&$iErrorCode)
{
if (!isset($_SESSION['login_mode']) || ($_SESSION['login_mode'] == 'form'))
{
$sAuthUser = utils::ReadPostedParam('auth_user', '', 'raw_data');
$sAuthPwd = utils::ReadPostedParam('auth_pwd', null, 'raw_data');
if ($this->bForceFormOnError || empty($sAuthUser) || empty($sAuthPwd))
{
if (array_key_exists('HTTP_X_COMBODO_AJAX', $_SERVER))
{
// X-Combodo-Ajax is a special header automatically added to all ajax requests
// Let's reply that we're currently logged-out
header('HTTP/1.0 401 Unauthorized');
exit;
}
// No credentials yet, display the form
$oPage = LoginWebPage::NewLoginWebPage();
$oPage->DisplayLoginForm($this->bForceFormOnError);
$oPage->output();
$this->bForceFormOnError = false;
exit;
}
$_SESSION['login_temp_auth_user'] = $sAuthUser;
$_SESSION['login_mode'] = 'form';
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
/**
* @inheritDoc
*/
protected function OnCheckCredentials(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'form')
{
$sAuthUser = utils::ReadPostedParam('auth_user', '', 'raw_data');
$sAuthPwd = utils::ReadPostedParam('auth_pwd', null, 'raw_data');
if (!UserRights::CheckCredentials($sAuthUser, $sAuthPwd, $_SESSION['login_mode'], 'internal'))
{
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
return LoginWebPage::LOGIN_FSM_ERROR;
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
/**
* @inheritDoc
*/
protected function OnCredentialsOK(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'form')
{
if (isset($_SESSION['auth_user']))
{
// If FSM reenter this state (example 2FA) then the auth_user is not resubmitted
$sAuthUser = $_SESSION['auth_user'];
}
else
{
$sAuthUser = utils::ReadPostedParam('auth_user', '', 'raw_data');
}
// Store 'auth_user' in session for further use
LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
/**
* @inheritDoc
*/
protected function OnError(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'form')
{
$this->bForceFormOnError = true;
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
/**
* @inheritDoc
*/
protected function OnConnected(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'form')
{
$_SESSION['can_logoff'] = true;
return LoginWebPage::CheckLoggedUser($iErrorCode);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
/**
* @inheritDoc
* @throws \Exception
*/
public function GetTwigContext()
{
$oLoginContext = new LoginTwigContext();
$oLoginContext->AddPostedVar('auth_user');
$oLoginContext->AddPostedVar('auth_pwd');
$sAuthUser = utils::ReadParam('auth_user', '', true, 'raw_data');
$sAuthPwd = utils::ReadParam('suggest_pwd', '', true, 'raw_data');
$aData = array(
'sAuthUser' => $sAuthUser,
'sAuthPwd' => $sAuthPwd,
);
$oLoginContext->AddBlockExtension('login_input', new LoginBlockExtension('extensionblock/loginforminput.html.twig', $aData));
$oLoginContext->AddBlockExtension('login_submit', new LoginBlockExtension('extensionblock/loginformsubmit.html.twig'));
$oLoginContext->AddBlockExtension('login_form_footer', new LoginBlockExtension('extensionblock/loginformfooter.html.twig'));
$bEnableResetPassword = MetaModel::GetConfig()->Get('forgot_password');
$sResetPasswordUrl = utils::GetAbsoluteUrlAppRoot() . 'pages/UI.php?loginop=forgot_pwd';
$aData = array(
'bEnableResetPassword' => $bEnableResetPassword,
'sResetPasswordUrl' => $sResetPasswordUrl,
);
$oLoginContext->AddBlockExtension('login_links', new LoginBlockExtension('extensionblock/loginformlinks.html.twig', $aData));
return $oLoginContext;
}
}

View File

@@ -0,0 +1,321 @@
<?php
/**
*
* @copyright Copyright (C) 2010-2019 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
use Combodo\iTop\TwigExtension;
/**
* Twig context for modules extending the login screen
* Class LoginTwigContext
*/
class LoginTwigContext
{
/** @var array */
private $aBlockExtension;
/** @var array */
private $aPostedVars;
/** @var string */
private $sTwigLoaderPath;
/** @var array */
private $aCSSFiles;
/** @var array */
private $aJsFiles;
private $sTwigNameSpace;
/**
* Build a context to display the twig files used
* to extend the login screens
*
* LoginTwigContext constructor.
* @api
*/
public function __construct()
{
$this->aBlockExtension = array();
$this->aPostedVars = array();
$this->sTwigLoaderPath = null;
$this->aCSSFiles = array();
$this->aJsFiles = array();
$this->sTwigNameSpace = null;
}
/**
* Set the absolute path on disk of the folder containing the twig templates
*
* @param string $sPath absolute path of twig templates directory
* @api
*/
public function SetLoaderPath($sPath)
{
$this->sTwigLoaderPath = $sPath;
}
/**
* Add a Twig block extension
*
* @param string $sBlockName
* @param LoginBlockExtension $oBlockExtension
*/
public function AddBlockExtension($sBlockName, $oBlockExtension)
{
$this->aBlockExtension[$sBlockName] = $oBlockExtension;
}
/**
* Add a variable intended to be posted on URL (and managed) by the module.
* Declaring the posted variables will prevent the core engine to manipulate these variables.
*
* @param string $sPostedVar Name of the posted variable
* @api
*/
public function AddPostedVar($sPostedVar)
{
$this->aPostedVars[] = $sPostedVar;
}
/**
* Add the URL of a CSS file to link to the login screen
*
* @param string $sFile URL of the CSS file to link
* @api
*/
public function AddCSSFile($sFile)
{
$this->aCSSFiles[] = $sFile;
}
/**
* Add the URL of a javascript file to link to the login screen
* @param string $sFile URL of the javascript file to link
* @api
*/
public function AddJsFile($sFile)
{
$this->aJsFiles[] = $sFile;
}
/**
* @param string $sBlockName
*
* @return \LoginBlockExtension
*/
public function GetBlockExtension($sBlockName)
{
/** @var LoginBlockExtension $oBlockExtension */
$oBlockExtension = isset($this->aBlockExtension[$sBlockName]) ? $this->aBlockExtension[$sBlockName] : null;
return $oBlockExtension;
}
/**
* @return array
*/
public function GetPostedVars()
{
return $this->aPostedVars;
}
/**
* @return string
*/
public function GetTwigLoaderPath()
{
return $this->sTwigLoaderPath;
}
/**
* @return array
*/
public function GetCSSFiles()
{
return $this->aCSSFiles;
}
/**
* @return array
*/
public function GetJsFiles()
{
return $this->aJsFiles;
}
}
/**
* Twig block description for login screen extension
* The login screen can be extended by adding twig templates
* to specific blocks of the login screens
*
* Class LoginBlockExtension
*/
class LoginBlockExtension
{
private $sTwig;
private $aData;
/**
* Create a new twig extension block
* The given twig template can be HTML, CSS or JavaScript.
* CSS goes to the block named 'css' and is inline in the page.
* JavaScript goes to the blocks named 'script' or 'ready_script' and are inline in the page.
* HTML goes to everywhere else
*
* LoginBlockExtension constructor.
*
* @param string $sTwig name of the twig file relative to the path given to the LoginTwigContext
* @param array $aData Data given to the twig template (into the variable {{ aData }})
* @api
*/
public function __construct($sTwig, $aData = array())
{
$this->sTwig = $sTwig;
$this->aData = $aData;
}
public function GetTwig()
{
return $this->sTwig;
}
public function GetData()
{
return $this->aData;
}
}
/**
* Used by LoginWebPage to display the login screen
* Class LoginTwigRenderer
*/
class LoginTwigRenderer
{
private $aLoginPluginList;
private $aPluginFormData;
private $aPostedVars;
private $oTwig;
public function __construct()
{
$this->aLoginPluginList = LoginWebPage::GetLoginPluginList('iLoginUIExtension', false);
$this->aPluginFormData = array();
$aTwigLoaders = array();
$this->aPostedVars = array();
foreach ($this->aLoginPluginList as $oLoginPlugin)
{
/** @var \iLoginUIExtension $oLoginPlugin */
$oLoginContext = $oLoginPlugin->GetTwigContext();
if (is_null($oLoginContext))
{
continue;
}
$this->aPluginFormData[] = $oLoginContext;
$sTwigLoaderPath = $oLoginContext->GetTwigLoaderPath();
if ($sTwigLoaderPath != null)
{
$oExtensionLoader = new Twig_Loader_Filesystem();
$oExtensionLoader->setPaths($sTwigLoaderPath);
$aTwigLoaders[] = $oExtensionLoader;
}
$this->aPostedVars = array_merge($this->aPostedVars, $oLoginContext->GetPostedVars());
}
$oCoreLoader = new Twig_Loader_Filesystem(array(), APPROOT.'templates');
$aCoreTemplatesPaths = array('login', 'login/password');
// Having this path declared after the plugins let the plugins replace the core templates
$oCoreLoader->setPaths($aCoreTemplatesPaths);
// Having the core templates accessible within a different namespace offer the possibility to extend them while replacing them
$oCoreLoader->setPaths($aCoreTemplatesPaths, 'ItopCore');
$aTwigLoaders[] = $oCoreLoader;
$oLoader = new Twig_Loader_Chain($aTwigLoaders);
$this->oTwig = new Twig_Environment($oLoader);
TwigExtension::RegisterTwigExtensions($this->oTwig);
}
public function GetDefaultVars()
{
$sLogo = 'itop-logo-external.png';
$sBrandingLogo = 'login-logo.png';
$sVersionShort = Dict::Format('UI:iTopVersion:Short', ITOP_APPLICATION, ITOP_VERSION);
$sIconUrl = Utils::GetConfig()->Get('app_icon_url');
$sDisplayIcon = utils::GetAbsoluteUrlAppRoot().'images/'.$sLogo.'?t='.utils::GetCacheBusterTimestamp();
if (file_exists(MODULESROOT.'branding/'.$sBrandingLogo))
{
$sDisplayIcon = utils::GetAbsoluteUrlModulesRoot().'branding/'.$sBrandingLogo.'?t='.utils::GetCacheBusterTimestamp();
}
$aVars = array(
'sAppRootUrl' => utils::GetAbsoluteUrlAppRoot(),
'aPluginFormData' => $this->GetPluginFormData(),
'sItopVersion' => ITOP_VERSION,
'sVersionShort' => $sVersionShort,
'sIconUrl' => $sIconUrl,
'sDisplayIcon' => $sDisplayIcon,
);
return $aVars;
}
public function Render(NiceWebPage $oPage, $sTwigFile, $aVars = array())
{
$oTemplate = $this->GetTwig()->load($sTwigFile);
$oPage->add($oTemplate->renderBlock('body', $aVars));
$oPage->add_script($oTemplate->renderBlock('script', $aVars));
$oPage->add_ready_script($oTemplate->renderBlock('ready_script', $aVars));
$oPage->add_style($oTemplate->renderBlock('css', $aVars));
// Render CSS links
foreach ($this->aPluginFormData as $oFormData)
{
/** @var \LoginTwigContext $oFormData */
$aCSSFiles = $oFormData->GetCSSFiles();
foreach ($aCSSFiles as $sCSSFile)
{
$oPage->add_linked_stylesheet($sCSSFile);
}
$aJsFiles = $oFormData->GetJsFiles();
foreach ($aJsFiles as $sJsFile)
{
$oPage->add_linked_script($sJsFile);
}
}
}
/**
* @return mixed
*/
public function GetLoginPluginList()
{
return $this->aLoginPluginList;
}
/**
* @return array
*/
public function GetPluginFormData()
{
return $this->aPluginFormData;
}
/**
* @return array
*/
public function GetPostedVars()
{
return $this->aPostedVars;
}
/**
* @return \Twig_Environment
*/
public function GetTwig()
{
return $this->oTwig;
}
}

View File

@@ -0,0 +1,93 @@
<?php
/**
* Class LoginURL
*
* @copyright Copyright (C) 2010-2019 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
class LoginURL extends AbstractLoginFSMExtension
{
/**
* @var bool
*/
private $bErrorOccurred = false;
/**
* Return the list of supported login modes for this plugin
*
* @return array of supported login modes
*/
public function ListSupportedLoginModes()
{
return array('url');
}
protected function OnModeDetection(&$iErrorCode)
{
if (!isset($_SESSION['login_mode']) && !$this->bErrorOccurred)
{
$sAuthUser = utils::ReadParam('auth_user', '', false, 'raw_data');
$sAuthPwd = utils::ReadParam('auth_pwd', null, false, 'raw_data');
if (!empty($sAuthUser) && !empty($sAuthPwd))
{
$_SESSION['login_mode'] = 'url';
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnReadCredentials(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'url')
{
$_SESSION['login_temp_auth_user'] = utils::ReadParam('auth_user', '', false, 'raw_data');
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnCheckCredentials(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'url')
{
$sAuthUser = utils::ReadParam('auth_user', '', false, 'raw_data');
$sAuthPwd = utils::ReadParam('auth_pwd', null, false, 'raw_data');
if (!UserRights::CheckCredentials($sAuthUser, $sAuthPwd, $_SESSION['login_mode'], 'internal'))
{
$iErrorCode = LoginWebPage::EXIT_CODE_WRONGCREDENTIALS;
return LoginWebPage::LOGIN_FSM_ERROR;
}
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnCredentialsOK(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'url')
{
$sAuthUser = utils::ReadParam('auth_user', '', false, 'raw_data');
LoginWebPage::OnLoginSuccess($sAuthUser, 'internal', $_SESSION['login_mode']);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnError(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'url')
{
$this->bErrorOccurred = true;
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
protected function OnConnected(&$iErrorCode)
{
if ($_SESSION['login_mode'] == 'url')
{
$_SESSION['can_logoff'] = true;
return LoginWebPage::CheckLoggedUser($iErrorCode);
}
return LoginWebPage::LOGIN_FSM_CONTINUE;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,93 @@
<?php
/**
* Copyright (C) 2013-2019 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
*/
//
// Maintenance message display functions
// Only included by approot.inc.php
//
/**
* Use a setup page to display the maintenance message
* @param $sTitle
* @param $sMessage
*/
function _MaintenanceSetupPageMessage($sTitle, $sMessage)
{
// Web Page
@include_once(APPROOT.'setup/setuppage.class.inc.php');
if (class_exists('SetupPage'))
{
$oP = new ErrorPage($sTitle);
$oP->p("<h2 class=\"center\">$sMessage</h2>");
$oP->add_ready_script(
<<<JS
// Reload in 30s to check if maintenance is over
setTimeout(function(){ window.location.reload(); }, 30000);
JS
);
$oP->output();
}
else
{
_MaintenanceTextMessage($sMessage);
}
}
/**
* Use simple text to display the maintenance message
* @param $sMessage
*/
function _MaintenanceTextMessage($sMessage)
{
echo $sMessage;
}
/**
* Use a simple HTML to display the maintenance message
* @param $sMessage
*/
function _MaintenanceHtmlMessage($sMessage)
{
echo '<html><body><div>'.$sMessage.'</div></body></html>';
}
/**
* Use a simple JSON to display the maintenance message
*
* @param $sTitle
* @param $sMessage
*/
function _MaintenanceJsonMessage($sTitle, $sMessage)
{
@include_once(APPROOT."/application/ajaxwebpage.class.inc.php");
if (class_exists('ajax_page'))
{
$oP = new ajax_page($sTitle);
$oP->add_header('Access-Control-Allow-Origin: *');
$oP->SetContentType('application/json');
$oP->add('{"code":100, "message":"'.$sMessage.'"}');
$oP->Output();
}
else
{
_MaintenanceTextMessage($sMessage);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,159 @@
<?php
// Copyright (C) 2010-2015 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/>
/**
* A provider for messages to be displayed in the iTop Newsroom
*/
interface iNewsroomProvider
{
/**
* Inject the current configuration in the provider
* @param Config $oConfig
* @return void
*/
public function SetConfig(Config $oConfig);
/**
* Tells if this provider is enabled for the given user
* @param User $oUser The user for who to check if the provider is applicable.
* return bool
*/
public function IsApplicable(User $oUser = null);
/**
* The human readable (localized) label for this provider
* @return string
*/
public function GetLabel();
/**
* The URL to query (from the browser, using jsonp) to fetch all unread messages
* @return string
*/
public function GetFetchURL();
/**
* The URL to navigate to in order to display all messages
* @return string
*/
public function GetViewAllURL();
/**
* The URL to query(from the browser, using jsonp) to mark all unread messages as read
* @return string
*/
public function GetMarkAllAsReadURL();
/**
* Return the URL to configure the preferences for this provider or null is there is nothing to configure
* @return string|null
*/
public function GetPreferencesUrl();
/**
* Return an array key => value to be replaced in URL of the messages
* Example: '%itop_root%' => utils::GetAbsoluteUrlAppRoot();
* @return string[]
*/
public function GetPlaceholders();
/**
* The duration between to refreshes of the cache (in seconds)
* @return int
*/
public function GetTTL();
}
/**
* Basic implementation of a Newsroom provider, to be overloaded by your own provider implementation
*
*/
abstract class NewsroomProviderBase implements iNewsroomProvider
{
/**
* The current configuration parameters
* @var Config
*/
protected $oConfig;
public function __construct()
{
$this->oConfig = null;
}
/**
* {@inheritDoc}
* @see iNewsroomProvider::SetConfig()
*/
public function SetConfig(Config $oConfig)
{
$this->oConfig = $oConfig;
}
/**
* {@inheritDoc}
* @see iNewsroomProvider::GetPreferencesUrl()
*/
public function GetPreferencesUrl()
{
return null; // No preferences
}
/**
* {@inheritDoc}
* @see iNewsroomProvider::GetLabel()
*/
public abstract function GetLabel();
/**
* {@inheritDoc}
* @see iNewsroomProvider::GetFetchURL()
*/
public abstract function GetFetchURL();
/**
* {@inheritDoc}
* @see iNewsroomProvider::GetMarkAllURL()
*/
public abstract function GetMarkAllAsReadURL();
/**
* {@inheritDoc}
* @see iNewsroomProvider::GetViewAllURL()
*/
public abstract function GetViewAllURL();
public function IsApplicable(User $oUser = null)
{
return false;
}
/**
* {@inheritDoc}
* @see iNewsroomProvider::GetPlaceholders()
*/
public function GetPlaceholders()
{
return array(); // By default, empty set of placeholders
}
public function GetTTL()
{
return 10*60; // Refresh every 10 minutes
}
}

View File

@@ -1,250 +1,262 @@
<?php
// Copyright (C) 2010-2016 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/>
/**
* Class NiceWebPage
*
* @copyright Copyright (C) 2010-2016 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once(APPROOT."/application/webpage.class.inc.php");
/**
* Web page with some associated CSS and scripts (jquery) for a fancier display
*/
class NiceWebPage extends WebPage
{
var $m_aReadyScripts;
var $m_sRootUrl;
public function __construct($s_title, $bPrintable = false)
{
parent::__construct($s_title, $bPrintable);
$this->m_aReadyScripts = array();
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-1.12.4.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate-1.4.1.min.js'); // Needed since many other plugins still rely on oldies like $.browser
$this->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/ui-lightness/jquery-ui-1.11.4.custom.css');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui-1.11.4.custom.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/hovertip.js');
// table sorting
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.pager.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablehover.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_sorter.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/datatable.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.positionBy.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.popupmenu.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/searchformforeignkeys.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/latinise/latinise.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_handler.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_handler_history.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_raw.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_string.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_field.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_numeric.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_enum.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_key.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_hierarchical_key.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_abstract.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_time.js');
$this->add_dict_entries('UI:Combo');
$this->add_ready_script(
<<< EOF
//add new widget called TruncatedList to properly display truncated lists when they are sorted
$.tablesorter.addWidget({
// give the widget a id
id: "truncatedList",
// format is called when the on init and when a sorting has finished
format: function(table)
{
// Check if there is a "truncated" line
this.truncatedList = false;
if ($("tr td.truncated",table).length > 0)
{
this.truncatedList = true;
}
if (this.truncatedList)
{
$("tr td",table).removeClass('truncated');
$("tr:last td",table).addClass('truncated');
}
}
});
$.tablesorter.addWidget({
// give the widget a id
id: "myZebra",
// format is called when the on init and when a sorting has finished
format: function(table)
{
// Replace the 'red even' lines by 'red_even' since most browser do not support 2 classes selector in CSS, etc..
$("tbody tr:even",table).addClass('even');
$("tbody tr.red:even",table).removeClass('red').removeClass('even').addClass('red_even');
$("tbody tr.orange:even",table).removeClass('orange').removeClass('even').addClass('orange_even');
$("tbody tr.green:even",table).removeClass('green').removeClass('even').addClass('green_even');
// In case we sort again the table, we need to remove the added 'even' classes on odd rows
$("tbody tr:odd",table).removeClass('even');
$("tbody tr.red_even:odd",table).removeClass('even').removeClass('red_even').addClass('red');
$("tbody tr.orange_even:odd",table).removeClass('even').removeClass('orange_even').addClass('orange');
$("tbody tr.green_even:odd",table).removeClass('even').removeClass('green_even').addClass('green');
}
});
$("table.listResults").tableHover(); // hover tables
EOF
);
$this->add_saas("css/light-grey.scss");
$this->m_sRootUrl = $this->GetAbsoluteUrlAppRoot();
$sAbsURLAppRoot = addslashes($this->m_sRootUrl);
$sAbsURLModulesRoot = addslashes($this->GetAbsoluteUrlModulesRoot());
$sEnvironment = addslashes(utils::GetCurrentEnvironment());
$sAppContext = addslashes($this->GetApplicationContext());
$this->add_script(
<<<EOF
function GetAbsoluteUrlAppRoot()
{
return '$sAbsURLAppRoot';
}
function GetAbsoluteUrlModulesRoot()
{
return '$sAbsURLModulesRoot';
}
function GetAbsoluteUrlModulePage(sModule, sPage, aArguments)
{
// aArguments is optional, it default to an empty hash
aArguments = typeof aArguments !== 'undefined' ? aArguments : {};
var sUrl = '$sAbsURLAppRoot'+'pages/exec.php?exec_module='+sModule+'&exec_page='+sPage+'&exec_env='+'$sEnvironment';
for (var sArgName in aArguments)
{
if (aArguments.hasOwnProperty(sArgName))
{
sUrl = sUrl + '&'+sArgName+'='+aArguments[sArgname];
}
}
return sUrl;
}
function AddAppContext(sURL)
{
var sContext = '$sAppContext';
if (sContext.length > 0)
{
if (sURL.indexOf('?') == -1)
{
return sURL+'?'+sContext;
}
return sURL+'&'+sContext;
}
return sURL;
}
EOF
);
}
public function SetRootUrl($sRootUrl)
{
$this->m_sRootUrl = $sRootUrl;
}
public function small_p($sText)
{
$this->add("<p style=\"font-size:smaller\">$sText</p>\n");
}
public function GetAbsoluteUrlAppRoot()
{
return utils::GetAbsoluteUrlAppRoot();
}
public function GetAbsoluteUrlModulesRoot()
{
return utils::GetAbsoluteUrlModulesRoot();
}
function GetApplicationContext()
{
$oAppContext = new ApplicationContext();
return $oAppContext->GetForLink();
}
// By Rom, used by CSVImport and Advanced search
public function MakeClassesSelect($sName, $sDefaultValue, $iWidthPx, $iActionCode = null)
{
// $aTopLevelClasses = array('bizService', 'bizContact', 'logInfra', 'bizDocument');
// These are classes wich root class is cmdbAbstractObject !
$this->add("<select id=\"select_$sName\" name=\"$sName\">");
$aValidClasses = array();
foreach(MetaModel::GetClasses('bizmodel') as $sClassName)
{
if (is_null($iActionCode) || UserRights::IsActionAllowed($sClassName, $iActionCode))
{
$sSelected = ($sClassName == $sDefaultValue) ? " SELECTED" : "";
$sDescription = MetaModel::GetClassDescription($sClassName);
$sDisplayName = MetaModel::GetName($sClassName);
$aValidClasses[$sDisplayName] = "<option style=\"width: ".$iWidthPx." px;\" title=\"$sDescription\" value=\"$sClassName\"$sSelected>$sDisplayName</option>";
}
}
ksort($aValidClasses);
$this->add(implode("\n", $aValidClasses));
$this->add("</select>");
}
// By Rom, used by Advanced search
public function add_select($aChoices, $sName, $sDefaultValue, $iWidthPx)
{
$this->add("<select id=\"select_$sName\" name=\"$sName\">");
foreach($aChoices as $sKey => $sValue)
{
$sSelected = ($sKey == $sDefaultValue) ? " SELECTED" : "";
$this->add("<option style=\"width: ".$iWidthPx." px;\" value=\"".htmlspecialchars($sKey)."\"$sSelected>".htmlentities($sValue, ENT_QUOTES, 'UTF-8')."</option>");
}
$this->add("</select>");
}
public function add_ready_script($sScript)
{
$this->m_aReadyScripts[] = $sScript;
}
/**
* Outputs (via some echo) the complete HTML page by assembling all its elements
*/
public function output()
{
//$this->set_base($this->m_sRootUrl.'pages/');
if (count($this->m_aReadyScripts)>0)
{
$this->add_script("\$(document).ready(function() {\n".implode("\n", $this->m_aReadyScripts)."\n});");
}
parent::output();
}
}
?>
<?php
/**
* Copyright (C) 2013-2020 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
*/
require_once(APPROOT."/application/webpage.class.inc.php");
/**
* Web page with some associated CSS and scripts (jquery) for a fancier display
*/
class NiceWebPage extends WebPage
{
var $m_aReadyScripts;
var $m_sRootUrl;
public function __construct($s_title, $bPrintable = false)
{
parent::__construct($s_title, $bPrintable);
$this->m_aReadyScripts = array();
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.min.js');
if(utils::IsDevelopmentEnvironment()) // Needed since many other plugins still rely on oldies like $.browser
{
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate.dev.js');
}
else
{
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-migrate.prod.min.js');
}
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui-1.11.4.custom.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/hovertip.js');
// table sorting
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablesorter.pager.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.tablehover.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/table-selectable-lines.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/field_sorter.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/datatable.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.positionBy.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.popupmenu.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/searchformforeignkeys.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/latinise/latinise.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_handler.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_handler_history.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_raw.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_string.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_field.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_numeric.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_enum.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_tag_set.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_external_key.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_hierarchical_key.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_abstract.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/search/search_form_criteria_date_time.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/clipboard.min.js');
$this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/clipboardwidget.js');
$this->add_dict_entries('UI:Combo');
$this->add_ready_script(
<<< EOF
//add new widget called TruncatedList to properly display truncated lists when they are sorted
$.tablesorter.addWidget({
// give the widget a id
id: "truncatedList",
// format is called when the on init and when a sorting has finished
format: function(table)
{
// Check if there is a "truncated" line
this.truncatedList = false;
if ($("tr td.truncated",table).length > 0)
{
this.truncatedList = true;
}
if (this.truncatedList)
{
$("tr td",table).removeClass('truncated');
$("tr:last td",table).addClass('truncated');
}
}
});
$.tablesorter.addWidget({
// give the widget a id
id: "myZebra",
// format is called when the on init and when a sorting has finished
format: function(table)
{
// Replace the 'red even' lines by 'red_even' since most browser do not support 2 classes selector in CSS, etc..
$("tbody tr:even",table).addClass('even');
$("tbody tr.red:even",table).removeClass('red').removeClass('even').addClass('red_even');
$("tbody tr.orange:even",table).removeClass('orange').removeClass('even').addClass('orange_even');
$("tbody tr.green:even",table).removeClass('green').removeClass('even').addClass('green_even');
// In case we sort again the table, we need to remove the added 'even' classes on odd rows
$("tbody tr:odd",table).removeClass('even');
$("tbody tr.red_even:odd",table).removeClass('even').removeClass('red_even').addClass('red');
$("tbody tr.orange_even:odd",table).removeClass('even').removeClass('orange_even').addClass('orange');
$("tbody tr.green_even:odd",table).removeClass('even').removeClass('green_even').addClass('green');
}
});
$("table.listResults").tableHover(); // hover tables
EOF
);
$this->LoadTheme();
$this->m_sRootUrl = $this->GetAbsoluteUrlAppRoot();
$sAbsURLAppRoot = addslashes($this->m_sRootUrl);
$sAbsURLModulesRoot = addslashes($this->GetAbsoluteUrlModulesRoot());
$sEnvironment = addslashes(utils::GetCurrentEnvironment());
$sAppContext = addslashes($this->GetApplicationContext());
$this->add_script(
<<<EOF
function GetAbsoluteUrlAppRoot()
{
return '$sAbsURLAppRoot';
}
function GetAbsoluteUrlModulesRoot()
{
return '$sAbsURLModulesRoot';
}
function GetAbsoluteUrlModulePage(sModule, sPage, aArguments)
{
// aArguments is optional, it default to an empty hash
aArguments = typeof aArguments !== 'undefined' ? aArguments : {};
var sUrl = '$sAbsURLAppRoot'+'pages/exec.php?exec_module='+sModule+'&exec_page='+sPage+'&exec_env='+'$sEnvironment';
for (var sArgName in aArguments)
{
if (aArguments.hasOwnProperty(sArgName))
{
sUrl = sUrl + '&'+sArgName+'='+aArguments[sArgname];
}
}
return sUrl;
}
function AddAppContext(sURL)
{
var sContext = '$sAppContext';
if (sContext.length > 0)
{
if (sURL.indexOf('?') == -1)
{
return sURL+'?'+sContext;
}
return sURL+'&'+sContext;
}
return sURL;
}
EOF
);
}
public function SetRootUrl($sRootUrl)
{
$this->m_sRootUrl = $sRootUrl;
}
public function small_p($sText)
{
$this->add("<p style=\"font-size:smaller\">$sText</p>\n");
}
public function GetAbsoluteUrlAppRoot()
{
return utils::GetAbsoluteUrlAppRoot();
}
public function GetAbsoluteUrlModulesRoot()
{
return utils::GetAbsoluteUrlModulesRoot();
}
function GetApplicationContext()
{
$oAppContext = new ApplicationContext();
return $oAppContext->GetForLink();
}
// By Rom, used by CSVImport and Advanced search
public function MakeClassesSelect($sName, $sDefaultValue, $iWidthPx, $iActionCode = null)
{
// $aTopLevelClasses = array('bizService', 'bizContact', 'logInfra', 'bizDocument');
// These are classes wich root class is cmdbAbstractObject !
$this->add("<select id=\"select_$sName\" name=\"$sName\">");
$aValidClasses = array();
foreach(MetaModel::GetClasses('bizmodel') as $sClassName)
{
if (is_null($iActionCode) || UserRights::IsActionAllowed($sClassName, $iActionCode))
{
$sSelected = ($sClassName == $sDefaultValue) ? " SELECTED" : "";
$sDescription = MetaModel::GetClassDescription($sClassName);
$sDisplayName = MetaModel::GetName($sClassName);
$aValidClasses[$sDisplayName] = "<option style=\"width: ".$iWidthPx." px;\" title=\"$sDescription\" value=\"$sClassName\"$sSelected>$sDisplayName</option>";
}
}
ksort($aValidClasses);
$this->add(implode("\n", $aValidClasses));
$this->add("</select>");
}
// By Rom, used by Advanced search
public function add_select($aChoices, $sName, $sDefaultValue, $iWidthPx)
{
$this->add("<select id=\"select_$sName\" name=\"$sName\">");
foreach($aChoices as $sKey => $sValue)
{
$sSelected = ($sKey == $sDefaultValue) ? " SELECTED" : "";
$this->add("<option style=\"width: ".$iWidthPx." px;\" value=\"".htmlspecialchars($sKey)."\"$sSelected>".htmlentities($sValue,
ENT_QUOTES, self::PAGES_CHARSET)."</option>");
}
$this->add("</select>");
}
public function add_ready_script($sScript)
{
$this->m_aReadyScripts[] = $sScript;
}
/**
* Outputs (via some echo) the complete HTML page by assembling all its elements
*/
public function output()
{
//$this->set_base($this->m_sRootUrl.'pages/');
if (count($this->m_aReadyScripts)>0)
{
$this->add_script("\$(document).ready(function() {\n".implode("\n", $this->m_aReadyScripts)."\n});");
}
parent::output();
}
/**
* @throws \Exception
* @since 2.7.0
*/
protected function LoadTheme()
{
$sCssThemeUrl = ThemeHandler::GetCurrentThemeUrl();
$this->add_linked_stylesheet($sCssThemeUrl);
}
}

View File

@@ -1,15 +1,53 @@
<?php
require_once(APPROOT.'lib/tcpdf/tcpdf.php');
/**
* Copyright (C) 2013-2019 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
*/
require_once(APPROOT.'application/utils.inc.php');
/**
* Custom class derived from TCPDF for providing custom headers and footers
*
* @author denis
*
*/
class iTopPDF extends TCPDF
{
protected $sDocumentTitle;
/**
* Shortcut for {@link TCPDF::SetFont}, to use the font configured
*
* @param string $style
* @param int $size
* @param string $fontfile
* @param string $subset
* @param bool $out
*
* @uses \TCPDF::SetFont()
* @uses \iTopPDF::GetPdfFont()
* @since 2.7.0
*/
public function SetFontParams($style, $size, $fontfile='', $subset='default', $out=true)
{
$siTopFont = self::GetPdfFont();
$this->SetFont($siTopFont, $style, $size, $fontfile, $subset, $out);
}
public function SetDocumentTitle($sDocumentTitle)
{
$this->sDocumentTitle = $sDocumentTitle;
@@ -17,26 +55,29 @@ class iTopPDF extends TCPDF
/**
* Builds the custom header. Called for each new page.
*
* @see TCPDF::Header()
*/
public function Header()
{
// Title
// Set font
$this->SetFont('dejavusans', 'B', 10);
$this->SetFontParams('B', 10);
$iPageNumberWidth = 25;
$aMargins = $this->getMargins();
// Display the title (centered)
$this->SetXY($aMargins['left'] + $iPageNumberWidth, 0);
$this->MultiCell($this->getPageWidth() - $aMargins['left'] - $aMargins['right'] - 2*$iPageNumberWidth, 15, $this->sDocumentTitle, 0, 'C', false, 0 /* $ln */, '', '', true, 0, false, true, 15, 'M' /* $valign */);
$this->SetFont('dejavusans', '', 10);
$this->MultiCell($this->getPageWidth() - $aMargins['left'] - $aMargins['right'] - 2 * $iPageNumberWidth, 15, $this->sDocumentTitle,
0, 'C', false, 0 /* $ln */, '', '', true, 0, false, true, 15, 'M' /* $valign */);
$this->SetFontParams('', 10);
// Display the page number (right aligned)
// Warning: the 'R'ight alignment does not work when using placeholders like $this->getAliasNumPage() or $this->getAliasNbPages()
$this->MultiCell($iPageNumberWidth, 15, 'Page '.$this->page, 0, 'R', false, 0 /* $ln */, '', '', true, 0, false, true, 15, 'M' /* $valign */);
$this->MultiCell($iPageNumberWidth, 15, Dict::Format('Core:BulkExport:PDF:PageNumber', $this->page), 0, 'R', false, 0 /* $ln */, '',
'', true, 0, false, true, 15, 'M' /* $valign */);
// Branding logo
$sBrandingIcon = APPROOT.'images/itop-logo.png';
if (file_exists(MODULESROOT.'branding/main-logo.png'))
@@ -51,6 +92,18 @@ class iTopPDF extends TCPDF
{
// No footer
}
/**
* dejavusans is a UTF-8 Unicode font. Standard PDF fonts like helvetica or times new roman are NOT UTF-8
* @return string font in the config file (export_pdf_font)
*/
public static function GetPdfFont()
{
$oConfig = utils::GetConfig();
$sPdfFont = $oConfig->Get('export_pdf_font');
return $sPdfFont;
}
}
/**
@@ -58,49 +111,45 @@ class iTopPDF extends TCPDF
*/
class PDFPage extends WebPage
{
/**
* Instance of the TCPDF object for creating the PDF
* @var TCPDF
*/
/** @var \iTopPDF Instance of the TCPDF object for creating the PDF */
protected $oPdf;
public function __construct($s_title, $sPageFormat = 'A4', $sPageOrientation = 'L')
{
parent::__construct($s_title);
define(K_PATH_FONTS, APPROOT.'lib/tcpdf/fonts');
$this->oPdf = new iTopPDF($sPageOrientation, 'mm', $sPageFormat, true, 'UTF-8', false);
define(K_PATH_FONTS, APPROOT.'lib/combodo/tcpdf/fonts');
$this->oPdf = new iTopPDF($sPageOrientation, 'mm', $sPageFormat, true, self::PAGES_CHARSET, false);
// set document information
$this->oPdf->SetCreator(PDF_CREATOR);
$this->oPdf->SetAuthor('iTop');
$this->oPdf->SetTitle($s_title);
$this->oPdf->SetDocumentTitle($s_title);
$this->oPdf->setFontSubsetting(true);
// Set font
// dejavusans is a UTF-8 Unicode font. Standard PDF fonts like helvetica or times new roman are NOT UTF-8
$this->oPdf->SetFont('dejavusans', '', 10, '', true);
$this->oPdf->SetFontParams('', 10, '', true);
// set auto page breaks
$this->oPdf->SetAutoPageBreak(true, 15); // 15 mm break margin at the bottom
$this->oPdf->SetTopMargin(15);
// Add a page, we're ready to start
$this->oPdf->AddPage();
$this->SetContentDisposition('inline', $s_title.'.pdf');
$this->SetDefaultStyle();
}
/**
* Sets a default style (suitable for printing) to be included each time $this->oPdf->writeHTML() is called
*/
protected function SetDefaultStyle()
{
$this->add_style(
<<<EOF
<<<EOF
table {
padding: 2pt;
}
@@ -124,19 +173,21 @@ td.icon {
width: 30px;
}
EOF
);
);
}
/**
* Get access to the underlying TCPDF object
* @return TCPDF
*
* @return \iTopPDF
*/
public function get_tcpdf()
{
$this->flush();
return $this->oPdf;
}
/**
* Writes the currently buffered HTML content into the PDF. This can be useful:
* - to sync the flow in case you want to access the underlying TCPDF object for some specific/graphic output
@@ -156,39 +207,42 @@ EOF
$this->s_content = '';
}
}
/**
* Whether or not the page is a PDF page
*
* @return boolean
*/
public function is_pdf()
{
return true;
}
/**
* Generates the PDF document and returns the PDF content as a string
*
* @return string
* @see WebPage::output()
*/
public function output()
{
$this->add_header('Content-type: application/x-pdf');
if (!empty($this->sContentDisposition))
{
if (!empty($this->sContentDisposition))
{
$this->add_header('Content-Disposition: '.$this->sContentDisposition.'; filename="'.$this->sContentFileName.'"');
}
foreach($this->a_headers as $s_header)
{
header($s_header);
}
$this->flush();
}
foreach ($this->a_headers as $s_header)
{
header($s_header);
}
$this->flush();
echo $this->oPdf->Output($this->s_title.'.pdf', 'S');
}
public function get_pdf()
{
$this->flush();
return $this->oPdf->Output($this->s_title.'.pdf', 'S');
}
}

File diff suppressed because it is too large Load Diff

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