diff --git a/ajax/group_values.php b/ajax/group_values.php
index 0f7cd28..a8d0a27 100644
--- a/ajax/group_values.php
+++ b/ajax/group_values.php
@@ -13,22 +13,19 @@
$ticket_id = (isset($_REQUEST['ticket_id'])) ? $_REQUEST['ticket_id'] : 0;
-$condition = PluginItilcategorygroupsCategory::getSQLCondition(intval($ticket_id),
- intval($_REQUEST['itilcategories_id']), $_REQUEST['type']);
-$rand = mt_rand();
-$default_options = ['display_emptychoice' => true,
- 'itemtype' => 'Group',
- 'condition' => $rand];
-
+$condition = PluginItilcategorygroupsCategory::getSQLCondition(
+ intval($ticket_id),
+ intval($_REQUEST['itilcategories_id']),
+ $_REQUEST['type']
+);
+if (empty($condition)) {
+ $condition = [
+ 'glpi_groups.is_assign' => 1,
+ ] + getEntitiesRestrictCriteria("", "entities_id", $_SESSION['glpiactive_entity'], 1);
+}
-if (! empty($condition)) {
- $_GET = array_merge($_GET, $default_options);
- $_SESSION['glpicondition'][$rand] = $condition;
+$_POST['display_emptychoice'] = true;
+$_POST['itemtype'] = 'Group';
+$_POST['condition'] = Dropdown::addNewCondition($condition);
-} else {
- $_GET = array_merge($_GET, $default_options);
- $_SESSION['glpicondition'][$rand] = getEntitiesRestrictRequest(" ", "", "entities_id",
- $_SESSION['glpiactive_entity'], 1). "AND glpi_groups.is_assign";
-}
-$_POST += $default_options; // fix for glpi 9.1
require ("../../../ajax/getDropdownValue.php");
diff --git a/composer.lock b/composer.lock
index c5147d0..583be70 100644
--- a/composer.lock
+++ b/composer.lock
@@ -9,20 +9,20 @@
"packages-dev": [
{
"name": "consolidation/annotated-command",
- "version": "2.8.4",
+ "version": "2.10.0",
"source": {
"type": "git",
"url": "https://github.com/consolidation/annotated-command.git",
- "reference": "651541a0b68318a2a202bda558a676e5ad92223c"
+ "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/651541a0b68318a2a202bda558a676e5ad92223c",
- "reference": "651541a0b68318a2a202bda558a676e5ad92223c",
+ "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/8e7d1a05230dc1159c751809e98b74f2b7f71873",
+ "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873",
"shasum": ""
},
"require": {
- "consolidation/output-formatters": "^3.1.12",
+ "consolidation/output-formatters": "^3.4",
"php": ">=5.4.0",
"psr/log": "^1",
"symfony/console": "^2.8|^3|^4",
@@ -57,20 +57,20 @@
}
],
"description": "Initialize Symfony Console commands from annotated command class methods.",
- "time": "2018-05-25T18:04:25+00:00"
+ "time": "2018-11-15T01:46:18+00:00"
},
{
"name": "consolidation/config",
- "version": "1.0.11",
+ "version": "1.1.1",
"source": {
"type": "git",
"url": "https://github.com/consolidation/config.git",
- "reference": "ede41d946078e97e7a9513aadc3352f1c26817af"
+ "reference": "925231dfff32f05b787e1fddb265e789b939cf4c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/consolidation/config/zipball/ede41d946078e97e7a9513aadc3352f1c26817af",
- "reference": "ede41d946078e97e7a9513aadc3352f1c26817af",
+ "url": "https://api.github.com/repos/consolidation/config/zipball/925231dfff32f05b787e1fddb265e789b939cf4c",
+ "reference": "925231dfff32f05b787e1fddb265e789b939cf4c",
"shasum": ""
},
"require": {
@@ -80,7 +80,7 @@
},
"require-dev": {
"g1a/composer-test-scenarios": "^1",
- "phpunit/phpunit": "^4",
+ "phpunit/phpunit": "^5",
"satooshi/php-coveralls": "^1.0",
"squizlabs/php_codesniffer": "2.*",
"symfony/console": "^2.5|^3|^4",
@@ -111,7 +111,7 @@
}
],
"description": "Provide configuration services for a commandline tool.",
- "time": "2018-05-27T01:17:02+00:00"
+ "time": "2018-10-24T17:55:35+00:00"
},
{
"name": "consolidation/log",
@@ -164,19 +164,20 @@
},
{
"name": "consolidation/output-formatters",
- "version": "3.2.1",
+ "version": "3.4.0",
"source": {
"type": "git",
"url": "https://github.com/consolidation/output-formatters.git",
- "reference": "d78ef59aea19d3e2e5a23f90a055155ee78a0ad5"
+ "reference": "a942680232094c4a5b21c0b7e54c20cce623ae19"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/d78ef59aea19d3e2e5a23f90a055155ee78a0ad5",
- "reference": "d78ef59aea19d3e2e5a23f90a055155ee78a0ad5",
+ "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/a942680232094c4a5b21c0b7e54c20cce623ae19",
+ "reference": "a942680232094c4a5b21c0b7e54c20cce623ae19",
"shasum": ""
},
"require": {
+ "dflydev/dot-access-data": "^1.1.0",
"php": ">=5.4.0",
"symfony/console": "^2.8|^3|^4",
"symfony/finder": "^2.5|^3|^4"
@@ -215,20 +216,20 @@
}
],
"description": "Format text by applying transformations provided by plug-in formatters.",
- "time": "2018-05-25T18:02:34+00:00"
+ "time": "2018-10-19T22:35:38+00:00"
},
{
"name": "consolidation/robo",
- "version": "1.3.0",
+ "version": "1.3.2",
"source": {
"type": "git",
"url": "https://github.com/consolidation/Robo.git",
- "reference": "ac563abfadf7cb7314b4e152f2b5033a6c255f6f"
+ "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/consolidation/Robo/zipball/ac563abfadf7cb7314b4e152f2b5033a6c255f6f",
- "reference": "ac563abfadf7cb7314b4e152f2b5033a6c255f6f",
+ "url": "https://api.github.com/repos/consolidation/Robo/zipball/a9bd9ecf00751aa92754903c0d17612c4e840ce8",
+ "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8",
"shasum": ""
},
"require": {
@@ -236,6 +237,7 @@
"consolidation/config": "^1.0.10",
"consolidation/log": "~1",
"consolidation/output-formatters": "^3.1.13",
+ "consolidation/self-update": "^1",
"grasmash/yaml-expander": "^1.3",
"league/container": "^2.2",
"php": ">=5.5.0",
@@ -252,15 +254,15 @@
"codeception/aspect-mock": "^1|^2.1.1",
"codeception/base": "^2.3.7",
"codeception/verify": "^0.3.2",
- "g1a/composer-test-scenarios": "^2",
+ "g1a/composer-test-scenarios": "^3",
"goaop/framework": "~2.1.2",
"goaop/parser-reflection": "^1.1.0",
"natxet/cssmin": "3.0.4",
"nikic/php-parser": "^3.1.5",
"patchwork/jsqueeze": "~2",
"pear/archive_tar": "^1.4.2",
+ "php-coveralls/php-coveralls": "^1",
"phpunit/php-code-coverage": "~2|~4",
- "satooshi/php-coveralls": "^2",
"squizlabs/php_codesniffer": "^2.8"
},
"suggest": {
@@ -274,9 +276,36 @@
],
"type": "library",
"extra": {
+ "scenarios": {
+ "symfony4": {
+ "require": {
+ "symfony/console": "^4"
+ },
+ "config": {
+ "platform": {
+ "php": "7.1.3"
+ }
+ }
+ },
+ "symfony2": {
+ "require": {
+ "symfony/console": "^2.8"
+ },
+ "remove": [
+ "goaop/framework"
+ ],
+ "config": {
+ "platform": {
+ "php": "5.5.9"
+ }
+ },
+ "scenario-options": {
+ "create-lockfile": "false"
+ }
+ }
+ },
"branch-alias": {
- "dev-master": "1.x-dev",
- "dev-state": "1.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
@@ -295,7 +324,57 @@
}
],
"description": "Modern task runner",
- "time": "2018-05-27T01:42:53+00:00"
+ "time": "2018-11-22T05:43:44+00:00"
+ },
+ {
+ "name": "consolidation/self-update",
+ "version": "1.1.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/consolidation/self-update.git",
+ "reference": "a1c273b14ce334789825a09d06d4c87c0a02ad54"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/consolidation/self-update/zipball/a1c273b14ce334789825a09d06d4c87c0a02ad54",
+ "reference": "a1c273b14ce334789825a09d06d4c87c0a02ad54",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.5.0",
+ "symfony/console": "^2.8|^3|^4",
+ "symfony/filesystem": "^2.5|^3|^4"
+ },
+ "bin": [
+ "scripts/release"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "SelfUpdate\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Greg Anderson",
+ "email": "greg.1.anderson@greenknowe.org"
+ },
+ {
+ "name": "Alexander Menk",
+ "email": "menk@mestrona.net"
+ }
+ ],
+ "description": "Provides a self:update command for Symfony Console applications.",
+ "time": "2018-10-28T01:52:03+00:00"
},
{
"name": "container-interop/container-interop",
@@ -774,16 +853,16 @@
},
{
"name": "psr/log",
- "version": "1.0.2",
+ "version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
- "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+ "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
+ "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
"shasum": ""
},
"require": {
@@ -817,20 +896,20 @@
"psr",
"psr-3"
],
- "time": "2016-10-10T12:19:37+00:00"
+ "time": "2018-11-20T15:27:04+00:00"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.3.0",
+ "version": "3.3.2",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266"
+ "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d86873af43b4aa9d1f39a3601cc0cfcf02b25266",
- "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e",
+ "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e",
"shasum": ""
},
"require": {
@@ -868,20 +947,20 @@
"phpcs",
"standards"
],
- "time": "2018-06-06T23:58:19+00:00"
+ "time": "2018-09-23T23:08:17+00:00"
},
{
"name": "symfony/console",
- "version": "v3.4.11",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "36f83f642443c46f3cf751d4d2ee5d047d757a27"
+ "reference": "8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/36f83f642443c46f3cf751d4d2ee5d047d757a27",
- "reference": "36f83f642443c46f3cf751d4d2ee5d047d757a27",
+ "url": "https://api.github.com/repos/symfony/console/zipball/8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb",
+ "reference": "8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb",
"shasum": ""
},
"require": {
@@ -937,20 +1016,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2018-05-16T08:49:21+00:00"
+ "time": "2018-11-26T12:48:07+00:00"
},
{
"name": "symfony/debug",
- "version": "v3.4.11",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "b28fd73fefbac341f673f5efd707d539d6a19f68"
+ "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/b28fd73fefbac341f673f5efd707d539d6a19f68",
- "reference": "b28fd73fefbac341f673f5efd707d539d6a19f68",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/a2233f555ddf55e5600f386fba7781cea1cb82d3",
+ "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3",
"shasum": ""
},
"require": {
@@ -993,20 +1072,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2018-05-16T14:03:39+00:00"
+ "time": "2018-11-27T12:43:10+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v3.4.11",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8"
+ "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fdd5abcebd1061ec647089c6c41a07ed60af09f8",
- "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc35e84adbb15c26ae6868e1efbf705a917be6b5",
+ "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5",
"shasum": ""
},
"require": {
@@ -1056,20 +1135,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2018-04-06T07:35:25+00:00"
+ "time": "2018-11-30T18:07:24+00:00"
},
{
"name": "symfony/filesystem",
- "version": "v3.4.11",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0"
+ "reference": "b49b1ca166bd109900e6a1683d9bb1115727ef2d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0",
- "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/b49b1ca166bd109900e6a1683d9bb1115727ef2d",
+ "reference": "b49b1ca166bd109900e6a1683d9bb1115727ef2d",
"shasum": ""
},
"require": {
@@ -1106,20 +1185,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2018-05-16T08:49:21+00:00"
+ "time": "2018-11-11T19:48:54+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.4.11",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "472a92f3df8b247b49ae364275fb32943b9656c6"
+ "reference": "6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/472a92f3df8b247b49ae364275fb32943b9656c6",
- "reference": "472a92f3df8b247b49ae364275fb32943b9656c6",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442",
+ "reference": "6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442",
"shasum": ""
},
"require": {
@@ -1155,29 +1234,32 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2018-05-16T08:49:21+00:00"
+ "time": "2018-11-11T19:48:54+00:00"
},
{
"name": "symfony/polyfill-ctype",
- "version": "v1.8.0",
+ "version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
- "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae"
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
- "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
+ "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.8-dev"
+ "dev-master": "1.9-dev"
}
},
"autoload": {
@@ -1210,20 +1292,20 @@
"polyfill",
"portable"
],
- "time": "2018-04-30T19:57:29+00:00"
+ "time": "2018-08-06T14:22:27+00:00"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.8.0",
+ "version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "3296adf6a6454a050679cde90f95350ad604b171"
+ "reference": "c79c051f5b3a46be09205c73b80b346e4153e494"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171",
- "reference": "3296adf6a6454a050679cde90f95350ad604b171",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494",
+ "reference": "c79c051f5b3a46be09205c73b80b346e4153e494",
"shasum": ""
},
"require": {
@@ -1235,7 +1317,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.8-dev"
+ "dev-master": "1.9-dev"
}
},
"autoload": {
@@ -1269,20 +1351,20 @@
"portable",
"shim"
],
- "time": "2018-04-26T10:06:28+00:00"
+ "time": "2018-09-21T13:07:52+00:00"
},
{
"name": "symfony/process",
- "version": "v3.4.11",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "4cbf2db9abcb01486a21b7a059e03a62fae63187"
+ "reference": "abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/4cbf2db9abcb01486a21b7a059e03a62fae63187",
- "reference": "4cbf2db9abcb01486a21b7a059e03a62fae63187",
+ "url": "https://api.github.com/repos/symfony/process/zipball/abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2",
+ "reference": "abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2",
"shasum": ""
},
"require": {
@@ -1318,20 +1400,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2018-05-16T08:49:21+00:00"
+ "time": "2018-11-20T16:10:26+00:00"
},
{
"name": "symfony/yaml",
- "version": "v3.4.11",
+ "version": "v3.4.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0"
+ "reference": "291e13d808bec481eab83f301f7bff3e699ef603"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0",
- "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/291e13d808bec481eab83f301f7bff3e699ef603",
+ "reference": "291e13d808bec481eab83f301f7bff3e699ef603",
"shasum": ""
},
"require": {
@@ -1377,7 +1459,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2018-05-03T23:18:14+00:00"
+ "time": "2018-11-11T19:48:54+00:00"
}
],
"aliases": [],
diff --git a/inc/category.class.php b/inc/category.class.php
index 0748142..dfcaf92 100644
--- a/inc/category.class.php
+++ b/inc/category.class.php
@@ -170,7 +170,7 @@ function multipleDropdownGroup($level) {
function prepareInputForAdd($input) {
$cat = new self();
- $found_cat = $cat->find("itilcategories_id = ".$this->input["itilcategories_id"]);
+ $found_cat = $cat->find(['itilcategories_id' => $this->input["itilcategories_id"]]);
if (count($found_cat) > 0) {
Session::addMessageAfterRedirect(__("A link with this category already exists", "itilcategorygroups"));
return false;
@@ -207,8 +207,12 @@ function post_updateItem($history = 1) {
if ($this->input["view_all_lvl$lvl"] != 1) {
//delete old groups values
- $found_cat_groups = $cat_group->find("itilcategories_id = ".$this->input["itilcategories_id"].
- " AND level = $lvl");
+ $found_cat_groups = $cat_group->find(
+ [
+ 'itilcategories_id' => $this->input["itilcategories_id"],
+ 'level' => $lvl
+ ]
+ );
foreach ($found_cat_groups as $id => $current_cat_group) {
$cat_group->delete(['id' => $current_cat_group['id']]);
}
@@ -277,7 +281,7 @@ static function getSQLCondition($tickets_id, $itilcategories_id, $type) {
}
}
- $condition = "";
+ $condition = [];
if (count($groups_id_toshow) > 0) {
// transform found groups (2 dimensions) in a flat array
$groups_id_toshow_flat = [];
@@ -285,8 +289,7 @@ static function getSQLCondition($tickets_id, $itilcategories_id, $type) {
array_push($groups_id_toshow_flat, $v);
});
- $newarray = implode(", ", $groups_id_toshow_flat);
- $condition = " id IN ($newarray)";
+ $condition['id'] = $groups_id_toshow_flat;
}
return $condition;
}
diff --git a/itilcategorygroups.xml b/itilcategorygroups.xml
index 97fe408..34a7861 100644
--- a/itilcategorygroups.xml
+++ b/itilcategorygroups.xml
@@ -37,6 +37,10 @@ Potom, pro každou z kategorií požadavku je možné určit která skupina bude
François Legastelois
+
+ 2.2.0
+ 9.4
+
2.1.3
9.3
diff --git a/locales/fi_FI.mo b/locales/fi_FI.mo
new file mode 100644
index 0000000..6388f9f
Binary files /dev/null and b/locales/fi_FI.mo differ
diff --git a/locales/fi_FI.po b/locales/fi_FI.po
new file mode 100644
index 0000000..9016d48
--- /dev/null
+++ b/locales/fi_FI.po
@@ -0,0 +1,60 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# Markku Vepsä, 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: GLPI Plugin - Itilcategorygroups\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-06-22 14:52+0000\n"
+"PO-Revision-Date: 2018-11-06 04:17+0000\n"
+"Last-Translator: Markku Vepsä\n"
+"Language-Team: Finnish (Finland) (http://www.transifex.com/teclib/glpi-plugin-itilcategorygroups/language/fi_FI/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: fi_FI\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: hook.php:77
+msgid "Level "
+msgstr "Taso"
+
+#: hook.php:95 inc/category.class.php:97 inc/category.class.php:459
+#: inc/group_level.class.php:92
+msgid "Level 1"
+msgstr "Taso 1"
+
+#: hook.php:96 inc/category.class.php:101 inc/category.class.php:483
+#: inc/group_level.class.php:93
+msgid "Level 2"
+msgstr "Taso 2"
+
+#: hook.php:97 inc/category.class.php:106 inc/category.class.php:507
+#: inc/group_level.class.php:94
+msgid "Level 3"
+msgstr "Taso 3"
+
+#: hook.php:98 inc/category.class.php:110 inc/category.class.php:531
+#: inc/group_level.class.php:95
+msgid "Level 4"
+msgstr "Taso 4"
+
+#: inc/category.class.php:42 inc/category.class.php:385 inc/menu.class.php:6
+msgid "Link ItilCategory - Groups"
+msgstr "Linkki Tikettikategoria - Ryhmät"
+
+#: inc/category.class.php:175
+msgid "A link with this category already exists"
+msgstr "Linkki tähän kategoriaan on jo olemassa"
+
+#: inc/menu.class.php:10 inc/group_level.class.php:50 setup.php:77
+msgid "ItilCategory Groups"
+msgstr "Tikettikategoria ryhmät"
+
+#: inc/group_level.class.php:14 inc/group_level.class.php:87
+#: inc/group_level.class.php:121
+msgid "Level attribution"
+msgstr "Tason määritys"
diff --git a/setup.php b/setup.php
index 0584ff4..ff33e75 100644
--- a/setup.php
+++ b/setup.php
@@ -28,12 +28,12 @@
@since 2009
---------------------------------------------------------------------- */
-define ('PLUGIN_ITILCATEGORYGROUPS_VERSION', '2.1.3');
+define ('PLUGIN_ITILCATEGORYGROUPS_VERSION', '2.2.0');
// Minimal GLPI version, inclusive
-define("PLUGIN_ITILCATEGORYGROUPS_MIN_GLPI", "9.3");
+define("PLUGIN_ITILCATEGORYGROUPS_MIN_GLPI", "9.4");
// Maximum GLPI version, exclusive
-define("PLUGIN_ITILCATEGORYGROUPS_MAX_GLPI", "9.4");
+define("PLUGIN_ITILCATEGORYGROUPS_MAX_GLPI", "9.5");
function plugin_init_itilcategorygroups() {
global $PLUGIN_HOOKS;