diff --git a/.travis.yml b/.travis.yml index f2963c95..972e75da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: php php: - - 5.5 - 5.6 - 7.0 - 7.1 + - 7.2 - nightly #env: diff --git a/.tx/config b/.tx/config index a811f6d7..3909f0c1 100644 --- a/.tx/config +++ b/.tx/config @@ -1,8 +1,8 @@ [main] host = https://www.transifex.com -[glpi-plugin-datainjection.datainjection-243pot] +[glpi-plugin-datainjection.datainjection-pot] file_filter = locales/.po source_file = locales/datainjection.pot source_lang = en -minimum_perc: 100 +type = PO diff --git a/composer.json b/composer.json index 1ac36cb3..e21ea281 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,10 @@ { - "minimum-stability": "dev", - "prefer-stable": true, "require-dev": { - "glpi-project/tools": "^0.1.0" + "glpi-project/tools": "^0.1" + }, + "config": { + "platform": { + "php": "5.6" + } } } diff --git a/composer.lock b/composer.lock index df8bdc91..c5147d0a 100644 --- a/composer.lock +++ b/composer.lock @@ -1,38 +1,38 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8a6db7f45e083d6f582cc8949facfebb", + "content-hash": "1780e587040d1a21844800dc378c2f2e", "packages": [], "packages-dev": [ { "name": "consolidation/annotated-command", - "version": "2.4.0", + "version": "2.8.4", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "80afffd362bd1cf83bef60db690a8c50d8390803" + "reference": "651541a0b68318a2a202bda558a676e5ad92223c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/80afffd362bd1cf83bef60db690a8c50d8390803", - "reference": "80afffd362bd1cf83bef60db690a8c50d8390803", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/651541a0b68318a2a202bda558a676e5ad92223c", + "reference": "651541a0b68318a2a202bda558a676e5ad92223c", "shasum": "" }, "require": { - "consolidation/output-formatters": "^3.1.5", + "consolidation/output-formatters": "^3.1.12", "php": ">=5.4.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "psr/log": "~1", - "symfony/console": "^2.8|~3", - "symfony/event-dispatcher": "^2.5|~3", - "symfony/finder": "^2.5|~3" + "psr/log": "^1", + "symfony/console": "^2.8|^3|^4", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "phpunit/phpunit": "4.*", - "satooshi/php-coveralls": "^1.0", + "g1a/composer-test-scenarios": "^2", + "phpunit/phpunit": "^6", + "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "^2.7" }, "type": "library", @@ -57,29 +57,85 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2017-02-04T06:13:54+00:00" + "time": "2018-05-25T18:04:25+00:00" + }, + { + "name": "consolidation/config", + "version": "1.0.11", + "source": { + "type": "git", + "url": "https://github.com/consolidation/config.git", + "reference": "ede41d946078e97e7a9513aadc3352f1c26817af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/config/zipball/ede41d946078e97e7a9513aadc3352f1c26817af", + "reference": "ede41d946078e97e7a9513aadc3352f1c26817af", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "grasmash/expander": "^1", + "php": ">=5.4.0" + }, + "require-dev": { + "g1a/composer-test-scenarios": "^1", + "phpunit/phpunit": "^4", + "satooshi/php-coveralls": "^1.0", + "squizlabs/php_codesniffer": "2.*", + "symfony/console": "^2.5|^3|^4", + "symfony/yaml": "^2.8.11|^3|^4" + }, + "suggest": { + "symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\Config\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Provide configuration services for a commandline tool.", + "time": "2018-05-27T01:17:02+00:00" }, { "name": "consolidation/log", - "version": "1.0.3", + "version": "1.0.6", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "74ba81b4edc585616747cc5c5309ce56fec41254" + "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/74ba81b4edc585616747cc5c5309ce56fec41254", - "reference": "74ba81b4edc585616747cc5c5309ce56fec41254", + "url": "https://api.github.com/repos/consolidation/log/zipball/dfd8189a771fe047bf3cd669111b2de5f1c79395", + "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395", "shasum": "" }, "require": { "php": ">=5.5.0", "psr/log": "~1.0", - "symfony/console": "~2.5|~3.0" + "symfony/console": "^2.8|^3|^4" }, "require-dev": { + "g1a/composer-test-scenarios": "^1", "phpunit/phpunit": "4.*", + "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "2.*" }, "type": "library", @@ -104,37 +160,43 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2016-03-23T23:46:42+00:00" + "time": "2018-05-25T18:14:39+00:00" }, { "name": "consolidation/output-formatters", - "version": "3.1.7", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "da39a0f14d5aaaee06732bb7cef2aea1de056b40" + "reference": "d78ef59aea19d3e2e5a23f90a055155ee78a0ad5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/da39a0f14d5aaaee06732bb7cef2aea1de056b40", - "reference": "da39a0f14d5aaaee06732bb7cef2aea1de056b40", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/d78ef59aea19d3e2e5a23f90a055155ee78a0ad5", + "reference": "d78ef59aea19d3e2e5a23f90a055155ee78a0ad5", "shasum": "" }, "require": { "php": ">=5.4.0", - "symfony/console": "~2.5|~3.0", - "symfony/finder": "~2.5|~3.0" + "symfony/console": "^2.8|^3|^4", + "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "phpunit/phpunit": "4.*", - "satooshi/php-coveralls": "^1.0", - "squizlabs/php_codesniffer": "2.*", + "g1a/composer-test-scenarios": "^2", + "phpunit/phpunit": "^5.7.27", + "satooshi/php-coveralls": "^2", + "squizlabs/php_codesniffer": "^2.7", + "symfony/console": "3.2.3", + "symfony/var-dumper": "^2.8|^3|^4", "victorjonsson/markdowndocs": "^1.3" }, + "suggest": { + "symfony/var-dumper": "For using the var_dump formatter" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { @@ -153,52 +215,57 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2017-01-21T06:26:40+00:00" + "time": "2018-05-25T18:02:34+00:00" }, { "name": "consolidation/robo", - "version": "dev-master", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "cdc15c0059a1b2d5287910df678e8a73cbaa8ed6" + "reference": "ac563abfadf7cb7314b4e152f2b5033a6c255f6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/cdc15c0059a1b2d5287910df678e8a73cbaa8ed6", - "reference": "cdc15c0059a1b2d5287910df678e8a73cbaa8ed6", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/ac563abfadf7cb7314b4e152f2b5033a6c255f6f", + "reference": "ac563abfadf7cb7314b4e152f2b5033a6c255f6f", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.2", + "consolidation/annotated-command": "^2.8.2", + "consolidation/config": "^1.0.10", "consolidation/log": "~1", - "consolidation/output-formatters": "^3.1.5", + "consolidation/output-formatters": "^3.1.13", + "grasmash/yaml-expander": "^1.3", "league/container": "^2.2", "php": ">=5.5.0", - "symfony/console": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.5|~3.0", - "symfony/filesystem": "~2.5|~3.0", - "symfony/finder": "~2.5|~3.0", - "symfony/process": "~2.5|~3.0" + "symfony/console": "^2.8|^3|^4", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/filesystem": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4", + "symfony/process": "^2.5|^3|^4" }, "replace": { "codegyre/robo": "< 1.0" }, "require-dev": { - "codeception/aspect-mock": "~1", - "codeception/base": "^2.2.6", + "codeception/aspect-mock": "^1|^2.1.1", + "codeception/base": "^2.3.7", "codeception/verify": "^0.3.2", - "henrikbjorn/lurker": "~1", - "natxet/cssmin": "~3", + "g1a/composer-test-scenarios": "^2", + "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", "phpunit/php-code-coverage": "~2|~4", - "satooshi/php-coveralls": "~1", - "squizlabs/php_codesniffer": "~2" + "satooshi/php-coveralls": "^2", + "squizlabs/php_codesniffer": "^2.8" }, "suggest": { "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", - "natxet/CssMin": "For minifying JS files in taskMinify", + "natxet/CssMin": "For minifying CSS files in taskMinify", "patchwork/jsqueeze": "For minifying JS files in taskMinify", "pear/archive_tar": "Allows tar archives to be created and extracted in taskPack and taskExtract, respectively." }, @@ -208,13 +275,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "1.x-dev", + "dev-state": "1.x-dev" } }, "autoload": { - "classmap": [ - "scripts/composer/ScriptHandler.php" - ], "psr-4": { "Robo\\": "src" } @@ -230,22 +295,25 @@ } ], "description": "Modern task runner", - "time": "2017-02-08T01:45:50+00:00" + "time": "2018-05-27T01:42:53+00:00" }, { "name": "container-interop/container-interop", - "version": "1.1.0", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/container-interop/container-interop.git", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", - "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", "shasum": "" }, + "require": { + "psr/container": "^1.0" + }, "type": "library", "autoload": { "psr-4": { @@ -257,34 +325,94 @@ "MIT" ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "time": "2014-12-30T15:22:37+00:00" + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Dflydev\\DotAccessData": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "time": "2017-01-20T21:14:22+00:00" }, { "name": "glpi-project/coding-standard", - "version": "0.5", + "version": "0.7.1", "source": { "type": "git", "url": "https://github.com/glpi-project/coding-standard.git", - "reference": "e19495c896a01199a2fec2e65b7613310598cf96" + "reference": "1cef37d764aecf8fd7d5d167db25da97e289cb03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/coding-standard/zipball/e19495c896a01199a2fec2e65b7613310598cf96", - "reference": "e19495c896a01199a2fec2e65b7613310598cf96", + "url": "https://api.github.com/repos/glpi-project/coding-standard/zipball/1cef37d764aecf8fd7d5d167db25da97e289cb03", + "reference": "1cef37d764aecf8fd7d5d167db25da97e289cb03", "shasum": "" }, "require": { - "squizlabs/php_codesniffer": "~2.0" + "squizlabs/php_codesniffer": "^3.3" }, "type": "library", "notification-url": "https://packagist.org/downloads/", "license": [ - "GPLv3" + "GPL-2.0-or-later" ], "authors": [ { "name": "Teclib'", - "email": "contact@teclib.com", + "email": "glpi@teclib.com", "homepage": "https://teclib.com" } ], @@ -294,27 +422,27 @@ "glpi", "phpcs" ], - "time": "2017-01-06T11:10:46+00:00" + "time": "2018-06-07T08:45:05+00:00" }, { "name": "glpi-project/tools", - "version": "0.1.1", + "version": "0.1.5", "source": { "type": "git", "url": "https://github.com/glpi-project/tools.git", - "reference": "89083f6e71fac05190c7cc76a9c5afd8b1f421ef" + "reference": "5ff99fa5967b468af3d3ba2d7a69ede1214273ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/89083f6e71fac05190c7cc76a9c5afd8b1f421ef", - "reference": "89083f6e71fac05190c7cc76a9c5afd8b1f421ef", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/5ff99fa5967b468af3d3ba2d7a69ede1214273ea", + "reference": "5ff99fa5967b468af3d3ba2d7a69ede1214273ea", "shasum": "" }, "require": { - "consolidation/robo": "dev-master@dev", - "glpi-project/coding-standard": "0.5", - "natxet/cssmin": "~3.0", - "patchwork/jsqueeze": "~1.0" + "consolidation/robo": "^1.3", + "glpi-project/coding-standard": "^0.7", + "natxet/cssmin": "^3.0", + "patchwork/jsqueeze": "^1.0" }, "bin": [ "tools/plugin-release", @@ -329,13 +457,13 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "GPLv3" + "GPL-3.0-or-later" ], "authors": [ { "name": "Teclib'", "email": "glpi@teclib.com", - "homepage": "https://teclib.com" + "homepage": "http://teclib-group.com" } ], "description": "Various tools for GLPI and its plugins", @@ -344,28 +472,124 @@ "plugins", "tools" ], - "time": "2017-02-08T08:20:09+00:00" + "time": "2018-06-21T11:59:33+00:00" + }, + { + "name": "grasmash/expander", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/grasmash/expander.git", + "reference": "95d6037344a4be1dd5f8e0b0b2571a28c397578f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/grasmash/expander/zipball/95d6037344a4be1dd5f8e0b0b2571a28c397578f", + "reference": "95d6037344a4be1dd5f8e0b0b2571a28c397578f", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=5.4" + }, + "require-dev": { + "greg-1-anderson/composer-test-scenarios": "^1", + "phpunit/phpunit": "^4|^5.5.4", + "satooshi/php-coveralls": "^1.0.2|dev-master", + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Grasmash\\Expander\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Grasmick" + } + ], + "description": "Expands internal property references in PHP arrays file.", + "time": "2017-12-21T22:14:55+00:00" + }, + { + "name": "grasmash/yaml-expander", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/grasmash/yaml-expander.git", + "reference": "3f0f6001ae707a24f4d9733958d77d92bf9693b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/grasmash/yaml-expander/zipball/3f0f6001ae707a24f4d9733958d77d92bf9693b1", + "reference": "3f0f6001ae707a24f4d9733958d77d92bf9693b1", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=5.4", + "symfony/yaml": "^2.8.11|^3|^4" + }, + "require-dev": { + "greg-1-anderson/composer-test-scenarios": "^1", + "phpunit/phpunit": "^4.8|^5.5.4", + "satooshi/php-coveralls": "^1.0.2|dev-master", + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Grasmash\\YamlExpander\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Grasmick" + } + ], + "description": "Expands internal property references in a yaml file.", + "time": "2017-12-16T16:06:03+00:00" }, { "name": "league/container", - "version": "2.2.0", + "version": "2.4.1", "source": { "type": "git", "url": "https://github.com/thephpleague/container.git", - "reference": "c0e7d947b690891f700dc4967ead7bdb3d6708c1" + "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/container/zipball/c0e7d947b690891f700dc4967ead7bdb3d6708c1", - "reference": "c0e7d947b690891f700dc4967ead7bdb3d6708c1", + "url": "https://api.github.com/repos/thephpleague/container/zipball/43f35abd03a12977a60ffd7095efd6a7808488c0", + "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.1", - "php": ">=5.4.0" + "container-interop/container-interop": "^1.2", + "php": "^5.4.0 || ^7.0" }, "provide": { - "container-interop/container-interop-implementation": "^1.1" + "container-interop/container-interop-implementation": "^1.2", + "psr/container-implementation": "^1.0" }, "replace": { "orno/di": "~2.0" @@ -376,7 +600,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev", + "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } }, @@ -408,20 +632,20 @@ "provider", "service" ], - "time": "2016-03-17T11:07:59+00:00" + "time": "2017-05-10T09:20:27+00:00" }, { "name": "natxet/CssMin", - "version": "v3.0.4", + "version": "v3.0.6", "source": { "type": "git", "url": "https://github.com/natxet/CssMin.git", - "reference": "92de3fe3ccb4f8298d31952490ef7d5395855c39" + "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/natxet/CssMin/zipball/92de3fe3ccb4f8298d31952490ef7d5395855c39", - "reference": "92de3fe3ccb4f8298d31952490ef7d5395855c39", + "url": "https://api.github.com/repos/natxet/CssMin/zipball/d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd", + "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd", "shasum": "" }, "require": { @@ -455,7 +679,7 @@ "css", "minify" ], - "time": "2015-09-25T11:13:11+00:00" + "time": "2018-01-09T11:15:01+00:00" }, { "name": "patchwork/jsqueeze", @@ -500,24 +724,21 @@ "time": "2015-03-25T10:11:08+00:00" }, { - "name": "phpdocumentor/reflection-common", - "version": "1.0", + "name": "psr/container", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "php": ">=5.3.0" }, "type": "library", "extra": { @@ -527,9 +748,7 @@ }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -538,112 +757,20 @@ ], "authors": [ { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2015-12-27T11:43:31+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30T07:12:33+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", - "shasum": "" - }, - "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2016-11-25T06:54:22+00:00" + "time": "2017-02-14T16:28:37+00:00" }, { "name": "psr/log", @@ -694,64 +821,37 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "2.8.0", + "version": "3.3.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "86dd55a522238211f9f3631e3361703578941d9a" + "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/86dd55a522238211f9f3631e3361703578941d9a", - "reference": "86dd55a522238211f9f3631e3361703578941d9a", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d86873af43b4aa9d1f39a3601cc0cfcf02b25266", + "reference": "d86873af43b4aa9d1f39a3601cc0cfcf02b25266", "shasum": "" }, "require": { "ext-simplexml": "*", "ext-tokenizer": "*", "ext-xmlwriter": "*", - "php": ">=5.1.2" + "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ - "scripts/phpcs", - "scripts/phpcbf" + "bin/phpcs", + "bin/phpcbf" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.x-dev" } }, - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Fixer.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" @@ -768,43 +868,49 @@ "phpcs", "standards" ], - "time": "2017-02-02T03:30:00+00:00" + "time": "2018-06-06T23:58:19+00:00" }, { "name": "symfony/console", - "version": "v3.2.3", + "version": "v3.4.11", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "7a8405a9fc175f87fed8a3c40856b0d866d61936" + "reference": "36f83f642443c46f3cf751d4d2ee5d047d757a27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/7a8405a9fc175f87fed8a3c40856b0d866d61936", - "reference": "7a8405a9fc175f87fed8a3c40856b0d866d61936", + "url": "https://api.github.com/repos/symfony/console/zipball/36f83f642443c46f3cf751d4d2ee5d047d757a27", + "reference": "36f83f642443c46f3cf751d4d2ee5d047d757a27", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", + "php": "^5.5.9|>=7.0.8", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/polyfill-mbstring": "~1.0" }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, "require-dev": { "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -831,37 +937,36 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-02-06T12:04:21+00:00" + "time": "2018-05-16T08:49:21+00:00" }, { "name": "symfony/debug", - "version": "v3.2.3", + "version": "v3.4.11", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "b4d9818f127c60ce21ed62c395da7df868dc8477" + "reference": "b28fd73fefbac341f673f5efd707d539d6a19f68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/b4d9818f127c60ce21ed62c395da7df868dc8477", - "reference": "b4d9818f127c60ce21ed62c395da7df868dc8477", + "url": "https://api.github.com/repos/symfony/debug/zipball/b28fd73fefbac341f673f5efd707d539d6a19f68", + "reference": "b28fd73fefbac341f673f5efd707d539d6a19f68", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0" }, "conflict": { "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~2.8|~3.0|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -888,31 +993,34 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-01-28T02:37:08+00:00" + "time": "2018-05-16T14:03:39+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.2.3", + "version": "v3.4.11", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6" + "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9137eb3a3328e413212826d63eeeb0217836e2b6", - "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/fdd5abcebd1061ec647089c6c41a07ed60af09f8", + "reference": "fdd5abcebd1061ec647089c6c41a07ed60af09f8", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/dependency-injection": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/dependency-injection": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0" + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.3|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0" }, "suggest": { "symfony/dependency-injection": "", @@ -921,7 +1029,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -948,29 +1056,30 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-01-02T20:32:22+00:00" + "time": "2018-04-06T07:35:25+00:00" }, { "name": "symfony/filesystem", - "version": "v3.2.3", + "version": "v3.4.11", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "a0c6ef2dc78d33b58d91d3a49f49797a184d06f4" + "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/a0c6ef2dc78d33b58d91d3a49f49797a184d06f4", - "reference": "a0c6ef2dc78d33b58d91d3a49f49797a184d06f4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0", + "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -997,29 +1106,29 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-01-08T20:47:33+00:00" + "time": "2018-05-16T08:49:21+00:00" }, { "name": "symfony/finder", - "version": "v3.2.3", + "version": "v3.4.11", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "8c71141cae8e2957946b403cc71a67213c0380d6" + "reference": "472a92f3df8b247b49ae364275fb32943b9656c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/8c71141cae8e2957946b403cc71a67213c0380d6", - "reference": "8c71141cae8e2957946b403cc71a67213c0380d6", + "url": "https://api.github.com/repos/symfony/finder/zipball/472a92f3df8b247b49ae364275fb32943b9656c6", + "reference": "472a92f3df8b247b49ae364275fb32943b9656c6", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1046,20 +1155,75 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-01-02T20:32:22+00:00" + "time": "2018-05-16T08:49:21+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-04-30T19:57:29+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.3.0", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + "reference": "3296adf6a6454a050679cde90f95350ad604b171" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", - "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", "shasum": "" }, "require": { @@ -1071,7 +1235,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.8-dev" } }, "autoload": { @@ -1105,29 +1269,29 @@ "portable", "shim" ], - "time": "2016-11-14T01:06:16+00:00" + "time": "2018-04-26T10:06:28+00:00" }, { "name": "symfony/process", - "version": "v3.2.3", + "version": "v3.4.11", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "32646a7cf53f3956c76dcb5c82555224ae321858" + "reference": "4cbf2db9abcb01486a21b7a059e03a62fae63187" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/32646a7cf53f3956c76dcb5c82555224ae321858", - "reference": "32646a7cf53f3956c76dcb5c82555224ae321858", + "url": "https://api.github.com/repos/symfony/process/zipball/4cbf2db9abcb01486a21b7a059e03a62fae63187", + "reference": "4cbf2db9abcb01486a21b7a059e03a62fae63187", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1154,39 +1318,48 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-02-03T12:11:38+00:00" + "time": "2018-05-16T08:49:21+00:00" }, { - "name": "webmozart/assert", - "version": "1.2.0", + "name": "symfony/yaml", + "version": "v3.4.11", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + "url": "https://github.com/symfony/yaml.git", + "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", - "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", + "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { "psr-4": { - "Webmozart\\Assert\\": "src/" - } + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1194,24 +1367,27 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2016-11-23T20:04:58+00:00" + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-05-03T23:18:14+00:00" } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": [], - "prefer-stable": true, + "prefer-stable": false, "prefer-lowest": false, "platform": [], - "platform-dev": [] + "platform-dev": [], + "platform-overrides": { + "php": "5.6" + } } diff --git a/css/datainjection.css b/css/datainjection.css index 275ef8a5..60b25946 100644 --- a/css/datainjection.css +++ b/css/datainjection.css @@ -1,313 +1,313 @@ -/************************General Tag***************************/ -legend { -font-size: 16px; -font-weight: bold; -} -/**************************************************************/ - -/****************Global container for wizard*******************/ -.global { -margin: 0 auto; -position: relative; -text-align: left; -font-family: "New Roman",serif; -} -/**************************************************************/ - -/**********************Onglet table****************************/ -.step { -margin:0; -text-align: center; --moz-border-radius-topright: 8px; --moz-border-radius-topleft: 8px; -border-left: 2px solid #d3d3ce; -border-right: 2px solid #d3d3ce; -border-top: 2px solid #d3d3ce; -} - -.step td { -width: 50px; -height: 50px; -font-size: 20px; -background-color: #d3d3ce; -} -/**************************************************************/ - -/**********************Wizard table****************************/ -.wizard { -height: 450px; -text-align: left; -background-color: #e6e6e6; -border: 2px solid #d3d3ce; --moz-border-radius-topright: 8px; --moz-border-radius-bottomright: 8px; --moz-border-radius-bottomleft: 8px; -} - -.wizard_left_area { -width: 212px; -background-color: white; -border-right: 2px inset black; -} - -.wizard_right_area { -padding: 20px; -font-size: 14px; -} - -.wizard_button { -height: 35px; -border-top: 2px outset black; -} - -.wizard_title { -font-size: 18px; -text-align: center; -margin-top: 20px; -margin-bottom: 50px; -} - -.wizard_explain { -font-size: 14px; -text-align: justify; -margin-left: 10px; -margin-right: 10px; -margin-top: 20px; -} -/**************************************************************/ - -/**************************Button******************************/ -.next { -float: right; -margin-right: 10px; -} - -.preview { -float: left; -margin-left: 10px; -} -/**************************************************************/ - -/***********************Presentation***************************/ -.presentation_logo { -margin: auto; -width: 180px; -height: 192px; -margin-top: 100px; -} - -.presentation_title { -font-size: 22px; -text-align: left; -margin-top: 30px; -} - -.presentation_text { -font-size: 16px; -line-height: 20px; -margin-top: 80px; -text-align: justify; -} -/**************************************************************/ - -/************************Choice Step***************************/ -.choiceStep_selection { -font-size: 14px; -width: 350px; -margin-left: auto; -margin-right: auto; -margin-top: 20px; -padding-top: 0; -} - -.choiceStep_table { -margin-bottom: 20px; -border-spacing: 10px; -font-size: 14px; -} - -.choiceStep_dropdown { -margin:auto; -width: 130px; - -} - -.choiceStep_comments { -display: none; -font-size: 14px; -margin-left: auto; -margin-right: auto; -margin-top: 20px; -width: 350px; -} -/**************************************************************/ - -/*************************Model Step***************************/ -.modelStep_selection { -width: 400px; -margin-left: auto; -margin-right: auto; -margin-top: 10px; -padding-top: 0; -} - -.modelStep_table { -font-size: 14px; -text-align: left; -} - -.modelStep_table td { -height: 30px; -} - -.delimiter { -text-align: center; -margin-top: 10px; -font-size: 14px; -visibility: hidden; -color: red; -} -/**************************************************************/ - -/************************Delete Step***************************/ -.deleteStep_table { -font-size: 16px; -margin-top: 100px; -border-spacing: 15px; -text-align: center; -} - -.save_delete { -font-size: 14px; -margin-top: 150px; -margin-left: auto; -margin-right: auto; -width: 180px; -line-height: 20px; -text-align: center; -} - -.suppr { -font-size: 14px; -margin-top: 70px; -} - -.question { -line-height: 20px; -} -/**************************************************************/ - -/*********************Mapping & Infos Step*********************/ -.mandatory { -text-align: center; -visibility: hidden; -color: red; -} -/**************************************************************/ - -/**************************File Step***************************/ -.fileStep_table { -text-align:center; -margin-top: 120px; -margin-bottom: 20px; -font-size: 16px; -} - -.fileStep_error { -color: red; -font-size: 14px; -margin-left: auto; -margin-right: auto; -width: 250px; -text-align: center; -} -/**************************************************************/ - -/**************************Save Step***************************/ -.saveStep_table { -font-size: 14px; -margin-top: 100px; -border-spacing: 10px; -} - -.saveStep2_table { -font-size: 14px; -margin-top: 70px; -border-spacing: 10px; -} -/**************************************************************/ - -/***********************Fill Info Step*************************/ -.fillInfoStep_fieldset { -margin-top: 30px; -margin-bottom: 10px; -} - -.fillInfoStep_tab td { -font-size: 14px; -} - -.fillInfoStep_mandatory { -color: red; -text-align: center; -} - -.fillInfoStep_red { -color: red; -font-size: 11px; -} - -.fillInfoStep_error { -color: red; -text-align: center; -margin-top: 50px; -} -/**************************************************************/ - -/*************************Import Step**************************/ -.importStep_cadre { -margin-top: 150px; -margin-left: auto; -margin-right: auto; -width: 300px; -height: 40px; -text-align: center; -} - -.importStep_end { -text-align: center; -margin-top: 20px; -} - -/**************************************************************/ - -/****************************Log Step**************************/ -.logStep_success { -margin-top: 120px; -font-size: 20px; -width: 200px; -margin-left: auto; -margin-right: auto; -text-align: center; -} - -.logStep_button { -width: 150px; -} - -.logStep_tab { -text-align: center; -margin-top: 100px; -} - -.logStep_tab td{ -height: 50px; -} - -.logStep_title { -width: 920px; -text-align: center; -font-size: 14px; -font-weight: bold; -} -/**************************************************************/ +/************************General Tag***************************/ +legend { +font-size: 16px; +font-weight: bold; +} +/**************************************************************/ + +/****************Global container for wizard*******************/ +.global { +margin: 0 auto; +position: relative; +text-align: left; +font-family: "New Roman",serif; +} +/**************************************************************/ + +/**********************Onglet table****************************/ +.step { +margin:0; +text-align: center; +-moz-border-radius-topright: 8px; +-moz-border-radius-topleft: 8px; +border-left: 2px solid #d3d3ce; +border-right: 2px solid #d3d3ce; +border-top: 2px solid #d3d3ce; +} + +.step td { +width: 50px; +height: 50px; +font-size: 20px; +background-color: #d3d3ce; +} +/**************************************************************/ + +/**********************Wizard table****************************/ +.wizard { +height: 450px; +text-align: left; +background-color: #e6e6e6; +border: 2px solid #d3d3ce; +-moz-border-radius-topright: 8px; +-moz-border-radius-bottomright: 8px; +-moz-border-radius-bottomleft: 8px; +} + +.wizard_left_area { +width: 212px; +background-color: white; +border-right: 2px inset black; +} + +.wizard_right_area { +padding: 20px; +font-size: 14px; +} + +.wizard_button { +height: 35px; +border-top: 2px outset black; +} + +.wizard_title { +font-size: 18px; +text-align: center; +margin-top: 20px; +margin-bottom: 50px; +} + +.wizard_explain { +font-size: 14px; +text-align: justify; +margin-left: 10px; +margin-right: 10px; +margin-top: 20px; +} +/**************************************************************/ + +/**************************Button******************************/ +.next { +float: right; +margin-right: 10px; +} + +.preview { +float: left; +margin-left: 10px; +} +/**************************************************************/ + +/***********************Presentation***************************/ +.presentation_logo { +margin: auto; +width: 180px; +height: 192px; +margin-top: 100px; +} + +.presentation_title { +font-size: 22px; +text-align: left; +margin-top: 30px; +} + +.presentation_text { +font-size: 16px; +line-height: 20px; +margin-top: 80px; +text-align: justify; +} +/**************************************************************/ + +/************************Choice Step***************************/ +.choiceStep_selection { +font-size: 14px; +width: 350px; +margin-left: auto; +margin-right: auto; +margin-top: 20px; +padding-top: 0; +} + +.choiceStep_table { +margin-bottom: 20px; +border-spacing: 10px; +font-size: 14px; +} + +.choiceStep_dropdown { +margin:auto; +width: 130px; + +} + +.choiceStep_comments { +display: none; +font-size: 14px; +margin-left: auto; +margin-right: auto; +margin-top: 20px; +width: 350px; +} +/**************************************************************/ + +/*************************Model Step***************************/ +.modelStep_selection { +width: 400px; +margin-left: auto; +margin-right: auto; +margin-top: 10px; +padding-top: 0; +} + +.modelStep_table { +font-size: 14px; +text-align: left; +} + +.modelStep_table td { +height: 30px; +} + +.delimiter { +text-align: center; +margin-top: 10px; +font-size: 14px; +visibility: hidden; +color: red; +} +/**************************************************************/ + +/************************Delete Step***************************/ +.deleteStep_table { +font-size: 16px; +margin-top: 100px; +border-spacing: 15px; +text-align: center; +} + +.save_delete { +font-size: 14px; +margin-top: 150px; +margin-left: auto; +margin-right: auto; +width: 180px; +line-height: 20px; +text-align: center; +} + +.suppr { +font-size: 14px; +margin-top: 70px; +} + +.question { +line-height: 20px; +} +/**************************************************************/ + +/*********************Mapping & Infos Step*********************/ +.mandatory { +text-align: center; +visibility: hidden; +color: red; +} +/**************************************************************/ + +/**************************File Step***************************/ +.fileStep_table { +text-align:center; +margin-top: 120px; +margin-bottom: 20px; +font-size: 16px; +} + +.fileStep_error { +color: red; +font-size: 14px; +margin-left: auto; +margin-right: auto; +width: 250px; +text-align: center; +} +/**************************************************************/ + +/**************************Save Step***************************/ +.saveStep_table { +font-size: 14px; +margin-top: 100px; +border-spacing: 10px; +} + +.saveStep2_table { +font-size: 14px; +margin-top: 70px; +border-spacing: 10px; +} +/**************************************************************/ + +/***********************Fill Info Step*************************/ +.fillInfoStep_fieldset { +margin-top: 30px; +margin-bottom: 10px; +} + +.fillInfoStep_tab td { +font-size: 14px; +} + +.fillInfoStep_mandatory { +color: red; +text-align: center; +} + +.fillInfoStep_red { +color: red; +font-size: 11px; +} + +.fillInfoStep_error { +color: red; +text-align: center; +margin-top: 50px; +} +/**************************************************************/ + +/*************************Import Step**************************/ +.importStep_cadre { +margin-top: 150px; +margin-left: auto; +margin-right: auto; +width: 300px; +height: 40px; +text-align: center; +} + +.importStep_end { +text-align: center; +margin-top: 20px; +} + +/**************************************************************/ + +/****************************Log Step**************************/ +.logStep_success { +margin-top: 120px; +font-size: 20px; +width: 200px; +margin-left: auto; +margin-right: auto; +text-align: center; +} + +.logStep_button { +width: 150px; +} + +.logStep_tab { +text-align: center; +margin-top: 100px; +} + +.logStep_tab td{ +height: 50px; +} + +.logStep_title { +width: 920px; +text-align: center; +font-size: 14px; +font-weight: bold; +} +/**************************************************************/ diff --git a/datainjection.xml b/datainjection.xml index 33ed73a3..5cb57ac4 100644 --- a/datainjection.xml +++ b/datainjection.xml @@ -25,6 +25,10 @@ Xavier Caillaud + + 2.6.0 + 9.3 + 2.5.2 9.2 diff --git a/docs/LISEZMOI.TXT b/docs/LISEZMOI.TXT index bb23237f..02df160a 100644 --- a/docs/LISEZMOI.TXT +++ b/docs/LISEZMOI.TXT @@ -1,51 +1,51 @@ -/* - * @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $ - LICENSE - - This file is part of the order plugin. - - Datainjection plugin is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Datainjection plugin 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with datainjection; along with Behaviors. If not, see . - -------------------------------------------------------------------------- - @package datainjection - @author the datainjection plugin team - @copyright Copyright (c) 2010-2011 Order plugin team - @license GPLv2+ - http://www.gnu.org/licenses/gpl.txt - @link https://forge.indepnet.net/projects/datainjection - @link http://www.glpi-project.org/ - @since 2009 - ---------------------------------------------------------------------- */ - -Author : Walid NOUH - -1 - Présentation - -Ce plugin vous permet d'injecter des fichiers CSV dans GLPI. - -Compatibilité 0.712 -Le plugin nécessite obligatoirement PHP5 ou supérieur ! - -2 - Installation +/* + * @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $ + LICENSE + + This file is part of the order plugin. + + Datainjection plugin is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Datainjection plugin 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with datainjection; along with Behaviors. If not, see . + -------------------------------------------------------------------------- + @package datainjection + @author the datainjection plugin team + @copyright Copyright (c) 2010-2011 Order plugin team + @license GPLv2+ + http://www.gnu.org/licenses/gpl.txt + @link https://forge.indepnet.net/projects/datainjection + @link http://www.glpi-project.org/ + @since 2009 + ---------------------------------------------------------------------- */ + +Author : Walid NOUH + +1 - Présentation + +Ce plugin vous permet d'injecter des fichiers CSV dans GLPI. + +Compatibilité 0.712 +Le plugin nécessite obligatoirement PHP5 ou supérieur ! + +2 - Installation Disponible en RPM dans les dépôts Fedora/EPEL yum install glpi-data-injection -Sinon : - Récupérez l'archive tar.gz du plugin - Décompressez la dans le répertoire plugins de votre installation de glpi - -Une fois copié dans le répertoire, dans l'onglet plugin vous verrez apparaître "Injection de fichiers". -Règlez les droits sur le plugin en fonction des profils. -Le plugin est ensuite prêt à l'emploi : il est accessible via le menu "Plugins"->"Injection de fichiers" - +Sinon : + Récupérez l'archive tar.gz du plugin + Décompressez la dans le répertoire plugins de votre installation de glpi + +Une fois copié dans le répertoire, dans l'onglet plugin vous verrez apparaître "Injection de fichiers". +Règlez les droits sur le plugin en fonction des profils. +Le plugin est ensuite prêt à l'emploi : il est accessible via le menu "Plugins"->"Injection de fichiers" + diff --git a/docs/ROADMAP.TXT b/docs/ROADMAP.TXT index 2737f6e5..698a852a 100644 --- a/docs/ROADMAP.TXT +++ b/docs/ROADMAP.TXT @@ -1,33 +1,33 @@ -/* - * @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $ - LICENSE - - This file is part of the order plugin. - - Datainjection plugin is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - Datainjection plugin 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with datainjection; along with Behaviors. If not, see . - -------------------------------------------------------------------------- - @package datainjection - @author the datainjection plugin team - @copyright Copyright (c) 2010-2011 Order plugin team - @license GPLv2+ - http://www.gnu.org/licenses/gpl.txt - @link https://forge.indepnet.net/projects/datainjection - @link http://www.glpi-project.org/ - @since 2009 - ---------------------------------------------------------------------- */ - -Possibilité d'injecter plus de types de données dans GLPI. +/* + * @version $Id: HEADER 14684 2011-06-11 06:32:40Z remi $ + LICENSE + + This file is part of the order plugin. + + Datainjection plugin is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + Datainjection plugin 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with datainjection; along with Behaviors. If not, see . + -------------------------------------------------------------------------- + @package datainjection + @author the datainjection plugin team + @copyright Copyright (c) 2010-2011 Order plugin team + @license GPLv2+ + http://www.gnu.org/licenses/gpl.txt + @link https://forge.indepnet.net/projects/datainjection + @link http://www.glpi-project.org/ + @since 2009 + ---------------------------------------------------------------------- */ + +Possibilité d'injecter plus de types de données dans GLPI. Add possibility to inject more data types into GLPI. -See : https://forge.indepnet.net/projects/roadmap/datainjection +See : https://forge.indepnet.net/projects/roadmap/datainjection diff --git a/front/clientinjection.form.php b/front/clientinjection.form.php index 59aa1f12..ce752468 100644 --- a/front/clientinjection.form.php +++ b/front/clientinjection.form.php @@ -42,7 +42,7 @@ } else if (isset($_POST['upload'])) { $model = new PluginDatainjectionModel(); $model->can($_POST['id'], READ); - $_SESSION['datainjection']['infos'] = (isset($_POST['info'])?$_POST['info']:array()); + $_SESSION['datainjection']['infos'] = (isset($_POST['info'])?$_POST['info']:[]); //If additional informations provided : check if mandatory infos are present if (!$model->checkMandatoryFields($_SESSION['datainjection']['infos'])) { @@ -57,12 +57,14 @@ && !$_FILES['filename']['error'] && $_FILES['filename']['size']) { - //Read file using automatic encoding detection, and do not delete file once readed - $options = array('file_encoding' => $_POST['file_encoding'], - 'mode' => PluginDatainjectionModel::PROCESS, - 'delete_file' => false); - $response = $model->processUploadedFile($options); - $model->cleanData(); + //Read file using automatic encoding detection, and do not delete file once readed + $options = [ + 'file_encoding' => $_POST['file_encoding'], + 'mode' => PluginDatainjectionModel::PROCESS, + 'delete_file' => false + ]; + $response = $model->processUploadedFile($options); + $model->cleanData(); if ($response) { //File uploaded successfully and matches the given model : switch to the import tab diff --git a/front/info.form.php b/front/info.form.php index 66c8ef1d..8bebc6b9 100644 --- a/front/info.form.php +++ b/front/info.form.php @@ -39,7 +39,7 @@ $info = new PluginDatainjectionInfo(); foreach ($_POST["item"] as $key => $val) { - $input = array('id' => $key); + $input = ['id' => $key]; if ($val == 1) { $info->check($key, UPDATE); $info->delete($input); diff --git a/front/model.form.php b/front/model.form.php index 134163e4..cede41f0 100644 --- a/front/model.form.php +++ b/front/model.form.php @@ -77,8 +77,10 @@ $model->check($_POST['id'], UPDATE); if ($model->processUploadedFile( - array('file_encoding' => 'csv', - 'mode' => PluginDatainjectionModel::CREATION) + [ + 'file_encoding' => 'csv', + 'mode' => PluginDatainjectionModel::CREATION + ] )) { Session::setActiveTab('PluginDatainjectionModel', 'PluginDatainjectionModel$4'); } else { @@ -103,6 +105,6 @@ "tools", "plugindatainjectionmenu", "model" ); -$model->display(array('id' =>$_GET["id"])); +$model->display(['id' =>$_GET["id"]]); Html::footer(); diff --git a/hook.php b/hook.php index 61095bd6..fa6fbc38 100644 --- a/hook.php +++ b/hook.php @@ -431,7 +431,7 @@ function plugin_datainjection_update170_20() { 'glpi_plugin_datainjection_mappings', 'glpi_plugin_datainjection_infos', 'glpi_plugin_datainjection_modelcsvs']; - Plugin::migrateItemType(array(), array(), $glpitables); + Plugin::migrateItemType([], [], $glpitables); $query = "UPDATE `glpi_plugin_datainjection_mappings` SET `itemtype` = 'none' , @@ -445,568 +445,1223 @@ function plugin_datainjection_update170_20() { WHERE `itemtype` = '-1'"; $DB->queryOrDie($query, "Datainjection infos table : error updating not mapped fields"); - $foreignkeys = array('assign' - => array(array('to' => 'users_id_assign', - 'tables' => array('glpi_tickets'))), - 'assign_group' - => array(array('to' => 'groups_id_assign', - 'tables' => array('glpi_tickets'))), - 'assign_ent' - => array(array('to' => 'suppliers_id_assign', - 'tables' => array('glpi_tickets'))), - 'auth_method' - => array(array('to' => 'authtype', - 'noindex' => array('glpi_users'), - 'tables' => array('glpi_users'))), - 'author' - => array(array('to' => 'users_id', - 'tables' => array('glpi_ticketfollowups', - 'glpi_knowbaseitems', - 'glpi_tickets'))), - 'auto_update' - => array(array('to' => 'autoupdatesystems_id', - 'tables' => array('glpi_computers'))), - 'budget' - => array(array('to' => 'budgets_id', - 'tables' => array('glpi_infocoms'))), - 'buy_version' - => array(array('to' => 'softwareversions_id_buy', - 'tables' => array('glpi_softwarelicenses'))), - 'category' - => array(array('to' => 'ticketcategories_id', - 'tables' => array('glpi_tickets')), - array('to' => 'softwarecategories_id', - 'tables' => array('glpi_softwares'))), - 'categoryID' - => array(array('to' => 'knowbaseitemcategories_id', - 'tables' => array('glpi_knowbaseitems'))), - 'cID' - => array(array('to' => 'computers_id', - 'tables' => array('glpi_computers_softwareversions'))), - 'computer' - => array(array('to' => 'items_id', - 'tables' => array('glpi_tickets'))), - 'computer_id' - => array(array('to' => 'computers_id', - 'tables' => array('glpi_registrykeys'))), - 'contract_type' - => array(array('to' => 'contracttypes_id', - 'tables' => array('glpi_contracts'))), - 'default_rubdoc_tracking' - => array(array('to' => 'documentcategories_id_forticket', - 'tables' => array('glpi_configs'), - 'comments' => array('glpi_configs' - => 'default category for documents added with a ticket'))), - 'device_type' - => array(array('to' => 'itemtype', - 'tables' => array('glpi_alerts', 'glpi_contracts_items', - 'glpi_documents_items', 'glpi_infocoms', - 'glpi_bookmarks', 'glpi_bookmarks_users', - 'glpi_links_itemtypes', - 'glpi_networkports', - 'glpi_reservationitems', - 'glpi_tickets'))), - 'domain' - => array(array('to' => 'domains_id', - 'tables' => array('glpi_computers', - 'glpi_networkequipments', - 'glpi_printers'))), - 'end1' - => array(array('to' => 'items_id', - 'tables' => array('glpi_computers_items'), - 'comments' => array('glpi_computers_items' - => 'RELATION to various table, according to itemtype (ID)')), - array('to' => 'networkports_id_1', - 'tables' => array('glpi_networkports_networkports'))), - 'end2' - => array(array('to' => 'computers_id', - 'tables' => array('glpi_computers_items')), - array('to' => 'networkports_id_2', - 'tables' => array('glpi_networkports_networkports')) ), - 'firmware' - => array(array('to' => 'networkequipmentfirmwares_id', - 'tables' => array('glpi_networkequipments'))), - 'FK_bookmark' - => array(array('to' => 'bookmarks_id', - 'tables' => array('glpi_bookmarks_users'))), - 'FK_computers' - => array(array('to' => 'computers_id', - 'tables' => array('glpi_computerdisks', - 'glpi_softwarelicenses'))), - 'FK_contact' - => array(array('to' => 'contacts_id', - 'tables' => array('glpi_contacts_suppliers'))), - 'FK_contract' - => array(array('to' => 'contracts_id', - 'tables' => array('glpi_contracts_suppliers', - 'glpi_contracts_items'))), - 'FK_device' - => array(array('to' => 'items_id', - 'tables' => array('glpi_alerts', 'glpi_contracts_items', - 'glpi_documents_items', 'glpi_infocoms'))), - 'FK_doc' - => array(array('to' => 'documents_id', - 'tables' => array('glpi_documents_items'))), - 'manufacturer' - => array(array('to' => 'suppliers_id', - 'tables' => array('glpi_contacts_suppliers', - 'glpi_contracts_suppliers', - 'glpi_infocoms')), - array('to' => 'manufacturers_id', - 'tables' => array('glpi_cartridgeitems', 'glpi_computers', - 'glpi_consumableitems', - 'glpi_devicecases', 'glpi_devicecontrols', - 'glpi_devicedrives', - 'glpi_devicegraphiccards', - 'glpi_deviceharddrives', - 'glpi_devicenetworkcards', - 'glpi_devicemotherboards', - 'glpi_devicepcis', - 'glpi_devicepowersupplies', - 'glpi_deviceprocessors', - 'glpi_devicememories', - 'glpi_devicesoundcards', 'glpi_monitors', - 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', 'glpi_softwares'))), - 'FK_entities' - => array(array('to' => 'entities_id', - 'tables' => array('glpi_bookmarks', 'glpi_cartridgeitems', - 'glpi_computers', 'glpi_consumableitems', - 'glpi_contacts', 'glpi_contracts', - 'glpi_documents', 'glpi_locations', - 'glpi_netpoints', 'glpi_suppliers', - 'glpi_entitydatas', 'glpi_groups', - 'glpi_knowbaseitems', 'glpi_links', - 'glpi_mailcollectors', 'glpi_monitors', - 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', 'glpi_reminders', - 'glpi_rules', 'glpi_softwares', - 'glpi_softwarelicenses', - 'glpi_softwareversions', - 'glpi_tickets', 'glpi_users', - 'glpi_profiles_users'), - 'default' => array('glpi_bookmarks' => "-1"))), - 'FK_filesystems' - => array(array('to' => 'filesystems_id', - 'tables' => array('glpi_computerdisks'))), - 'FK_glpi_cartridges_type' - => array(array('to' => 'cartridgeitems_id', - 'tables' => array('glpi_cartridges', - 'glpi_cartridges_printermodels'))), - 'FK_glpi_consumables_type' - => array(array('to' => 'consumableitems_id', - 'tables' => array('glpi_consumables'))), - 'FK_glpi_dropdown_model_printers' - => array(array('to' => 'printermodels_id', - 'tables' => array('glpi_cartridges_printermodels'))), - 'FK_glpi_printers' - => array(array('to' => 'printers_id', - 'tables' => array('glpi_cartridges'))), - 'FK_group' - => array(array('to' => 'groups_id', - 'tables' => array('glpi_tickets'))), - 'FK_groups' - => array(array('to' => 'groups_id', - 'tables' => array('glpi_computers', 'glpi_monitors', - 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', 'glpi_softwares', - 'glpi_groups_users'))), - 'FK_interface' - => array(array('to' => 'interfacetypes_id', - 'tables' => array('glpi_devicegraphiccards'))), - - 'FK_item' - => array(array('to' => 'items_id', - 'tables' => array('glpi_mailingsettings'))), - - 'FK_links' - => array(array('to' => 'links_id', - 'tables' => array('glpi_links_itemtypes'))), - - 'FK_port' - => array(array('to' => 'networkports_id', - 'tables' => array('glpi_networkports_vlans'))), - - 'FK_profiles' - => array(array('to' => 'profiles_id', - 'tables' => array('glpi_profiles_users', 'glpi_users'))), - - 'FK_users' - => array(array('to' => 'users_id', - 'tables' => array('glpi_bookmarks', - 'glpi_displaypreferences', - 'glpi_documents', 'glpi_groups', - 'glpi_reminders', 'glpi_bookmarks_users', - 'glpi_groups_users', - 'glpi_profiles_users', 'glpi_computers', - 'glpi_monitors', 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', 'glpi_softwares'))), - - 'FK_vlan' - => array(array('to' => 'vlans_id', - 'tables' => array('glpi_networkports_vlans'))), - - 'glpi_id' - => array(array('to' => 'computers_id', - 'tables' => array('glpi_ocslinks'))), - - 'id_assign' - => array(array('to' => 'users_id', - 'tables' => array('glpi_ticketplannings'))), - - 'id_auth' - => array(array('to' => 'auths_id', - 'tables' => array('glpi_users'))), - - 'id_device' - => array(array('to' => 'items_id', - 'tables' => array('glpi_reservationitems'))), - - 'id_item' - => array(array('to' => 'reservationitems_id', - 'tables' => array('glpi_reservations'))), - - 'id_user' - => array(array('to' => 'users_id', - 'tables' => array('glpi_consumables', - 'glpi_reservations'))), - - 'iface' - => array(array('to' => 'networkinterfaces_id', - 'tables' => array('glpi_networkports'))), - - 'interface' - => array(array('to' => 'interfacetypes_id', - 'tables' => array('glpi_devicecontrols', - 'glpi_deviceharddrives', - 'glpi_devicedrives'))), - - 'location' - => array(array('to' => 'locations_id', - 'tables' => array('glpi_cartridgeitems', 'glpi_computers', - 'glpi_consumableitems', 'glpi_netpoints', - 'glpi_monitors', 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', 'glpi_users', - 'glpi_softwares'))), - - 'model' - => array(array('to' => 'computermodels_id', - 'tables' => array('glpi_computers')), - array('to' => 'monitormodels_id', - 'tables' => array('glpi_monitors')), - array('to' => 'networkequipmentmodels_id', - 'tables' => array('glpi_networkequipments')), - array('to' => 'peripheralmodels_id', - 'tables' => array('glpi_peripherals')), - array('to' => 'phonemodels_id', - 'tables' => array('glpi_phones')), - array('to' => 'printermodels_id', - 'tables' => array('glpi_printers'))), - - 'netpoint' - => array(array('to' => 'netpoints_id', - 'tables' => array('glpi_networkports'))), - - 'network' - => array(array('to' => 'networks_id', - 'tables' => array('glpi_computers', - 'glpi_networkequipments', - 'glpi_printers'))), - - 'on_device' - => array(array('to' => 'items_id', - 'tables' => array('glpi_networkports'))), - - 'os' - => array(array('to' => 'operatingsystems_id', - 'tables' => array('glpi_computers'))), - - 'os_license_id' - => array(array('to' => 'os_licenseid', - 'tables' => array('glpi_computers'))), - - 'os_version' - => array(array('to' => 'operatingsystemversions_id', - 'tables' => array('glpi_computers'))), - - 'parentID' - => array(array('to' => 'knowbaseitemcategories_id', - 'tables' => array('glpi_knowbaseitemcategories')), - array('to' => 'locations_id', - 'tables' => array('glpi_locations')), - array('to' => 'ticketcategories_id', - 'tables' => array('glpi_ticketcategories')), - array('to' => 'entities_id', - 'tables' => array('glpi_entities')) ), - - 'platform' - => array(array('to' => 'operatingsystems_id', - 'tables' => array('glpi_softwares'))), - - 'power' - => array(array('to' => 'phonepowersupplies_id', - 'tables' => array('glpi_phones'))), - - 'recipient' - => array(array('to' => 'users_id_recipient', - 'tables' => array('glpi_tickets'))), - - 'rubrique' - => array(array('to' => 'documentcategories_id', - 'tables' => array('glpi_documents'))), - - 'sID' - => array(array('to' => 'softwares_id', - 'tables' => array('glpi_softwarelicenses', - 'glpi_softwareversions'))), - - 'state' - => array(array('to' => 'states_id', - 'tables' => array('glpi_computers', 'glpi_monitors', - 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', - 'glpi_softwareversions'))), - - 'tech_num' - => array(array('to' => 'users_id_tech', - 'tables' => array('glpi_cartridgeitems', 'glpi_computers', - 'glpi_consumableitems', 'glpi_monitors', - 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', 'glpi_softwares'))), - - 'title' - => array(array('to' => 'usertitles_id', - 'tables' => array('glpi_users'))), - - 'type' - => array(array('to' => 'cartridgeitemtypes_id', - 'tables' => array('glpi_cartridgeitems')), - array('to' => 'computertypes_id', - 'tables' => array('glpi_computers')), - array('to' => 'consumableitemtypes_id', - 'tables' => array('glpi_consumableitems')), - array('to' => 'contacttypes_id', - 'tables' => array('glpi_contacts')), - array('to' => 'devicecasetypes_id', - 'tables' => array('glpi_devicecases')), - array('to' => 'devicememorytypes_id', - 'tables' => array('glpi_devicememories')), - array('to' => 'suppliertypes_id', - 'tables' => array('glpi_suppliers')), - array('to' => 'monitortypes_id', - 'tables' => array('glpi_monitors')), - array('to' => 'networkequipmenttypes_id', - 'tables' => array('glpi_networkequipments')), - array('to' => 'peripheraltypes_id', - 'tables' => array('glpi_peripherals')), - array('to' => 'phonetypes_id', - 'tables' => array('glpi_phones')), - array('to' => 'printertypes_id', - 'tables' => array('glpi_printers')), - array('to' => 'softwarelicensetypes_id', - 'tables' => array('glpi_softwarelicenses')), - array('to' => 'usercategories_id', - 'tables' => array('glpi_users')), - array('to' => 'itemtype', - 'tables' => array('glpi_computers_items', - 'glpi_displaypreferences'))), - - 'update_software' - => array(array('to' => 'softwares_id', - 'tables' => array('glpi_softwares'))), - - 'use_version' - => array(array('to' => 'softwareversions_id_use', - 'tables' => array('glpi_softwarelicenses'))), - - 'vID' - => array(array('to' => 'softwareversions_id', - 'tables' => array('glpi_computers_softwareversions'))), - - 'conpta_num' - => array(array('to' => 'accounting_number', - 'tables' => array('glpi_contracts'))), - - 'num_commande' - => array(array('to' => 'order_number', - 'tables' => array('glpi_infocoms'))), - - 'bon_livraison' - => array(array('to' => 'delivery_number', - 'tables' => array('glpi_infocoms'))), - - 'num_immo' - => array(array('to' => 'immo_number', - 'tables' => array('glpi_infocoms'))), - - 'facture' - => array(array('to' => 'bill', - 'tables' => array('glpi_infocoms'))), - - 'amort_time' - => array(array('to' => 'sink_time', - 'tables' => array('glpi_infocoms'))), - - 'amort_type' - => array(array('to' => 'sink_type', - 'tables' => array('glpi_infocoms'))), - - 'ifmac' - => array(array('to' => 'mac', - 'tables' => array('glpi_networkequipments'))), - - 'ifaddr' - => array(array('to' => 'ip', - 'tables' => array('glpi_networkequipments', - 'glpi_networkports'))), - - 'ramSize' - => array(array('to' => 'memory_size', - 'tables' => array('glpi_printers'))), - - 'ramSize' - => array(array('to' => 'memory_size', - 'tables' => array('glpi_printers'))), - - 'facturation' - => array(array('to' => 'billing', - 'tables' => array('glpi_contracts'))), - - 'monday' - => array(array('to' => 'use_monday', - 'tables' => array('glpi_contracts'))), - - 'saturday' - => array(array('to' => 'use_saturday', - 'tables' => array('glpi_contracts'))), - - 'recursive' - => array(array('to' => 'is_recursive', - 'tables' => array('glpi_networkequipments', 'glpi_groups', - 'glpi_contracts', 'glpi_contacts', - 'glpi_suppliers', 'glpi_printers', - 'glpi_softwares', 'glpi_softwareversions', - 'glpi_softwarelicences'))), - - 'faq' - => array(array('to' => 'is_faq', - 'tables' => array('glpi_knowbaseitems'))), - - 'flags_micro' - => array(array('to' => 'have_micro', - 'tables' => array('glpi_monitors'))), - - 'flags_speaker' - => array(array('to' => 'have_speaker', - 'tables' => array('glpi_monitors'))), - - 'flags_subd' - => array(array('to' => 'have_subd', - 'tables' => array('glpi_monitors'))), - - 'flags_bnc' - => array(array('to' => 'have_bnc', - 'tables' => array('glpi_monitors'))), - - 'flags_dvi' - => array(array('to' => 'have_dvi', - 'tables' => array('glpi_monitors'))), - - 'flags_pivot' - => array(array('to' => 'have_pivot', - 'tables' => array('glpi_monitors'))), - - 'flags_hp' - => array(array('to' => 'have_hp', - 'tables' => array('glpi_phones'))), - - 'flags_casque' - => array(array('to' => 'have_headset', - 'tables' => array('glpi_phones'))), - - 'flags_usb' - => array(array('to' => 'have_usb', - 'tables' => array('glpi_printers'))), - - 'flags_par' - => array(array('to' => 'have_parallel', - 'tables' => array('glpi_printers'))), - - 'flags_serial' - => array(array('to' => 'have_serial', - 'tables' => array('glpi_printers'))), - - 'initial_pages' - => array(array('to' => 'init_pages_counter', - 'tables' => array('glpi_printers'))), - - 'global' - => array(array('to' => 'is_global', - 'tables' => array('glpi_monitors', 'glpi_networkequipments', - 'glpi_peripherals', 'glpi_phones', - 'glpi_printers', 'glpi_softwares'))), - 'template' => array(array('to' =>'template_name', - 'tables' => array('glpi_cartridgeitems', 'glpi_computers', - 'glpi_consumableitems', 'glpi_devicecases', - 'glpi_devicecontrols', 'glpi_devicedrives', - 'glpi_devicegraphiccards', 'glpi_deviceharddrives', - 'glpi_devicenetworkcards', 'glpi_devicemotherboards', - 'glpi_devicepcis', 'glpi_devicepowersupplies', - 'glpi_deviceprocessors', 'glpi_devicememories', - 'glpi_devicesoundcards', 'glpi_monitors', - 'glpi_networkequipments', 'glpi_peripherals', - 'glpi_phones', 'glpi_printers', - 'glpi_softwares'))), - 'comments' => array(array('to' => 'comment', - 'tables' => array('glpi_cartridgeitems', 'glpi_computers', - 'glpi_consumableitems', 'glpi_contacts', - 'glpi_contracts', 'glpi_documents', - 'glpi_autoupdatesystems', 'glpi_budgets', - 'glpi_cartridgeitemtypes', 'glpi_devicecasetypes', - 'glpi_consumableitemtypes', 'glpi_contacttypes', - 'glpi_contracttypes', 'glpi_domains', - 'glpi_suppliertypes', 'glpi_filesystems', - 'glpi_networkequipmentfirmwares', - 'glpi_networkinterfaces', 'glpi_interfacetypes', - 'glpi_knowbaseitemcategories', - 'glpi_softwarelicensetypes', 'glpi_locations', - 'glpi_manufacturers', 'glpi_computermodels', - 'glpi_monitormodels', 'glpi_networkequipmentmodels', - 'glpi_peripheralmodels', 'glpi_phonemodels', - 'glpi_printermodels', 'glpi_netpoints', - 'glpi_networks', 'glpi_operatingsystems', - 'glpi_operatingsystemservicepacks', - 'glpi_operatingsystemversions', - 'glpi_phonepowersupplies', 'glpi_devicememorytypes', - 'glpi_documentcategories', 'glpi_softwarecategories', - 'glpi_states', 'glpi_ticketcategories', - 'glpi_usertitles', 'glpi_usercategories', - 'glpi_vlans', 'glpi_suppliers', 'glpi_entities', - 'glpi_groups', 'glpi_infocoms', 'glpi_monitors', - 'glpi_phones', 'glpi_printers', 'glpi_peripherals', - 'glpi_networkequipments', 'glpi_reservationitems', - 'glpi_rules', 'glpi_softwares', 'glpi_softwarelicenses', - 'glpi_softwareversions', 'glpi_computertypes', - 'glpi_monitortypes', 'glpi_networkequipmenttypes', - 'glpi_peripheraltypes', 'glpi_phonetypes', - 'glpi_printertypes', 'glpi_users'))), - - 'notes' => array(array('to' => 'notepad', - 'tables' => array('glpi_cartridgeitems', 'glpi_computers', - 'glpi_consumableitems', 'glpi_contacts', - 'glpi_contracts', 'glpi_documents', - 'glpi_suppliers', 'glpi_entitydatas', - 'glpi_printers', 'glpi_monitors', - 'glpi_phones', 'glpi_peripherals', - 'glpi_networkequipments', - 'glpi_softwares')))); + $foreignkeys = [ + 'assign' => [ + [ + 'to' => 'users_id_assign', + 'tables' => [ + 'glpi_tickets' + ] + ] + ], + 'assign_group' => [ + [ + 'to' => 'groups_id_assign', + 'tables' => [ + 'glpi_tickets' + ] + ] + ], + 'assign_ent' => [ + [ + 'to' => 'suppliers_id_assign', + 'tables' => [ + 'glpi_tickets' + ] + ] + ], + 'auth_method' => [ + [ + 'to' => 'authtype', + 'noindex' => [ + 'glpi_users' + ], + 'tables' => [ + 'glpi_users' + ] + ] + ], + 'author' => [ + [ + 'to' => 'users_id', + 'tables' => [ + 'glpi_ticketfollowups', + 'glpi_knowbaseitems', + 'glpi_tickets' + ] + ] + ], + 'auto_update' => [ + [ + 'to' => 'autoupdatesystems_id', + 'tables' => [ + 'glpi_computers' + ] + ] + ], + 'budget' => [ + [ + 'to' => 'budgets_id', + 'tables' => [ + 'glpi_infocoms' + ] + ] + ], + 'buy_version' => [ + [ + 'to' => 'softwareversions_id_buy', + 'tables' => [ + 'glpi_softwarelicenses' + ] + ] + ], + 'category' => [ + [ + 'to' => 'ticketcategories_id', + 'tables' => [ + 'glpi_tickets' + ] + ], + [ + 'to' => 'softwarecategories_id', + 'tables' => [ + 'glpi_softwares' + ] + ] + ], + 'categoryID' => [ + [ + 'to' => 'knowbaseitemcategories_id', + 'tables' => [ + 'glpi_knowbaseitems' + ] + ] + ], + 'cID' => [ + [ + 'to' => 'computers_id', + 'tables' => [ + 'glpi_computers_softwareversions' + ] + ] + ], + 'computer' => [ + [ + 'to' => 'items_id', + 'tables' => [ + 'glpi_tickets' + ] + ] + ], + 'computer_id' => [ + [ + 'to' => 'computers_id', + 'tables' => [ + 'glpi_registrykeys' + ] + ] + ], + 'contract_type' => [ + [ + 'to' => 'contracttypes_id', + 'tables' => [ + 'glpi_contracts' + ] + ] + ], + 'default_rubdoc_tracking' => [ + [ + 'to' => 'documentcategories_id_forticket', + 'tables' => [ + 'glpi_configs' + ], + 'comments' => [ + 'glpi_configs' => 'default category for documents added with a ticket' + ] + ] + ], + 'device_type' => [ + [ + 'to' => 'itemtype', + 'tables' => [ + 'glpi_alerts', + 'glpi_contracts_items', + 'glpi_documents_items', + 'glpi_infocoms', + 'glpi_bookmarks', + 'glpi_bookmarks_users', + 'glpi_links_itemtypes', + 'glpi_networkports', + 'glpi_reservationitems', + 'glpi_tickets' + ] + ] + ], + 'domain' => [ + [ + 'to' => 'domains_id', + 'tables' => [ + 'glpi_computers', + 'glpi_networkequipments', + 'glpi_printers' + ] + ] + ], + 'end1' => [ + [ + 'to' => 'items_id', + 'tables' => [ + 'glpi_computers_items' + ], + 'comments' => [ + 'glpi_computers_items' => 'RELATION to various table, according to itemtype (ID]' + ] + ], + [ + 'to' => 'networkports_id_1', + 'tables' => [ + 'glpi_networkports_networkports' + ] + ] + ], + 'end2' => [ + [ + 'to' => 'computers_id', + 'tables' => [ + 'glpi_computers_items' + ] + ], + [ + 'to' => 'networkports_id_2', + 'tables' => [ + 'glpi_networkports_networkports' + ] + ] + ], + 'firmware' => [ + [ + 'to' => 'networkequipmentfirmwares_id', + 'tables' => [ + 'glpi_networkequipments' + ] + ] + ], + 'FK_bookmark' => [ + [ + 'to' => 'bookmarks_id', + 'tables' => [ + 'glpi_bookmarks_users' + ] + ] + ], + 'FK_computers' => [ + [ + 'to' => 'computers_id', + 'tables' => [ + 'glpi_computerdisks', + 'glpi_softwarelicenses' + ] + ] + ], + 'FK_contact' => [ + [ + 'to' => 'contacts_id', + 'tables' => [ + 'glpi_contacts_suppliers' + ] + ] + ], + 'FK_contract' => [ + [ + 'to' => 'contracts_id', + 'tables' => [ + 'glpi_contracts_suppliers', + 'glpi_contracts_items' + ] + ] + ], + 'FK_device' => [ + [ + 'to' => 'items_id', + 'tables' => [ + 'glpi_alerts', + 'glpi_contracts_items', + 'glpi_documents_items', + 'glpi_infocoms' + ] + ] + ], + 'FK_doc' => [ + [ + 'to' => 'documents_id', + 'tables' => [ + 'glpi_documents_items' + ] + ] + ], + 'manufacturer' => [ + [ + 'to' => 'suppliers_id', + 'tables' => [ + 'glpi_contacts_suppliers', + 'glpi_contracts_suppliers', + 'glpi_infocoms' + ] + ], + [ + 'to' => 'manufacturers_id', + 'tables' => [ + 'glpi_cartridgeitems', + 'glpi_computers', + 'glpi_consumableitems', + 'glpi_devicecases', + 'glpi_devicecontrols', + 'glpi_devicedrives', + 'glpi_devicegraphiccards', + 'glpi_deviceharddrives', + 'glpi_devicenetworkcards', + 'glpi_devicemotherboards', + 'glpi_devicepcis', + 'glpi_devicepowersupplies', + 'glpi_deviceprocessors', + 'glpi_devicememories', + 'glpi_devicesoundcards', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_softwares' + ] + ] + ], + 'FK_entities' => [ + [ + 'to' => 'entities_id', + 'tables' => [ + 'glpi_bookmarks', + 'glpi_cartridgeitems', + 'glpi_computers', + 'glpi_consumableitems', + 'glpi_contacts', + 'glpi_contracts', + 'glpi_documents', + 'glpi_locations', + 'glpi_netpoints', + 'glpi_suppliers', + 'glpi_entitydatas', + 'glpi_groups', + 'glpi_knowbaseitems', + 'glpi_links', + 'glpi_mailcollectors', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_reminders', + 'glpi_rules', + 'glpi_softwares', + 'glpi_softwarelicenses', + 'glpi_softwareversions', + 'glpi_tickets', + 'glpi_users', + 'glpi_profiles_users' + ], + 'default' => [ + 'glpi_bookmarks' => "-1" + ] + ] + ], + 'FK_filesystems' => [ + [ + 'to' => 'filesystems_id', + 'tables' => [ + 'glpi_computerdisks' + ] + ] + ], + 'FK_glpi_cartridges_type' => [ + [ + 'to' => 'cartridgeitems_id', + 'tables' => [ + 'glpi_cartridges', + 'glpi_cartridges_printermodels' + ] + ] + ], + 'FK_glpi_consumables_type' => [ + [ + 'to' => 'consumableitems_id', + 'tables' => [ + 'glpi_consumables' + ] + ] + ], + 'FK_glpi_dropdown_model_printers' => [ + [ + 'to' => 'printermodels_id', + 'tables' => [ + 'glpi_cartridges_printermodels' + ] + ] + ], + 'FK_glpi_printers' => [ + [ + 'to' => 'printers_id', + 'tables' => [ + 'glpi_cartridges' + ] + ] + ], + 'FK_group' => [ + [ + 'to' => 'groups_id', + 'tables' => [ + 'glpi_tickets' + ] + ] + ], + 'FK_groups' => [ + [ + 'to' => 'groups_id', + 'tables' => [ + 'glpi_computers', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_softwares', + 'glpi_groups_users' + ] + ] + ], + 'FK_interface' => [ + [ + 'to' => 'interfacetypes_id', + 'tables' => [ + 'glpi_devicegraphiccards' + ] + ] + ], + 'FK_item' => [ + [ + 'to' => 'items_id', + 'tables' => [ + 'glpi_mailingsettings' + ] + ] + ], + 'FK_links' => [ + [ + 'to' => 'links_id', + 'tables' => [ + 'glpi_links_itemtypes' + ] + ] + ], + 'FK_port' => [ + [ + 'to' => 'networkports_id', + 'tables' => [ + 'glpi_networkports_vlans' + ] + ] + ], + 'FK_profiles' => [ + [ + 'to' => 'profiles_id', + 'tables' => [ + 'glpi_profiles_users', + 'glpi_users' + ] + ] + ], + 'FK_users' => [ + [ + 'to' => 'users_id', + 'tables' => [ + 'glpi_bookmarks', + 'glpi_displaypreferences', + 'glpi_documents', + 'glpi_groups', + 'glpi_reminders', + 'glpi_bookmarks_users', + 'glpi_groups_users', + 'glpi_profiles_users', + 'glpi_computers', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_softwares' + ] + ] + ], + 'FK_vlan' => [ + [ + 'to' => 'vlans_id', + 'tables' => [ + 'glpi_networkports_vlans' + ] + ] + ], + 'glpi_id' => [ + [ + 'to' => 'computers_id', + 'tables' => [ + 'glpi_ocslinks' + ] + ] + ], + 'id_assign' => [ + [ + 'to' => 'users_id', + 'tables' => [ + 'glpi_ticketplannings' + ] + ] + ], + 'id_auth' => [ + [ + 'to' => 'auths_id', + 'tables' => [ + 'glpi_users' + ] + ] + ], + 'id_device' => [ + [ + 'to' => 'items_id', + 'tables' => [ + 'glpi_reservationitems' + ] + ] + ], + 'id_item' => [ + [ + 'to' => 'reservationitems_id', + 'tables' => [ + 'glpi_reservations' + ] + ] + ], + 'id_user' => [ + [ + 'to' => 'users_id', + 'tables' => [ + 'glpi_consumables', + 'glpi_reservations' + ] + ] + ], + 'iface' => [ + [ + 'to' => 'networkinterfaces_id', + 'tables' => [ + 'glpi_networkports' + ] + ] + ], + 'interface' => [ + [ + 'to' => 'interfacetypes_id', + 'tables' => [ + 'glpi_devicecontrols', + 'glpi_deviceharddrives', + 'glpi_devicedrives' + ] + ] + ], + 'location' => [ + [ + 'to' => 'locations_id', + 'tables' => [ + 'glpi_cartridgeitems', + 'glpi_computers', + 'glpi_consumableitems', + 'glpi_netpoints', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_users', + 'glpi_softwares' + ] + ] + ], + 'model' => [ + [ + 'to' => 'computermodels_id', + 'tables' => [ + 'glpi_computers' + ] + ], + [ + 'to' => 'monitormodels_id', + 'tables' => [ + 'glpi_monitors' + ] + ], + [ + 'to' => 'networkequipmentmodels_id', + 'tables' => [ + 'glpi_networkequipments' + ] + ], + [ + 'to' => 'peripheralmodels_id', + 'tables' => [ + 'glpi_peripherals' + ] + ], + [ + 'to' => 'phonemodels_id', + 'tables' => [ + 'glpi_phones' + ] + ], + [ + 'to' => 'printermodels_id', + 'tables' => [ + 'glpi_printers' + ] + ] + ], + 'netpoint' => [ + [ + 'to' => 'netpoints_id', + 'tables' => [ + 'glpi_networkports' + ] + ] + ], + 'network' => [ + [ + 'to' => 'networks_id', + 'tables' => [ + 'glpi_computers', + 'glpi_networkequipments', + 'glpi_printers' + ] + ] + ], + 'on_device' => [ + [ + 'to' => 'items_id', + 'tables' => [ + 'glpi_networkports' + ] + ] + ], + 'os' => [ + [ + 'to' => 'operatingsystems_id', + 'tables' => [ + 'glpi_computers' + ] + ] + ], + 'os_license_id' => [ + [ + 'to' => 'os_licenseid', + 'tables' => [ + 'glpi_computers' + ] + ] + ], + 'os_version' => [ + [ + 'to' => 'operatingsystemversions_id', + 'tables' => [ + 'glpi_computers' + ] + ] + ], + 'parentID' => [ + [ + 'to' => 'knowbaseitemcategories_id', + 'tables' => [ + 'glpi_knowbaseitemcategories' + ] + ], + [ + 'to' => 'locations_id', + 'tables' => [ + 'glpi_locations' + ] + ], + [ + 'to' => 'ticketcategories_id', + 'tables' => [ + 'glpi_ticketcategories' + ] + ], + [ + 'to' => 'entities_id', + 'tables' => [ + 'glpi_entities' + ] + ] + ], + 'platform' => [ + [ + 'to' => 'operatingsystems_id', + 'tables' => [ + 'glpi_softwares' + ] + ] + ], + 'power' => [ + [ + 'to' => 'phonepowersupplies_id', + 'tables' => [ + 'glpi_phones' + ] + ] + ], + 'recipient' => [ + [ + 'to' => 'users_id_recipient', + 'tables' => [ + 'glpi_tickets' + ] + ] + ], + 'rubrique' => [ + [ + 'to' => 'documentcategories_id', + 'tables' => [ + 'glpi_documents' + ] + ] + ], + 'sID' => [ + [ + 'to' => 'softwares_id', + 'tables' => [ + 'glpi_softwarelicenses', + 'glpi_softwareversions' + ] + ] + ], + 'state' => [ + [ + 'to' => 'states_id', + 'tables' => [ + 'glpi_computers', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_softwareversions' + ] + ] + ], + 'tech_num' => [ + [ + 'to' => 'users_id_tech', + 'tables' => [ + 'glpi_cartridgeitems', + 'glpi_computers', + 'glpi_consumableitems', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_softwares' + ] + ] + ], + 'title' => [ + [ + 'to' => 'usertitles_id', + 'tables' => [ + 'glpi_users' + ] + ] + ], + 'type' => [ + [ + 'to' => 'cartridgeitemtypes_id', + 'tables' => [ + 'glpi_cartridgeitems' + ] + ], + [ + 'to' => 'computertypes_id', + 'tables' => [ + 'glpi_computers' + ] + ], + [ + 'to' => 'consumableitemtypes_id', + 'tables' => [ + 'glpi_consumableitems' + ] + ], + [ + 'to' => 'contacttypes_id', + 'tables' => [ + 'glpi_contacts' + ] + ], + [ + 'to' => 'devicecasetypes_id', + 'tables' => [ + 'glpi_devicecases' + ] + ], + [ + 'to' => 'devicememorytypes_id', + 'tables' => [ + 'glpi_devicememories' + ] + ], + [ + 'to' => 'suppliertypes_id', + 'tables' => [ + 'glpi_suppliers' + ] + ], + [ + 'to' => 'monitortypes_id', + 'tables' => [ + 'glpi_monitors' + ] + ], + [ + 'to' => 'networkequipmenttypes_id', + 'tables' => [ + 'glpi_networkequipments' + ] + ], + [ + 'to' => 'peripheraltypes_id', + 'tables' => [ + 'glpi_peripherals' + ] + ], + [ + 'to' => 'phonetypes_id', + 'tables' => [ + 'glpi_phones' + ] + ], + [ + 'to' => 'printertypes_id', + 'tables' => [ + 'glpi_printers' + ] + ], + [ + 'to' => 'softwarelicensetypes_id', + 'tables' => [ + 'glpi_softwarelicenses' + ] + ], + [ + 'to' => 'usercategories_id', + 'tables' => [ + 'glpi_users' + ] + ], + [ + 'to' => 'itemtype', + 'tables' => [ + 'glpi_computers_items', + 'glpi_displaypreferences' + ] + ] + ], + 'update_software' => [ + [ + 'to' => 'softwares_id', + 'tables' => [ + 'glpi_softwares' + ] + ] + ], + 'use_version' => [ + [ + 'to' => 'softwareversions_id_use', + 'tables' => [ + 'glpi_softwarelicenses' + ] + ] + ], + 'vID' => [ + [ + 'to' => 'softwareversions_id', + 'tables' => [ + 'glpi_computers_softwareversions' + ] + ] + ], + 'conpta_num' => [ + [ + 'to' => 'accounting_number', + 'tables' => [ + 'glpi_contracts' + ] + ] + ], + 'num_commande' => [ + [ + 'to' => 'order_number', + 'tables' => [ + 'glpi_infocoms' + ] + ] + ], + 'bon_livraison' => [ + [ + 'to' => 'delivery_number', + 'tables' => [ + 'glpi_infocoms' + ] + ] + ], + 'num_immo' => [ + [ + 'to' => 'immo_number', + 'tables' => [ + 'glpi_infocoms' + ] + ] + ], + 'facture' => [ + [ + 'to' => 'bill', + 'tables' => [ + 'glpi_infocoms' + ] + ] + ], + 'amort_time' => [ + [ + 'to' => 'sink_time', + 'tables' => [ + 'glpi_infocoms' + ] + ] + ], + 'amort_type' => [ + [ + 'to' => 'sink_type', + 'tables' => [ + 'glpi_infocoms' + ] + ] + ], + 'ifmac' => [ + [ + 'to' => 'mac', + 'tables' => [ + 'glpi_networkequipments' + ] + ] + ], + 'ifaddr' => [ + [ + 'to' => 'ip', + 'tables' => [ + 'glpi_networkequipments', + 'glpi_networkports' + ] + ] + ], + 'ramSize' => [ + [ + 'to' => 'memory_size', + 'tables' => [ + 'glpi_printers' + ] + ] + ], + 'facturation' => [ + [ + 'to' => 'billing', + 'tables' => [ + 'glpi_contracts' + ] + ] + ], + 'monday' => [ + [ + 'to' => 'use_monday', + 'tables' => [ + 'glpi_contracts' + ] + ] + ], + 'saturday' => [ + [ + 'to' => 'use_saturday', + 'tables' => [ + 'glpi_contracts' + ] + ] + ], + 'recursive' => [ + [ + 'to' => 'is_recursive', + 'tables' => [ + 'glpi_networkequipments', + 'glpi_groups', + 'glpi_contracts', + 'glpi_contacts', + 'glpi_suppliers', + 'glpi_printers', + 'glpi_softwares', + 'glpi_softwareversions', + 'glpi_softwarelicences' + ] + ] + ], + 'faq' => [ + [ + 'to' => 'is_faq', + 'tables' => [ + 'glpi_knowbaseitems' + ] + ] + ], + 'flags_micro' => [ + [ + 'to' => 'have_micro', + 'tables' => [ + 'glpi_monitors' + ] + ] + ], + 'flags_speaker' => [ + [ + 'to' => 'have_speaker', + 'tables' => [ + 'glpi_monitors' + ] + ] + ], + 'flags_subd' => [ + [ + 'to' => 'have_subd', + 'tables' => [ + 'glpi_monitors' + ] + ] + ], + 'flags_bnc' => [ + [ + 'to' => 'have_bnc', + 'tables' => [ + 'glpi_monitors' + ] + ] + ], + 'flags_dvi' => [ + [ + 'to' => 'have_dvi', + 'tables' => [ + 'glpi_monitors' + ] + ] + ], + 'flags_pivot' => [ + [ + 'to' => 'have_pivot', + 'tables' => [ + 'glpi_monitors' + ] + ] + ], + 'flags_hp' => [ + [ + 'to' => 'have_hp', + 'tables' => [ + 'glpi_phones' + ] + ] + ], + 'flags_casque' => [ + [ + 'to' => 'have_headset', + 'tables' => [ + 'glpi_phones' + ] + ] + ], + 'flags_usb' => [ + [ + 'to' => 'have_usb', + 'tables' => [ + 'glpi_printers' + ] + ] + ], + 'flags_par' => [ + [ + 'to' => 'have_parallel', + 'tables' => [ + 'glpi_printers' + ] + ] + ], + 'flags_serial' => [ + [ + 'to' => 'have_serial', + 'tables' => [ + 'glpi_printers' + ] + ] + ], + 'initial_pages' => [ + [ + 'to' => 'init_pages_counter', + 'tables' => [ + 'glpi_printers' + ] + ] + ], + 'global' => [ + [ + 'to' => 'is_global', + 'tables' => [ + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_softwares' + ] + ] + ], + 'template' => [ + [ + 'to' => 'template_name', + 'tables' => [ + 'glpi_cartridgeitems', + 'glpi_computers', + 'glpi_consumableitems', + 'glpi_devicecases', + 'glpi_devicecontrols', + 'glpi_devicedrives', + 'glpi_devicegraphiccards', + 'glpi_deviceharddrives', + 'glpi_devicenetworkcards', + 'glpi_devicemotherboards', + 'glpi_devicepcis', + 'glpi_devicepowersupplies', + 'glpi_deviceprocessors', + 'glpi_devicememories', + 'glpi_devicesoundcards', + 'glpi_monitors', + 'glpi_networkequipments', + 'glpi_peripherals', + 'glpi_phones', + 'glpi_printers', + 'glpi_softwares' + ] + ] + ], + 'comments' => [ + [ + 'to' => 'comment', + 'tables' => [ + 'glpi_cartridgeitems', + 'glpi_computers', + 'glpi_consumableitems', + 'glpi_contacts', + 'glpi_contracts', + 'glpi_documents', + 'glpi_autoupdatesystems', + 'glpi_budgets', + 'glpi_cartridgeitemtypes', + 'glpi_devicecasetypes', + 'glpi_consumableitemtypes', + 'glpi_contacttypes', + 'glpi_contracttypes', + 'glpi_domains', + 'glpi_suppliertypes', + 'glpi_filesystems', + 'glpi_networkequipmentfirmwares', + 'glpi_networkinterfaces', + 'glpi_interfacetypes', + 'glpi_knowbaseitemcategories', + 'glpi_softwarelicensetypes', + 'glpi_locations', + 'glpi_manufacturers', + 'glpi_computermodels', + 'glpi_monitormodels', + 'glpi_networkequipmentmodels', + 'glpi_peripheralmodels', + 'glpi_phonemodels', + 'glpi_printermodels', + 'glpi_netpoints', + 'glpi_networks', + 'glpi_operatingsystems', + 'glpi_operatingsystemservicepacks', + 'glpi_operatingsystemversions', + 'glpi_phonepowersupplies', + 'glpi_devicememorytypes', + 'glpi_documentcategories', + 'glpi_softwarecategories', + 'glpi_states', + 'glpi_ticketcategories', + 'glpi_usertitles', + 'glpi_usercategories', + 'glpi_vlans', + 'glpi_suppliers', + 'glpi_entities', + 'glpi_groups', + 'glpi_infocoms', + 'glpi_monitors', + 'glpi_phones', + 'glpi_printers', + 'glpi_peripherals', + 'glpi_networkequipments', + 'glpi_reservationitems', + 'glpi_rules', + 'glpi_softwares', + 'glpi_softwarelicenses', + 'glpi_softwareversions', + 'glpi_computertypes', + 'glpi_monitortypes', + 'glpi_networkequipmenttypes', + 'glpi_peripheraltypes', + 'glpi_phonetypes', + 'glpi_printertypes', + 'glpi_users' + ] + ] + ], + 'notes' => [ + [ + 'to' => 'notepad', + 'tables' => [ + 'glpi_cartridgeitems', + 'glpi_computers', + 'glpi_consumableitems', + 'glpi_contacts', + 'glpi_contracts', + 'glpi_documents', + 'glpi_suppliers', + 'glpi_entitydatas', + 'glpi_printers', + 'glpi_monitors', + 'glpi_phones', + 'glpi_peripherals', + 'glpi_networkequipments', + 'glpi_softwares' + ] + ] + ] + ]; $foreignkeys = Plugin::doHookFunction("plugin_datainjection_migratefields", $foreignkeys); $query = "SELECT `itemtype`, `value` @@ -1078,7 +1733,7 @@ function plugin_datainjection_update220_230() { * @param $hook_name * @param $params array **/ -function plugin_datainjection_loadHook($hook_name, $params=array ()) { +function plugin_datainjection_loadHook($hook_name, $params = []) { global $PLUGIN_HOOKS; @@ -1131,7 +1786,7 @@ function plugin_datainjection_addDefaultWhere($itemtype) { $_SESSION['glpiactive_entity'], true ); if (count($models) > 0) { - $tab = array(); + $tab = []; foreach ($models as $model) { $tab[] = $model['id']; } diff --git a/inc/autoupdatesysteminjection.class.php b/inc/autoupdatesysteminjection.class.php index c5d4e808..a8f02637 100644 --- a/inc/autoupdatesysteminjection.class.php +++ b/inc/autoupdatesysteminjection.class.php @@ -52,20 +52,20 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type='') { * * @return an array of IDs of newly created objects : for example array(Computer=>1, Networkport=>10) **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/backendcsv.class.php b/inc/backendcsv.class.php index 80744a81..4292276a 100644 --- a/inc/backendcsv.class.php +++ b/inc/backendcsv.class.php @@ -67,7 +67,7 @@ function setDelimiter($delimiter) { /** * @param $present (true by default) **/ - function setHeaderPresent($present=true) { + function setHeaderPresent($present = true) { $this->isHeaderPresent = $present; } @@ -80,11 +80,11 @@ function setHeaderPresent($present=true) { * @param $data * @param $encoding (default 1) **/ - static function parseLine($fic, $data, $encoding=1) { + static function parseLine($fic, $data, $encoding = 1) { global $DB; - $csv = array(); + $csv = []; $num = count($data); for ($c=0; $c<$num; $c++) { @@ -122,7 +122,7 @@ static function parseLine($fic, $data, $encoding=1) { * @param $newfile * @param $encoding **/ - function init($newfile,$encoding) { + function init($newfile, $encoding) { $this->file = $newfile; $this->encoding = $encoding; @@ -134,7 +134,7 @@ function init($newfile,$encoding) { * * @param $numberOfLines inumber of lines to be read (-1 means all file) (default 1) **/ - function read($numberOfLines=1) { + function read($numberOfLines = 1) { $injectionData = new PluginDatainjectionData(); $this->openFile(); @@ -227,7 +227,7 @@ function getNextLine() { if ($data === false) { return false; } - $line = array(); + $line = []; if ((count($data) > 1) || ($data[0] != PluginDatainjectionCommonInjectionLib::EMPTY_VALUE) ) { diff --git a/inc/backendinterface.class.php b/inc/backendinterface.class.php index 1998975d..b9517482 100644 --- a/inc/backendinterface.class.php +++ b/inc/backendinterface.class.php @@ -40,7 +40,7 @@ interface PluginDatainjectionBackendInterface * * @param $numberOfLines (default 1) **/ - function read($numberOfLines=1); + function read($numberOfLines = 1); /** diff --git a/inc/budgetinjection.class.php b/inc/budgetinjection.class.php index 44a4b519..52228c5f 100644 --- a/inc/budgetinjection.class.php +++ b/inc/budgetinjection.class.php @@ -54,14 +54,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -71,13 +71,13 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("date" => array(3,5), - "yesno" => array(86), - "multiline_text" => array(16, 90), - "decimal" => array(4)); + $options['displaytype'] = ["date" => [3,5], + "yesno" => [86], + "multiline_text" => [16, 90], + "decimal" => [4]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -86,7 +86,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/cartridgeiteminjection.class.php b/inc/cartridgeiteminjection.class.php index 5ca7ed1a..720f9716 100644 --- a/inc/cartridgeiteminjection.class.php +++ b/inc/cartridgeiteminjection.class.php @@ -53,14 +53,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -74,15 +74,15 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(91, 92, 93); + $notimportable = [91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 23, 49), - "user" => array(24), - "multiline_text" => array(16, 90), - "dropdown_integer" => array(8)); + $options['displaytype'] = ["dropdown" => [3, 4, 23, 49], + "user" => [24], + "multiline_text" => [16, 90], + "dropdown_integer" => [8]]; - $options['checktype'] = array("integer" => array(8)); + $options['checktype'] = ["integer" => [8]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -91,7 +91,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/clientinjection.class.php b/inc/clientinjection.class.php index 2b783cd2..dfd7e1e4 100644 --- a/inc/clientinjection.class.php +++ b/inc/clientinjection.class.php @@ -38,7 +38,7 @@ class PluginDatainjectionClientInjection const STEP_RESULT = 2; //Injection results - private $results = array(); + private $results = []; //Model used for injection private $model; @@ -56,7 +56,7 @@ function title() { global $CFG_GLPI; - $buttons = array (); + $buttons = []; $title = ""; if (Session::haveRight(static::$rightname, UPDATE)) { @@ -71,7 +71,7 @@ function title() { } - function showForm($ID, $options=array()) { + function showForm($ID, $options = []) { global $CFG_GLPI; @@ -139,7 +139,7 @@ function showForm($ID, $options=array()) { /** * @param $options array **/ - static function showUploadFileForm($options=array()) { + static function showUploadFileForm($options = []) { $add_form = (isset($options['add_form']) && $options['add_form']); $confirm = (isset($options['confirm']) && $options['confirm']); @@ -197,7 +197,7 @@ static function showUploadFileForm($options=array()) { static function showInjectionForm(PluginDatainjectionModel $model, $entities_id) { if (!PluginDatainjectionSession::getParam('infos')) { - PluginDatainjectionSession::setParam('infos', array()); + PluginDatainjectionSession::setParam('infos', []); } echo ""; echo ""; diff --git a/inc/commoninjectionlib.class.php b/inc/commoninjectionlib.class.php index 28d4675c..a063364e 100644 --- a/inc/commoninjectionlib.class.php +++ b/inc/commoninjectionlib.class.php @@ -32,18 +32,18 @@ class PluginDatainjectionCommonInjectionLib { //Injection results - private $results = array(); + private $results = []; //Values to inject - private $values = array(); + private $values = []; //Fields mandatory for injection - private $mandatory_fields = array(); + private $mandatory_fields = []; //List of fields which can agregate more than one value (type multiline_text) - private $severalvalues_fields = array(); + private $severalvalues_fields = []; - private $optional_infos = array(); + private $optional_infos = []; //Injection class to use private $injectionClass; @@ -52,13 +52,13 @@ class PluginDatainjectionCommonInjectionLib private $primary_type; //Store checks to perform on values - private $checks = array(); + private $checks = []; //Store rights - private $rights = array(); + private $rights = []; //Store specific fields formats - private $formats = array(); + private $formats = []; //Entity in which data will be inserted private $entity = 0; @@ -123,24 +123,24 @@ class PluginDatainjectionCommonInjectionLib **/ function setDefaultValues() { - $this->checks = array('ip' => false, 'mac' => false, + $this->checks = ['ip' => false, 'mac' => false, 'integer' => false, 'yes' => false, 'bool' => false, 'date' => false, 'float' => false, 'string' => false, 'right_r' => false, 'right_rw' => false, 'interface' => false, 'auth_method' => false, - 'port_unicity' => false); + 'port_unicity' => false]; //Rights options - $this->rights = array('add_dropdown' => false, + $this->rights = ['add_dropdown' => false, 'overwrite_notempty_fields' => false, 'can_add' => false, 'can_update' => false, - 'can_delete' => false); + 'can_delete' => false]; //Field format options - $this->formats = array('date_format' => self::DATE_TYPE_YYYYMMDD, - 'float_format' => self::FLOAT_TYPE_COMMA); + $this->formats = ['date_format' => self::DATE_TYPE_YYYYMMDD, + 'float_format' => self::FLOAT_TYPE_COMMA]; } @@ -155,7 +155,7 @@ function setDefaultValues() { * * @return nothinActiong **/ - function __construct($injectionClass, $values=array(), $injection_options=array()) { + function __construct($injectionClass, $values = [], $injection_options = []) { $this->setDefaultValues(); @@ -188,8 +188,8 @@ function __construct($injectionClass, $values=array(), $injection_options=array( if (isset($injection_options['formats'])) { $this->formats = $injection_options['formats']; } else { - $this->formats = array('date_format' => self::DATE_TYPE_YYYYMMDD, - 'float_format' => self::FLOAT_TYPE_DOT); + $this->formats = ['date_format' => self::DATE_TYPE_YYYYMMDD, + 'float_format' => self::FLOAT_TYPE_DOT]; } //Store values to inject @@ -248,7 +248,7 @@ function areTypeMandatoryFieldsOK($injectionClass) { && self::isFieldADropdown($option['displaytype'])) ) { $status_check = false; - $this->results[self::ACTION_CHECK][] = array(self::MANDATORY, $option['name']); + $this->results[self::ACTION_CHECK][] = [self::MANDATORY, $option['name']]; } } } @@ -266,8 +266,8 @@ function areTypeMandatoryFieldsOK($injectionClass) { static function isFieldADropdown($field_type) { if (!in_array( - $field_type, array('integer', 'decimal', 'tree', - 'text', 'multiline_text', 'date') + $field_type, ['integer', 'decimal', 'tree', + 'text', 'multiline_text', 'date'] )) { return true; } @@ -347,12 +347,12 @@ static function getBlacklistedOptions($itemtype) { //2 : id // 19 : date_mod // 80 : entity - $blacklist = array(2, 19, 80, 201, 202, 203, 204); + $blacklist = [2, 19, 80, 201, 202, 203, 204]; //add document fields if (in_array($itemtype, $CFG_GLPI["document_types"])) { - $tabs = Document::getSearchOptionsToAdd(); - $document_fields = array(); + $tabs = Document::rawSearchOptionsToAdd(); + $document_fields = []; unset($tabs['document']); foreach ($tabs as $k => $v) { $document_fields[] = $k; @@ -363,8 +363,8 @@ static function getBlacklistedOptions($itemtype) { //add infocoms fields if (in_array($itemtype, $CFG_GLPI["infocom_types"])) { - $tabs = Infocom::getSearchOptionsToAdd($itemtype); - $infocom_fields = array(); + $tabs = Infocom::rawSearchOptionsToAdd($itemtype); + $infocom_fields = []; unset($tabs['financial']); foreach ($tabs as $k => $v) { $infocom_fields[] = $k; @@ -374,8 +374,8 @@ static function getBlacklistedOptions($itemtype) { } //add contract fields if (in_array($itemtype, $CFG_GLPI["contract_types"])) { - $tabs = Contract::getSearchOptionsToAdd(); - $contract_fields = array(); + $tabs = Contract::rawSearchOptionsToAdd(); + $contract_fields = []; unset($tabs['contract']); foreach ($tabs as $k => $v) { $contract_fields[] = $k; @@ -386,8 +386,8 @@ static function getBlacklistedOptions($itemtype) { //add networkport fields if (in_array($itemtype, $CFG_GLPI["networkport_types"])) { - $tabs = NetworkPort::getSearchOptionsToAdd($itemtype); - $networkport_fields = array(); + $tabs = NetworkPort::rawSearchOptionsToAdd($itemtype); + $networkport_fields = []; unset($tabs['network']); foreach ($tabs as $k => $v) { $networkport_fields[] = $k; @@ -398,7 +398,7 @@ static function getBlacklistedOptions($itemtype) { //add ticket_types fields if (in_array($itemtype, $CFG_GLPI["ticket_types"])) { - $ticket_fields = array(60, 140); + $ticket_fields = [60, 140]; $blacklist = array_merge($blacklist, $ticket_fields); } @@ -499,7 +499,7 @@ public function getInjectionResults() { **/ private function manageFieldValues() { - $blacklisted_fields = array('id'); + $blacklisted_fields = ['id']; foreach ($this->values as $itemtype => $data) { $injectionClass = self::getInjectionClassInstance($itemtype); @@ -535,7 +535,7 @@ private function manageFieldValues() { * @return nothing **/ private function getFieldValue($injectionClass, $itemtype, $searchOption, $field, $value, - $add=true + $add = true ) { if (isset($searchOption['storevaluein'])) { $linkfield = $searchOption['storevaluein']; @@ -572,8 +572,8 @@ private function getFieldValue($injectionClass, $itemtype, $searchOption, $field $item = new $tmptype(); if ($item instanceof CommonTreeDropdown) { // use findID instead of getID - $input = array ('completename' => $value, - 'entities_id' => $this->entity); + $input = ['completename' => $value, + 'entities_id' => $this->entity]; if ($item->canCreate() && $this->rights['add_dropdown']) { $id = $item->import($input); @@ -600,8 +600,8 @@ private function getFieldValue($injectionClass, $itemtype, $searchOption, $field if ($value && $id <= 0) { $this->results['status'] = self::WARNING; $this->results[self::ACTION_CHECK]['status'] = self::WARNING; - $this->results[self::ACTION_CHECK][] = array(self::WARNING_NOTFOUND, - $searchOption['name']."='$value'"); + $this->results[self::ACTION_CHECK][] = [self::WARNING_NOTFOUND, + $searchOption['name']."='$value'"]; } break; @@ -656,9 +656,9 @@ private function addExternalDropdownParameters($itemtype) { global $DB; - $external = array(); + $external = []; $values = $this->getValuesForItemtype($itemtype); - $toadd = array('manufacturers_id' => 'manufacturer'); + $toadd = ['manufacturers_id' => 'manufacturer']; foreach ($toadd as $field => $addvalue) { if (isset($values[$field])) { @@ -843,7 +843,7 @@ private function unsetValue($itemtype, $field) { * @param value of the field * @param fromdb boolean **/ - private function setValueForItemtype($itemtype, $field, $value, $fromdb=false) { + private function setValueForItemtype($itemtype, $field, $value, $fromdb = false) { // TODO awfull hack, text ftom CSV set more than once, so check if "another" value if (isset($this->values[$itemtype][$field]) && $this->values[$itemtype][$field]!=$value) { @@ -1024,8 +1024,8 @@ static private function reformatFloat($value, $format) { switch ($format) { case self::FLOAT_TYPE_COMMA : $value = str_replace( - array(" ", ","), - array("","."), + [" ", ","], + ["","."], $value ); break; @@ -1145,7 +1145,7 @@ private function check() { if ($value == self::EMPTY_VALUE && $mandatory) { $this->results['status'] = self::FAILED; $this->results[self::ACTION_CHECK]['status'] = self::FAILED; - $this->results[self::ACTION_CHECK][] = array(self::MANDATORY, $field); + $this->results[self::ACTION_CHECK][] = [self::MANDATORY, $field]; $continue = false; } else { @@ -1153,8 +1153,8 @@ private function check() { $injectionClass, $option, $field, $value, $mandatory ); - $this->results[self::ACTION_CHECK][] = array($check_result, - $field."='$value'"); + $this->results[self::ACTION_CHECK][] = [$check_result, + $field."='$value'"]; if ($check_result != self::SUCCESS) { $this->results[self::ACTION_CHECK]['status'] = self::FAILED; @@ -1500,10 +1500,10 @@ public function processAddOrUpdate() { * * @return the id of the object added or updated **/ - private function effectiveAddOrUpdate($injectionClass, $item, $values, $add=true) { + private function effectiveAddOrUpdate($injectionClass, $item, $values, $add = true) { //Insert data using the standard add() method - $toinject = array(); + $toinject = []; $options = $injectionClass->getOptions(); foreach ($values as $key => $value) { @@ -1522,7 +1522,7 @@ private function effectiveAddOrUpdate($injectionClass, $item, $values, $add=true if (method_exists($injectionClass, 'customimport')) { $newID = call_user_func( - array($injectionClass, 'customimport'), $toinject, $add, + [$injectionClass, 'customimport'], $toinject, $add, $this->rights ); } else if ($item instanceof CommonDropdown && $add) { @@ -1867,7 +1867,7 @@ private function addTemplateFields($itemtype) { * * @return nothing **/ - static function logAddOrUpdate($item, $add=true) { + static function logAddOrUpdate($item, $add = true) { if ($item->dohistory) { $changes[0] = 0; @@ -1892,9 +1892,9 @@ static function logAddOrUpdate($item, $add=true) { **/ static function getActionLabel($action) { - $actions = array(self::IMPORT_ADD => __('Add'), + $actions = [self::IMPORT_ADD => __('Add'), self::IMPORT_UPDATE => __('Update'), - self::IMPORT_DELETE => __('Delete')); + self::IMPORT_DELETE => __('Delete')]; if (isset($actions[$action])) { return $actions[$action]; @@ -1974,8 +1974,8 @@ static function addToSearchOptions(array $type_searchOptions, array $options, //Add linkfield for theses fields : no massive action is allowed in the core, but they can be //imported using the commonlib - $add_linkfield = array('comment' => 'comment', - 'notepad' => 'notepad'); + $add_linkfield = ['comment' => 'comment', + 'notepad' => 'notepad']; foreach ($type_searchOptions as $id => $tmp) { if (!is_array($tmp) || !isset($tmp['field']) || in_array($id, $options['ignore_fields'])) { @@ -2004,7 +2004,7 @@ static function addToSearchOptions(array $type_searchOptions, array $options, } } - foreach (array('displaytype', 'checktype') as $paramtype) { + foreach (['displaytype', 'checktype'] as $paramtype) { if (isset($options[$paramtype])) { foreach ($options[$paramtype] as $type => $tabsID) { foreach ($tabsID as $tabID) { @@ -2026,7 +2026,7 @@ static function addToSearchOptions(array $type_searchOptions, array $options, * * @return nothing **/ - static function addTemplateSearchOptions($injectionClass,&$tab) { + static function addTemplateSearchOptions($injectionClass, &$tab) { $itemtype = self::getItemtypeByInjectionClass($injectionClass); $item = new $itemtype(); diff --git a/inc/computer_iteminjection.class.php b/inc/computer_iteminjection.class.php index f34386b2..6c0c3b3f 100644 --- a/inc/computer_iteminjection.class.php +++ b/inc/computer_iteminjection.class.php @@ -45,7 +45,7 @@ static function getTable($classname = null) { } - static function getTypeName($nb=0) { + static function getTypeName($nb = 0) { return __('Direct connections'); } @@ -68,7 +68,7 @@ function connectedTo() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab[110]['table'] = 'glpi_computers'; $tab[110]['field'] = 'name'; @@ -104,7 +104,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/computer_softwarelicenseinjection.class.php b/inc/computer_softwarelicenseinjection.class.php index bf0c4f00..3d7ce87b 100644 --- a/inc/computer_softwarelicenseinjection.class.php +++ b/inc/computer_softwarelicenseinjection.class.php @@ -37,7 +37,7 @@ class PluginDatainjectionComputer_SoftwareLicenseInjection extends Computer_Soft { - static function getTypeName($nb=0) { + static function getTypeName($nb = 0) { return __('Computer'); } @@ -59,14 +59,14 @@ function isPrimaryType() { function connectedTo() { - return array('SoftwareLicense'); + return ['SoftwareLicense']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab[110]['table'] = 'glpi_computers'; $tab[110]['field'] = 'name'; @@ -108,7 +108,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -118,8 +118,8 @@ function addOrUpdateObject($values=array(), $options=array()) { function addSpecificMandatoryFields() { - return array('computers_id' => 1, - 'softwarelicenses_id' => 1); + return ['computers_id' => 1, + 'softwarelicenses_id' => 1]; } diff --git a/inc/computer_softwareversioninjection.class.php b/inc/computer_softwareversioninjection.class.php index 46d2fdd1..6c75f22a 100644 --- a/inc/computer_softwareversioninjection.class.php +++ b/inc/computer_softwareversioninjection.class.php @@ -37,7 +37,7 @@ class PluginDatainjectionComputer_SoftwareVersionInjection extends Computer_Soft { - static function getTypeName($nb=0) { + static function getTypeName($nb = 0) { return __('Computer'); } @@ -58,14 +58,14 @@ function isPrimaryType() { function connectedTo() { - return array('Software', 'SoftwareVersion'); + return ['Software', 'SoftwareVersion']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab[110]['table'] = 'glpi_computers'; $tab[110]['field'] = 'name'; @@ -107,7 +107,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -117,8 +117,8 @@ function addOrUpdateObject($values=array(), $options=array()) { function addSpecificMandatoryFields() { - return array('computers_id' => 1, - 'softwareversions_id' => 1); + return ['computers_id' => 1, + 'softwareversions_id' => 1]; } diff --git a/inc/computerinjection.class.php b/inc/computerinjection.class.php index 86407b9c..88181179 100644 --- a/inc/computerinjection.class.php +++ b/inc/computerinjection.class.php @@ -54,14 +54,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -80,10 +80,10 @@ function getOptions($primary_type='') { $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 23, 31, 32, 33, 40, - 41, 42, 45, 46, 49, 71), - "user" => array(24, 70), - "multiline_text" => array(16, 90)); + $options['displaytype'] = ["dropdown" => [3, 4, 23, 31, 32, 33, 40, + 41, 42, 45, 46, 49, 71], + "user" => [24, 70], + "multiline_text" => [16, 90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -92,7 +92,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/computermodelinjection.class.php b/inc/computermodelinjection.class.php index 777e96d1..a644232c 100644 --- a/inc/computermodelinjection.class.php +++ b/inc/computermodelinjection.class.php @@ -60,7 +60,7 @@ function connectedTo() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -70,7 +70,7 @@ function getOptions($primary_type='') { $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=[], $options=[]) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/computertypeinjection.class.php b/inc/computertypeinjection.class.php index d2265c5e..f41f817c 100644 --- a/inc/computertypeinjection.class.php +++ b/inc/computertypeinjection.class.php @@ -45,7 +45,7 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } @@ -60,17 +60,17 @@ static function getTable($classname = null) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/consumableiteminjection.class.php b/inc/consumableiteminjection.class.php index 7ddf2851..bed4ace5 100644 --- a/inc/consumableiteminjection.class.php +++ b/inc/consumableiteminjection.class.php @@ -53,14 +53,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -74,15 +74,15 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(91, 92, 93); + $notimportable = [91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 23, 49), - "user" => array(24), - "multiline_text" => array(16, 90), - "dropdown_integer" => array(8)); - $options['checktype'] = array("integer" => array(8)); + $options['displaytype'] = ["dropdown" => [3, 4, 23, 49], + "user" => [24], + "multiline_text" => [16, 90], + "dropdown_integer" => [8]]; + $options['checktype'] = ["integer" => [8]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -91,7 +91,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/contact_supplierinjection.class.php b/inc/contact_supplierinjection.class.php index 9453c6ed..6d8b5d21 100644 --- a/inc/contact_supplierinjection.class.php +++ b/inc/contact_supplierinjection.class.php @@ -53,14 +53,14 @@ function isPrimaryType() { function connectedTo() { - return array('Contact', 'Supplier'); + return ['Contact', 'Supplier']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab[100]['table'] = 'glpi_suppliers'; $tab[100]['field'] = 'name'; @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -89,7 +89,7 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $primary_type * @param $values **/ - function addSpecificNeededFields($primary_type,$values) { + function addSpecificNeededFields($primary_type, $values) { $fields[getForeignKeyFieldForTable(getTableForItemType($primary_type))] = $values[$primary_type]['id']; diff --git a/inc/contactinjection.class.php b/inc/contactinjection.class.php index 027eb086..116faed7 100644 --- a/inc/contactinjection.class.php +++ b/inc/contactinjection.class.php @@ -53,26 +53,26 @@ function isPrimaryType() { function connectedTo() { - return array('Supplier'); + return ['Supplier']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(8); + $notimportable = [8]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(8, 9), - "bool" => array(86), - "multiline_text" => array(16, 82, 90)); + $options['displaytype'] = ["dropdown" => [8, 9], + "bool" => [86], + "multiline_text" => [16, 82, 90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -81,7 +81,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/contacttypeinjection.class.php b/inc/contacttypeinjection.class.php index c1cddba0..8255b160 100644 --- a/inc/contacttypeinjection.class.php +++ b/inc/contacttypeinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -78,7 +78,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/contract_iteminjection.class.php b/inc/contract_iteminjection.class.php index 5e8e1bc5..462cd6e8 100644 --- a/inc/contract_iteminjection.class.php +++ b/inc/contract_iteminjection.class.php @@ -63,7 +63,7 @@ function connectedTo() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab[100]['table'] = 'glpi_contracts'; $tab[100]['field'] = 'name'; @@ -92,7 +92,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/contract_supplierinjection.class.php b/inc/contract_supplierinjection.class.php index 285f5332..58ca54af 100644 --- a/inc/contract_supplierinjection.class.php +++ b/inc/contract_supplierinjection.class.php @@ -53,14 +53,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab[4]['table'] = 'glpi_contracts'; $tab[4]['field'] = 'name'; @@ -81,7 +81,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -95,7 +95,7 @@ function addOrUpdateObject($values=array(), $options=array()) { **/ function addSpecificNeededFields($primary_type, $values) { - return array(getForeignKeyFieldForTable(getTableForItemType($primary_type)) - => $values[$primary_type]['id']); + return [getForeignKeyFieldForTable(getTableForItemType($primary_type)) + => $values[$primary_type]['id']]; } } diff --git a/inc/contractinjection.class.php b/inc/contractinjection.class.php index d6d3dcb3..c18e83fd 100644 --- a/inc/contractinjection.class.php +++ b/inc/contractinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -90,18 +90,18 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(12, 13, 20, 41, 42, 43, 44, 45, 72); + $notimportable = [12, 13, 20, 41, 42, 43, 44, 45, 72]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(4), - "date" => array(5), - "dropdown_integer" => array(6, 7, 21), - "bool" => array(86), - "alert" => array(59), - "billing" => array(22), - "renewal" => array(23), - "multiline_text" => array(16 ,90)); + $options['displaytype'] = ["dropdown" => [4], + "date" => [5], + "dropdown_integer" => [6, 7, 21], + "bool" => [86], + "alert" => [59], + "billing" => [22], + "renewal" => [23], + "multiline_text" => [16 ,90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -110,7 +110,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -122,13 +122,13 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $info array * @param $option array **/ - function showAdditionalInformation($info=array(),$option=array()) { + function showAdditionalInformation($info = [], $option = []) { $name = "info[".$option['linkfield']."]"; switch ($option['displaytype']) { case 'alert' : - Contract::dropdownAlert(array('name' => $name)); + Contract::dropdownAlert(['name' => $name]); break; case 'renewal' : @@ -137,11 +137,11 @@ function showAdditionalInformation($info=array(),$option=array()) { case 'billing' : Dropdown::showNumber( - $name, array('value' => 0, + $name, ['value' => 0, 'min' => 12, 'max' => 60, 'step' => 12, - 'toadd' => array(0 => Dropdown::EMPTY_VALUE, + 'toadd' => [0 => Dropdown::EMPTY_VALUE, 1 => sprintf( _n( '%d month', @@ -165,8 +165,8 @@ function showAdditionalInformation($info=array(),$option=array()) { '%d month', '%d months', 6 ), 6 - ))), - array('unit' => 'month') + )]], + ['unit' => 'month'] ); break; diff --git a/inc/contracttypeinjection.class.php b/inc/contracttypeinjection.class.php index 307b158b..c27e12cd 100644 --- a/inc/contracttypeinjection.class.php +++ b/inc/contracttypeinjection.class.php @@ -53,23 +53,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -78,7 +78,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/data.class.php b/inc/data.class.php index 8eadd33a..c36ccf97 100644 --- a/inc/data.class.php +++ b/inc/data.class.php @@ -36,7 +36,7 @@ class PluginDatainjectionData function __construct() { - $injectionData = array(); + $injectionData = []; } @@ -63,7 +63,7 @@ function getDataAtLine($line_id) { if (count($this->injectionData) >= $line_id) { return $this->injectionData[$line_id][0]; } - return array(); + return []; } } diff --git a/inc/devicecaseinjection.class.php b/inc/devicecaseinjection.class.php index d9374405..07087a86 100644 --- a/inc/devicecaseinjection.class.php +++ b/inc/devicecaseinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(12, 23)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [12, 23]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -80,7 +80,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array **/ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { $class = "Item_".get_parent_class($this); @@ -105,7 +105,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/devicecasetypeinjection.class.php b/inc/devicecasetypeinjection.class.php index 1a951028..72ba9e9d 100644 --- a/inc/devicecasetypeinjection.class.php +++ b/inc/devicecasetypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/devicecontrolinjection.class.php b/inc/devicecontrolinjection.class.php index 7f26eb66..a6f8cb5c 100644 --- a/inc/devicecontrolinjection.class.php +++ b/inc/devicecontrolinjection.class.php @@ -52,25 +52,25 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(14, 23), - "bool" => array(12)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [14, 23], + "bool" => [12]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -81,7 +81,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array **/ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { @@ -107,7 +107,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/devicedriveinjection.class.php b/inc/devicedriveinjection.class.php index 2a0e17ed..cab56940 100644 --- a/inc/devicedriveinjection.class.php +++ b/inc/devicedriveinjection.class.php @@ -52,25 +52,25 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(14, 23), - "bool" => array(12)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [14, 23], + "bool" => [12]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -81,7 +81,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array */ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { @@ -108,7 +108,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/deviceecasetypeinjection.class.php b/inc/deviceecasetypeinjection.class.php index 1a951028..72ba9e9d 100644 --- a/inc/deviceecasetypeinjection.class.php +++ b/inc/deviceecasetypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/deviceharddriveinjection.class.php b/inc/deviceharddriveinjection.class.php index e9b52e27..e3da0581 100644 --- a/inc/deviceharddriveinjection.class.php +++ b/inc/deviceharddriveinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(14, 23)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [14, 23]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -80,7 +80,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array */ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { $class = "Item_".get_parent_class($this); @@ -105,7 +105,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/devicememoryinjection.class.php b/inc/devicememoryinjection.class.php index 21d0d927..a8823d05 100644 --- a/inc/devicememoryinjection.class.php +++ b/inc/devicememoryinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(13, 23)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [13, 23]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -80,7 +80,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array **/ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { $class = "Item_".get_parent_class($this); @@ -113,7 +113,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -127,7 +127,7 @@ function addOrUpdateObject($values=array(), $options=array()) { **/ function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if (!isset($values['size_default'])) { if (isset($values[get_parent_class($this)]['size'])) { $fields['size_default'] = $values[get_parent_class($this)]['size']; diff --git a/inc/devicememorytypeinjection.class.php b/inc/devicememorytypeinjection.class.php index bb3f0b93..97d239c7 100644 --- a/inc/devicememorytypeinjection.class.php +++ b/inc/devicememorytypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/devicemotherboardinjection.class.php b/inc/devicemotherboardinjection.class.php index 163366ac..9873bbbd 100644 --- a/inc/devicemotherboardinjection.class.php +++ b/inc/devicemotherboardinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(23)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [23]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -80,7 +80,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array */ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { $class = "Item_".get_parent_class($this); @@ -105,7 +105,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/devicenetworkcardinjection.class.php b/inc/devicenetworkcardinjection.class.php index f4811b8b..1e17cc66 100644 --- a/inc/devicenetworkcardinjection.class.php +++ b/inc/devicenetworkcardinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() */ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(23)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [23]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -80,7 +80,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array */ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { $class = "Item_".get_parent_class($this); @@ -105,7 +105,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/deviceprocessorinjection.class.php b/inc/deviceprocessorinjection.class.php index 4e6616ab..98b4a591 100644 --- a/inc/deviceprocessorinjection.class.php +++ b/inc/deviceprocessorinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array("Computer"); + return ["Computer"]; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "dropdown" => array(23)); + $options['displaytype'] = ["multiline_text" => [16], + "dropdown" => [23]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -80,7 +80,7 @@ function getOptions($primary_type='') { * @param $add (true by default) * @param $rights array **/ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['Computer']['id'])) { $class = "Item_".get_parent_class($this); @@ -113,7 +113,7 @@ function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -127,7 +127,7 @@ function addOrUpdateObject($values=array(), $options=array()) { **/ function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if (!isset($values['frequency_default'])) { if (isset($values[get_parent_class($this)]['frequency'])) { $fields['frequency_default'] = $values[get_parent_class($this)]['frequency']; diff --git a/inc/documentinjection.class.php b/inc/documentinjection.class.php index 218cf5a2..047c56e5 100644 --- a/inc/documentinjection.class.php +++ b/inc/documentinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { return Search::getOptions(get_parent_class($this)); } @@ -68,7 +68,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/documenttypeinjection.class.php b/inc/documenttypeinjection.class.php index 57279e78..cee1a205 100644 --- a/inc/documenttypeinjection.class.php +++ b/inc/documenttypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/domaininjection.class.php b/inc/domaininjection.class.php index 44471892..c4837dc0 100644 --- a/inc/domaininjection.class.php +++ b/inc/domaininjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/dropdown.class.php b/inc/dropdown.class.php index 5a1eb01a..fd4cac86 100644 --- a/inc/dropdown.class.php +++ b/inc/dropdown.class.php @@ -124,7 +124,7 @@ static function dropdownFileEncoding() { Dropdown::showFromArray( 'file_encoding', $values, - array('value' => PluginDatainjectionBackend::ENCODING_AUTO) + ['value' => PluginDatainjectionBackend::ENCODING_AUTO] ); } diff --git a/inc/engine.class.php b/inc/engine.class.php index bd2f790a..adaa7700 100644 --- a/inc/engine.class.php +++ b/inc/engine.class.php @@ -37,10 +37,10 @@ class PluginDatainjectionEngine private $entity; //Additional infos to be added - private $infos = array(); + private $infos = []; //Lines in error - private $error_lines = array(); + private $error_lines = []; /** @@ -48,7 +48,7 @@ class PluginDatainjectionEngine * @param $infos array * @param $entity (default 0) */ - function __construct($model, $infos=array(), $entity=0) { + function __construct($model, $infos = [], $entity = 0) { //Instanciate model $this->model = $model; @@ -71,8 +71,8 @@ function __construct($model, $infos=array(), $entity=0) { function injectLine($line, $index) { //Store all fields to injection, sorted by itemtype - $fields_toinject = array(); - $mandatory_fields = array(); + $fields_toinject = []; + $mandatory_fields = []; //Get the injectionclass associated to the itemtype $itemtype = $this->getModel()->getItemtype(); @@ -110,7 +110,7 @@ function injectLine($line, $index) { //--------------- Set all needed options ------------------// //Check options - $checks = array('ip' => true, + $checks = ['ip' => true, 'mac' => true, 'integer' => true, 'yes' => true, @@ -122,26 +122,26 @@ function injectLine($line, $index) { 'right_rw' => true, 'interface' => true, 'auth_method' => true, - 'port_unicity' => $this->getModel()->getPortUnicity()); + 'port_unicity' => $this->getModel()->getPortUnicity()]; //Rights options - $rights = array('add_dropdown' => $this->getModel()->getCanAddDropdown(), + $rights = ['add_dropdown' => $this->getModel()->getCanAddDropdown(), 'overwrite_notempty_fields' => $this->getModel()->getCanOverwriteIfNotEmpty(), 'can_add' => $this->model->getBehaviorAdd(), 'can_update' => $this->model->getBehaviorUpdate(), - 'can_delete' => false); + 'can_delete' => false]; //Field format options - $formats = array('date_format' => $this->getModel()->getDateFormat(), - 'float_format' => $this->getModel()->getFloatFormat()); + $formats = ['date_format' => $this->getModel()->getDateFormat(), + 'float_format' => $this->getModel()->getFloatFormat()]; //Check options : by default check all types - $options = array('checks' => $checks, + $options = ['checks' => $checks, 'entities_id' => $this->getEntity(), 'rights' => $rights, 'formats' => $formats, 'mandatory_fields' => $mandatory_fields, - 'optional_data' => $optional_data); + 'optional_data' => $optional_data]; //Will manage add or update $results = $injectionClass->addOrUpdateObject($fields_toinject, $options); @@ -163,7 +163,7 @@ function injectLine($line, $index) { * * @return nothing **/ - function addRequiredFields($itemtype, &$fields_toinject=array()) { + function addRequiredFields($itemtype, &$fields_toinject = []) { //Add entity to the primary type $fields_toinject[$itemtype]['entities_id'] = $this->entity; @@ -182,7 +182,7 @@ function addRequiredFields($itemtype, &$fields_toinject=array()) { * @return nothing **/ function addValueToInject(&$fields_toinject, $searchOptions, $mapping, $value, - $several = array() + $several = [] ) { // Option will be found only for "main" type. @@ -214,7 +214,7 @@ function addValueToInject(&$fields_toinject, $searchOptions, $mapping, $value, **/ function addAdditionalInformations() { - $additional_infos = array(); + $additional_infos = []; foreach ($this->model->getInfos() as $info) { if (isset($this->infos[$info->getValue()]) && PluginDatainjectionInfo::keepInfo($info, $this->infos[$info->getValue()]) diff --git a/inc/entityinjection.class.php b/inc/entityinjection.class.php index da3f8d2a..1cf391b1 100644 --- a/inc/entityinjection.class.php +++ b/inc/entityinjection.class.php @@ -52,25 +52,25 @@ function isPrimaryType() { function connectedTo() { - return array('Document'); + return ['Document']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(14, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 47, 48, 49,50, 51, 52, 53, 54, 55, 91, 92, 93); + $notimportable = [14, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 47, 48, 49,50, 51, 52, 53, 54, 55, 91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(3, 16, 17, 24), - "dropdown" => array(9)); + $options['displaytype'] = ["multiline_text" => [3, 16, 17, 24], + "dropdown" => [9]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -92,7 +92,7 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $add (true by default) * @param $rights array **/ - function customimport($input=array(), $add=true, $rights=array()) { + function customimport($input = [], $add = true, $rights = []) { if (!isset($input['completename']) || empty($input['completename'])) { return -1; diff --git a/inc/filesystemtypeinjection.class.php b/inc/filesystemtypeinjection.class.php index ae9f854a..adb4d985 100644 --- a/inc/filesystemtypeinjection.class.php +++ b/inc/filesystemtypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/group_userinjection.class.php b/inc/group_userinjection.class.php index db59b0fb..54c5cf24 100644 --- a/inc/group_userinjection.class.php +++ b/inc/group_userinjection.class.php @@ -37,7 +37,7 @@ class PluginDatainjectionGroup_UserInjection extends Group_User { - static function getTypeName($nb=0) { + static function getTypeName($nb = 0) { return sprintf(__('%1$s - %2$s'), __('Group'), __('User')); } @@ -58,15 +58,15 @@ function isPrimaryType() { function connectedTo() { - //return array(); - return array('Group'); + //return []; + return ['Group']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -78,11 +78,11 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(4); + $notimportable = [4]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("bool" => array(3, 6, 7), - "dropdown" => array(4)); + $options['displaytype'] = ["bool" => [3, 6, 7], + "dropdown" => [4]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -91,7 +91,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/groupinjection.class.php b/inc/groupinjection.class.php index f44c48c4..da10c78a 100644 --- a/inc/groupinjection.class.php +++ b/inc/groupinjection.class.php @@ -52,24 +52,24 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(14, 70, 71); + $notimportable = [14, 70, 71]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("bool" => array(11, 12, 13, 14 ,15, 17), - "multiline_text" => array(16)); + $options['displaytype'] = ["bool" => [11, 12, 13, 14 ,15, 17], + "multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -78,7 +78,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/info.class.php b/inc/info.class.php index 681bc1cd..5c43bf69 100644 --- a/inc/info.class.php +++ b/inc/info.class.php @@ -74,7 +74,7 @@ function getInfosType() { * @param $model PluginDatainjectionModel object * @param $canedit (false by default) **/ - static function showAddInfo(PluginDatainjectionModel $model, $canedit=false) { + static function showAddInfo(PluginDatainjectionModel $model, $canedit = false) { if ($canedit) { echo " $model->fields['itemtype']) + ['primary_type' + => $model->fields['itemtype']] ); echo ""; echo ""; @@ -159,8 +159,8 @@ static function showFormInfos(PluginDatainjectionModel $model) { echo ""; echo ""; @@ -175,7 +175,7 @@ static function showFormInfos(PluginDatainjectionModel $model) { echo ""; Html::openArrowMassives("info_form$rand", true); - Html::closeArrowMassives(array('delete' => __('Delete permanently'))); + Html::closeArrowMassives(['delete' => __('Delete permanently')]); } echo "
"; $rand = PluginDatainjectionInjectionType::dropdownLinkedTypes( $info, - array('primary_type' - => $model->fields['itemtype']) + ['primary_type' + => $model->fields['itemtype']] ); echo "
"; Html::closeForm(); @@ -187,7 +187,7 @@ static function showFormInfos(PluginDatainjectionModel $model) { * @param $models_id * @param $infos array **/ - static function manageInfos($models_id, $infos=array()) { + static function manageInfos($models_id, $infos = []) { global $DB; @@ -216,8 +216,8 @@ static function manageInfos($models_id, $infos=array()) { } $info->deleteByCriteria( - array('models_id' => $models_id, - 'value' => PluginDatainjectionInjectionType::NO_VALUE) + ['models_id' => $models_id, + 'value' => PluginDatainjectionInjectionType::NO_VALUE] ); } @@ -270,7 +270,7 @@ static function showAdditionalInformationsForm(PluginDatainjectionModel $model) $info, (isset($_SESSION['datainjection']['infos']) ? $_SESSION['datainjection']['infos'] - : array()) + : []) ); echo ""; } @@ -292,7 +292,7 @@ static function showAdditionalInformationsForm(PluginDatainjectionModel $model) * @param $info PluginDatainjectionInfo object * @param $values array */ - static function displayAdditionalInformation(PluginDatainjectionInfo $info, $values=array()) { + static function displayAdditionalInformation(PluginDatainjectionInfo $info, $values = []) { $injectionClass = PluginDatainjectionCommonInjectionLib::getInjectionClassInstance($info->fields['itemtype']); @@ -319,7 +319,7 @@ static function displayAdditionalInformation(PluginDatainjectionInfo $info, $val * @return nothing **/ static function showAdditionalInformation(PluginDatainjectionInfo $info, $option, - $injectionClass, $values = array()) { + $injectionClass, $values = []) { $name = "info[".$option['linkfield']."]"; @@ -347,8 +347,8 @@ static function showAdditionalInformation(PluginDatainjectionInfo $info, $option $value = 0; } Dropdown::show( - getItemTypeForTable($option['table']), array('name' => $name, - 'value' => $value) + getItemTypeForTable($option['table']), ['name' => $name, + 'value' => $value] ); break; @@ -364,13 +364,13 @@ static function showAdditionalInformation(PluginDatainjectionInfo $info, $option $value = 0; } User::dropdown( - array('name' => $name, - 'value' => $value) + ['name' => $name, + 'value' => $value] ); break; case 'date' : - Html::showDateField($name, array('value' => $value)); + Html::showDateField($name, ['value' => $value]); break; case 'multiline_text' : @@ -381,14 +381,14 @@ static function showAdditionalInformation(PluginDatainjectionInfo $info, $option $minvalue = (isset($option['minvalue'])?$option['minvalue']:0); $maxvalue = (isset($option['maxvalue'])?$option['maxvalue']:0); $step = (isset($option['step'])?$option['step']:1); - $default = (isset($option['-1'])?array(-1 => $option['-1']):array()); + $default = (isset($option['-1'])?[-1 => $option['-1']]:[]); Dropdown::showNumber( - $name, array('value' => $value, + $name, ['value' => $value, 'min' => $minvalue, 'max' => $maxvalue, 'step' => $step, - 'toadd' => $default) + 'toadd' => $default] ); break; @@ -457,7 +457,7 @@ static function dropdownTemplates($name, $table) { global $DB; - $values = array(0 => Dropdown::EMPTY_VALUE); + $values = [0 => Dropdown::EMPTY_VALUE]; $sql = "SELECT `id`, `template_name` FROM `".$table."` diff --git a/inc/infocollection.class.php b/inc/infocollection.class.php index a6954304..d87ecbb2 100644 --- a/inc/infocollection.class.php +++ b/inc/infocollection.class.php @@ -36,7 +36,7 @@ class PluginDatainjectionInfoCollection function __construct() { - $this->infosCollection = array(); + $this->infosCollection = []; } diff --git a/inc/infocominjection.class.php b/inc/infocominjection.class.php index ef3ab205..96a04d86 100644 --- a/inc/infocominjection.class.php +++ b/inc/infocominjection.class.php @@ -61,7 +61,7 @@ function connectedTo() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -102,20 +102,20 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(20, 21, 86); + $notimportable = [20, 21, 86]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); $key = array_search(19, $options['ignore_fields']); unset($options['ignore_fields'][$key]); - $options['displaytype'] = array("date" => array(4, 5, 23, 24, 25, 27, 28, 159), - "dropdown" => array(6, 9, 19, 123), - "dropdown_integer" => array(6, 14), - "decimal" => array(8, 13, 17), - "sink_type" => array(15), - "alert" => array(22), - "multiline_text" => array(16)); + $options['displaytype'] = ["date" => [4, 5, 23, 24, 25, 27, 28, 159], + "dropdown" => [6, 9, 19, 123], + "dropdown_integer" => [6, 14], + "decimal" => [8, 13, 17], + "sink_type" => [15], + "alert" => [22], + "multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -125,7 +125,7 @@ function getOptions($primary_type='') { * @param $info array * @param $option array **/ - function showAdditionalInformation($info=[], $option=[]) { + function showAdditionalInformation($info = [], $option = []) { $name = "info[".$option['linkfield']."]"; @@ -135,7 +135,7 @@ function showAdditionalInformation($info=[], $option=[]) { break; case 'alert' : - Infocom::dropdownAlert(array('name' => $name)); + Infocom::dropdownAlert(['name' => $name]); break; default: @@ -147,10 +147,10 @@ function showAdditionalInformation($info=[], $option=[]) { /** * @param $values array **/ - function reformat(&$values=[]) { + function reformat(&$values = []) { - foreach (array('order_date', 'use_date', 'buy_date', 'warranty_date', 'delivery_date', - 'inventory_date') as $date) { + foreach (['order_date', 'use_date', 'buy_date', 'warranty_date', 'delivery_date', + 'inventory_date'] as $date) { if (isset($values['Infocom'][$date]) && ($values['Infocom'][$date] == PluginDatainjectionCommonInjectionLib::EMPTY_VALUE) @@ -164,7 +164,7 @@ function reformat(&$values=[]) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=[], $options=[]) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/injectioninterface.class.php b/inc/injectioninterface.class.php index d72bcef5..e8ef4bc7 100644 --- a/inc/injectioninterface.class.php +++ b/inc/injectioninterface.class.php @@ -62,7 +62,7 @@ function connectedTo(); * * @return an array of search options, as defined in each commondbtm object **/ - function getOptions($primary_type=''); + function getOptions($primary_type = ''); /** @@ -72,7 +72,7 @@ function getOptions($primary_type=''); * * This method is optionnal ! Implement it if the itemtype to display special information **/ - //function showAdditionalInformation($info=array()); + //function showAdditionalInformation($info=[]); /** @@ -84,7 +84,7 @@ function getOptions($primary_type=''); * @return an array of IDs of newly created objects: * for example array(Computer=>1, Networkport=>10) **/ - function addOrUpdateObject($values=array(), $options=array()); + function addOrUpdateObject($values = [], $options = []); @@ -107,7 +107,7 @@ function addOrUpdateObject($values=array(), $options=array()); * * @param $values array **/ - //function reformat(&$values=array()); + //function reformat(&$values=[]); /** @@ -118,7 +118,7 @@ function addOrUpdateObject($values=array(), $options=array()); * * @return nothing **/ - //function checkPresent($fields_toinject=array(), $options=array()); + //function checkPresent($fields_toinject=[], $options=[]); /** diff --git a/inc/injectiontype.class.php b/inc/injectiontype.class.php index e68bae31..90066439 100644 --- a/inc/injectiontype.class.php +++ b/inc/injectiontype.class.php @@ -40,14 +40,14 @@ class PluginDatainjectionInjectionType { * * @return an array which contains array(itemtype => itemtype name) **/ - static function getItemtypes($only_primary=false) { + static function getItemtypes($only_primary = false) { global $INJECTABLE_TYPES; getTypesToInject(); $plugin = new Plugin(); - $values = array(); + $values = []; foreach ($INJECTABLE_TYPES as $type => $from) { $injectionclass = new $type(); @@ -66,7 +66,7 @@ static function getItemtypes($only_primary=false) { $plugin->getFromDBbyDir($from); $name = $plugin->getName().': '; } - $name.= call_user_func(array($type, 'getTypeName')); + $name.= call_user_func([$type, 'getTypeName']); $values[$typename] = $name; } } @@ -83,11 +83,11 @@ static function getItemtypes($only_primary=false) { * * @return nothing **/ - static function dropdown($value='', $only_primary=false) { + static function dropdown($value = '', $only_primary = false) { return Dropdown::showFromArray( 'itemtype', self::getItemtypes($only_primary), - array('value' => $value) + ['value' => $value] ); } @@ -98,7 +98,7 @@ static function dropdown($value='', $only_primary=false) { * @param $mapping_or_info * @param $options array **/ - static function dropdownLinkedTypes($mapping_or_info, $options=array()) { + static function dropdownLinkedTypes($mapping_or_info, $options = []) { global $INJECTABLE_TYPES, $CFG_GLPI; @@ -118,7 +118,7 @@ static function dropdownLinkedTypes($mapping_or_info, $options=array()) { } $mappings_id = $mapping_or_info->fields['id']; - $values = array(); + $values = []; if (($p['itemtype'] == self::NO_VALUE) && ($mapping_or_info->fields['itemtype'] != self::NO_VALUE) @@ -139,14 +139,14 @@ static function dropdownLinkedTypes($mapping_or_info, $options=array()) { $connected_to = $injectionClass->connectedTo(); if (in_array($p['primary_type'], $connected_to)) { $typename = getItemTypeForTable($injectionClass->getTable()); - $values[$typename] = call_user_func(array($type, 'getTypeName')); + $values[$typename] = call_user_func([$type, 'getTypeName']); } } asort($values); $rand = Dropdown::showFromArray( "data[".$mappings_id."][itemtype]", - $values, array('value' => $p['itemtype']) + $values, ['value' => $p['itemtype']] ); $p['itemtype'] = '__VALUE__'; @@ -163,14 +163,14 @@ static function dropdownLinkedTypes($mapping_or_info, $options=array()) { /** * @param $options array **/ - static function dropdownFields($options = array()) { + static function dropdownFields($options = []) { global $CFG_GLPI; - $used = array(); + $used = []; $p['itemtype'] = self::NO_VALUE; $p['primary_type'] = ''; - $p['mapping_or_info'] = array(); + $p['mapping_or_info'] = []; $p['called_by'] = ''; $p['need_decode'] = true; $p['fields_update'] = true; @@ -188,7 +188,7 @@ static function dropdownFields($options = array()) { $mapping_or_info = $options['mapping_or_info']; } - $fields = array(); + $fields = []; $fields[self::NO_VALUE] = __('-------Choose a field-------', 'datainjection'); //By default field has no default value @@ -226,8 +226,8 @@ static function dropdownFields($options = array()) { $rand = Dropdown::showFromArray( "data[".$mapping_or_info['id']."][value]", $fields, - array('value' => $mapping_value, - 'used' => $used) + ['value' => $mapping_value, + 'used' => $used] ); $url = $CFG_GLPI["root_doc"]."/plugins/datainjection/ajax/dropdownMandatory.php"; @@ -276,7 +276,7 @@ static function isEqual($option, $mapping) { * @param $name * @param $option array **/ - static function testBasicEqual($name, $option=array()) { + static function testBasicEqual($name, $option = []) { //Basic tests if ((strtolower($option['field']) == $name) @@ -292,7 +292,7 @@ static function testBasicEqual($name, $option=array()) { /** * @param $options array **/ - static function showMandatoryCheckbox($options=array()) { + static function showMandatoryCheckbox($options = []) { // Received data has been slashed. $options = Toolbox::stripslashes_deep($options); @@ -324,13 +324,13 @@ static function showMandatoryCheckbox($options=array()) { /** * @param $options array **/ - static function getUsedMappingsOrInfos($options=array()) { + static function getUsedMappingsOrInfos($options = []) { global $DB; $p['itemtype'] = self::NO_VALUE; $p['primary_type'] = ''; - $p['mapping_or_info'] = array(); + $p['mapping_or_info'] = []; $p['called_by'] = ''; $p['need_decode'] = true; @@ -347,7 +347,7 @@ static function getUsedMappingsOrInfos($options=array()) { $mapping_or_info = $options['mapping_or_info']; } - $used = array(); + $used = []; $table = (($p['called_by'] == 'PluginDatainjectionMapping') ?"glpi_plugin_datainjection_mappings" :"glpi_plugin_datainjection_infos"); diff --git a/inc/interfacetypeinjection.class.php b/inc/interfacetypeinjection.class.php index bce112e6..88c81222 100644 --- a/inc/interfacetypeinjection.class.php +++ b/inc/interfacetypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); $ //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -83,7 +83,7 @@ function getOptions($primary_type='') { * @return an array of IDs of newly created objects: * for example array(Computer=>1, Networkport=>10) **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/item_operatingsysteminjection.class.php b/inc/item_operatingsysteminjection.class.php index d86e627a..9f6b1abe 100644 --- a/inc/item_operatingsysteminjection.class.php +++ b/inc/item_operatingsysteminjection.class.php @@ -51,9 +51,9 @@ function isPrimaryType() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { - $tab = Item_OperatingSystem::getSearchOptionsToAddNew(get_parent_class($this)); + $tab = Item_OperatingSystem::rawSearchOptionsToAdd(get_parent_class($this)); $searchoptions = []; foreach ($tab as $option) { if (is_numeric($option['id'])) { @@ -78,14 +78,14 @@ function getOptions($primary_type='') { function connectedTo() { - return array('Computer', 'NetworkEquipment'); + return ['Computer', 'NetworkEquipment']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/itilcategoryinjection.class.php b/inc/itilcategoryinjection.class.php index 29726c72..93b2c26f 100644 --- a/inc/itilcategoryinjection.class.php +++ b/inc/itilcategoryinjection.class.php @@ -52,27 +52,27 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(14, 98, 77, 78); + $notimportable = [14, 98, 77, 78]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(71, 72, 73), - "bool" => array(3, 74, 75, 76, 86), - "user" => array(70), - "multiline_text" => array(16)); + $options['displaytype'] = ["dropdown" => [71, 72, 73], + "bool" => [3, 74, 75, 76, 86], + "user" => [70], + "multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -81,7 +81,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/knowbaseitemcategoryinjection.class.php b/inc/knowbaseitemcategoryinjection.class.php index 43a4ff1f..bbdf9c3a 100644 --- a/inc/knowbaseitemcategoryinjection.class.php +++ b/inc/knowbaseitemcategoryinjection.class.php @@ -51,23 +51,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(14); + $notimportable = [14]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -76,7 +76,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/knowbaseiteminjection.class.php b/inc/knowbaseiteminjection.class.php index acd03aad..0575ca4f 100644 --- a/inc/knowbaseiteminjection.class.php +++ b/inc/knowbaseiteminjection.class.php @@ -53,14 +53,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -68,15 +68,15 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(4), - "date" => array(5), - "multiline_text" => array(6,7), - "bool" => array(8, 9, 86), - "user" => array(70)); + $options['displaytype'] = ["dropdown" => [4], + "date" => [5], + "multiline_text" => [6,7], + "bool" => [8, 9, 86], + "user" => [70]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -85,7 +85,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/locationinjection.class.php b/inc/locationinjection.class.php index 343c5893..2aa172bd 100644 --- a/inc/locationinjection.class.php +++ b/inc/locationinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() */ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(14); + $notimportable = [14]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/manufacturerinjection.class.php b/inc/manufacturerinjection.class.php index b92c4697..827e764f 100644 --- a/inc/manufacturerinjection.class.php +++ b/inc/manufacturerinjection.class.php @@ -53,7 +53,7 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } @@ -66,7 +66,7 @@ function getOptions($primary_type = '') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); @@ -77,7 +77,7 @@ function getOptions($primary_type = '') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/mapping.class.php b/inc/mapping.class.php index 50998c7c..79d0a258 100644 --- a/inc/mapping.class.php +++ b/inc/mapping.class.php @@ -37,7 +37,7 @@ class PluginDatainjectionMapping extends CommonDBTM * @param $field * @param $value **/ - function equal($field,$value) { + function equal($field, $value) { if (!isset($this->fields[$field])) { return false; @@ -99,7 +99,7 @@ static function showFormMappings(PluginDatainjectionModel $model) { if (isset($_SESSION['datainjection']['lines'])) { $lines = unserialize($_SESSION['datainjection']['lines']); } else { - $lines = array(); + $lines = []; } echo ""; @@ -134,7 +134,7 @@ static function showFormMappings(PluginDatainjectionModel $model) { echo ""; echo "".$mapping->fields['name'].""; echo ""; - $options = array('primary_type' => $model->fields['itemtype']); + $options = ['primary_type' => $model->fields['itemtype']]; PluginDatainjectionInjectionType::dropdownLinkedTypes($mapping, $options); echo ""; echo ""; @@ -164,7 +164,7 @@ static function getSeveralMappedField($models_id) { global $DB; - $several = array(); + $several = []; $query = "SELECT `value`, COUNT(*) AS counter FROM `glpi_plugin_datainjection_mappings` @@ -187,7 +187,7 @@ static function getMappingsSortedByRank($models_id) { global $DB; - $mappings = array(); + $mappings = []; $query = "SELECT `name` FROM `glpi_plugin_datainjection_mappings` WHERE `models_id` = '".$models_id."' diff --git a/inc/mappingcollection.class.php b/inc/mappingcollection.class.php index eddcd3d8..53a6edd6 100644 --- a/inc/mappingcollection.class.php +++ b/inc/mappingcollection.class.php @@ -35,7 +35,7 @@ class PluginDatainjectionMappingCollection function __construct() { - $this->mappingCollection = array(); + $this->mappingCollection = []; } @@ -55,7 +55,7 @@ function load($models_id) { WHERE `models_id` = '$models_id' ORDER BY `rank` ASC"; - $this->mappingCollection = array(); + $this->mappingCollection = []; foreach ($data = $DB->request($sql) as $data) { // Addslashes to conform to value return by PluginDatainjectionBackendcsv::parseLine @@ -145,7 +145,7 @@ function saveAllMappings() { function deleteMappingsFromDB($model_id) { $mapping = new PluginDatainjectionMapping(); - $mapping->deleteByCriteria(array('models_id' => $model_id)); + $mapping->deleteByCriteria(['models_id' => $model_id]); } @@ -183,7 +183,7 @@ static function checkMappings($models_id) { function getMandatoryMappings() { - $mandatories = array(); + $mandatories = []; foreach ($this->mappingCollection as $mapping) { if ($mapping->isMandatory()) { $mandatories[] = $mapping; diff --git a/inc/menu.class.php b/inc/menu.class.php index 3e310a36..99c35801 100644 --- a/inc/menu.class.php +++ b/inc/menu.class.php @@ -44,7 +44,7 @@ static function getMenuContent() { $injectionFormUrl = '/plugins/datainjection/front/clientinjection.form.php'; - $menu = array(); + $menu = []; $menu['title'] = self::getMenuName(); $menu['page'] = $injectionFormUrl; diff --git a/inc/model.class.php b/inc/model.class.php index 3808415f..9c5486c8 100644 --- a/inc/model.class.php +++ b/inc/model.class.php @@ -52,7 +52,7 @@ class PluginDatainjectionModel extends CommonDBTM public $injectionData = false; //Store field of type 'multline_text' several times mapped - public $severaltimes_mapped = array(); + public $severaltimes_mapped = []; //Private or public model const MODEL_PRIVATE = 1; @@ -70,7 +70,7 @@ class PluginDatainjectionModel extends CommonDBTM - static function getTypeName($nb=0) { + static function getTypeName($nb = 0) { return __('Model management', 'datainjection'); } @@ -246,7 +246,7 @@ function getSpecificModel() { /** * @param $options array **/ - static function dropdown($options=array()) { + static function dropdown($options = []) { global $CFG_GLPI; @@ -254,7 +254,7 @@ static function dropdown($options=array()) { Session::getLoginUserID(), 'name', $_SESSION['glpiactive_entity'], false ); - $p = array('models_id' => '__VALUE__'); + $p = ['models_id' => '__VALUE__']; if (isset($_SESSION['datainjection']['models_id'])) { $value = $_SESSION['datainjection']['models_id']; @@ -318,7 +318,7 @@ static function getModels($user_id, $order = "name", $entity = -1, $all = false) global $DB; - $models = array (); + $models = []; $query = "SELECT `id`, `name`, `is_private`, `entities_id`, `is_recursive`, `itemtype`, `step`, `comment` FROM `glpi_plugin_datainjection_models` "; @@ -351,99 +351,147 @@ static function getModels($user_id, $order = "name", $entity = -1, $all = false) //Standard functions - function getSearchOptions() { - - $tab = array(); - - $tab['common'] = self::getTypeName(); - - $tab[1]['table'] = $this->getTable(); - $tab[1]['field'] = 'name'; - $tab[1]['name'] = __('Name'); - $tab[1]['datatype'] = 'itemlink'; - $tab[1]['itemlink_type'] = $this->getType(); - - $tab[2]['table'] = $this->getTable(); - $tab[2]['field'] = 'id'; - $tab[2]['name'] = __('ID'); - - $tab[3]['table'] = $this->getTable(); - $tab[3]['field'] = 'behavior_add'; - $tab[3]['name'] = __('Allow lines creation', 'datainjection'); - $tab[3]['datatype'] = 'bool'; - $tab[3]['massiveaction'] = false; - - $tab[4]['table'] = $this->getTable(); - $tab[4]['field'] = 'behavior_update'; - $tab[4]['name'] = __('Allow lines update', 'datainjection'); - $tab[4]['datatype'] = 'bool'; - $tab[4]['massiveaction'] = false; - - $tab[5]['table'] = $this->getTable(); - $tab[5]['field'] = 'itemtype'; - $tab[5]['name'] = __('Type of data to import', 'datainjection'); - $tab[5]['datatype'] = 'itemtypename'; - $tab[5]['nosearch'] = true; - $tab[5]['massiveaction'] = false; - - $tab[6]['table'] = $this->getTable(); - $tab[6]['field'] = 'can_add_dropdown'; - $tab[6]['name'] = __('Allow creation of dropdowns', 'datainjection'); - $tab[6]['datatype'] = 'bool'; - - $tab[7]['table'] = $this->getTable(); - $tab[7]['field'] = 'date_format'; - $tab[7]['name'] = __('Dates format', 'datainjection'); - $tab[7]['datatype'] = 'specific'; - $tab[7]['searchtype'] = 'equals'; - - $tab[8]['table'] = $this->getTable(); - $tab[8]['field'] = 'float_format'; - $tab[8]['name'] = __('Float format', 'datainjection'); - $tab[8]['datatype'] = 'specific'; - $tab[8]['searchtype'] = 'equals'; - - $tab[9]['table'] = $this->getTable(); - $tab[9]['field'] = 'perform_network_connection'; - $tab[9]['name'] = __( - 'Try to establish network connection is possible', - 'datainjection' - ); - $tab[9]['datatype'] = 'bool'; - - $tab[10]['table'] = $this->getTable(); - $tab[10]['field'] = 'port_unicity'; - $tab[10]['name'] = __('Port unicity criteria', 'datainjection'); - $tab[10]['datatype'] = 'specific'; - $tab[10]['searchtype'] = 'equals'; - - $tab[11]['table'] = $this->getTable(); - $tab[11]['field'] = 'is_private'; - $tab[11]['name'] = __('Private'); - $tab[11]['datatype'] = 'bool'; - $tab[11]['massiveaction'] = false; - - $tab[12]['table'] = $this->getTable(); - $tab[12]['field'] = 'step'; - $tab[12]['name'] = __('Status'); - $tab[12]['massiveaction'] = false; - $tab[12]['datatype'] = 'specific'; - $tab[12]['searchtype'] = 'equals'; - - $tab[16]['table'] = $this->getTable(); - $tab[16]['field'] = 'comment'; - $tab[16]['name'] = __('Comments'); - $tab[16]['datatype'] = 'text'; - - $tab[80]['table'] = 'glpi_entities'; - $tab[80]['field'] = 'completename'; - $tab[80]['name'] = __('Entity'); - $tab[80]['datatype'] = 'dropdown'; - - $tab[86]['table'] = $this->getTable(); - $tab[86]['field'] = 'is_recursive'; - $tab[86]['name'] = __('Child entities'); - $tab[86]['datatype'] = 'bool'; + function rawSearchOptions() { + + $tab = []; + + $tab[] = [ + 'id' => 'common', + 'name' => self::getTypeName(), + ]; + + $tab[] = [ + 'id' => 1, + 'table' => $this->getTable(), + 'field' => 'name', + 'name' => __('Name'), + 'datatype' => 'itemlink', + 'itemlink_type' => $this->getType(), + ]; + + $tab[] = [ + 'id' => 2, + 'table' => $this->getTable(), + 'field' => 'id', + 'name' => __('ID'), + ]; + + $tab[] = [ + 'id' => 3, + 'table' => $this->getTable(), + 'field' => 'behavior_add', + 'name' => __('Allow lines creation', 'datainjection'), + 'datatype' => 'bool', + 'massiveaction' => false, + ]; + + $tab[] = [ + 'id' => 4, + 'table' => $this->getTable(), + 'field' => 'behavior_update', + 'name' => __('Allow lines update', 'datainjection'), + 'datatype' => 'bool', + 'massiveaction' => false, + ]; + + $tab[] = [ + 'id' => 5, + 'table' => $this->getTable(), + 'field' => 'itemtype', + 'name' => __('Type of data to import', 'datainjection'), + 'datatype' => 'itemtypename', + 'nosearch' => true, + 'massiveaction' => false, + ]; + + $tab[] = [ + 'id' => 6, + 'table' => $this->getTable(), + 'field' => 'can_add_dropdown', + 'name' => __('Allow creation of dropdowns', 'datainjection'), + 'datatype' => 'bool', + ]; + + $tab[] = [ + 'id' => 7, + 'table' => $this->getTable(), + 'field' => 'date_format', + 'name' => __('Dates format', 'datainjection'), + 'datatype' => 'specific', + 'searchtype' => 'equals', + ]; + + $tab[] = [ + 'id' => 8, + 'table' => $this->getTable(), + 'field' => 'float_format', + 'name' => __('Float format', 'datainjection'), + 'datatype' => 'specific', + 'searchtype' => 'equals', + ]; + + $tab[] = [ + 'id' => 9, + 'table' => $this->getTable(), + 'field' => 'perform_network_connection', + 'name' => __( + 'Try to establish network connection is possible', + 'datainjection' + ), + 'datatype' => 'bool', + ]; + + $tab[] = [ + 'id' => 10, + 'table' => $this->getTable(), + 'field' => 'port_unicity', + 'name' => __('Port unicity criteria', 'datainjection'), + 'datatype' => 'specific', + 'searchtype' => 'equals', + ]; + + $tab[] = [ + 'id' => 11, + 'table' => $this->getTable(), + 'field' => 'is_private', + 'name' => __('Private'), + 'datatype' => 'bool', + 'massiveaction' => false, + ]; + + $tab[] = [ + 'id' => 12, + 'table' => $this->getTable(), + 'field' => 'step', + 'name' => __('Status'), + 'datatype' => 'specific', + 'searchtype' => 'equals', + 'massiveaction' => false, + ]; + + $tab[] = [ + 'id' => 16, + 'table' => $this->getTable(), + 'field' => 'comment', + 'name' => __('Comments'), + 'datatype' => 'text', + ]; + + $tab[] = [ + 'id' => 80, + 'table' => 'glpi_entities', + 'field' => 'completename', + 'name' => __('Entity'), + 'datatype' => 'dropdown', + ]; + + $tab[] = [ + 'id' => 86, + 'table' => $this->getTable(), + 'field' => 'is_recursive', + 'name' => __('Child entities'), + 'datatype' => 'bool', + ]; return $tab; } @@ -456,10 +504,10 @@ function getSearchOptions() { * @param $values * @param $options array **/ - static function getSpecificValueToDisplay($field, $values, array $options=array()) { + static function getSpecificValueToDisplay($field, $values, array $options = []) { if (!is_array($values)) { - $values = array($field => $values); + $values = [$field => $values]; } switch ($field) { case "port_unicity" : @@ -486,10 +534,10 @@ static function getSpecificValueToDisplay($field, $values, array $options=array( * @param $values (defaut '') * @param $options array **/ - static function getSpecificValueToSelect($field, $name='', $values='', array $options=array()) { + static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = []) { if (!is_array($values)) { - $values = array($field => $values); + $values = [$field => $values]; } $options['display'] = false; switch ($field) { @@ -526,7 +574,7 @@ static function getSpecificValueToSelect($field, $name='', $values='', array $op } - function showForm($ID, $options = array()) { + function showForm($ID, $options = []) { if ($ID > 0) { $this->check($ID, READ); @@ -546,7 +594,7 @@ function showForm($ID, $options = array()) { } - function showAdvancedForm($ID, $options = array()) { + function showAdvancedForm($ID, $options = []) { if ($ID > 0) { $this->check($ID, READ); @@ -554,7 +602,7 @@ function showAdvancedForm($ID, $options = array()) { // Create item $this->check(-1, UPDATE); $this->getEmpty(); - echo Html::hidden('step', array('value' => 1)); + echo Html::hidden('step', ['value' => 1]); } echo ""; @@ -573,13 +621,31 @@ function showAdvancedForm($ID, $options = array()) { echo ""; echo ""; + $rand = mt_rand(); echo ""; - echo ""; - Dropdown::showPrivatePublicSwitch( - $this->fields["is_private"], $this->fields["entities_id"], - $this->fields["is_recursive"] + echo ""; + echo ""; + Dropdown::showFromArray( + 'is_private', [ + 1 => __('Private'), + 0 => __('Public') + ], [ + 'value' => $this->fields['is_private'], + 'rand' => $rand + ] ); - echo ""; + echo ""; + echo ""; + echo ""; + echo "".__('Entity').""; + echo ""; + Entity::dropdown(['value' => $this->fields["entities_id"]]); + echo ""; + echo "". __('Child entities').""; + echo ""; + Dropdown::showYesNo('is_recursive', $this->fields["is_recursive"]); + echo ""; + echo ""; echo ""; echo "".__('Comments').""; @@ -620,7 +686,7 @@ function showAdvancedForm($ID, $options = array()) { echo ""; Dropdown::showFromArray( 'date_format', PluginDatainjectionDropdown::dateFormats(), - array('value' => $this->fields['date_format']) + ['value' => $this->fields['date_format']] ); echo ""; @@ -633,7 +699,7 @@ function showAdvancedForm($ID, $options = array()) { echo ""; Dropdown::showFromArray( 'float_format', PluginDatainjectionDropdown::floatFormats(), - array('value' => $this->fields['float_format']) + ['value' => $this->fields['float_format']] ); echo ""; @@ -646,7 +712,7 @@ function showAdvancedForm($ID, $options = array()) { echo ""; Dropdown::showFromArray( 'port_unicity', PluginDatainjectionDropdown::portUnicityValues(), - array('value' => $this->fields['port_unicity']) + ['value' => $this->fields['port_unicity']] ); echo ""; @@ -680,9 +746,9 @@ function showValidationForm() { //Tabs management - function defineTabs($options = array()) { + function defineTabs($options = []) { - $tabs = array(); + $tabs = []; $this->addStandardTab(__CLASS__, $tabs, $options); $this->addStandardTab('Log', $tabs, $options); return $tabs; @@ -690,7 +756,7 @@ function defineTabs($options = array()) { //Tabs management - function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { + function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { $canedit = Session::haveRight('plugin_datainjection_model', UPDATE); @@ -721,7 +787,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { } - static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { + static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == __CLASS__) { switch ($tabnum) { @@ -760,12 +826,12 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtempl function cleanDBonPurge() { - $itemtypes = array("PluginDatainjectionModelcsv", "PluginDatainjectionMapping", - "PluginDatainjectionInfo"); + $itemtypes = ["PluginDatainjectionModelcsv", "PluginDatainjectionMapping", + "PluginDatainjectionInfo"]; foreach ($itemtypes as $itemtype) { $item = new $itemtype(); - $item->deleteByCriteria(array("models_id" => $this->getID())); + $item->deleteByCriteria(["models_id" => $this->getID()]); } } @@ -775,7 +841,7 @@ function cleanDBonPurge() { * * @param $crit array of criteria (ex array('itemtype'=>'PluginAppliancesAppliance')) **/ - static function clean($crit=array()) { + static function clean($crit = []) { global $DB; @@ -828,10 +894,6 @@ function prepareInputForAdd($input) { return false; } - if (isset($input['is_private']) && ($input['is_private'] == 1)) { - $input['entities_id'] = $_SESSION['glpiactive_entity']; - $input['is_recursive'] = 1; - } $input['step'] = self::FILE_STEP; return $input; @@ -841,9 +903,6 @@ function prepareInputForAdd($input) { function prepareInputForUpdate($input) { if (isset($input['is_private']) && ($input['is_private'] == 1)) { - $input['entities_id'] = $_SESSION['glpiactive_entity']; - $input['is_recursive'] = 1; - if (isset($input['users_id']) && ($input['users_id'] != $this->fields['users_id'])) { Session::addMessageAfterRedirect( __( @@ -887,7 +946,7 @@ static function getInstanceByModelID($models_id) { /** * @param $options array **/ - function readUploadedFile($options=array()) { + function readUploadedFile($options = []) { $file_encoding = (isset($options['file_encoding']) ?$options['file_encoding'] :PluginDatainjectionBackend::ENCODING_AUTO); @@ -908,11 +967,11 @@ function readUploadedFile($options=array()) { $unique_filename = tempnam(realpath(PLUGIN_DATAINJECTION_UPLOAD_DIR), "PWS"); if (!move_uploaded_file($temporary_uploaded_filename, $unique_filename)) { - return array('status' => PluginDatainjectionCommonInjectionLib::FAILED, + return ['status' => PluginDatainjectionCommonInjectionLib::FAILED, 'message' => sprintf( __('Impossible to copy the file in %s', 'datainjection'), realpath(PLUGIN_DATAINJECTION_UPLOAD_DIR) - )); + )]; } } @@ -924,8 +983,8 @@ function readUploadedFile($options=array()) { Session::addMessageAfterRedirect($message, true, ERROR, false); } //unlink($temporary_uniquefilename); - return array('status' => ERROR, - 'message' => $message); + return ['status' => ERROR, + 'message' => $message]; } else { //Initialise a new backend @@ -978,7 +1037,7 @@ function loadSpecificModel() { * * @return boolean **/ - function processUploadedFile($options=array()) { + function processUploadedFile($options = []) { $file_encoding = (isset($options['file_encoding']) ?$options['file_encoding'] :PluginDatainjectionBackend::ENCODING_AUTO); @@ -1094,23 +1153,23 @@ function isFileCorrect() { count($header) ); - return array('status' => PluginDatainjectionCommonInjectionLib::FAILED, + return ['status' => PluginDatainjectionCommonInjectionLib::FAILED, 'field_in_error' => false, - 'error_message' => $error_message); + 'error_message' => $error_message]; } //If no header in the CSV file, exit method if (!$this->specific_model->isHeaderPresent()) { - return array('status' => PluginDatainjectionCommonInjectionLib::SUCCESS, + return ['status' => PluginDatainjectionCommonInjectionLib::SUCCESS, 'field_in_error' => false, - 'error_message' => ''); + 'error_message' => '']; } - $error = array('status' => PluginDatainjectionCommonInjectionLib::SUCCESS, - 'field_in_error' => false, - 'error_message' => ''); + $error = ['status' => PluginDatainjectionCommonInjectionLib::SUCCESS, + 'field_in_error' => false, + 'error_message' => '']; - //Check each mapping to be sure it has exactly the same name + //Check each mapping to be sure it has exactly the same name foreach ($this->getMappings() as $key => $mapping) { if (!isset($header[$key])) { $error['status'] = PluginDatainjectionCommonInjectionLib::FAILED; @@ -1120,8 +1179,8 @@ function isFileCorrect() { //If name of the mapping is not equal in the csv file header and in the DB $name_from_file = trim( mb_strtoupper( - stripslashes($header[$mapping->getRank()]), - 'UTF-8' + stripslashes($header[$mapping->getRank()]), + 'UTF-8' ) ); $name_from_db = trim(mb_strtoupper(stripslashes($mapping->getName()), 'UTF-8')); @@ -1135,9 +1194,9 @@ function isFileCorrect() { $error['field_in_error'] = false; $error['error_message'] .= "
".sprintf( - __('%1$s: %2$s'), - __('Into the file', 'datainjection'), - $name_from_file + __('%1$s: %2$s'), + __('Into the file', 'datainjection'), + $name_from_file )."\n"; $error['error_message'] .=sprintf( __('%1$s: %2$s'), @@ -1147,7 +1206,7 @@ function isFileCorrect() { } } } - return $error; + return $error; } @@ -1241,7 +1300,7 @@ static function cleanSessionVariables() { //Reset parameters stored in session PluginDatainjectionSession::removeParams(); - PluginDatainjectionSession::setParam('infos', array()); + PluginDatainjectionSession::setParam('infos', []); } @@ -1297,13 +1356,13 @@ static function prepareLogResults($models_id) { true ) ); - $todisplay = array(); + $todisplay = []; $model = new self(); $model->getFromDB($models_id); if (!empty($results)) { foreach ($results as $result) { - $tmp = array('line' => $result['line'], + $tmp = ['line' => $result['line'], 'status' => $result['status'], 'check_sumnary' => PluginDatainjectionCommonInjectionLib::getLogLabel(PluginDatainjectionCommonInjectionLib::SUCCESS), 'check_message' => PluginDatainjectionCommonInjectionLib::getLogLabel(PluginDatainjectionCommonInjectionLib::SUCCESS), @@ -1311,7 +1370,7 @@ static function prepareLogResults($models_id) { 'status_message' => PluginDatainjectionCommonInjectionLib::getLogLabel($result['status']), 'itemtype' => $model->fields['itemtype'], 'url' => '', - 'item' => ''); + 'item' => '']; if (isset($result[PluginDatainjectionCommonInjectionLib::ACTION_CHECK])) { $check_infos = $result[PluginDatainjectionCommonInjectionLib::ACTION_CHECK]; @@ -1509,7 +1568,7 @@ static function exportAsPDF($models_id) { function cleanData() { - $this->injectionData = array(); + $this->injectionData = []; } } diff --git a/inc/modelcsv.class.php b/inc/modelcsv.class.php index 364330bb..78619a47 100644 --- a/inc/modelcsv.class.php +++ b/inc/modelcsv.class.php @@ -152,7 +152,7 @@ function getFromDBByModelID($models_id) { * @param $model PluginDatainjectionModel object * @param $options array **/ - function showAdditionnalForm(PluginDatainjectionModel $model, $options=array()) { + function showAdditionnalForm(PluginDatainjectionModel $model, $options = []) { $id = $this->getFromDBByModelID($model->fields['id']); $canedit = $this->can($id, UPDATE); diff --git a/inc/monitorinjection.class.php b/inc/monitorinjection.class.php index 6aa650a2..c9940762 100644 --- a/inc/monitorinjection.class.php +++ b/inc/monitorinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array('Computer', 'Document'); + return ['Computer', 'Document']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -68,15 +68,15 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(91, 92, 93); + $notimportable = [91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 23, 31, 40, 49, 46, 71), - "user" => array(24, 70), - "float" => array(11), - "bool" => array(41, 42, 43, 44, 45, 46, 47, 48), - "multiline_text" => array(16, 90)); + $options['displaytype'] = ["dropdown" => [3, 4, 23, 31, 40, 49, 46, 71], + "user" => [24, 70], + "float" => [11], + "bool" => [41, 42, 43, 44, 45, 46, 47, 48], + "multiline_text" => [16, 90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -85,7 +85,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -97,9 +97,9 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $primary_type * @param $values **/ - function addSpecificNeededFields($primary_type,$values) { + function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if (isset($values[$primary_type]['is_global'])) { if (empty($values[$primary_type]['is_global'])) { $fields['is_global'] = 0; diff --git a/inc/monitormodelinjection.class.php b/inc/monitormodelinjection.class.php index 4854b774..cc40641d 100644 --- a/inc/monitormodelinjection.class.php +++ b/inc/monitormodelinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/monitortypeinjection.class.php b/inc/monitortypeinjection.class.php index 96d7632e..12902fc9 100644 --- a/inc/monitortypeinjection.class.php +++ b/inc/monitortypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/netpointinjection.class.php b/inc/netpointinjection.class.php index 6c64ec10..62b6c67a 100644 --- a/inc/netpointinjection.class.php +++ b/inc/netpointinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array('Computer', 'NetworkEquipment', 'Peripheral', 'Phone'); + return ['Computer', 'NetworkEquipment', 'Peripheral', 'Phone']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -68,12 +68,12 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(91, 92, 93); + $notimportable = [91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3), - "multiline_text" => array(16)); + $options['displaytype'] = ["dropdown" => [3], + "multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -82,7 +82,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/networkequipmentfirmwareinjection.class.php b/inc/networkequipmentfirmwareinjection.class.php index 2d7f96dd..86e5f919 100644 --- a/inc/networkequipmentfirmwareinjection.class.php +++ b/inc/networkequipmentfirmwareinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/networkequipmentinjection.class.php b/inc/networkequipmentinjection.class.php index 366e1ee0..2e3671d7 100644 --- a/inc/networkequipmentinjection.class.php +++ b/inc/networkequipmentinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -83,11 +83,11 @@ function getOptions($primary_type='') { $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 11, 23, 31, 32, 33, - 40, 49, 71), - "bool" => array(86), - "user" => array(24, 70), - "multiline_text" => array(16, 90)); + $options['displaytype'] = ["dropdown" => [3, 4, 11, 23, 31, 32, 33, + 40, 49, 71], + "bool" => [86], + "user" => [24, 70], + "multiline_text" => [16, 90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -96,7 +96,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -109,11 +109,11 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $add (true by default) * @param $rights array */ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { if (isset($values['NetworkEquipment']['nb_ports'])) { for ($i=1; $i<=$values['NetworkEquipment']['nb_ports']; $i++) { - $input = array(); + $input = []; $netport = new NetworkPort(); $add = ""; diff --git a/inc/networkequipmentmodelinjection.class.php b/inc/networkequipmentmodelinjection.class.php index f06eeb78..8868803d 100644 --- a/inc/networkequipmentmodelinjection.class.php +++ b/inc/networkequipmentmodelinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/networkequipmenttypeinjection.class.php b/inc/networkequipmenttypeinjection.class.php index 1202ef03..ac7bd176 100644 --- a/inc/networkequipmenttypeinjection.class.php +++ b/inc/networkequipmenttypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/networkinjection.class.php b/inc/networkinjection.class.php index 8f17d9b1..a6d7902e 100644 --- a/inc/networkinjection.class.php +++ b/inc/networkinjection.class.php @@ -51,23 +51,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -76,7 +76,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/networkinterfaceinjection.class.php b/inc/networkinterfaceinjection.class.php index f4221fba..3a13b197 100644 --- a/inc/networkinterfaceinjection.class.php +++ b/inc/networkinterfaceinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/networknameinjection.class.php b/inc/networknameinjection.class.php index 57eaf02c..d47b8315 100644 --- a/inc/networknameinjection.class.php +++ b/inc/networknameinjection.class.php @@ -60,16 +60,16 @@ function connectedTo() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(20, 21); + $notimportable = [20, 21]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(12)); + $options['displaytype'] = ["dropdown" => [12]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -78,7 +78,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -90,7 +90,7 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $primary_type * @param $values **/ - function addSpecificNeededFields($primary_type,$values) { + function addSpecificNeededFields($primary_type, $values) { $fields['items_id'] = $values['NetworkPort']['id']; $fields['itemtype'] = "NetworkPort"; @@ -104,7 +104,7 @@ function addSpecificNeededFields($primary_type,$values) { * @param $add (true by default) * @param $rights array */ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { global $DB; diff --git a/inc/networkport_vlaninjection.class.php b/inc/networkport_vlaninjection.class.php index e06d9b91..fd026f11 100644 --- a/inc/networkport_vlaninjection.class.php +++ b/inc/networkport_vlaninjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(4)); + $options['displaytype'] = ["dropdown" => [4]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -89,7 +89,7 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $primary_type * @param $values **/ - function addSpecificNeededFields($primary_type,$values) { + function addSpecificNeededFields($primary_type, $values) { $fields['networkports_id'] = $values['NetworkPort']['id']; return $fields; diff --git a/inc/networkportinjection.class.php b/inc/networkportinjection.class.php index 74a30bdd..f7db33a9 100644 --- a/inc/networkportinjection.class.php +++ b/inc/networkportinjection.class.php @@ -61,7 +61,7 @@ function connectedTo() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -105,13 +105,13 @@ function getOptions($primary_type='') { $tab[100]['storevaluein'] = $tab[100]['linkfield']; $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(20, 21); + $notimportable = [20, 21]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(9), - "multiline_text" => array(16), - "instantiation_type" => array(87)); + $options['displaytype'] = ["dropdown" => [9], + "multiline_text" => [16], + "instantiation_type" => [87]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -121,7 +121,7 @@ function getOptions($primary_type='') { * @param $primary_type * @param $values **/ - function addSpecificNeededFields($primary_type,$values) { + function addSpecificNeededFields($primary_type, $values) { if (isset($values[$primary_type]['instantiation_type'])) { $fields['instantiation_type'] = $values[$primary_type]['instantiation_type']; @@ -136,22 +136,22 @@ function addSpecificNeededFields($primary_type,$values) { * @param $info array * @param $option array **/ - function showAdditionalInformation($info=array(), $option=array()) { + function showAdditionalInformation($info = [], $option = []) { $name = "info[".$option['linkfield']."]"; switch ($option['displaytype']) { case 'instantiation_type' : - $instantiations = array(); + $instantiations = []; $class = get_parent_class($this); foreach ($class::getNetworkPortInstantiations() as $inst_type) { - if (call_user_func(array($inst_type, 'canCreate'))) { - $instantiations[$inst_type] = call_user_func(array($inst_type, 'getTypeName')); + if (call_user_func([$inst_type, 'canCreate'])) { + $instantiations[$inst_type] = call_user_func([$inst_type, 'getTypeName']); } } Dropdown::showFromArray( 'instantiation_type', $instantiations, - array('value' => 'NetworkPortEthernet') + ['value' => 'NetworkPortEthernet'] ); break; @@ -164,7 +164,7 @@ function showAdditionalInformation($info=array(), $option=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -176,7 +176,7 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $fields_toinject array * @param $options array **/ - function checkPresent($fields_toinject=array(), $options=array()) { + function checkPresent($fields_toinject = [], $options = []) { return $this->getUnicityRequest($fields_toinject['NetworkPort'], $options['checks']); } @@ -188,30 +188,30 @@ function checkPresent($fields_toinject=array(), $options=array()) { **/ function checkParameters($fields_toinject, $options) { - $fields_tocheck = array(); + $fields_tocheck = []; switch ($options['checks']['port_unicity']) { case PluginDatainjectionCommonInjectionLib::UNICITY_NETPORT_LOGICAL_NUMBER : - $fields_tocheck = array('logical_number'); + $fields_tocheck = ['logical_number']; break; case PluginDatainjectionCommonInjectionLib::UNICITY_NETPORT_LOGICAL_NUMBER_MAC : - $fields_tocheck = array('logical_number', 'mac'); + $fields_tocheck = ['logical_number', 'mac']; break; case PluginDatainjectionCommonInjectionLib::UNICITY_NETPORT_LOGICAL_NUMBER_NAME : - $fields_tocheck = array('logical_number', 'name'); + $fields_tocheck = ['logical_number', 'name']; break; case PluginDatainjectionCommonInjectionLib::UNICITY_NETPORT_LOGICAL_NUMBER_NAME_MAC : - $fields_tocheck = array('logical_number', 'mac', 'name'); + $fields_tocheck = ['logical_number', 'mac', 'name']; break; case PluginDatainjectionCommonInjectionLib::UNICITY_NETPORT_MACADDRESS : - $fields_tocheck = array('mac'); + $fields_tocheck = ['mac']; break; case PluginDatainjectionCommonInjectionLib::UNICITY_NETPORT_NAME : - $fields_tocheck = array('name'); + $fields_tocheck = ['name']; break; } @@ -236,7 +236,7 @@ function checkParameters($fields_toinject, $options) { * * @return the sql where clause **/ - function getUnicityRequest($fields_toinject=array(), $options=array()) { + function getUnicityRequest($fields_toinject = [], $options = []) { $where = ""; @@ -291,7 +291,7 @@ function getUnicityRequest($fields_toinject=array(), $options=array()) { * * @return true if check ok, false if not ok **/ - function lastCheck($values=array()) { + function lastCheck($values = []) { if ((!isset($values['NetworkPort']['name']) || empty($values['NetworkPort']['name'])) && (!isset($values['NetworkPort']['mac']) || empty($values['NetworkPort']['mac'])) @@ -309,7 +309,7 @@ function lastCheck($values=array()) { * @param $add (true by default) * @param $rights array **/ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { global $DB; diff --git a/inc/notepadinjection.class.php b/inc/notepadinjection.class.php index 3fd69cba..f522e251 100644 --- a/inc/notepadinjection.class.php +++ b/inc/notepadinjection.class.php @@ -36,7 +36,7 @@ class PluginDatainjectionNotepadInjection extends Notepad implements PluginDatainjectionInjectionInterface { - static function getTable($classname = NULL) { + static function getTable($classname = null) { $parenttype = get_parent_class(); return $parenttype::getTable(); @@ -49,7 +49,7 @@ function isPrimaryType() { function connectedTo() { - return array('Computer', 'NetworkEquipment', 'Printer'); + return ['Computer', 'NetworkEquipment', 'Printer']; } function customDataAlreadyInDB($injectionClass, $values, $options) { @@ -60,9 +60,9 @@ function customDataAlreadyInDB($injectionClass, $values, $options) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { - $tab = Notepad::getSearchOptionsToAddNew(); + $tab = Notepad::rawSearchOptionsToAdd(); $searchoptions = []; foreach ($tab as $option) { if (is_numeric($option['id'])) { @@ -89,7 +89,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/operatingsystemarchitectureinjection.class.php b/inc/operatingsystemarchitectureinjection.class.php index d145c7ee..9e0afbc3 100644 --- a/inc/operatingsystemarchitectureinjection.class.php +++ b/inc/operatingsystemarchitectureinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/operatingsystemeditioninjection.class.php b/inc/operatingsystemeditioninjection.class.php index 5e843b22..77e616f9 100644 --- a/inc/operatingsystemeditioninjection.class.php +++ b/inc/operatingsystemeditioninjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array('Computer'); + return ['Computer']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/operatingsysteminjection.class.php b/inc/operatingsysteminjection.class.php index 538c1c98..9655dc5d 100644 --- a/inc/operatingsysteminjection.class.php +++ b/inc/operatingsysteminjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/operatingsystemkernelinjection.class.php b/inc/operatingsystemkernelinjection.class.php index 7272a9be..470d861d 100644 --- a/inc/operatingsystemkernelinjection.class.php +++ b/inc/operatingsystemkernelinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/operatingsystemkernelversioninjection.class.php b/inc/operatingsystemkernelversioninjection.class.php index d4091145..518a8757 100644 --- a/inc/operatingsystemkernelversioninjection.class.php +++ b/inc/operatingsystemkernelversioninjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/operatingsystemservicepackinjection.class.php b/inc/operatingsystemservicepackinjection.class.php index 3c3ee66f..206c62a3 100644 --- a/inc/operatingsystemservicepackinjection.class.php +++ b/inc/operatingsystemservicepackinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/operatingsystemversioninjection.class.php b/inc/operatingsystemversioninjection.class.php index a81df4dc..160b8e02 100644 --- a/inc/operatingsystemversioninjection.class.php +++ b/inc/operatingsystemversioninjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/peripheralinjection.class.php b/inc/peripheralinjection.class.php index e2ec30d0..643aa145 100644 --- a/inc/peripheralinjection.class.php +++ b/inc/peripheralinjection.class.php @@ -51,14 +51,14 @@ function isPrimaryType() { function connectedTo() { - return array('Computer', 'Document'); + return ['Computer', 'Document']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -67,14 +67,14 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(91, 92, 93); + $notimportable = [91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 23, 31, 40, 49, 71), - "user" => array(24, 70), - "bool" => array(82), - "multiline_text" => array(16, 90)); + $options['displaytype'] = ["dropdown" => [3, 4, 23, 31, 40, 49, 71], + "user" => [24, 70], + "bool" => [82], + "multiline_text" => [16, 90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -83,7 +83,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -97,7 +97,7 @@ function addOrUpdateObject($values=array(), $options=array()) { **/ function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if (isset($values[$primary_type]['is_global'])) { if (empty($values[$primary_type]['is_global'])) { $fields['is_global'] = 0; diff --git a/inc/peripheralmodelinjection.class.php b/inc/peripheralmodelinjection.class.php index c4cf4541..222f1dc3 100644 --- a/inc/peripheralmodelinjection.class.php +++ b/inc/peripheralmodelinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/peripheraltypeinjection.class.php b/inc/peripheraltypeinjection.class.php index 965fe358..18787165 100644 --- a/inc/peripheraltypeinjection.class.php +++ b/inc/peripheraltypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/phoneinjection.class.php b/inc/phoneinjection.class.php index 250e0d03..8ec3f720 100644 --- a/inc/phoneinjection.class.php +++ b/inc/phoneinjection.class.php @@ -52,27 +52,27 @@ function isPrimaryType() { function connectedTo() { - return array('Computer', 'Document'); + return ['Computer', 'Document']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(91, 92, 93); + $notimportable = [91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 23, 31, 40, 42, 49, 71), - "user" => array(24, 70), - "bool" => array(43, 44, 82), - "multiline_text" => array(16, 90)); + $options['displaytype'] = ["dropdown" => [3, 4, 23, 31, 40, 42, 49, 71], + "user" => [24, 70], + "bool" => [43, 44, 82], + "multiline_text" => [16, 90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -81,7 +81,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -95,7 +95,7 @@ function addOrUpdateObject($values=array(), $options=array()) { **/ function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if (isset($values[$primary_type]['is_global'])) { if (empty($values[$primary_type]['is_global'])) { $fields['is_global'] = 0; diff --git a/inc/phonemodelinjection.class.php b/inc/phonemodelinjection.class.php index 08d4c8e3..4d076608 100644 --- a/inc/phonemodelinjection.class.php +++ b/inc/phonemodelinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/phonepowersupplytypeinjection.class.php b/inc/phonepowersupplytypeinjection.class.php index e46acabe..e5cd0e62 100644 --- a/inc/phonepowersupplytypeinjection.class.php +++ b/inc/phonepowersupplytypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/phonetypeinjection.class.php b/inc/phonetypeinjection.class.php index c6c77572..36cdc697 100644 --- a/inc/phonetypeinjection.class.php +++ b/inc/phonetypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/printerinjection.class.php b/inc/printerinjection.class.php index e5aec94c..574663dd 100644 --- a/inc/printerinjection.class.php +++ b/inc/printerinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array('Computer', 'Document'); + return ['Computer', 'Document']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -68,16 +68,16 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(91, 92, 93); + $notimportable = [91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 4, 23, 31, 32, 33, 40, 49, 71), - "bool" => array(42, 43, 44, 45, 46, 86), - "user" => array(24, 70), - "multiline_text" => array(16, 90)); + $options['displaytype'] = ["dropdown" => [3, 4, 23, 31, 32, 33, 40, 49, 71], + "bool" => [42, 43, 44, 45, 46, 86], + "user" => [24, 70], + "multiline_text" => [16, 90]]; - $options['checktype'] = array("bool" => array(42, 43, 44, 45, 46, 86)); + $options['checktype'] = ["bool" => [42, 43, 44, 45, 46, 86]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -86,7 +86,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -98,9 +98,9 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $primary_type * @param $values **/ - function addSpecificNeededFields($primary_type,$values) { + function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if (isset($values[$primary_type]['is_global'])) { if (empty($values[$primary_type]['is_global'])) { $fields['is_global'] = 0; @@ -119,9 +119,9 @@ function addSpecificNeededFields($primary_type,$values) { **/ function processDictionnariesIfNeeded(&$values) { - $matchings = array('name' => 'name', + $matchings = ['name' => 'name', 'manufacturer' => 'manufacturers_id', - 'comment' => 'comment'); + 'comment' => 'comment']; foreach ($matchings as $name => $value) { if (isset($values['Printer'][$value])) { $params[$name] = $values['Printer'][$value]; @@ -131,7 +131,7 @@ function processDictionnariesIfNeeded(&$values) { } $rulecollection = new RuleDictionnaryPrinterCollection(); - $res_rule = $rulecollection->processAllRules($params, array(), array()); + $res_rule = $rulecollection->processAllRules($params, [], []); if (!isset($res_rule['_no_rule_matches'])) { //Printers dictionnary explicitly refuse import diff --git a/inc/printermodelinjection.class.php b/inc/printermodelinjection.class.php index 6db83325..328d0c6d 100644 --- a/inc/printermodelinjection.class.php +++ b/inc/printermodelinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/printertypeinjection.class.php b/inc/printertypeinjection.class.php index efaf1e17..792f523e 100644 --- a/inc/printertypeinjection.class.php +++ b/inc/printertypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/profile.class.php b/inc/profile.class.php index 5576f315..ec409a68 100644 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -35,14 +35,14 @@ class PluginDatainjectionProfile extends Profile static function getAllRights() { - $rights = array( - array('itemtype' => 'PluginDatainjectionModel', + $rights = [ + ['itemtype' => 'PluginDatainjectionModel', 'label' => __('Model management', 'datainjection'), - 'field' => 'plugin_datainjection_model'), - array('itemtype' => 'PluginDatainjectionModel', + 'field' => 'plugin_datainjection_model'], + ['itemtype' => 'PluginDatainjectionModel', 'label' => __('Injection of the file', 'datainjection'), 'field' => 'plugin_datainjection_use', - 'rights' => array(READ => __('Read')))); + 'rights' => [READ => __('Read')]]]; return $rights; } @@ -60,7 +60,7 @@ function cleanProfiles($ID) { $DB->query($query); } - function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { + function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if ($item->getType() == 'Profile') { if ($item->getField('interface') == 'central') { @@ -72,7 +72,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { } - static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { + static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { if ($item->getType() == 'Profile') { $profile = new self(); @@ -80,7 +80,7 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtempl //In case there's no right datainjection for this profile, create it self::addDefaultProfileInfos( $item->getID(), - array('plugin_datainjection_model' => 0) + ['plugin_datainjection_model' => 0] ); $profile->showForm($ID); } @@ -118,8 +118,8 @@ static function createFirstAccess($profiles_id) { foreach (self::getAllRights() as $right) { self::addDefaultProfileInfos( $profiles_id, - array('plugin_datainjection_model' => ALLSTANDARDRIGHT, - 'plugin_datainjection_use' => READ) + ['plugin_datainjection_model' => ALLSTANDARDRIGHT, + 'plugin_datainjection_use' => READ] ); } } @@ -148,11 +148,11 @@ static function migrateProfiles() { $value = 0; break; } - self::addDefaultProfileInfos($id, array('plugin_datainjection_model' => $value)); + self::addDefaultProfileInfos($id, ['plugin_datainjection_model' => $value]); if ($value > 0) { - self::addDefaultProfileInfos($id, array('plugin_datainjection_use' => READ)); + self::addDefaultProfileInfos($id, ['plugin_datainjection_use' => READ]); } else { - self::addDefaultProfileInfos($id, array('plugin_datainjection_model' => 0)); + self::addDefaultProfileInfos($id, ['plugin_datainjection_model' => 0]); } } } @@ -166,10 +166,10 @@ static function migrateProfiles() { * * @return nothing **/ - function showForm($profiles_id=0, $openform=true, $closeform=true) { + function showForm($profiles_id = 0, $openform = true, $closeform = true) { echo "
"; - if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) + if (($canedit = Session::haveRightsOr(self::$rightname, [CREATE, UPDATE, PURGE])) && $openform ) { $profile = new Profile(); @@ -182,16 +182,16 @@ function showForm($profiles_id=0, $openform=true, $closeform=true) { $rights = self::getAllRights(); $profile->displayRightsChoiceMatrix( self::getAllRights(), - array('canedit' => $canedit, + ['canedit' => $canedit, 'default_class' => 'tab_bg_2', - 'title' => __('General')) + 'title' => __('General')] ); if ($canedit && $closeform ) { echo "
"; - echo Html::hidden('id', array('value' => $profiles_id)); - echo Html::submit(_sx('button', 'Save'), array('name' => 'update')); + echo Html::hidden('id', ['value' => $profiles_id]); + echo Html::submit(_sx('button', 'Save'), ['name' => 'update']); echo "
\n"; Html::closeForm(); } diff --git a/inc/profile_userinjection.class.php b/inc/profile_userinjection.class.php index 8d0ab792..3569d0f7 100644 --- a/inc/profile_userinjection.class.php +++ b/inc/profile_userinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -74,10 +74,10 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("bool" => array(86)); + $options['displaytype'] = ["bool" => [86]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -86,7 +86,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -98,7 +98,7 @@ function addOrUpdateObject($values=array(), $options=array()) { * @param $primary_type * @param $values **/ - function addSpecificNeededFields($primary_type,$values) { + function addSpecificNeededFields($primary_type, $values) { $fields['users_id'] = $values['User']['id']; return $fields; diff --git a/inc/profileinjection.class.php b/inc/profileinjection.class.php index 4d2e1538..735711cf 100644 --- a/inc/profileinjection.class.php +++ b/inc/profileinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { return Search::getOptions(get_parent_class($this)); } @@ -74,7 +74,7 @@ function checkType($field_name, $data, $mandatory) { switch ($field_name) { case 'right_rw' : - return (in_array($data, array('r', 'w')) + return (in_array($data, ['r', 'w']) ?PluginDatainjectionCommonInjectionLib::SUCCESS :PluginDatainjectionCommonInjectionLib::TYPE_MISMATCH); @@ -87,7 +87,7 @@ function checkType($field_name, $data, $mandatory) { :PluginDatainjectionCommonInjectionLib::TYPE_MISMATCH); case 'interface': - return (in_array($data, array('helpdesk', 'central')) + return (in_array($data, ['helpdesk', 'central']) ?PluginDatainjectionCommonInjectionLib::SUCCESS :PluginDatainjectionCommonInjectionLib::TYPE_MISMATCH); @@ -100,7 +100,7 @@ function checkType($field_name, $data, $mandatory) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/requesttypeinjection.class.php b/inc/requesttypeinjection.class.php index 87e6ad91..391a1a99 100644 --- a/inc/requesttypeinjection.class.php +++ b/inc/requesttypeinjection.class.php @@ -52,25 +52,25 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("bool" => array(14, 15), - "multiline_text" => array(16)); + $options['displaytype'] = ["bool" => [14, 15], + "multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/session.class.php b/inc/session.class.php index e8fd10e9..6da03f2a 100644 --- a/inc/session.class.php +++ b/inc/session.class.php @@ -43,7 +43,7 @@ static function getParam($param) { if (!isset($_SESSION['datainjection'][$param])) { return false; } - if (in_array($param, array('results', 'error_lines'))) { + if (in_array($param, ['results', 'error_lines'])) { $fic = $_SESSION['datainjection'][$param]; return file_get_contents(GLPI_DOC_DIR.'/_tmp/'.$fic); } @@ -59,9 +59,9 @@ static function getParam($param) { * * @return nothing **/ - static function setParam($param,$results) { + static function setParam($param, $results) { - if (in_array($param, array('results', 'error_lines'))) { + if (in_array($param, ['results', 'error_lines'])) { $fic = Session::getLoginUserID().'_'.$param.'_'.microtime(true); file_put_contents(GLPI_DOC_DIR.'/_tmp/'.$fic, $results); $_SESSION['datainjection'][$param] = $fic; diff --git a/inc/softwareinjection.class.php b/inc/softwareinjection.class.php index 1c1a6cd6..f12870b5 100644 --- a/inc/softwareinjection.class.php +++ b/inc/softwareinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -68,14 +68,14 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(4, 5, 31, 72, 91, 92, 93, 160, 161, 162, 163, 164, 165, 166, 170); + $notimportable = [4, 5, 31, 72, 91, 92, 93, 160, 161, 162, 163, 164, 165, 166, 170]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(3, 23, 49, 62, 71), - "bool" => array(61, 86), - "user" => array(24, 70), - "multiline_text" => array(16, 90)); + $options['displaytype'] = ["dropdown" => [3, 23, 49, 62, 71], + "bool" => [61, 86], + "user" => [24, 70], + "multiline_text" => [16, 90]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -96,7 +96,7 @@ function processDictionnariesIfNeeded(&$values) { $params['manufacturer'] = ''; } $rulecollection = new RuleDictionnarySoftwareCollection(); - $res_rule = $rulecollection->processAllRules($params, array(), array()); + $res_rule = $rulecollection->processAllRules($params, [], []); if (!isset($res_rule['_no_rule_matches'])) { //Software dictionnary explicitly refuse import @@ -125,7 +125,7 @@ function processDictionnariesIfNeeded(&$values) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/softwarelicenseinjection.class.php b/inc/softwarelicenseinjection.class.php index 875836d5..2cfb4477 100644 --- a/inc/softwarelicenseinjection.class.php +++ b/inc/softwarelicenseinjection.class.php @@ -53,14 +53,14 @@ function isPrimaryType() { function connectedTo() { - return array('Software'); + return ['Software']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -79,17 +79,17 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); $key = array_search(2, $options['ignore_fields']); unset($options['ignore_fields'][$key]); - $options['displaytype'] = array("dropdown" => array(5, 6, 7, 110), - "date" => array(8), - "multiline_text" => array(16), - "software" => array(100)); + $options['displaytype'] = ["dropdown" => [5, 6, 7, 110], + "date" => [8], + "multiline_text" => [16], + "software" => [100]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -99,24 +99,24 @@ function getOptions($primary_type='') { * @param $info array * @param $option array **/ - function showAdditionalInformation($info=array(), $option=array()) { + function showAdditionalInformation($info = [], $option = []) { $name = "info[".$option['linkfield']."]"; switch ($option['displaytype']) { case 'computer' : Computer::dropdown( - array('name' => $name, + ['name' => $name, 'entity' => $_SESSION['glpiactive_entity'], - 'entity_sons' => false) + 'entity_sons' => false] ); break; case 'software' : Software::dropdown( - array('name' => $name, + ['name' => $name, 'entity' => $_SESSION['glpiactive_entity'], - 'entity_sons' => false) + 'entity_sons' => false] ); break; @@ -129,7 +129,7 @@ function showAdditionalInformation($info=array(), $option=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -140,7 +140,7 @@ function addOrUpdateObject($values=array(), $options=array()) { /** * @param $fields_toinject array **/ - function getValueForAdditionalMandatoryFields($fields_toinject=array()) { + function getValueForAdditionalMandatoryFields($fields_toinject = []) { global $DB; @@ -178,7 +178,7 @@ function getValueForAdditionalMandatoryFields($fields_toinject=array()) { **/ function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if ($primary_type == 'Software') { $fields['softwares_id'] = $values[$primary_type]['id']; } @@ -190,7 +190,7 @@ function addSpecificNeededFields($primary_type, $values) { * @param $fields_toinject array * @param $options array **/ - function checkPresent($fields_toinject=array(), $options=array()) { + function checkPresent($fields_toinject = [], $options = []) { if ($options['itemtype'] != 'SoftwareLicense') { return (" AND `softwares_id` = '".$fields_toinject['Software']['id']."' diff --git a/inc/softwarelicensetypeinjection.class.php b/inc/softwarelicensetypeinjection.class.php index e6c2d164..6ab98ff0 100644 --- a/inc/softwarelicensetypeinjection.class.php +++ b/inc/softwarelicensetypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/softwareversioninjection.class.php b/inc/softwareversioninjection.class.php index 31ba05fa..583436c0 100644 --- a/inc/softwareversioninjection.class.php +++ b/inc/softwareversioninjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array('Software'); + return ['Software']; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -75,16 +75,16 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); $key = array_search(2, $options['ignore_fields']); unset($options['ignore_fields'][$key]); - $options['displaytype'] = array("dropdown" => array(4,31), - "multiline_text" => array(16), - "software" => array(100)); + $options['displaytype'] = ["dropdown" => [4,31], + "multiline_text" => [16], + "software" => [100]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -94,23 +94,23 @@ function getOptions($primary_type='') { * @param $info array * @param $option array **/ - function showAdditionalInformation($info=array(), $option=array()) { + function showAdditionalInformation($info = [], $option = []) { $name = "info[".$option['linkfield']."]"; switch ($option['displaytype']) { case 'computer' : Computer::dropdown( - array('name' => $name, + ['name' => $name, 'entity' => $_SESSION['glpiactive_entity'], - 'entity_sons' => false) + 'entity_sons' => false] ); break; case 'software' : Software::dropdown( - array('name' => $name, + ['name' => $name, 'entity' => $_SESSION['glpiactive_entity'], - 'entity_sons' => false) + 'entity_sons' => false] ); break; @@ -123,7 +123,7 @@ function showAdditionalInformation($info=array(), $option=array()) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -134,7 +134,7 @@ function addOrUpdateObject($values=array(), $options=array()) { /** * @param $fields_toinject array **/ - function getValueForAdditionalMandatoryFields($fields_toinject=array()) { + function getValueForAdditionalMandatoryFields($fields_toinject = []) { global $DB; @@ -172,7 +172,7 @@ function getValueForAdditionalMandatoryFields($fields_toinject=array()) { **/ function addSpecificNeededFields($primary_type, $values) { - $fields = array(); + $fields = []; if ($primary_type == 'Software') { $fields['softwares_id'] = $values[$primary_type]['id']; } @@ -184,7 +184,7 @@ function addSpecificNeededFields($primary_type, $values) { * @param $fields_toinject array * @param $options array **/ - function checkPresent($fields_toinject=array(), $options=array()) { + function checkPresent($fields_toinject = [], $options = []) { if ($options['itemtype'] != 'SoftwareVersion') { return (" AND `softwares_id` = '".$fields_toinject['Software']['id']."' diff --git a/inc/solutiontemplateinjection.class.php b/inc/solutiontemplateinjection.class.php index bff2ed8a..aa6beafa 100644 --- a/inc/solutiontemplateinjection.class.php +++ b/inc/solutiontemplateinjection.class.php @@ -52,25 +52,25 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(4, 16), - "dropdown" => array(3), - "bool" => array(86)); + $options['displaytype'] = ["multiline_text" => [4, 16], + "dropdown" => [3], + "bool" => [86]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/solutiontypeinjection.class.php b/inc/solutiontypeinjection.class.php index c8a52377..f58dc60d 100644 --- a/inc/solutiontypeinjection.class.php +++ b/inc/solutiontypeinjection.class.php @@ -52,7 +52,7 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } @@ -65,12 +65,12 @@ function getOptions($primary_type = '') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16), - "bool" => array(86)); + $options['displaytype'] = ["multiline_text" => [16], + "bool" => [86]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type = '') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/stateinjection.class.php b/inc/stateinjection.class.php index c9f194aa..befa765d 100644 --- a/inc/stateinjection.class.php +++ b/inc/stateinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(14); + $notimportable = [14]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/supplierinjection.class.php b/inc/supplierinjection.class.php index b12d9caf..a54454f0 100644 --- a/inc/supplierinjection.class.php +++ b/inc/supplierinjection.class.php @@ -52,26 +52,26 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(8, 29); + $notimportable = [8, 29]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("dropdown" => array(9), - "multiline_text" => array(3, 16, 90), - "bool" => array(86)); + $options['displaytype'] = ["dropdown" => [9], + "multiline_text" => [3, 16, 90], + "bool" => [86]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -80,7 +80,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/suppliertypeinjection.class.php b/inc/suppliertypeinjection.class.php index 59298434..bf1c13f5 100644 --- a/inc/suppliertypeinjection.class.php +++ b/inc/suppliertypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/taskcategoryinjection.class.php b/inc/taskcategoryinjection.class.php index 880f6e69..50e9d194 100644 --- a/inc/taskcategoryinjection.class.php +++ b/inc/taskcategoryinjection.class.php @@ -52,25 +52,25 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(14); + $notimportable = [14]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("bool" => array(86), - "multiline_text" => array(16)); + $options['displaytype'] = ["bool" => [86], + "multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +79,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/userinjection.class.php b/inc/userinjection.class.php index da566f5d..be1a6a24 100644 --- a/inc/userinjection.class.php +++ b/inc/userinjection.class.php @@ -52,14 +52,14 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); @@ -96,15 +96,15 @@ function getOptions($primary_type='') { //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(13, 14, 15, 17, 20, 23, 30, 31, 60, 61, 77, 91, 92, 93); + $notimportable = [13, 14, 15, 17, 20, 23, 30, 31, 60, 61, 77, 91, 92, 93]; $options['ignore_fields'] = array_merge($blacklist, $notimportable); //Add displaytype value - $options['displaytype'] = array("dropdown" => array(3, 79, 81, 82), - "multiline_text" => array(16), - "bool" => array(8), - "password" => array(4)); + $options['displaytype'] = ["dropdown" => [3, 79, 81, 82], + "multiline_text" => [16], + "bool" => [8], + "password" => [4]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -113,7 +113,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); @@ -141,7 +141,7 @@ function addSpecificNeededFields($primary_type, $values) { * @param $add (true by default) * @param $rights array */ - function processAfterInsertOrUpdate($values, $add=true, $rights=array()) { + function processAfterInsertOrUpdate($values, $add = true, $rights = []) { global $DB; diff --git a/inc/virtualmachinestateinjection.class.php b/inc/virtualmachinestateinjection.class.php index d3be1662..a38cef6b 100644 --- a/inc/virtualmachinestateinjection.class.php +++ b/inc/virtualmachinestateinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/virtualmachinesysteminjection.class.php b/inc/virtualmachinesysteminjection.class.php index 8c560536..f37a60f9 100644 --- a/inc/virtualmachinesysteminjection.class.php +++ b/inc/virtualmachinesysteminjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/virtualmachinetypeinjection.class.php b/inc/virtualmachinetypeinjection.class.php index dcfaba28..875fb435 100644 --- a/inc/virtualmachinetypeinjection.class.php +++ b/inc/virtualmachinetypeinjection.class.php @@ -52,23 +52,23 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("multiline_text" => array(16)); + $options['displaytype'] = ["multiline_text" => [16]]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -77,7 +77,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/vlaninjection.class.php b/inc/vlaninjection.class.php index cdff2d8a..0629000e 100644 --- a/inc/vlaninjection.class.php +++ b/inc/vlaninjection.class.php @@ -52,25 +52,27 @@ function isPrimaryType() { function connectedTo() { - return array(); + return []; } /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Search::getOptions(get_parent_class($this)); //Remove some options because some fields cannot be imported $blacklist = PluginDatainjectionCommonInjectionLib::getBlacklistedOptions(get_parent_class($this)); - $notimportable = array(); + $notimportable = []; $options['ignore_fields'] = array_merge($blacklist, $notimportable); - $options['displaytype'] = array("bool" => array(86), - "multiline_text" => array(16)); + $options['displaytype'] = [ + "bool" => [86], + "multiline_text" => [16] + ]; return PluginDatainjectionCommonInjectionLib::addToSearchOptions($tab, $options, $this); } @@ -79,7 +81,7 @@ function getOptions($primary_type='') { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::addOrUpdateObject() **/ - function addOrUpdateObject($values=array(), $options=array()) { + function addOrUpdateObject($values = [], $options = []) { $lib = new PluginDatainjectionCommonInjectionLib($this, $values, $options); $lib->processAddOrUpdate(); diff --git a/inc/webservice.class.php b/inc/webservice.class.php index 76f51f7c..e1b40028 100644 --- a/inc/webservice.class.php +++ b/inc/webservice.class.php @@ -35,14 +35,14 @@ class PluginDatainjectionWebservice static function methodInject($params, $protocol) { if (isset($params['help'])) { - return array('uri' => 'string,mandatory', + return ['uri' => 'string,mandatory', 'base64' => 'string,optional', 'additional' => 'array,optional', 'models_id' => 'integer, mandatory', 'entities_id'=> 'integer,mandatory', 'mandatory' => 'array,optional', 'uri' => 'uri,mandatory', - 'help' => 'bool,optional'); + 'help' => 'bool,optional']; } $model = new PluginDatainjectionModel(); @@ -128,7 +128,7 @@ static function methodInject($params, $protocol) { } //Mandatory fields - $additional_infos = array(); + $additional_infos = []; if (isset($params['additional']) && is_array($params['additional'])) { $additional_infos = $params['additional']; } @@ -145,38 +145,40 @@ static function methodInject($params, $protocol) { return $response; } - //Uploade successful : now perform import ! - $options = array('file_encoding' => PluginDatainjectionBackend::ENCODING_AUTO, //Detect automatically file encoding - 'webservice' => true, //Use webservice CSV file import - 'original_filename' => $params['uri'], //URI to the CSV file - 'unique_filename' => $filename, //Unique filename - 'mode' => PluginDatainjectionModel::PROCESS, - 'delete_file' => false, //Do not delete file once imported - 'protocol' => $protocol); //The Webservice protocol used - - $results = array(); - $response = $model->processUploadedFile($options); + //Uploade successful : now perform import ! + $options = ['file_encoding' => PluginDatainjectionBackend::ENCODING_AUTO, //Detect automatically file encoding + 'webservice' => true, //Use webservice CSV file import + 'original_filename' => $params['uri'], //URI to the CSV file + 'unique_filename' => $filename, //Unique filename + 'mode' => PluginDatainjectionModel::PROCESS, + 'delete_file' => false, //Do not delete file once imported + 'protocol' => $protocol]; //The Webservice protocol used + + $results = []; + $response = $model->processUploadedFile($options); if (!PluginWebservicesMethodCommon::isError($protocol, $response)) { - $engine = new PluginDatainjectionEngine($model, $additional_infos, $params['entities_id']); + $engine = new PluginDatainjectionEngine( + $model, + $additional_infos, + $params['entities_id'] + ); //Remove first line if header is present $first = true; foreach ($model->injectionData->getData() as $id => $data) { - if ($first - && $model->getSpecificModel()->isHeaderPresent() - ) { + if ($first && $model->getSpecificModel()->isHeaderPresent()) { $first = false; } else { $results[] = $engine->injectLine($data[0], $id); } } - $model->cleanData(); - return $results; + $model->cleanData(); + return $results; } - return $response; + return $response; } - static function methodGetModel($params,$protocol) { + static function methodGetModel($params, $protocol) { $params['itemtype'] = 'PluginDatainjectionModel'; return PluginWebservicesMethodInventaire::methodGetObject($params, $protocol); @@ -193,7 +195,7 @@ static function methodListModels($params, $protocol) { static function methodListItemtypes($params, $protocol) { if (isset($params['help'])) { - return array('help' => 'bool,optional'); + return ['help' => 'bool,optional']; } if (!isset($_SESSION['glpiID'])) { diff --git a/locales/cs_CZ.mo b/locales/cs_CZ.mo index 86c11452..5ae721b6 100644 Binary files a/locales/cs_CZ.mo and b/locales/cs_CZ.mo differ diff --git a/locales/cs_CZ.po b/locales/cs_CZ.po index c9271d15..119d0f69 100644 --- a/locales/cs_CZ.po +++ b/locales/cs_CZ.po @@ -1,16 +1,16 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Datainjection Development Team -# This file is distributed under the same license as the GLPI - Datainjection plugin package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Datainjection plugin 2.3.0\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-22 22:57+0100\n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Pavel Borecki , 2018\n" +"Last-Translator: Cédric Anne, 2018\n" "Language-Team: Czech (Czech Republic) (https://www.transifex.com/teclib/teams/28042/cs_CZ/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" @@ -18,28 +18,28 @@ msgstr "" "Language: cs_CZ\n" "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" -#: hook.php:115 hook.php:129 setup.php:50 -msgid "Can't create folder" -msgstr "Složku není možné vytvořit" +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" +msgstr "Soubor se nepodařilo nalézt" -#: setup.php:76 front/clientinjection.form.php:33 inc/menu.class.php:36 -#: inc/profile.class.php:64 +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 msgid "File injection" -msgstr "Vpravení souboru" - -#: setup.php:89 -msgid "This plugin requires GLPI 0.85 or higher" -msgstr "Tento zásuvný modul vyžaduje GLPI verze 0.85 a novější" +msgstr "Import souboru" -#: front/clientinjection.form.php:47 +#: front/clientinjection.form.php:50 msgid "One mandatory field is not filled" -msgstr "Povinná kolonka není vyplněná" +msgstr "Povinné pole není vyplněno" -#: front/clientinjection.form.php:77 front/model.form.php:83 -msgid "The file could not be found" -msgstr "Soubor se nepodařilo nalézt" +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" +msgstr "Zobrazit soubor" + +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" +msgstr "Výkaz o importu souboru" -#: front/mapping.form.php:58 +#: front/mapping.form.php:60 msgid "" "One link field must be selected: it will be used to check if data already " "exists" @@ -47,7 +47,7 @@ msgstr "" "Je třeba vybrat jednu kolonku odkazu: bude použito pro kontrolu zda data už " "existují" -#: front/mapping.form.php:68 +#: front/mapping.form.php:76 msgid "" "This step allows you to add informations not present in the file. You'll be " "asked for theses informations while using the model." @@ -55,326 +55,262 @@ msgstr "" "V tomto kroku je možné přidat informace které se nenacházejí v souboru. O " "tyto informace budete požádáni při používání modelu." -#: front/popup.php:37 inc/mapping.class.php:109 -msgid "See the file" -msgstr "Zobrazit soubor" - -#: front/popup.php:43 inc/model.class.php:1350 -msgid "File injection report" -msgstr "Výkaz o vpravení souboru" - -#: inc/clientinjection.class.php:81 -msgid "Use an existing model" -msgstr "Použít existující model" - -#: inc/clientinjection.class.php:89 -msgid "No model currently available" -msgstr "V tuto chvíli není k dispozici žádný model" - -#: inc/clientinjection.class.php:95 -msgid "You can start the model creation by hitting the button" -msgstr "Vytváření modelu je možné zahájit kliknutím na tlačítko" - -#: inc/clientinjection.class.php:140 inc/dropdown.class.php:86 -#: inc/model.class.php:652 -msgid "File to inject" -msgstr "Soubor který importovat" - -#: inc/clientinjection.class.php:143 inc/info.class.php:232 -msgid "Choose a file" -msgstr "Zvolte soubor" - -#: inc/clientinjection.class.php:149 -msgid "File encoding" -msgstr "Enkódování souboru" - -#: inc/clientinjection.class.php:157 -msgid "Warning : existing data will be overridden" -msgstr "Varování: stávající data budou přepsána" - -#: inc/clientinjection.class.php:159 -msgid "" -"Watch out, you're about to inject data into GLPI. Are you sure you want to " -"do it ?" -msgstr "Pozor, chystáte se importovat data do GLPI. Opravdu to chcete udělat?" - -#: inc/clientinjection.class.php:165 -msgid "Launch the import" -msgstr "Spustit import" - -#: inc/clientinjection.class.php:195 -msgid "Import progress" -msgstr "Ukazatel stavu importu" - -#: inc/clientinjection.class.php:199 inc/menu.class.php:52 -#: inc/menu.class.php:53 inc/profile.class.php:41 -msgid "Injection of the file" -msgstr "Import souboru" - -#: inc/clientinjection.class.php:258 -#, php-format -msgid "Injection of the file... %d%%" -msgstr "Import souboru… %d%%" - -#: inc/clientinjection.class.php:269 -msgid "Injection finished" -msgstr "Import dokončen" - -#: inc/clientinjection.class.php:338 -msgid "Injection's results" -msgstr "Výsledek importu" - -#: inc/clientinjection.class.php:343 -msgid "Injection successful" -msgstr "Import úspěšný" - -#: inc/clientinjection.class.php:346 -msgid "Injection encounters errors" -msgstr "Při importu se vyskytly chyby" - -#: inc/clientinjection.class.php:355 -msgid "See the log" -msgstr "Zobrazit záznam událostí (log)" - -#: inc/clientinjection.class.php:361 -msgid "Export rapport in PDF" -msgstr "Exportovat hlášení do PDF" - -#: inc/clientinjection.class.php:367 -msgid "Export the log" -msgstr "Exportovat záznam událostí" - -#: inc/clientinjection.class.php:375 -msgid "Finish" -msgstr "Dokončit" +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" +msgstr "Složku není možné vytvořit" -#: inc/commoninjectionlib.class.php:1817 +#: inc/commoninjectionlib.class.php:1876 msgid "Add from CSV file" msgstr "Přidat z CSV souboru" -#: inc/commoninjectionlib.class.php:1819 +#: inc/commoninjectionlib.class.php:1878 msgid "Update from CSV file" msgstr "Aktualizovat z CSV souboru" -#: inc/commoninjectionlib.class.php:1860 +#: inc/commoninjectionlib.class.php:1919 msgid "No right to import data" msgstr "Nemáte oprávnění importovat data" -#: inc/commoninjectionlib.class.php:1864 +#: inc/commoninjectionlib.class.php:1923 msgid "No right to update data" msgstr "Nemáte oprávnění aktualizovat data" -#: inc/commoninjectionlib.class.php:1868 +#: inc/commoninjectionlib.class.php:1927 msgid "Size of the inserted value is to expansive" msgstr "Velikost vkládané hodnoty je příliš obsáhlá" -#: inc/commoninjectionlib.class.php:1872 +#: inc/commoninjectionlib.class.php:1931 msgid "Import not allowed" msgstr "Import není dovolen" -#: inc/commoninjectionlib.class.php:1876 +#: inc/commoninjectionlib.class.php:1935 msgid "Import failed" msgstr "Import se nezdařil" -#: inc/commoninjectionlib.class.php:1880 +#: inc/commoninjectionlib.class.php:1939 msgid "At least one mandatory field is not present" msgstr "Přinejmenším jedna povinná kolonka chybí" -#: inc/commoninjectionlib.class.php:1884 +#: inc/commoninjectionlib.class.php:1943 msgid "Data to insert are correct" msgstr "Data pro vložení jsou v pořádku" -#: inc/commoninjectionlib.class.php:1888 +#: inc/commoninjectionlib.class.php:1947 msgid "One data is not the good type" msgstr "Jedny data nejsou dobrého typu" -#: inc/commoninjectionlib.class.php:1892 +#: inc/commoninjectionlib.class.php:1951 msgid "Warning" msgstr "Varování" -#: inc/commoninjectionlib.class.php:1896 +#: inc/commoninjectionlib.class.php:1955 msgid "Data not found" msgstr "Nebyla nalezena žádná data" -#: inc/commoninjectionlib.class.php:1900 inc/model.class.php:1215 +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 msgid "Undetermined" msgstr "Nezjištěno" -#: inc/dropdown.class.php:36 -msgid "dd-mm-yyyy" -msgstr "dd-mm-yyyy" +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" +msgstr "Správa modelů" -#: inc/dropdown.class.php:38 -msgid "mm-dd-yyyy" -msgstr "mm-dd-yyyy" +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" +msgstr "Import souboru" -#: inc/dropdown.class.php:40 -msgid "yyyy-mm-dd" -msgstr "yyyy-mm-dd" +#: inc/webservice.class.php:78 +msgid "Model unknown" +msgstr "Neznámý model" -#: inc/dropdown.class.php:59 -msgid "1 234.56" -msgstr "1234,56" +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" +msgstr "Tento model vám není přístupný" -#: inc/dropdown.class.php:61 -msgid "1 234,56" -msgstr "1234,56" +#: inc/webservice.class.php:115 +msgid "Entity unknown" +msgstr "Neznámá entita" -#: inc/dropdown.class.php:63 -msgid "1,234.56" -msgstr "1234,56" +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" +msgstr "Tato entita vám není přístupná" -#: inc/dropdown.class.php:87 inc/model.class.php:654 -msgid "Mappings" -msgstr "Mapování" +#: inc/clientinjection.class.php:88 +msgid "Use an existing model" +msgstr "Použít existující model" -#: inc/dropdown.class.php:88 inc/model.class.php:657 -msgid "Additional Information" -msgstr "Další informace" +#: inc/clientinjection.class.php:96 +msgid "No model currently available" +msgstr "V tuto chvíli není k dispozici žádný model" -#: inc/dropdown.class.php:90 -msgid "Model available for use" -msgstr "Model který je možné použít" +#: inc/clientinjection.class.php:105 +msgid "You can start the model creation by hitting the button" +msgstr "Vytvoření modelu je možné zahájit kliknutím na tlačítko" -#: inc/dropdown.class.php:113 -msgid "Automatic detection" -msgstr "Automatické zjištění" +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 +msgid "File to inject" +msgstr "Soubor k importu" -#: inc/dropdown.class.php:115 -msgid "UTF-8" -msgstr "UTF-8" +#: inc/clientinjection.class.php:156 inc/info.class.php:247 +msgid "Choose a file" +msgstr "Zvolte soubor" -#: inc/dropdown.class.php:116 -msgid "ISO8859-1" -msgstr "ISO8859-1" +#: inc/clientinjection.class.php:162 +msgid "File encoding" +msgstr "Znaková sada souboru" -#: inc/info.class.php:78 inc/info.class.php:134 inc/mapping.class.php:116 -msgid "Tables" -msgstr "Tabulky" +#: inc/clientinjection.class.php:170 +msgid "Warning : existing data will be overridden" +msgstr "Varování: stávající data budou přepsána" -#: inc/info.class.php:80 inc/info.class.php:136 -msgid "Mandatory information" -msgstr "Povinné informace" +#: inc/clientinjection.class.php:173 +msgid "" +"Watch out, you're about to inject data into GLPI. Are you sure you want to " +"do it ?" +msgstr "Pozor, chystáte se importovat data do GLPI. Opravdu to chcete udělat?" -#: inc/info.class.php:135 -msgid "Fields" -msgstr "Kolonky" +#: inc/clientinjection.class.php:180 +msgid "Launch the import" +msgstr "Spustit import" -#: inc/info.class.php:231 -msgid "Complementary information" -msgstr "Doplňující informace" +#: inc/clientinjection.class.php:210 +msgid "Import progress" +msgstr "Ukazatel postupu importu" -#: inc/info.class.php:240 -msgid "Download file sample" -msgstr "Stáhnout ukázku souboru" +#: inc/clientinjection.class.php:280 +#, php-format +msgid "Injection of the file... %d%%" +msgstr "Import souboru… %d%%" -#: inc/injectiontype.class.php:121 -msgid "-------Choose a table-------" -msgstr "-------Zvolte tabulku-------" +#: inc/clientinjection.class.php:297 +msgid "Injection finished" +msgstr "Import dokončen" -#: inc/injectiontype.class.php:177 -msgid "-------Choose a field-------" -msgstr "-------Zvolte kolonku-------" +#: inc/clientinjection.class.php:369 +msgid "Injection's results" +msgstr "Výsledek importu" -#: inc/mapping.class.php:115 -msgid "Header of the file" -msgstr "Hlavička souboru" +#: inc/clientinjection.class.php:374 +msgid "Injection successful" +msgstr "Import úspěšný" -#: inc/mapping.class.php:118 -msgid "Link field" -msgstr "Propojená kolonka" +#: inc/clientinjection.class.php:377 +msgid "Injection encounters errors" +msgstr "Při importu se vyskytly chyby" -#: inc/model.class.php:73 inc/profile.class.php:38 -msgid "Model management" -msgstr "Správa modelů" +#: inc/clientinjection.class.php:386 +msgid "See the log" +msgstr "Zobrazit záznam událostí (log)" + +#: inc/clientinjection.class.php:392 +msgid "Export rapport in PDF" +msgstr "Exportovat hlášení do PDF" + +#: inc/clientinjection.class.php:398 +msgid "Export the log" +msgstr "Exportovat záznam událostí" + +#: inc/clientinjection.class.php:406 +msgid "Finish" +msgstr "Dokončit" -#: inc/model.class.php:339 inc/model.class.php:558 +#: inc/model.class.php:383 inc/model.class.php:669 msgid "Allow lines creation" msgstr "Umožnit vytváření propojení" -#: inc/model.class.php:345 inc/model.class.php:561 +#: inc/model.class.php:392 inc/model.class.php:672 msgid "Allow lines update" msgstr "Umožnit aktualizace řádků" -#: inc/model.class.php:351 inc/model.class.php:546 +#: inc/model.class.php:401 inc/model.class.php:657 msgid "Type of data to import" msgstr "Typ dat k importu" -#: inc/model.class.php:358 inc/model.class.php:570 +#: inc/model.class.php:411 inc/model.class.php:681 msgid "Allow creation of dropdowns" msgstr "Umožnit vytváření rozbalovacích nabídek" -#: inc/model.class.php:363 inc/model.class.php:574 +#: inc/model.class.php:419 inc/model.class.php:685 msgid "Dates format" msgstr "Formát datumů" -#: inc/model.class.php:369 inc/model.class.php:585 +#: inc/model.class.php:428 inc/model.class.php:698 msgid "Float format" msgstr "Formát desetinné čárky" -#: inc/model.class.php:375 inc/model.class.php:592 +#: inc/model.class.php:438 inc/model.class.php:707 msgid "Try to establish network connection is possible" msgstr "Je možné pokusit se navázat síťové spojení" -#: inc/model.class.php:381 inc/model.class.php:596 +#: inc/model.class.php:448 inc/model.class.php:711 msgid "Port unicity criteria" msgstr "Kritérium jednoznačnosti portu" -#: inc/model.class.php:566 +#: inc/model.class.php:677 msgid "Advanced options" msgstr "Pokročilé předvolby" -#: inc/model.class.php:581 +#: inc/model.class.php:694 msgid "Allow update of existing fields" msgstr "Umožnit aktualizovat existující kolonky" -#: inc/model.class.php:620 +#: inc/model.class.php:737 msgctxt "button" msgid "Validate the model" msgstr "Ověřit model" -#: inc/model.class.php:685 +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "Mapování" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "Další informace" + +#: inc/model.class.php:802 msgid "Load this file" msgstr "Načíst tento soubor" -#: inc/model.class.php:763 +#: inc/model.class.php:881 msgid "Please enter a name for the model" msgstr "Zadejte název pro model" -#: inc/model.class.php:769 +#: inc/model.class.php:890 msgid "Your model should allow import and/or update of data" msgstr "Váš model by měl umožnit import a/nebo aktualizaci dat" -#: inc/model.class.php:791 +#: inc/model.class.php:909 msgid "You are not the initial creator of this model" msgstr "Nejste původním tvůrcem tohoto modelu" -#: inc/model.class.php:851 +#: inc/model.class.php:972 #, php-format msgid "Impossible to copy the file in %s" msgstr "Není možné kopírovat soubor v %s" -#: inc/model.class.php:858 +#: inc/model.class.php:980 msgid "File format is wrong" msgstr "Formát souboru není správný" -#: inc/model.class.php:859 +#: inc/model.class.php:981 msgid "Extension csv required" msgstr "Je třeba rozšíření csv" -#: inc/model.class.php:933 +#: inc/model.class.php:1058 msgid "Not data to import" msgstr "Žádná data k importu" -#: inc/model.class.php:986 +#: inc/model.class.php:1118 msgid "The file is ok." msgstr "Soubor je v pořádku." -#: inc/model.class.php:1009 +#: inc/model.class.php:1143 msgid "The number of columns of the file is incorrect." msgstr "Počet sloupců v souboru není správný." -#: inc/model.class.php:1010 +#: inc/model.class.php:1145 #, php-format msgid "%d awaited column" msgid_plural "%d awaited columns" @@ -383,7 +319,7 @@ msgstr[1] "očekávány %d sloupce" msgstr[2] "očekáváno %d sloupců" msgstr[3] "očekávány %d sloupce" -#: inc/model.class.php:1012 +#: inc/model.class.php:1150 #, php-format msgid "%d found column" msgid_plural "%d found columns" @@ -392,82 +328,142 @@ msgstr[1] "nalezeny %d sloupce" msgstr[2] "nalezeno %d sloupců" msgstr[3] "nalezeny %d sloupce" -#: inc/model.class.php:1046 +#: inc/model.class.php:1190 msgid "At least one column is incorrect" msgstr "Přinejmenším jeden sloupec není správný" -#: inc/model.class.php:1053 +#: inc/model.class.php:1198 msgid "Into the file" msgstr "Do souboru" -#: inc/model.class.php:1056 +#: inc/model.class.php:1203 msgid "From the model" msgstr "Z modelu" -#: inc/model.class.php:1278 inc/model.class.php:1357 +#: inc/model.class.php:1434 inc/model.class.php:1517 msgid "Array of successful injections" msgstr "Pole úspěšných importů" -#: inc/model.class.php:1285 inc/model.class.php:1315 inc/model.class.php:1360 -#: inc/model.class.php:1378 +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 msgid "Line" msgstr "Řádek" -#: inc/model.class.php:1286 inc/model.class.php:1317 inc/model.class.php:1361 -#: inc/model.class.php:1380 +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 msgid "Data Import" msgstr "Import dat" -#: inc/model.class.php:1287 inc/model.class.php:1318 inc/model.class.php:1362 -#: inc/model.class.php:1381 +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 msgid "Injection type" msgstr "Typ vpravení" -#: inc/model.class.php:1288 inc/model.class.php:1319 inc/model.class.php:1363 -#: inc/model.class.php:1382 +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 msgid "Object Identifier" msgstr "Identifikátor objektu" -#: inc/model.class.php:1308 inc/model.class.php:1375 +#: inc/model.class.php:1464 inc/model.class.php:1537 msgid "Array of unsuccessful injections" msgstr "Pole neúspěšných vpravení" -#: inc/model.class.php:1316 inc/model.class.php:1379 inc/model.class.php:1393 +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 msgid "Data check" msgstr "Kontrola dat" -#: inc/modelcsv.class.php:149 +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" +msgstr "-------Zvolte tabulku-------" + +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" +msgstr "-------Zvolte pole-------" + +#: inc/networkequipmentinjection.class.php:72 +msgid "Number of ports" +msgstr "Počet portů" + +#: inc/mapping.class.php:123 +msgid "Header of the file" +msgstr "Hlavička souboru" + +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" +msgstr "Tabulky" + +#: inc/mapping.class.php:126 +msgid "Link field" +msgstr "Propojená pole" + +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" +msgstr "Povinné informace" + +#: inc/info.class.php:142 +msgid "Fields" +msgstr "Pole" + +#: inc/info.class.php:246 +msgid "Complementary information" +msgstr "Doplňující informace" + +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "Stáhnout ukázku souboru" + +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "dd-mm-yyyy" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "mm-dd-yyyy" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "yyyy-mm-dd" + +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "Model který je možné použít" + +#: inc/dropdown.class.php:119 +msgid "Automatic detection" +msgstr "Automatické zjištění" + +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "UTF-8" + +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "ISO8859-1" + +#: inc/modelcsv.class.php:160 msgid "Specific file format options" msgstr "Předvolby konkrétního souborového formátu" -#: inc/modelcsv.class.php:152 +#: inc/modelcsv.class.php:163 msgid "Header's presence" msgstr "Přítomnost hlavičky" -#: inc/modelcsv.class.php:156 +#: inc/modelcsv.class.php:167 msgid "File delimitor" msgstr "Oddělovač souboru" -#: inc/networkequipmentinjection.class.php:69 -msgid "Number of ports" -msgstr "Počet portů" - -#: inc/networkportinjection.class.php:85 +#: inc/networkportinjection.class.php:89 msgid "Port MAC address" msgstr "MAC adresa portu" - -#: inc/webservice.class.php:70 -msgid "Model unknown" -msgstr "Neznámý model" - -#: inc/webservice.class.php:75 inc/webservice.class.php:80 -msgid "You cannot access this model" -msgstr "Tento model vám není přístupný" - -#: inc/webservice.class.php:95 -msgid "Entity unknown" -msgstr "Neznámá entita" - -#: inc/webservice.class.php:100 -msgid "You cannot access this entity" -msgstr "Tato entita vám není přístupná" diff --git a/locales/datainjection.pot b/locales/datainjection.pot index ba9d0b0d..5489ff1f 100644 --- a/locales/datainjection.pot +++ b/locales/datainjection.pot @@ -1,14 +1,14 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Datainjection Development Team -# This file is distributed under the same license as the GLPI - Datainjection plugin package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Datainjection plugin 2.3.0\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-22 22:57+0100\n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,448 +18,444 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: hook.php:115 hook.php:129 setup.php:50 -msgid "Can't create folder" +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" msgstr "" -#: setup.php:76 front/clientinjection.form.php:33 inc/menu.class.php:36 -#: inc/profile.class.php:64 +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 msgid "File injection" msgstr "" -#: setup.php:89 -msgid "This plugin requires GLPI 0.85 or higher" +#: front/clientinjection.form.php:50 +msgid "One mandatory field is not filled" msgstr "" -#: front/clientinjection.form.php:47 -msgid "One mandatory field is not filled" +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" msgstr "" -#: front/clientinjection.form.php:77 front/model.form.php:83 -msgid "The file could not be found" +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" msgstr "" -#: front/mapping.form.php:58 +#: front/mapping.form.php:60 msgid "" "One link field must be selected: it will be used to check if data already " "exists" msgstr "" -#: front/mapping.form.php:68 +#: front/mapping.form.php:76 msgid "" "This step allows you to add informations not present in the file. You'll be " "asked for theses informations while using the model." msgstr "" -#: front/popup.php:37 inc/mapping.class.php:109 -msgid "See the file" -msgstr "" - -#: front/popup.php:43 inc/model.class.php:1350 -msgid "File injection report" -msgstr "" - -#: inc/clientinjection.class.php:81 -msgid "Use an existing model" -msgstr "" - -#: inc/clientinjection.class.php:89 -msgid "No model currently available" -msgstr "" - -#: inc/clientinjection.class.php:95 -msgid "You can start the model creation by hitting the button" -msgstr "" - -#: inc/clientinjection.class.php:140 inc/dropdown.class.php:86 -#: inc/model.class.php:652 -msgid "File to inject" -msgstr "" - -#: inc/clientinjection.class.php:143 inc/info.class.php:232 -msgid "Choose a file" -msgstr "" - -#: inc/clientinjection.class.php:149 -msgid "File encoding" -msgstr "" - -#: inc/clientinjection.class.php:157 -msgid "Warning : existing data will be overridden" -msgstr "" - -#: inc/clientinjection.class.php:159 -msgid "" -"Watch out, you're about to inject data into GLPI. Are you sure you want to " -"do it ?" -msgstr "" - -#: inc/clientinjection.class.php:165 -msgid "Launch the import" -msgstr "" - -#: inc/clientinjection.class.php:195 -msgid "Import progress" -msgstr "" - -#: inc/clientinjection.class.php:199 inc/menu.class.php:52 -#: inc/menu.class.php:53 inc/profile.class.php:41 -msgid "Injection of the file" -msgstr "" - -#: inc/clientinjection.class.php:258 -#, php-format -msgid "Injection of the file... %d%%" -msgstr "" - -#: inc/clientinjection.class.php:269 -msgid "Injection finished" -msgstr "" - -#: inc/clientinjection.class.php:338 -msgid "Injection's results" -msgstr "" - -#: inc/clientinjection.class.php:343 -msgid "Injection successful" -msgstr "" - -#: inc/clientinjection.class.php:346 -msgid "Injection encounters errors" -msgstr "" - -#: inc/clientinjection.class.php:355 -msgid "See the log" -msgstr "" - -#: inc/clientinjection.class.php:361 -msgid "Export rapport in PDF" -msgstr "" - -#: inc/clientinjection.class.php:367 -msgid "Export the log" -msgstr "" - -#: inc/clientinjection.class.php:375 -msgid "Finish" +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" msgstr "" -#: inc/commoninjectionlib.class.php:1817 +#: inc/commoninjectionlib.class.php:1876 msgid "Add from CSV file" msgstr "" -#: inc/commoninjectionlib.class.php:1819 +#: inc/commoninjectionlib.class.php:1878 msgid "Update from CSV file" msgstr "" -#: inc/commoninjectionlib.class.php:1860 +#: inc/commoninjectionlib.class.php:1919 msgid "No right to import data" msgstr "" -#: inc/commoninjectionlib.class.php:1864 +#: inc/commoninjectionlib.class.php:1923 msgid "No right to update data" msgstr "" -#: inc/commoninjectionlib.class.php:1868 +#: inc/commoninjectionlib.class.php:1927 msgid "Size of the inserted value is to expansive" msgstr "" -#: inc/commoninjectionlib.class.php:1872 +#: inc/commoninjectionlib.class.php:1931 msgid "Import not allowed" msgstr "" -#: inc/commoninjectionlib.class.php:1876 +#: inc/commoninjectionlib.class.php:1935 msgid "Import failed" msgstr "" -#: inc/commoninjectionlib.class.php:1880 +#: inc/commoninjectionlib.class.php:1939 msgid "At least one mandatory field is not present" msgstr "" -#: inc/commoninjectionlib.class.php:1884 +#: inc/commoninjectionlib.class.php:1943 msgid "Data to insert are correct" msgstr "" -#: inc/commoninjectionlib.class.php:1888 +#: inc/commoninjectionlib.class.php:1947 msgid "One data is not the good type" msgstr "" -#: inc/commoninjectionlib.class.php:1892 +#: inc/commoninjectionlib.class.php:1951 msgid "Warning" msgstr "" -#: inc/commoninjectionlib.class.php:1896 +#: inc/commoninjectionlib.class.php:1955 msgid "Data not found" msgstr "" -#: inc/commoninjectionlib.class.php:1900 inc/model.class.php:1215 +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 msgid "Undetermined" msgstr "" -#: inc/dropdown.class.php:36 -msgid "dd-mm-yyyy" +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" msgstr "" -#: inc/dropdown.class.php:38 -msgid "mm-dd-yyyy" +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" msgstr "" -#: inc/dropdown.class.php:40 -msgid "yyyy-mm-dd" +#: inc/webservice.class.php:78 +msgid "Model unknown" msgstr "" -#: inc/dropdown.class.php:59 -msgid "1 234.56" +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" msgstr "" -#: inc/dropdown.class.php:61 -msgid "1 234,56" +#: inc/webservice.class.php:115 +msgid "Entity unknown" msgstr "" -#: inc/dropdown.class.php:63 -msgid "1,234.56" +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" msgstr "" -#: inc/dropdown.class.php:87 inc/model.class.php:654 -msgid "Mappings" +#: inc/clientinjection.class.php:88 +msgid "Use an existing model" msgstr "" -#: inc/dropdown.class.php:88 inc/model.class.php:657 -msgid "Additional Information" +#: inc/clientinjection.class.php:96 +msgid "No model currently available" msgstr "" -#: inc/dropdown.class.php:90 -msgid "Model available for use" +#: inc/clientinjection.class.php:105 +msgid "You can start the model creation by hitting the button" msgstr "" -#: inc/dropdown.class.php:113 -msgid "Automatic detection" +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 +msgid "File to inject" msgstr "" -#: inc/dropdown.class.php:115 -msgid "UTF-8" +#: inc/clientinjection.class.php:156 inc/info.class.php:247 +msgid "Choose a file" msgstr "" -#: inc/dropdown.class.php:116 -msgid "ISO8859-1" +#: inc/clientinjection.class.php:162 +msgid "File encoding" msgstr "" -#: inc/info.class.php:78 inc/info.class.php:134 inc/mapping.class.php:116 -msgid "Tables" +#: inc/clientinjection.class.php:170 +msgid "Warning : existing data will be overridden" msgstr "" -#: inc/info.class.php:80 inc/info.class.php:136 -msgid "Mandatory information" +#: inc/clientinjection.class.php:173 +msgid "" +"Watch out, you're about to inject data into GLPI. Are you sure you want to " +"do it ?" msgstr "" -#: inc/info.class.php:135 -msgid "Fields" +#: inc/clientinjection.class.php:180 +msgid "Launch the import" msgstr "" -#: inc/info.class.php:231 -msgid "Complementary information" +#: inc/clientinjection.class.php:210 +msgid "Import progress" msgstr "" -#: inc/info.class.php:240 -msgid "Download file sample" +#: inc/clientinjection.class.php:280 +#, php-format +msgid "Injection of the file... %d%%" msgstr "" -#: inc/injectiontype.class.php:121 -msgid "-------Choose a table-------" +#: inc/clientinjection.class.php:297 +msgid "Injection finished" msgstr "" -#: inc/injectiontype.class.php:177 -msgid "-------Choose a field-------" +#: inc/clientinjection.class.php:369 +msgid "Injection's results" msgstr "" -#: inc/mapping.class.php:115 -msgid "Header of the file" +#: inc/clientinjection.class.php:374 +msgid "Injection successful" msgstr "" -#: inc/mapping.class.php:118 -msgid "Link field" +#: inc/clientinjection.class.php:377 +msgid "Injection encounters errors" msgstr "" -#: inc/model.class.php:73 inc/profile.class.php:38 -msgid "Model management" +#: inc/clientinjection.class.php:386 +msgid "See the log" +msgstr "" + +#: inc/clientinjection.class.php:392 +msgid "Export rapport in PDF" msgstr "" -#: inc/model.class.php:339 inc/model.class.php:558 +#: inc/clientinjection.class.php:398 +msgid "Export the log" +msgstr "" + +#: inc/clientinjection.class.php:406 +msgid "Finish" +msgstr "" + +#: inc/model.class.php:383 inc/model.class.php:669 msgid "Allow lines creation" msgstr "" -#: inc/model.class.php:345 inc/model.class.php:561 +#: inc/model.class.php:392 inc/model.class.php:672 msgid "Allow lines update" msgstr "" -#: inc/model.class.php:351 inc/model.class.php:546 +#: inc/model.class.php:401 inc/model.class.php:657 msgid "Type of data to import" msgstr "" -#: inc/model.class.php:358 inc/model.class.php:570 +#: inc/model.class.php:411 inc/model.class.php:681 msgid "Allow creation of dropdowns" msgstr "" -#: inc/model.class.php:363 inc/model.class.php:574 +#: inc/model.class.php:419 inc/model.class.php:685 msgid "Dates format" msgstr "" -#: inc/model.class.php:369 inc/model.class.php:585 +#: inc/model.class.php:428 inc/model.class.php:698 msgid "Float format" msgstr "" -#: inc/model.class.php:375 inc/model.class.php:592 +#: inc/model.class.php:438 inc/model.class.php:707 msgid "Try to establish network connection is possible" msgstr "" -#: inc/model.class.php:381 inc/model.class.php:596 +#: inc/model.class.php:448 inc/model.class.php:711 msgid "Port unicity criteria" msgstr "" -#: inc/model.class.php:566 +#: inc/model.class.php:677 msgid "Advanced options" msgstr "" -#: inc/model.class.php:581 +#: inc/model.class.php:694 msgid "Allow update of existing fields" msgstr "" -#: inc/model.class.php:620 +#: inc/model.class.php:737 msgctxt "button" msgid "Validate the model" msgstr "" -#: inc/model.class.php:685 +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "" + +#: inc/model.class.php:802 msgid "Load this file" msgstr "" -#: inc/model.class.php:763 +#: inc/model.class.php:881 msgid "Please enter a name for the model" msgstr "" -#: inc/model.class.php:769 +#: inc/model.class.php:890 msgid "Your model should allow import and/or update of data" msgstr "" -#: inc/model.class.php:791 +#: inc/model.class.php:909 msgid "You are not the initial creator of this model" msgstr "" -#: inc/model.class.php:851 +#: inc/model.class.php:972 #, php-format msgid "Impossible to copy the file in %s" msgstr "" -#: inc/model.class.php:858 +#: inc/model.class.php:980 msgid "File format is wrong" msgstr "" -#: inc/model.class.php:859 +#: inc/model.class.php:981 msgid "Extension csv required" msgstr "" -#: inc/model.class.php:933 +#: inc/model.class.php:1058 msgid "Not data to import" msgstr "" -#: inc/model.class.php:986 +#: inc/model.class.php:1118 msgid "The file is ok." msgstr "" -#: inc/model.class.php:1009 +#: inc/model.class.php:1143 msgid "The number of columns of the file is incorrect." msgstr "" -#: inc/model.class.php:1010 +#: inc/model.class.php:1145 #, php-format msgid "%d awaited column" msgid_plural "%d awaited columns" msgstr[0] "" msgstr[1] "" -#: inc/model.class.php:1012 +#: inc/model.class.php:1150 #, php-format msgid "%d found column" msgid_plural "%d found columns" msgstr[0] "" msgstr[1] "" -#: inc/model.class.php:1046 +#: inc/model.class.php:1190 msgid "At least one column is incorrect" msgstr "" -#: inc/model.class.php:1053 +#: inc/model.class.php:1198 msgid "Into the file" msgstr "" -#: inc/model.class.php:1056 +#: inc/model.class.php:1203 msgid "From the model" msgstr "" -#: inc/model.class.php:1278 inc/model.class.php:1357 +#: inc/model.class.php:1434 inc/model.class.php:1517 msgid "Array of successful injections" msgstr "" -#: inc/model.class.php:1285 inc/model.class.php:1315 inc/model.class.php:1360 -#: inc/model.class.php:1378 +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 msgid "Line" msgstr "" -#: inc/model.class.php:1286 inc/model.class.php:1317 inc/model.class.php:1361 -#: inc/model.class.php:1380 +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 msgid "Data Import" msgstr "" -#: inc/model.class.php:1287 inc/model.class.php:1318 inc/model.class.php:1362 -#: inc/model.class.php:1381 +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 msgid "Injection type" msgstr "" -#: inc/model.class.php:1288 inc/model.class.php:1319 inc/model.class.php:1363 -#: inc/model.class.php:1382 +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 msgid "Object Identifier" msgstr "" -#: inc/model.class.php:1308 inc/model.class.php:1375 +#: inc/model.class.php:1464 inc/model.class.php:1537 msgid "Array of unsuccessful injections" msgstr "" -#: inc/model.class.php:1316 inc/model.class.php:1379 inc/model.class.php:1393 +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 msgid "Data check" msgstr "" -#: inc/modelcsv.class.php:149 -msgid "Specific file format options" +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" msgstr "" -#: inc/modelcsv.class.php:152 -msgid "Header's presence" +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" msgstr "" -#: inc/modelcsv.class.php:156 -msgid "File delimitor" +#: inc/networkequipmentinjection.class.php:72 +msgid "Number of ports" msgstr "" -#: inc/networkequipmentinjection.class.php:69 -msgid "Number of ports" +#: inc/mapping.class.php:123 +msgid "Header of the file" msgstr "" -#: inc/networkportinjection.class.php:85 -msgid "Port MAC address" +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" msgstr "" -#: inc/webservice.class.php:70 -msgid "Model unknown" +#: inc/mapping.class.php:126 +msgid "Link field" msgstr "" -#: inc/webservice.class.php:75 inc/webservice.class.php:80 -msgid "You cannot access this model" +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" msgstr "" -#: inc/webservice.class.php:95 -msgid "Entity unknown" +#: inc/info.class.php:142 +msgid "Fields" msgstr "" -#: inc/webservice.class.php:100 -msgid "You cannot access this entity" +#: inc/info.class.php:246 +msgid "Complementary information" +msgstr "" + +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "" + +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "" + +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "" + +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "" + +#: inc/dropdown.class.php:119 +msgid "Automatic detection" +msgstr "" + +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "" + +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "" + +#: inc/modelcsv.class.php:160 +msgid "Specific file format options" +msgstr "" + +#: inc/modelcsv.class.php:163 +msgid "Header's presence" +msgstr "" + +#: inc/modelcsv.class.php:167 +msgid "File delimitor" +msgstr "" + +#: inc/networkportinjection.class.php:89 +msgid "Port MAC address" msgstr "" diff --git a/locales/en_GB.mo b/locales/en_GB.mo new file mode 100644 index 00000000..121cd650 Binary files /dev/null and b/locales/en_GB.mo differ diff --git a/locales/en_GB.po b/locales/en_GB.po new file mode 100644 index 00000000..c38b1429 --- /dev/null +++ b/locales/en_GB.po @@ -0,0 +1,466 @@ +# English translations for PACKAGE package. +# Copyright (C) 2018 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Automatically generated, 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" +"PO-Revision-Date: 2018-06-28 09:54+0000\n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: en_GB\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" +msgstr "The file could not be found" + +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 +msgid "File injection" +msgstr "File injection" + +#: front/clientinjection.form.php:50 +msgid "One mandatory field is not filled" +msgstr "One mandatory field is not filled" + +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" +msgstr "See the file" + +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" +msgstr "File injection report" + +#: front/mapping.form.php:60 +msgid "" +"One link field must be selected: it will be used to check if data already " +"exists" +msgstr "" +"One link field must be selected: it will be used to check if data already " +"exists" + +#: front/mapping.form.php:76 +msgid "" +"This step allows you to add informations not present in the file. You'll be " +"asked for theses informations while using the model." +msgstr "" +"This step allows you to add informations not present in the file. You'll be " +"asked for theses informations while using the model." + +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" +msgstr "Can't create folder" + +#: inc/commoninjectionlib.class.php:1876 +msgid "Add from CSV file" +msgstr "Add from CSV file" + +#: inc/commoninjectionlib.class.php:1878 +msgid "Update from CSV file" +msgstr "Update from CSV file" + +#: inc/commoninjectionlib.class.php:1919 +msgid "No right to import data" +msgstr "No right to import data" + +#: inc/commoninjectionlib.class.php:1923 +msgid "No right to update data" +msgstr "No right to update data" + +#: inc/commoninjectionlib.class.php:1927 +msgid "Size of the inserted value is to expansive" +msgstr "Size of the inserted value is to expansive" + +#: inc/commoninjectionlib.class.php:1931 +msgid "Import not allowed" +msgstr "Import not allowed" + +#: inc/commoninjectionlib.class.php:1935 +msgid "Import failed" +msgstr "Import failed" + +#: inc/commoninjectionlib.class.php:1939 +msgid "At least one mandatory field is not present" +msgstr "At least one mandatory field is not present" + +#: inc/commoninjectionlib.class.php:1943 +msgid "Data to insert are correct" +msgstr "Data to insert are correct" + +#: inc/commoninjectionlib.class.php:1947 +msgid "One data is not the good type" +msgstr "One data is not the good type" + +#: inc/commoninjectionlib.class.php:1951 +msgid "Warning" +msgstr "Warning" + +#: inc/commoninjectionlib.class.php:1955 +msgid "Data not found" +msgstr "Data not found" + +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 +msgid "Undetermined" +msgstr "Undetermined" + +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" +msgstr "Model management" + +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" +msgstr "Injection of the file" + +#: inc/webservice.class.php:78 +msgid "Model unknown" +msgstr "Model unknown" + +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" +msgstr "You cannot access this model" + +#: inc/webservice.class.php:115 +msgid "Entity unknown" +msgstr "Entity unknown" + +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" +msgstr "You cannot access this entity" + +#: inc/clientinjection.class.php:88 +msgid "Use an existing model" +msgstr "Use an existing model" + +#: inc/clientinjection.class.php:96 +msgid "No model currently available" +msgstr "No model currently available" + +#: inc/clientinjection.class.php:105 +msgid "You can start the model creation by hitting the button" +msgstr "You can start the model creation by hitting the button" + +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 +msgid "File to inject" +msgstr "File to inject" + +#: inc/clientinjection.class.php:156 inc/info.class.php:247 +msgid "Choose a file" +msgstr "Choose a file" + +#: inc/clientinjection.class.php:162 +msgid "File encoding" +msgstr "File encoding" + +#: inc/clientinjection.class.php:170 +msgid "Warning : existing data will be overridden" +msgstr "Warning : existing data will be overridden" + +#: inc/clientinjection.class.php:173 +msgid "" +"Watch out, you're about to inject data into GLPI. Are you sure you want to " +"do it ?" +msgstr "" +"Watch out, you're about to inject data into GLPI. Are you sure you want to " +"do it ?" + +#: inc/clientinjection.class.php:180 +msgid "Launch the import" +msgstr "Launch the import" + +#: inc/clientinjection.class.php:210 +msgid "Import progress" +msgstr "Import progress" + +#: inc/clientinjection.class.php:280 +#, php-format +msgid "Injection of the file... %d%%" +msgstr "Injection of the file... %d%%" + +#: inc/clientinjection.class.php:297 +msgid "Injection finished" +msgstr "Injection finished" + +#: inc/clientinjection.class.php:369 +msgid "Injection's results" +msgstr "Injection's results" + +#: inc/clientinjection.class.php:374 +msgid "Injection successful" +msgstr "Injection successful" + +#: inc/clientinjection.class.php:377 +msgid "Injection encounters errors" +msgstr "Injection encounters errors" + +#: inc/clientinjection.class.php:386 +msgid "See the log" +msgstr "See the log" + +#: inc/clientinjection.class.php:392 +msgid "Export rapport in PDF" +msgstr "Export rapport in PDF" + +#: inc/clientinjection.class.php:398 +msgid "Export the log" +msgstr "Export the log" + +#: inc/clientinjection.class.php:406 +msgid "Finish" +msgstr "Finish" + +#: inc/model.class.php:383 inc/model.class.php:669 +msgid "Allow lines creation" +msgstr "Allow lines creation" + +#: inc/model.class.php:392 inc/model.class.php:672 +msgid "Allow lines update" +msgstr "Allow lines update" + +#: inc/model.class.php:401 inc/model.class.php:657 +msgid "Type of data to import" +msgstr "Type of data to import" + +#: inc/model.class.php:411 inc/model.class.php:681 +msgid "Allow creation of dropdowns" +msgstr "Allow creation of dropdowns" + +#: inc/model.class.php:419 inc/model.class.php:685 +msgid "Dates format" +msgstr "Dates format" + +#: inc/model.class.php:428 inc/model.class.php:698 +msgid "Float format" +msgstr "Float format" + +#: inc/model.class.php:438 inc/model.class.php:707 +msgid "Try to establish network connection is possible" +msgstr "Try to establish network connection is possible" + +#: inc/model.class.php:448 inc/model.class.php:711 +msgid "Port unicity criteria" +msgstr "Port unicity criteria" + +#: inc/model.class.php:677 +msgid "Advanced options" +msgstr "Advanced options" + +#: inc/model.class.php:694 +msgid "Allow update of existing fields" +msgstr "Allow update of existing fields" + +#: inc/model.class.php:737 +msgctxt "button" +msgid "Validate the model" +msgstr "Validate the model" + +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "Mappings" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "Additional Information" + +#: inc/model.class.php:802 +msgid "Load this file" +msgstr "Load this file" + +#: inc/model.class.php:881 +msgid "Please enter a name for the model" +msgstr "Please enter a name for the model" + +#: inc/model.class.php:890 +msgid "Your model should allow import and/or update of data" +msgstr "Your model should allow import and/or update of data" + +#: inc/model.class.php:909 +msgid "You are not the initial creator of this model" +msgstr "You are not the initial creator of this model" + +#: inc/model.class.php:972 +#, php-format +msgid "Impossible to copy the file in %s" +msgstr "Impossible to copy the file in %s" + +#: inc/model.class.php:980 +msgid "File format is wrong" +msgstr "File format is wrong" + +#: inc/model.class.php:981 +msgid "Extension csv required" +msgstr "Extension csv required" + +#: inc/model.class.php:1058 +msgid "Not data to import" +msgstr "Not data to import" + +#: inc/model.class.php:1118 +msgid "The file is ok." +msgstr "The file is ok." + +#: inc/model.class.php:1143 +msgid "The number of columns of the file is incorrect." +msgstr "The number of columns of the file is incorrect." + +#: inc/model.class.php:1145 +#, php-format +msgid "%d awaited column" +msgid_plural "%d awaited columns" +msgstr[0] "%d awaited column" +msgstr[1] "%d awaited columns" + +#: inc/model.class.php:1150 +#, php-format +msgid "%d found column" +msgid_plural "%d found columns" +msgstr[0] "%d found column" +msgstr[1] "%d found columns" + +#: inc/model.class.php:1190 +msgid "At least one column is incorrect" +msgstr "At least one column is incorrect" + +#: inc/model.class.php:1198 +msgid "Into the file" +msgstr "Into the file" + +#: inc/model.class.php:1203 +msgid "From the model" +msgstr "From the model" + +#: inc/model.class.php:1434 inc/model.class.php:1517 +msgid "Array of successful injections" +msgstr "Array of successful injections" + +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 +msgid "Line" +msgstr "Line" + +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 +msgid "Data Import" +msgstr "Data Import" + +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 +msgid "Injection type" +msgstr "Injection type" + +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 +msgid "Object Identifier" +msgstr "Object Identifier" + +#: inc/model.class.php:1464 inc/model.class.php:1537 +msgid "Array of unsuccessful injections" +msgstr "Array of unsuccessful injections" + +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 +msgid "Data check" +msgstr "Data check" + +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" +msgstr "-------Choose a table-------" + +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" +msgstr "-------Choose a field-------" + +#: inc/networkequipmentinjection.class.php:72 +msgid "Number of ports" +msgstr "Number of ports" + +#: inc/mapping.class.php:123 +msgid "Header of the file" +msgstr "Header of the file" + +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" +msgstr "Tables" + +#: inc/mapping.class.php:126 +msgid "Link field" +msgstr "Link field" + +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" +msgstr "Mandatory information" + +#: inc/info.class.php:142 +msgid "Fields" +msgstr "Fields" + +#: inc/info.class.php:246 +msgid "Complementary information" +msgstr "Complementary information" + +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "Download file sample" + +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "dd-mm-yyyy" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "mm-dd-yyyy" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "yyyy-mm-dd" + +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "1 234.56" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "1,234.56" + +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "Model available for use" + +#: inc/dropdown.class.php:119 +msgid "Automatic detection" +msgstr "Automatic detection" + +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "UTF-8" + +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "ISO8859-1" + +#: inc/modelcsv.class.php:160 +msgid "Specific file format options" +msgstr "Specific file format options" + +#: inc/modelcsv.class.php:163 +msgid "Header's presence" +msgstr "Header's presence" + +#: inc/modelcsv.class.php:167 +msgid "File delimitor" +msgstr "File delimitor" + +#: inc/networkportinjection.class.php:89 +msgid "Port MAC address" +msgstr "Port MAC address" diff --git a/locales/fi_FI.mo b/locales/fi_FI.mo new file mode 100644 index 00000000..5f9d30e1 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 00000000..d63b9181 --- /dev/null +++ b/locales/fi_FI.po @@ -0,0 +1,465 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Cédric Anne, 2018\n" +"Language-Team: Finnish (Finland) (https://www.transifex.com/teclib/teams/28042/fi_FI/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: fi_FI\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" +msgstr "Tiedostoa ei löytynyt" + +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 +msgid "File injection" +msgstr "Tietojen tuonti" + +#: front/clientinjection.form.php:50 +msgid "One mandatory field is not filled" +msgstr "Pakollista kenttää ei ole täytetty" + +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" +msgstr "Katso tiedosto" + +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" +msgstr "Tiedoston tuontiraportti" + +#: front/mapping.form.php:60 +msgid "" +"One link field must be selected: it will be used to check if data already " +"exists" +msgstr "" +"Yksi linkkikenttä on valittava: sitä käytetään tarkistamaan, onko tietoja jo" +" olemassa." + +#: front/mapping.form.php:76 +msgid "" +"This step allows you to add informations not present in the file. You'll be " +"asked for theses informations while using the model." +msgstr "" +"Tässä vaiheessa voit lisätä tietoja, joita ei ole tiedostossa. Sinulta " +"kysytään näitä tietoja, kun käytät mallia." + +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" +msgstr "Kansioa ei voi luoda" + +#: inc/commoninjectionlib.class.php:1876 +msgid "Add from CSV file" +msgstr "Lisää CSV-tiedostosta" + +#: inc/commoninjectionlib.class.php:1878 +msgid "Update from CSV file" +msgstr "Päivitä CSV-tiedostosta" + +#: inc/commoninjectionlib.class.php:1919 +msgid "No right to import data" +msgstr "Ei oikeutta tuoda tietoja" + +#: inc/commoninjectionlib.class.php:1923 +msgid "No right to update data" +msgstr "Ei oikeutta päivittää tietoja" + +#: inc/commoninjectionlib.class.php:1927 +msgid "Size of the inserted value is to expansive" +msgstr "Syötetyn arvo koko laajeneva" + +#: inc/commoninjectionlib.class.php:1931 +msgid "Import not allowed" +msgstr "Tuonti ei sallittu" + +#: inc/commoninjectionlib.class.php:1935 +msgid "Import failed" +msgstr "Tuonti epäonnistui" + +#: inc/commoninjectionlib.class.php:1939 +msgid "At least one mandatory field is not present" +msgstr "Ainakin yksi pakollinen kenttä puuttuu" + +#: inc/commoninjectionlib.class.php:1943 +msgid "Data to insert are correct" +msgstr "Syötetyt tiedot ovat oikeita" + +#: inc/commoninjectionlib.class.php:1947 +msgid "One data is not the good type" +msgstr "Yksi tieto ei ole oikeaa tyyppiä" + +#: inc/commoninjectionlib.class.php:1951 +msgid "Warning" +msgstr "Varoitus" + +#: inc/commoninjectionlib.class.php:1955 +msgid "Data not found" +msgstr "Tietoja ei löytynyt" + +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 +msgid "Undetermined" +msgstr "Määrittelemätön" + +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" +msgstr "Mallinhallinta" + +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" +msgstr "Tiedoston tuonti" + +#: inc/webservice.class.php:78 +msgid "Model unknown" +msgstr "Malli tuntematon" + +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" +msgstr "Et voi käyttää tätä mallia" + +#: inc/webservice.class.php:115 +msgid "Entity unknown" +msgstr "Tuntematon yksikkö" + +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" +msgstr "Ei pääsyä tähän yksikköön" + +#: inc/clientinjection.class.php:88 +msgid "Use an existing model" +msgstr "Käytä olemassa olevaa mallia" + +#: inc/clientinjection.class.php:96 +msgid "No model currently available" +msgstr "Ei saatavilla olevaa mallia" + +#: inc/clientinjection.class.php:105 +msgid "You can start the model creation by hitting the button" +msgstr "Voit aloittaa mallin luomisen napsauttamalla painiketta" + +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 +msgid "File to inject" +msgstr "Tuotava tiedosto" + +#: inc/clientinjection.class.php:156 inc/info.class.php:247 +msgid "Choose a file" +msgstr "Valitse tiedosto" + +#: inc/clientinjection.class.php:162 +msgid "File encoding" +msgstr "Tiedoston koodaus" + +#: inc/clientinjection.class.php:170 +msgid "Warning : existing data will be overridden" +msgstr "Varoitus: olemassa olevat tiedot korvataan" + +#: inc/clientinjection.class.php:173 +msgid "" +"Watch out, you're about to inject data into GLPI. Are you sure you want to " +"do it ?" +msgstr "Huomio! Olet tuomassa tietoja GLPI:hen. Haluatko varmasti tehdä sen?" + +#: inc/clientinjection.class.php:180 +msgid "Launch the import" +msgstr "Käynnistä tuonti" + +#: inc/clientinjection.class.php:210 +msgid "Import progress" +msgstr "Tuonnin edistyminen" + +#: inc/clientinjection.class.php:280 +#, php-format +msgid "Injection of the file... %d%%" +msgstr "Tiedostoa käsitellään... %d %%" + +#: inc/clientinjection.class.php:297 +msgid "Injection finished" +msgstr "Tuonti suoritettu loppuun" + +#: inc/clientinjection.class.php:369 +msgid "Injection's results" +msgstr "Tuonnin tulokset" + +#: inc/clientinjection.class.php:374 +msgid "Injection successful" +msgstr "Tuonti onnistui" + +#: inc/clientinjection.class.php:377 +msgid "Injection encounters errors" +msgstr "Tuonti sisälsi virheitä" + +#: inc/clientinjection.class.php:386 +msgid "See the log" +msgstr "Katso loki" + +#: inc/clientinjection.class.php:392 +msgid "Export rapport in PDF" +msgstr "Vie raportti PDF-muodossa" + +#: inc/clientinjection.class.php:398 +msgid "Export the log" +msgstr "Vie loki" + +#: inc/clientinjection.class.php:406 +msgid "Finish" +msgstr "Lopeta" + +#: inc/model.class.php:383 inc/model.class.php:669 +msgid "Allow lines creation" +msgstr "Salli rivien luominen" + +#: inc/model.class.php:392 inc/model.class.php:672 +msgid "Allow lines update" +msgstr "Salli rivien päivitys" + +#: inc/model.class.php:401 inc/model.class.php:657 +msgid "Type of data to import" +msgstr "Tuotavan tiedon tyyppi" + +#: inc/model.class.php:411 inc/model.class.php:681 +msgid "Allow creation of dropdowns" +msgstr "Salli alasvetovalikoiden luominen" + +#: inc/model.class.php:419 inc/model.class.php:685 +msgid "Dates format" +msgstr "Päiväyksen muoto" + +#: inc/model.class.php:428 inc/model.class.php:698 +msgid "Float format" +msgstr "Numeromuoto" + +#: inc/model.class.php:438 inc/model.class.php:707 +msgid "Try to establish network connection is possible" +msgstr "Mahdollisuus yrittää verkkoyhteyden luomista" + +#: inc/model.class.php:448 inc/model.class.php:711 +msgid "Port unicity criteria" +msgstr "Porttiyhtenäisyyden kriteerit" + +#: inc/model.class.php:677 +msgid "Advanced options" +msgstr "Edistyneet asetukset" + +#: inc/model.class.php:694 +msgid "Allow update of existing fields" +msgstr "Salli nykyisten kenttien päivittäminen" + +#: inc/model.class.php:737 +msgctxt "button" +msgid "Validate the model" +msgstr "Vahvista malli" + +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "Linkitykset" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "Lisätiedot" + +#: inc/model.class.php:802 +msgid "Load this file" +msgstr "Lataa tämä tiedosto" + +#: inc/model.class.php:881 +msgid "Please enter a name for the model" +msgstr "Anna mallille nimi" + +#: inc/model.class.php:890 +msgid "Your model should allow import and/or update of data" +msgstr "Mallin pitäisi sallia tietojen tuonti ja/tai päivitys" + +#: inc/model.class.php:909 +msgid "You are not the initial creator of this model" +msgstr "Et ole tämän mallin alkuperäinen tekijä" + +#: inc/model.class.php:972 +#, php-format +msgid "Impossible to copy the file in %s" +msgstr "Tiedostoa ei voi kopioida %s" + +#: inc/model.class.php:980 +msgid "File format is wrong" +msgstr "Tiedostomuoto on väärä" + +#: inc/model.class.php:981 +msgid "Extension csv required" +msgstr "CSV-tiedostotunniste vaaditaan" + +#: inc/model.class.php:1058 +msgid "Not data to import" +msgstr "Ei tuotavia tietoja" + +#: inc/model.class.php:1118 +msgid "The file is ok." +msgstr "Tiedosto on kunnossa." + +#: inc/model.class.php:1143 +msgid "The number of columns of the file is incorrect." +msgstr "Tiedoston sarakkeiden määrä on virheellinen." + +#: inc/model.class.php:1145 +#, php-format +msgid "%d awaited column" +msgid_plural "%d awaited columns" +msgstr[0] "%d odottava sarake" +msgstr[1] "%d odottavaa saraketta" + +#: inc/model.class.php:1150 +#, php-format +msgid "%d found column" +msgid_plural "%d found columns" +msgstr[0] "%d löytynyt sarake" +msgstr[1] "%d löydettyä saraketta" + +#: inc/model.class.php:1190 +msgid "At least one column is incorrect" +msgstr "Ainakin yksi sarake on väärä" + +#: inc/model.class.php:1198 +msgid "Into the file" +msgstr "Tiedostoon" + +#: inc/model.class.php:1203 +msgid "From the model" +msgstr "Mallista" + +#: inc/model.class.php:1434 inc/model.class.php:1517 +msgid "Array of successful injections" +msgstr "Tuonti onnistui" + +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 +msgid "Line" +msgstr "Rivi" + +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 +msgid "Data Import" +msgstr "Tuo tiedot" + +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 +msgid "Injection type" +msgstr "Tuonnin tyyppi" + +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 +msgid "Object Identifier" +msgstr "Kohteen tunniste" + +#: inc/model.class.php:1464 inc/model.class.php:1537 +msgid "Array of unsuccessful injections" +msgstr "Tuonti epäonnistui" + +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 +msgid "Data check" +msgstr "Tietojen tarkistus" + +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" +msgstr "-------Valitse taulukko-------" + +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" +msgstr "-------Valitse kenttä-------" + +#: inc/networkequipmentinjection.class.php:72 +msgid "Number of ports" +msgstr "Porttien lukumäärä" + +#: inc/mapping.class.php:123 +msgid "Header of the file" +msgstr "Tiedoston otsikko" + +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" +msgstr "Taulukot" + +#: inc/mapping.class.php:126 +msgid "Link field" +msgstr "Linkkikenttä" + +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" +msgstr "Pakollinen tieto" + +#: inc/info.class.php:142 +msgid "Fields" +msgstr "Kentät" + +#: inc/info.class.php:246 +msgid "Complementary information" +msgstr "Täydentävät tiedot" + +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "Lataa näytetiedosto" + +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "pp-kk-vvvv" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "kk-pp-vvvv" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "vvvv-kk-pp" + +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "1 234.56" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "1,234.56" + +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "Malli on käytettävissä" + +#: inc/dropdown.class.php:119 +msgid "Automatic detection" +msgstr "Automaattinen tunnistus" + +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "UTF-8" + +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "ISO8859-1" + +#: inc/modelcsv.class.php:160 +msgid "Specific file format options" +msgstr "Erityiset tiedostomuotoasetukset" + +#: inc/modelcsv.class.php:163 +msgid "Header's presence" +msgstr "Otsikko on olemassa" + +#: inc/modelcsv.class.php:167 +msgid "File delimitor" +msgstr "Tietojen erotinmerkki" + +#: inc/networkportinjection.class.php:89 +msgid "Port MAC address" +msgstr "Portin MAC-osoite" diff --git a/locales/fr.mo b/locales/fr.mo deleted file mode 100644 index 1b67003e..00000000 Binary files a/locales/fr.mo and /dev/null differ diff --git a/locales/fr.po b/locales/fr.po deleted file mode 100644 index 60afa636..00000000 --- a/locales/fr.po +++ /dev/null @@ -1,471 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Datainjection Development Team -# This file is distributed under the same license as the GLPI - Datainjection plugin package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: GLPI - Datainjection plugin 2.3.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-22 22:57+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Thierry Bugier , 2017\n" -"Language-Team: French (https://www.transifex.com/teclib/teams/28042/fr/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" -"Language: fr\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: hook.php:115 hook.php:129 setup.php:50 -msgid "Can't create folder" -msgstr "Impossible de créer le dossier" - -#: setup.php:76 front/clientinjection.form.php:33 inc/menu.class.php:36 -#: inc/profile.class.php:64 -msgid "File injection" -msgstr "Injection de fichiers" - -#: setup.php:89 -msgid "This plugin requires GLPI 0.85 or higher" -msgstr "Ce plugin nécessite GLPI >= 0.85" - -#: front/clientinjection.form.php:47 -msgid "One mandatory field is not filled" -msgstr "Un champ obligatoire n'est pas rempli" - -#: front/clientinjection.form.php:77 front/model.form.php:83 -msgid "The file could not be found" -msgstr "Le fichier est introuvable" - -#: front/mapping.form.php:58 -msgid "" -"One link field must be selected: it will be used to check if data already " -"exists" -msgstr "" -"Au moins un champ de liaison doit être sélectionné: il sera utilisé pour " -"vérifier si des données existent déjà" - -#: front/mapping.form.php:68 -msgid "" -"This step allows you to add informations not present in the file. You'll be " -"asked for theses informations while using the model." -msgstr "" -"Vous pouvez à présent définir des données qui devront être saisies " -"manuellement au moment de l'import." - -#: front/popup.php:37 inc/mapping.class.php:109 -msgid "See the file" -msgstr "Voir un aperçu du fichier" - -#: front/popup.php:43 inc/model.class.php:1350 -msgid "File injection report" -msgstr "Rapport d'injection du fichier" - -#: inc/clientinjection.class.php:81 -msgid "Use an existing model" -msgstr "Utiliser un modèle existant" - -#: inc/clientinjection.class.php:89 -msgid "No model currently available" -msgstr "Aucun modèle n'est disponible actuellement" - -#: inc/clientinjection.class.php:95 -msgid "You can start the model creation by hitting the button" -msgstr "Vous pouvez en créer un en cliquant sur le bouton" - -#: inc/clientinjection.class.php:140 inc/dropdown.class.php:86 -#: inc/model.class.php:652 -msgid "File to inject" -msgstr "Fichier à injecter" - -#: inc/clientinjection.class.php:143 inc/info.class.php:232 -msgid "Choose a file" -msgstr "Choix du fichier" - -#: inc/clientinjection.class.php:149 -msgid "File encoding" -msgstr "Encodage du fichier" - -#: inc/clientinjection.class.php:157 -msgid "Warning : existing data will be overridden" -msgstr "Attention : Les données existantes seront écrasées !" - -#: inc/clientinjection.class.php:159 -msgid "" -"Watch out, you're about to inject data into GLPI. Are you sure you want to " -"do it ?" -msgstr "" -"Attention, vous êtes sur le point d'importer des données dans GLPI. Êtes-" -"vous sûr de vouloir le faire ?" - -#: inc/clientinjection.class.php:165 -msgid "Launch the import" -msgstr "Procéder à l'import" - -#: inc/clientinjection.class.php:195 -msgid "Import progress" -msgstr "Etat d'avancement de l'import" - -#: inc/clientinjection.class.php:199 inc/menu.class.php:52 -#: inc/menu.class.php:53 inc/profile.class.php:41 -msgid "Injection of the file" -msgstr "Importation du fichier" - -#: inc/clientinjection.class.php:258 -#, php-format -msgid "Injection of the file... %d%%" -msgstr "Importation du fichier... %d%%" - -#: inc/clientinjection.class.php:269 -msgid "Injection finished" -msgstr "Importation terminée" - -#: inc/clientinjection.class.php:338 -msgid "Injection's results" -msgstr "Résultat de l'importation" - -#: inc/clientinjection.class.php:343 -msgid "Injection successful" -msgstr "L'importation a réussi" - -#: inc/clientinjection.class.php:346 -msgid "Injection encounters errors" -msgstr "L'importation a rencontré des erreurs" - -#: inc/clientinjection.class.php:355 -msgid "See the log" -msgstr "Voir le rapport" - -#: inc/clientinjection.class.php:361 -msgid "Export rapport in PDF" -msgstr "Exporter le rapport en PDF" - -#: inc/clientinjection.class.php:367 -msgid "Export the log" -msgstr "Générer CSV des erreurs" - -#: inc/clientinjection.class.php:375 -msgid "Finish" -msgstr "Terminer" - -#: inc/commoninjectionlib.class.php:1817 -msgid "Add from CSV file" -msgstr "Ajout depuis le fichier CSV" - -#: inc/commoninjectionlib.class.php:1819 -msgid "Update from CSV file" -msgstr "Mis à jour depuis le fichier CSV" - -#: inc/commoninjectionlib.class.php:1860 -msgid "No right to import data" -msgstr "Vous n'avez pas les droits nécessaires pour importer des données" - -#: inc/commoninjectionlib.class.php:1864 -msgid "No right to update data" -msgstr "Vous n'avez pas les droits nécessaires pour mettre à jour des données" - -#: inc/commoninjectionlib.class.php:1868 -msgid "Size of the inserted value is to expansive" -msgstr "Le nombre de valeurs à insérer est trop important" - -#: inc/commoninjectionlib.class.php:1872 -msgid "Import not allowed" -msgstr "Import interdit" - -#: inc/commoninjectionlib.class.php:1876 -msgid "Import failed" -msgstr "Import impossible" - -#: inc/commoninjectionlib.class.php:1880 -msgid "At least one mandatory field is not present" -msgstr "Au moins un champ obligatoire n'est pas rempli" - -#: inc/commoninjectionlib.class.php:1884 -msgid "Data to insert are correct" -msgstr "Les données à importer sont valides" - -#: inc/commoninjectionlib.class.php:1888 -msgid "One data is not the good type" -msgstr "Au moins une donnée n'a pas le bon format / type" - -#: inc/commoninjectionlib.class.php:1892 -msgid "Warning" -msgstr "Attention" - -#: inc/commoninjectionlib.class.php:1896 -msgid "Data not found" -msgstr "Donnée introuvable" - -#: inc/commoninjectionlib.class.php:1900 inc/model.class.php:1215 -msgid "Undetermined" -msgstr "Indéterminé" - -#: inc/dropdown.class.php:36 -msgid "dd-mm-yyyy" -msgstr "jj-mm-aaaa" - -#: inc/dropdown.class.php:38 -msgid "mm-dd-yyyy" -msgstr "mm-jj-aaaa" - -#: inc/dropdown.class.php:40 -msgid "yyyy-mm-dd" -msgstr "aaaa-mm-jj" - -#: inc/dropdown.class.php:59 -msgid "1 234.56" -msgstr "1 234.56" - -#: inc/dropdown.class.php:61 -msgid "1 234,56" -msgstr "1 234,56" - -#: inc/dropdown.class.php:63 -msgid "1,234.56" -msgstr "1,234.56" - -#: inc/dropdown.class.php:87 inc/model.class.php:654 -msgid "Mappings" -msgstr "Correspondances" - -#: inc/dropdown.class.php:88 inc/model.class.php:657 -msgid "Additional Information" -msgstr "Infos complémentaires" - -#: inc/dropdown.class.php:90 -msgid "Model available for use" -msgstr "Modèle utilisable" - -#: inc/dropdown.class.php:113 -msgid "Automatic detection" -msgstr "Détection automatique" - -#: inc/dropdown.class.php:115 -msgid "UTF-8" -msgstr "UTF-8" - -#: inc/dropdown.class.php:116 -msgid "ISO8859-1" -msgstr "ISO8859-1" - -#: inc/info.class.php:78 inc/info.class.php:134 inc/mapping.class.php:116 -msgid "Tables" -msgstr "Tables" - -#: inc/info.class.php:80 inc/info.class.php:136 -msgid "Mandatory information" -msgstr "Information obligatoire" - -#: inc/info.class.php:135 -msgid "Fields" -msgstr "Champs" - -#: inc/info.class.php:231 -msgid "Complementary information" -msgstr "Information complémentaire" - -#: inc/info.class.php:240 -msgid "Download file sample" -msgstr "Téléchargement fichier exemple" - -#: inc/injectiontype.class.php:121 -msgid "-------Choose a table-------" -msgstr "-------Choisir une table-------" - -#: inc/injectiontype.class.php:177 -msgid "-------Choose a field-------" -msgstr "-------Choisir un champ-------" - -#: inc/mapping.class.php:115 -msgid "Header of the file" -msgstr "En-tête du fichier" - -#: inc/mapping.class.php:118 -msgid "Link field" -msgstr "Champs de liaison" - -#: inc/model.class.php:73 inc/profile.class.php:38 -msgid "Model management" -msgstr "Gestion des modèles" - -#: inc/model.class.php:339 inc/model.class.php:558 -msgid "Allow lines creation" -msgstr "Création des lignes" - -#: inc/model.class.php:345 inc/model.class.php:561 -msgid "Allow lines update" -msgstr "Mise à jour des lignes" - -#: inc/model.class.php:351 inc/model.class.php:546 -msgid "Type of data to import" -msgstr "Type de données à importer" - -#: inc/model.class.php:358 inc/model.class.php:570 -msgid "Allow creation of dropdowns" -msgstr "Ajouter des intitulés" - -#: inc/model.class.php:363 inc/model.class.php:574 -msgid "Dates format" -msgstr "Format des dates" - -#: inc/model.class.php:369 inc/model.class.php:585 -msgid "Float format" -msgstr "Format des nombres décimaux" - -#: inc/model.class.php:375 inc/model.class.php:592 -msgid "Try to establish network connection is possible" -msgstr "Essayer de réaliser les connexions réseau" - -#: inc/model.class.php:381 inc/model.class.php:596 -msgid "Port unicity criteria" -msgstr "Critère d'unicité d'un port" - -#: inc/model.class.php:566 -msgid "Advanced options" -msgstr "Options avancées" - -#: inc/model.class.php:581 -msgid "Allow update of existing fields" -msgstr "Mise à jour des champs existants" - -#: inc/model.class.php:620 -msgctxt "button" -msgid "Validate the model" -msgstr "Valider le modèle" - -#: inc/model.class.php:685 -msgid "Load this file" -msgstr "Charger le fichier" - -#: inc/model.class.php:763 -msgid "Please enter a name for the model" -msgstr "Merci d'entrer un nom pour le modèle" - -#: inc/model.class.php:769 -msgid "Your model should allow import and/or update of data" -msgstr "Votre modèle devrait permettre l'import ou la mise à jour de données" - -#: inc/model.class.php:791 -msgid "You are not the initial creator of this model" -msgstr "Vous n'êtes pas le créateur de ce modèle" - -#: inc/model.class.php:851 -#, php-format -msgid "Impossible to copy the file in %s" -msgstr "Impossible de copier le fichier dans %s" - -#: inc/model.class.php:858 -msgid "File format is wrong" -msgstr "Le fichier n'a pas le bon format" - -#: inc/model.class.php:859 -msgid "Extension csv required" -msgstr "L'extension csv est requise" - -#: inc/model.class.php:933 -msgid "Not data to import" -msgstr "Pas de données à insérer" - -#: inc/model.class.php:986 -msgid "The file is ok." -msgstr "The fichier est ok." - -#: inc/model.class.php:1009 -msgid "The number of columns of the file is incorrect." -msgstr "Le nombre de colonnes du fichier n'est pas correct : " - -#: inc/model.class.php:1010 -#, php-format -msgid "%d awaited column" -msgid_plural "%d awaited columns" -msgstr[0] "%d Colonne attendue" -msgstr[1] "%d Colonnes attendues" - -#: inc/model.class.php:1012 -#, php-format -msgid "%d found column" -msgid_plural "%d found columns" -msgstr[0] "%d Colonne trouvée" -msgstr[1] "%d Colonnes trouvées" - -#: inc/model.class.php:1046 -msgid "At least one column is incorrect" -msgstr "Au moins une colonne est incorrecte : " - -#: inc/model.class.php:1053 -msgid "Into the file" -msgstr "Dans le fichier" - -#: inc/model.class.php:1056 -msgid "From the model" -msgstr "Depuis le modèle" - -#: inc/model.class.php:1278 inc/model.class.php:1357 -msgid "Array of successful injections" -msgstr "Tableau des imports qui ont réussis" - -#: inc/model.class.php:1285 inc/model.class.php:1315 inc/model.class.php:1360 -#: inc/model.class.php:1378 -msgid "Line" -msgstr "Ligne" - -#: inc/model.class.php:1286 inc/model.class.php:1317 inc/model.class.php:1361 -#: inc/model.class.php:1380 -msgid "Data Import" -msgstr "Import des données" - -#: inc/model.class.php:1287 inc/model.class.php:1318 inc/model.class.php:1362 -#: inc/model.class.php:1381 -msgid "Injection type" -msgstr "Type d'injection" - -#: inc/model.class.php:1288 inc/model.class.php:1319 inc/model.class.php:1363 -#: inc/model.class.php:1382 -msgid "Object Identifier" -msgstr "Identifiant de l'objet" - -#: inc/model.class.php:1308 inc/model.class.php:1375 -msgid "Array of unsuccessful injections" -msgstr "Tableau des imports qui ont échoués ou partiellement réussis" - -#: inc/model.class.php:1316 inc/model.class.php:1379 inc/model.class.php:1393 -msgid "Data check" -msgstr "Vérification des données" - -#: inc/modelcsv.class.php:149 -msgid "Specific file format options" -msgstr "Options spécifiques au format de fichier" - -#: inc/modelcsv.class.php:152 -msgid "Header's presence" -msgstr "Présence d'un en-tête" - -#: inc/modelcsv.class.php:156 -msgid "File delimitor" -msgstr "Délimiteur du fichier" - -#: inc/networkequipmentinjection.class.php:69 -msgid "Number of ports" -msgstr "Nombre de ports" - -#: inc/networkportinjection.class.php:85 -msgid "Port MAC address" -msgstr "Adresse MAC du port" - -#: inc/webservice.class.php:70 -msgid "Model unknown" -msgstr "Modèle inconnu" - -#: inc/webservice.class.php:75 inc/webservice.class.php:80 -msgid "You cannot access this model" -msgstr "Vous n'avez pas le droit d'accéder à ce modèle" - -#: inc/webservice.class.php:95 -msgid "Entity unknown" -msgstr "Entité inconnue" - -#: inc/webservice.class.php:100 -msgid "You cannot access this entity" -msgstr "Vous ne pouvez pas accéder à cette entité" diff --git a/locales/fr_FR.mo b/locales/fr_FR.mo index 48e75b20..bcda5853 100644 Binary files a/locales/fr_FR.mo and b/locales/fr_FR.mo differ diff --git a/locales/fr_FR.po b/locales/fr_FR.po index b7c84786..e47b3138 100644 --- a/locales/fr_FR.po +++ b/locales/fr_FR.po @@ -1,56 +1,45 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Datainjection Development Team +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. -# +# +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Datainjection plugin 2.3.0\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-07-17 16:10+0200\n" -"PO-Revision-Date: 2015-02-24 09:43+0100\n" -"Last-Translator: Jérémy MOREAU \n" -"Language-Team: LANGUAGE \n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: Cédric Anne, 2018\n" +"Language-Team: French (France) (https://www.transifex.com/teclib/teams/28042/fr_FR/)\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Language: fr_FR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 1.5.4\n" -#: hook.php:120 hook.php:134 -msgid "Can't create folder" -msgstr "Impossible de créer le dossier" - -#: setup.php:52 setup.php:132 -#, php-format -msgid "%s must exists and be writable for web server user" -msgstr "" -"%s doit exister et être accessible en écriture pour l'utilisateur du serveur " -"Web" - -#: setup.php:58 setup.php:59 inc/clientinjection.class.php:194 -msgid "Injection of the file" -msgstr "Importation du fichier" +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" +msgstr "Le fichier est introuvable" -#: setup.php:103 front/clientinjection.form.php:33 inc/profile.class.php:71 -#: inc/profile.class.php:141 +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 msgid "File injection" msgstr "Injection de fichiers" -#: setup.php:137 -msgid "This plugin requires GLPI >= 0.84" -msgstr "Ce plugin nécessite GLPI >= 0.84" - -#: front/clientinjection.form.php:47 +#: front/clientinjection.form.php:50 msgid "One mandatory field is not filled" msgstr "Un champ obligatoire n'est pas rempli" -#: front/clientinjection.form.php:77 front/model.form.php:83 -msgid "The file could not be found" -msgstr "Le fichier est introuvable" +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" +msgstr "Voir un aperçu du fichier" -#: front/mapping.form.php:58 +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" +msgstr "Rapport d'injection du fichier" + +#: front/mapping.form.php:60 msgid "" "One link field must be selected: it will be used to check if data already " "exists" @@ -58,7 +47,7 @@ msgstr "" "Au moins un champ de liaison doit être sélectionné: il sera utilisé pour " "vérifier si des données existent déjà" -#: front/mapping.form.php:68 +#: front/mapping.form.php:76 msgid "" "This step allows you to add informations not present in the file. You'll be " "asked for theses informations while using the model." @@ -66,442 +55,413 @@ msgstr "" "Vous pouvez à présent définir des données qui devront être saisies " "manuellement au moment de l'import." -#: front/popup.php:37 inc/mapping.class.php:118 -msgid "See the file" -msgstr "Voir un aperçu du fichier" +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" +msgstr "Impossible de créer le dossier" -#: front/popup.php:43 inc/model.class.php:1357 -msgid "File injection report" -msgstr "Rapport d'injection du fichier" +#: inc/commoninjectionlib.class.php:1876 +msgid "Add from CSV file" +msgstr "Ajout depuis le fichier CSV" + +#: inc/commoninjectionlib.class.php:1878 +msgid "Update from CSV file" +msgstr "Mis à jour depuis le fichier CSV" + +#: inc/commoninjectionlib.class.php:1919 +msgid "No right to import data" +msgstr "Vous n'avez pas les droits nécessaires pour importer des données" -#: inc/clientinjection.class.php:78 +#: inc/commoninjectionlib.class.php:1923 +msgid "No right to update data" +msgstr "Vous n'avez pas les droits nécessaires pour mettre à jour des données" + +#: inc/commoninjectionlib.class.php:1927 +msgid "Size of the inserted value is to expansive" +msgstr "Le nombre de valeurs à insérer est trop important" + +#: inc/commoninjectionlib.class.php:1931 +msgid "Import not allowed" +msgstr "Import interdit" + +#: inc/commoninjectionlib.class.php:1935 +msgid "Import failed" +msgstr "Import impossible" + +#: inc/commoninjectionlib.class.php:1939 +msgid "At least one mandatory field is not present" +msgstr "Au moins un champ obligatoire n'est pas rempli" + +#: inc/commoninjectionlib.class.php:1943 +msgid "Data to insert are correct" +msgstr "Les données à importer sont valides" + +#: inc/commoninjectionlib.class.php:1947 +msgid "One data is not the good type" +msgstr "Au moins une donnée n'a pas le bon format / type" + +#: inc/commoninjectionlib.class.php:1951 +msgid "Warning" +msgstr "Attention" + +#: inc/commoninjectionlib.class.php:1955 +msgid "Data not found" +msgstr "Donnée introuvable" + +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 +msgid "Undetermined" +msgstr "Indéterminé" + +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" +msgstr "Gestion des modèles" + +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" +msgstr "Importation du fichier" + +#: inc/webservice.class.php:78 +msgid "Model unknown" +msgstr "Modèle inconnu" + +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" +msgstr "Vous n'avez pas le droit d'accéder à ce modèle" + +#: inc/webservice.class.php:115 +msgid "Entity unknown" +msgstr "Entité inconnue" + +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" +msgstr "Vous ne pouvez pas accéder à cette entité" + +#: inc/clientinjection.class.php:88 msgid "Use an existing model" msgstr "Utiliser un modèle existant" -#: inc/clientinjection.class.php:86 +#: inc/clientinjection.class.php:96 msgid "No model currently available" msgstr "Aucun modèle n'est disponible actuellement" -#: inc/clientinjection.class.php:90 +#: inc/clientinjection.class.php:105 msgid "You can start the model creation by hitting the button" msgstr "Vous pouvez en créer un en cliquant sur le bouton" -#: inc/clientinjection.class.php:135 inc/dropdown.class.php:86 -#: inc/model.class.php:659 +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 msgid "File to inject" msgstr "Fichier à injecter" -#: inc/clientinjection.class.php:138 inc/info.class.php:241 +#: inc/clientinjection.class.php:156 inc/info.class.php:247 msgid "Choose a file" msgstr "Choix du fichier" -#: inc/clientinjection.class.php:144 +#: inc/clientinjection.class.php:162 msgid "File encoding" msgstr "Encodage du fichier" -#: inc/clientinjection.class.php:152 +#: inc/clientinjection.class.php:170 msgid "Warning : existing data will be overridden" msgstr "Attention : Les données existantes seront écrasées !" -#: inc/clientinjection.class.php:154 +#: inc/clientinjection.class.php:173 msgid "" -"Watch out, you're about to inject datas into GLPI. Are you sure you want to " +"Watch out, you're about to inject data into GLPI. Are you sure you want to " "do it ?" msgstr "" -"Attention ! Vous allez importer des données dans GLPI. Etes-vous sûr de " -"vouloir continuer ?" +"Attention, vous êtes sur le point d'importer des données dans GLPI. Êtes-" +"vous sûr de vouloir le faire ?" -#: inc/clientinjection.class.php:160 +#: inc/clientinjection.class.php:180 msgid "Launch the import" msgstr "Procéder à l'import" -#: inc/clientinjection.class.php:190 +#: inc/clientinjection.class.php:210 msgid "Import progress" msgstr "Etat d'avancement de l'import" -#: inc/clientinjection.class.php:253 +#: inc/clientinjection.class.php:280 #, php-format msgid "Injection of the file... %d%%" msgstr "Importation du fichier... %d%%" -#: inc/clientinjection.class.php:264 +#: inc/clientinjection.class.php:297 msgid "Injection finished" msgstr "Importation terminée" -#: inc/clientinjection.class.php:334 +#: inc/clientinjection.class.php:369 msgid "Injection's results" msgstr "Résultat de l'importation" -#: inc/clientinjection.class.php:339 +#: inc/clientinjection.class.php:374 msgid "Injection successful" msgstr "L'importation a réussi" -#: inc/clientinjection.class.php:342 +#: inc/clientinjection.class.php:377 msgid "Injection encounters errors" msgstr "L'importation a rencontré des erreurs" -#: inc/clientinjection.class.php:351 +#: inc/clientinjection.class.php:386 msgid "See the log" msgstr "Voir le rapport" -#: inc/clientinjection.class.php:357 +#: inc/clientinjection.class.php:392 msgid "Export rapport in PDF" msgstr "Exporter le rapport en PDF" -#: inc/clientinjection.class.php:363 +#: inc/clientinjection.class.php:398 msgid "Export the log" msgstr "Générer CSV des erreurs" -#: inc/clientinjection.class.php:371 +#: inc/clientinjection.class.php:406 msgid "Finish" msgstr "Terminer" -#: inc/commoninjectionlib.class.php:1815 -msgid "Add from CSV file" -msgstr "Ajout depuis le fichier CSV" - -#: inc/commoninjectionlib.class.php:1817 -msgid "Update from CSV file" -msgstr "Mis à jour depuis le fichier CSV" - -#: inc/commoninjectionlib.class.php:1858 -msgid "No right to import data" -msgstr "Vous n'avez pas les droits nécessaires pour importer des données" - -#: inc/commoninjectionlib.class.php:1862 -msgid "No right to update data" -msgstr "Vous n'avez pas les droits nécessaires pour mettre à jour des données" - -#: inc/commoninjectionlib.class.php:1866 -msgid "Size of the inserted value is to expansive" -msgstr "Le nombre de valeurs à insérer est trop important" - -#: inc/commoninjectionlib.class.php:1870 -msgid "Import not allowed" -msgstr "Import interdit" - -#: inc/commoninjectionlib.class.php:1874 -msgid "Import failed" -msgstr "Import impossible" - -#: inc/commoninjectionlib.class.php:1878 -msgid "At least one mandatory field is not present" -msgstr "Au moins un champ obligatoire n'est pas rempli" - -#: inc/commoninjectionlib.class.php:1882 -msgid "Datas to insert are correct" -msgstr "Les données à insérer sont correctes" - -#: inc/commoninjectionlib.class.php:1886 -msgid "One data is not the good type" -msgstr "Au moins une donnée n'a pas le bon format / type" - -#: inc/commoninjectionlib.class.php:1890 -msgid "Warning" -msgstr "Attention" - -#: inc/commoninjectionlib.class.php:1894 -msgid "Data not found" -msgstr "Donnée introuvable" - -#: inc/commoninjectionlib.class.php:1898 inc/model.class.php:1222 -msgid "Undetermined" -msgstr "Indéterminé" - -#: inc/dropdown.class.php:36 -msgid "dd-mm-yyyy" -msgstr "jj-mm-aaaa" - -#: inc/dropdown.class.php:38 -msgid "mm-dd-yyyy" -msgstr "mm-jj-aaaa" - -#: inc/dropdown.class.php:40 -msgid "yyyy-mm-dd" -msgstr "aaaa-mm-jj" - -#: inc/dropdown.class.php:59 -msgid "1 234.56" -msgstr "1 234.56" - -#: inc/dropdown.class.php:61 -msgid "1 234,56" -msgstr "1 234,56" - -#: inc/dropdown.class.php:63 -msgid "1,234.56" -msgstr "1,234.56" - -#: inc/dropdown.class.php:87 inc/model.class.php:660 -msgid "Mappings" -msgstr "Correspondances" - -#: inc/dropdown.class.php:88 inc/model.class.php:663 -msgid "Additional Information" -msgstr "Infos complémentaires" - -#: inc/dropdown.class.php:90 -msgid "Model available for use" -msgstr "Modèle utilisable" - -#: inc/dropdown.class.php:113 -msgid "Automatic detection" -msgstr "Détection automatique" - -#: inc/dropdown.class.php:115 -msgid "UTF-8" -msgstr "UTF-8" - -#: inc/dropdown.class.php:116 -msgid "ISO8859-1" -msgstr "ISO8859-1" - -#: inc/info.class.php:87 inc/info.class.php:143 inc/mapping.class.php:125 -msgid "Tables" -msgstr "Tables" - -#: inc/info.class.php:89 inc/info.class.php:145 -msgid "Mandatory information" -msgstr "Information obligatoire" - -#: inc/info.class.php:144 -msgid "Fields" -msgstr "Champs" - -#: inc/info.class.php:240 -msgid "Complementary information" -msgstr "Information complémentaire" - -#: inc/info.class.php:249 -msgid "Download file sample" -msgstr "Téléchargement fichier exemple" - -#: inc/injectiontype.class.php:121 -msgid "-------Choose a table-------" -msgstr "-------Choisir une table-------" - -#: inc/injectiontype.class.php:177 -msgid "-------Choose a field-------" -msgstr "-------Choisir un champ-------" - -#: inc/mapping.class.php:124 -msgid "Header of the file" -msgstr "En-tête du fichier" - -#: inc/mapping.class.php:127 -msgid "Link field" -msgstr "Champs de liaison" - -#: inc/model.class.php:71 -msgid "Model management" -msgstr "Gestion des modèles" - -#: inc/model.class.php:348 inc/model.class.php:568 +#: inc/model.class.php:383 inc/model.class.php:669 msgid "Allow lines creation" msgstr "Création des lignes" -#: inc/model.class.php:354 inc/model.class.php:571 +#: inc/model.class.php:392 inc/model.class.php:672 msgid "Allow lines update" msgstr "Mise à jour des lignes" -#: inc/model.class.php:360 inc/model.class.php:556 -msgid "Type of datas to import" -msgstr "Type de données à insérer" +#: inc/model.class.php:401 inc/model.class.php:657 +msgid "Type of data to import" +msgstr "Type de données à importer" -#: inc/model.class.php:367 inc/model.class.php:580 +#: inc/model.class.php:411 inc/model.class.php:681 msgid "Allow creation of dropdowns" msgstr "Ajouter des intitulés" -#: inc/model.class.php:372 inc/model.class.php:584 +#: inc/model.class.php:419 inc/model.class.php:685 msgid "Dates format" msgstr "Format des dates" -#: inc/model.class.php:378 inc/model.class.php:595 +#: inc/model.class.php:428 inc/model.class.php:698 msgid "Float format" msgstr "Format des nombres décimaux" -#: inc/model.class.php:384 inc/model.class.php:602 +#: inc/model.class.php:438 inc/model.class.php:707 msgid "Try to establish network connection is possible" msgstr "Essayer de réaliser les connexions réseau" -#: inc/model.class.php:390 inc/model.class.php:606 +#: inc/model.class.php:448 inc/model.class.php:711 msgid "Port unicity criteria" msgstr "Critère d'unicité d'un port" -#: inc/model.class.php:576 +#: inc/model.class.php:677 msgid "Advanced options" msgstr "Options avancées" -#: inc/model.class.php:591 +#: inc/model.class.php:694 msgid "Allow update of existing fields" msgstr "Mise à jour des champs existants" -#: inc/model.class.php:630 +#: inc/model.class.php:737 msgctxt "button" msgid "Validate the model" msgstr "Valider le modèle" -#: inc/model.class.php:691 +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "Correspondances" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "Infos complémentaires" + +#: inc/model.class.php:802 msgid "Load this file" msgstr "Charger le fichier" -#: inc/model.class.php:769 +#: inc/model.class.php:881 msgid "Please enter a name for the model" msgstr "Merci d'entrer un nom pour le modèle" -#: inc/model.class.php:775 +#: inc/model.class.php:890 msgid "Your model should allow import and/or update of data" msgstr "Votre modèle devrait permettre l'import ou la mise à jour de données" -#: inc/model.class.php:797 +#: inc/model.class.php:909 msgid "You are not the initial creator of this model" msgstr "Vous n'êtes pas le créateur de ce modèle" -#: inc/model.class.php:858 +#: inc/model.class.php:972 #, php-format msgid "Impossible to copy the file in %s" msgstr "Impossible de copier le fichier dans %s" -#: inc/model.class.php:865 +#: inc/model.class.php:980 msgid "File format is wrong" msgstr "Le fichier n'a pas le bon format" -#: inc/model.class.php:866 +#: inc/model.class.php:981 msgid "Extension csv required" msgstr "L'extension csv est requise" -#: inc/model.class.php:940 +#: inc/model.class.php:1058 msgid "Not data to import" msgstr "Pas de données à insérer" -#: inc/model.class.php:993 +#: inc/model.class.php:1118 msgid "The file is ok." msgstr "The fichier est ok." -#: inc/model.class.php:1016 +#: inc/model.class.php:1143 msgid "The number of columns of the file is incorrect." msgstr "Le nombre de colonnes du fichier n'est pas correct : " -#: inc/model.class.php:1017 +#: inc/model.class.php:1145 #, php-format msgid "%d awaited column" msgid_plural "%d awaited columns" msgstr[0] "%d Colonne attendue" msgstr[1] "%d Colonnes attendues" -#: inc/model.class.php:1019 +#: inc/model.class.php:1150 #, php-format msgid "%d found column" msgid_plural "%d found columns" msgstr[0] "%d Colonne trouvée" msgstr[1] "%d Colonnes trouvées" -#: inc/model.class.php:1053 +#: inc/model.class.php:1190 msgid "At least one column is incorrect" msgstr "Au moins une colonne est incorrecte : " -#: inc/model.class.php:1060 +#: inc/model.class.php:1198 msgid "Into the file" msgstr "Dans le fichier" -#: inc/model.class.php:1063 +#: inc/model.class.php:1203 msgid "From the model" msgstr "Depuis le modèle" -#: inc/model.class.php:1285 inc/model.class.php:1364 +#: inc/model.class.php:1434 inc/model.class.php:1517 msgid "Array of successful injections" msgstr "Tableau des imports qui ont réussis" -#: inc/model.class.php:1292 inc/model.class.php:1322 inc/model.class.php:1367 -#: inc/model.class.php:1385 +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 msgid "Line" msgstr "Ligne" -#: inc/model.class.php:1293 inc/model.class.php:1324 inc/model.class.php:1368 -#: inc/model.class.php:1387 +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 msgid "Data Import" msgstr "Import des données" -#: inc/model.class.php:1294 inc/model.class.php:1325 inc/model.class.php:1369 -#: inc/model.class.php:1388 +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 msgid "Injection type" msgstr "Type d'injection" -#: inc/model.class.php:1295 inc/model.class.php:1326 inc/model.class.php:1370 -#: inc/model.class.php:1389 +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 msgid "Object Identifier" msgstr "Identifiant de l'objet" -#: inc/model.class.php:1315 inc/model.class.php:1382 +#: inc/model.class.php:1464 inc/model.class.php:1537 msgid "Array of unsuccessful injections" msgstr "Tableau des imports qui ont échoués ou partiellement réussis" -#: inc/model.class.php:1323 inc/model.class.php:1386 inc/model.class.php:1400 +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 msgid "Data check" msgstr "Vérification des données" -#: inc/modelcsv.class.php:158 -msgid "Specific file format options" -msgstr "Options spécifiques au format de fichier" - -#: inc/modelcsv.class.php:161 -msgid "Header's presence" -msgstr "Présence d'un en-tête" +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" +msgstr "-------Choisir une table-------" -#: inc/modelcsv.class.php:165 -msgid "File delimitor" -msgstr "Délimiteur du fichier" +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" +msgstr "-------Choisir un champ-------" -#: inc/networkequipmentinjection.class.php:69 +#: inc/networkequipmentinjection.class.php:72 msgid "Number of ports" msgstr "Nombre de ports" -#: inc/networkportinjection.class.php:85 -msgid "Port MAC address" -msgstr "Adresse MAC du port" +#: inc/mapping.class.php:123 +msgid "Header of the file" +msgstr "En-tête du fichier" -#: inc/webservice.class.php:70 -msgid "Model unknown" -msgstr "Modèle inconnu" +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" +msgstr "Tables" -#: inc/webservice.class.php:75 inc/webservice.class.php:80 -msgid "You cannot access this model" -msgstr "Vous n'avez pas le droit d'accéder à ce modèle" +#: inc/mapping.class.php:126 +msgid "Link field" +msgstr "Champs de liaison" -#: inc/webservice.class.php:95 -msgid "Entity unknown" -msgstr "Entité inconnue" +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" +msgstr "Information obligatoire" -#: inc/webservice.class.php:100 -msgid "You cannot access this entity" -msgstr "Vous ne pouvez pas accéder à cette entité" +#: inc/info.class.php:142 +msgid "Fields" +msgstr "Champs" + +#: inc/info.class.php:246 +msgid "Complementary information" +msgstr "Information complémentaire" + +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "Téléchargement fichier exemple" -#~ msgid "required" -#~ msgstr "requise" +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "jj-mm-aaaa" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "mm-jj-aaaa" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "aaaa-mm-jj" -#~ msgid "Creation of the model on going" -#~ msgstr "Modèle en cours de création" +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "1 234.56" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "1,234.56" -#~ msgid "List of the models" -#~ msgstr "Liste des modèles" +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "Modèle utilisable" -#~ msgid "Connected to : device name" -#~ msgstr "Connecté à : Nom actif" +#: inc/dropdown.class.php:119 +msgid "Automatic detection" +msgstr "Détection automatique" -#~ msgid "Connected to : port number" -#~ msgstr "Connecté à : Numéro de port" +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "UTF-8" -#~ msgid "Datas are still in the database" -#~ msgstr "Des données sont toujours dans la base de données" +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "ISO8859-1" -#~ msgid "Import is successful" -#~ msgstr "L'import s'est bien passé" +#: inc/modelcsv.class.php:160 +msgid "Specific file format options" +msgstr "Options spécifiques au format de fichier" -#~ msgid "Data already used" -#~ msgstr "Donnée déjà utilisée" +#: inc/modelcsv.class.php:163 +msgid "Header's presence" +msgstr "Présence d'un en-tête" -#~ msgid "More than one value found" -#~ msgstr "Plus d'une valeur a été trouvé" +#: inc/modelcsv.class.php:167 +msgid "File delimitor" +msgstr "Délimiteur du fichier" -#~ msgid "Object is already linked" -#~ msgstr "L'objet est déjà lié" +#: inc/networkportinjection.class.php:89 +msgid "Port MAC address" +msgstr "Adresse MAC du port" diff --git a/locales/pt_BR.mo b/locales/pt_BR.mo index 32651d59..2e27ffc8 100644 Binary files a/locales/pt_BR.mo and b/locales/pt_BR.mo differ diff --git a/locales/pt_BR.po b/locales/pt_BR.po index 6bd0263d..86b0c71a 100644 --- a/locales/pt_BR.po +++ b/locales/pt_BR.po @@ -1,16 +1,16 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Datainjection Development Team -# This file is distributed under the same license as the GLPI - Datainjection plugin package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Datainjection plugin 2.3.0\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-22 22:57+0100\n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Arthur Ramos Schaefer , 2017\n" +"Last-Translator: Cédric Anne, 2018\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/teclib/teams/28042/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" @@ -18,28 +18,28 @@ msgstr "" "Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: hook.php:115 hook.php:129 setup.php:50 -msgid "Can't create folder" -msgstr "Não é possível criar a pasta" +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" +msgstr "O arquivo não pode ser encontrado" -#: setup.php:76 front/clientinjection.form.php:33 inc/menu.class.php:36 -#: inc/profile.class.php:64 +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 msgid "File injection" msgstr "File injection" -#: setup.php:89 -msgid "This plugin requires GLPI 0.85 or higher" -msgstr "Este plugin necessita GLPI 0.85 ou mais recente" - -#: front/clientinjection.form.php:47 +#: front/clientinjection.form.php:50 msgid "One mandatory field is not filled" msgstr "Um campo obrigatório não está preenchido" -#: front/clientinjection.form.php:77 front/model.form.php:83 -msgid "The file could not be found" -msgstr "O arquivo não pode ser encontrado" +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" +msgstr "Ver o arquivo" -#: front/mapping.form.php:58 +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" +msgstr "Relatório do File Injection" + +#: front/mapping.form.php:60 msgid "" "One link field must be selected: it will be used to check if data already " "exists" @@ -47,7 +47,7 @@ msgstr "" "Um campo linkado deve ser selecionado: ele será usado para verificar se os " "dados já existem" -#: front/mapping.form.php:68 +#: front/mapping.form.php:76 msgid "" "This step allows you to add informations not present in the file. You'll be " "asked for theses informations while using the model." @@ -56,44 +56,117 @@ msgstr "" "arquivo. Estas informações serão solicitadas quando você estiver usando o " "modelo." -#: front/popup.php:37 inc/mapping.class.php:109 -msgid "See the file" -msgstr "Ver o arquivo" +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" +msgstr "Não é possível criar a pasta" -#: front/popup.php:43 inc/model.class.php:1350 -msgid "File injection report" -msgstr "Relatório do File Injection" +#: inc/commoninjectionlib.class.php:1876 +msgid "Add from CSV file" +msgstr "Adicionar de arquivo CSV" -#: inc/clientinjection.class.php:81 +#: inc/commoninjectionlib.class.php:1878 +msgid "Update from CSV file" +msgstr "Atualizar com arquivo CSV" + +#: inc/commoninjectionlib.class.php:1919 +msgid "No right to import data" +msgstr "Sem direitos para importação dos dados" + +#: inc/commoninjectionlib.class.php:1923 +msgid "No right to update data" +msgstr "Sem direitos para atualização dos dados" + +#: inc/commoninjectionlib.class.php:1927 +msgid "Size of the inserted value is to expansive" +msgstr "O tamanho do valor inserido é expansivo" + +#: inc/commoninjectionlib.class.php:1931 +msgid "Import not allowed" +msgstr "Importação não permitida" + +#: inc/commoninjectionlib.class.php:1935 +msgid "Import failed" +msgstr "Falha na importação" + +#: inc/commoninjectionlib.class.php:1939 +msgid "At least one mandatory field is not present" +msgstr "Pelo menos um dos campos obrigatórios não está presente, verifique" + +#: inc/commoninjectionlib.class.php:1943 +msgid "Data to insert are correct" +msgstr "Dados para importação estão corretos" + +#: inc/commoninjectionlib.class.php:1947 +msgid "One data is not the good type" +msgstr "Um dado não está de acordo" + +#: inc/commoninjectionlib.class.php:1951 +msgid "Warning" +msgstr "Aviso" + +#: inc/commoninjectionlib.class.php:1955 +msgid "Data not found" +msgstr "Dados não encontrados" + +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 +msgid "Undetermined" +msgstr "Impossível determinar" + +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" +msgstr "Gerenciamento de modelos" + +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" +msgstr "Injetando o arquivo" + +#: inc/webservice.class.php:78 +msgid "Model unknown" +msgstr "Modelo desconhecido" + +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" +msgstr "Você não pode acessar este modelo" + +#: inc/webservice.class.php:115 +msgid "Entity unknown" +msgstr "Entidade desconhecida" + +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" +msgstr "Você não pode acessar essa entidade" + +#: inc/clientinjection.class.php:88 msgid "Use an existing model" msgstr "Usar um modelo existente" -#: inc/clientinjection.class.php:89 +#: inc/clientinjection.class.php:96 msgid "No model currently available" msgstr "Nenhum modelo disponível atualmente" -#: inc/clientinjection.class.php:95 +#: inc/clientinjection.class.php:105 msgid "You can start the model creation by hitting the button" msgstr "Você pode iniciar a criação do modelo, pressionando o botão" -#: inc/clientinjection.class.php:140 inc/dropdown.class.php:86 -#: inc/model.class.php:652 +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 msgid "File to inject" msgstr "Arquivo para inserção" -#: inc/clientinjection.class.php:143 inc/info.class.php:232 +#: inc/clientinjection.class.php:156 inc/info.class.php:247 msgid "Choose a file" msgstr "Escolha um arquivo" -#: inc/clientinjection.class.php:149 +#: inc/clientinjection.class.php:162 msgid "File encoding" msgstr "Codificação do arquivo" -#: inc/clientinjection.class.php:157 +#: inc/clientinjection.class.php:170 msgid "Warning : existing data will be overridden" msgstr "Atenção : os dados existentes serão sobrescritos" -#: inc/clientinjection.class.php:159 +#: inc/clientinjection.class.php:173 msgid "" "Watch out, you're about to inject data into GLPI. Are you sure you want to " "do it ?" @@ -101,372 +174,295 @@ msgstr "" "Cuidado, você está prestes a importar dados no GLPI. Você tem certeza de que" " quer fazer isso?" -#: inc/clientinjection.class.php:165 +#: inc/clientinjection.class.php:180 msgid "Launch the import" msgstr "Iniciar importação" -#: inc/clientinjection.class.php:195 +#: inc/clientinjection.class.php:210 msgid "Import progress" msgstr "Progresso da importação" -#: inc/clientinjection.class.php:199 inc/menu.class.php:52 -#: inc/menu.class.php:53 inc/profile.class.php:41 -msgid "Injection of the file" -msgstr "Injetando o arquivo" - -#: inc/clientinjection.class.php:258 +#: inc/clientinjection.class.php:280 #, php-format msgid "Injection of the file... %d%%" msgstr "Injetando o arquivo... %d%%" -#: inc/clientinjection.class.php:269 +#: inc/clientinjection.class.php:297 msgid "Injection finished" msgstr "Inserção finalizada" -#: inc/clientinjection.class.php:338 +#: inc/clientinjection.class.php:369 msgid "Injection's results" msgstr "Resultado da inserção" -#: inc/clientinjection.class.php:343 +#: inc/clientinjection.class.php:374 msgid "Injection successful" msgstr "Inserção concluída com sucesso" -#: inc/clientinjection.class.php:346 +#: inc/clientinjection.class.php:377 msgid "Injection encounters errors" msgstr "Erros encontrados" -#: inc/clientinjection.class.php:355 +#: inc/clientinjection.class.php:386 msgid "See the log" msgstr "Ver o log" -#: inc/clientinjection.class.php:361 +#: inc/clientinjection.class.php:392 msgid "Export rapport in PDF" msgstr "Exportar relatório em PDF" -#: inc/clientinjection.class.php:367 +#: inc/clientinjection.class.php:398 msgid "Export the log" msgstr "Exportar o log" -#: inc/clientinjection.class.php:375 +#: inc/clientinjection.class.php:406 msgid "Finish" msgstr "Finalizar" -#: inc/commoninjectionlib.class.php:1817 -msgid "Add from CSV file" -msgstr "Adicionar de arquivo CSV" - -#: inc/commoninjectionlib.class.php:1819 -msgid "Update from CSV file" -msgstr "Atualizar com arquivo CSV" - -#: inc/commoninjectionlib.class.php:1860 -msgid "No right to import data" -msgstr "Sem direitos para importação dos dados" - -#: inc/commoninjectionlib.class.php:1864 -msgid "No right to update data" -msgstr "Sem direitos para atualização dos dados" - -#: inc/commoninjectionlib.class.php:1868 -msgid "Size of the inserted value is to expansive" -msgstr "O tamanho do valor inserido é expansivo" - -#: inc/commoninjectionlib.class.php:1872 -msgid "Import not allowed" -msgstr "Importação não permitida" - -#: inc/commoninjectionlib.class.php:1876 -msgid "Import failed" -msgstr "Falha na importação" - -#: inc/commoninjectionlib.class.php:1880 -msgid "At least one mandatory field is not present" -msgstr "Pelo menos um dos campos obrigatórios não está presente, verifique" - -#: inc/commoninjectionlib.class.php:1884 -msgid "Data to insert are correct" -msgstr "Dados para importação estão corretos" - -#: inc/commoninjectionlib.class.php:1888 -msgid "One data is not the good type" -msgstr "Um dado não está de acordo" - -#: inc/commoninjectionlib.class.php:1892 -msgid "Warning" -msgstr "Aviso" - -#: inc/commoninjectionlib.class.php:1896 -msgid "Data not found" -msgstr "Dados não encontrados" - -#: inc/commoninjectionlib.class.php:1900 inc/model.class.php:1215 -msgid "Undetermined" -msgstr "Impossível determinar" - -#: inc/dropdown.class.php:36 -msgid "dd-mm-yyyy" -msgstr "dd-mm-yyyy" - -#: inc/dropdown.class.php:38 -msgid "mm-dd-yyyy" -msgstr "mm-dd-yyyy" - -#: inc/dropdown.class.php:40 -msgid "yyyy-mm-dd" -msgstr "yyyy-mm-dd" - -#: inc/dropdown.class.php:59 -msgid "1 234.56" -msgstr "1 234.56" - -#: inc/dropdown.class.php:61 -msgid "1 234,56" -msgstr "1 234,56" - -#: inc/dropdown.class.php:63 -msgid "1,234.56" -msgstr "1,234.56" - -#: inc/dropdown.class.php:87 inc/model.class.php:654 -msgid "Mappings" -msgstr "Mapeamento" - -#: inc/dropdown.class.php:88 inc/model.class.php:657 -msgid "Additional Information" -msgstr "Informações adicionais" - -#: inc/dropdown.class.php:90 -msgid "Model available for use" -msgstr "Modelo disponível para uso" - -#: inc/dropdown.class.php:113 -msgid "Automatic detection" -msgstr "Detecção automática" - -#: inc/dropdown.class.php:115 -msgid "UTF-8" -msgstr "UTF-8" - -#: inc/dropdown.class.php:116 -msgid "ISO8859-1" -msgstr "ISO8859-1" - -#: inc/info.class.php:78 inc/info.class.php:134 inc/mapping.class.php:116 -msgid "Tables" -msgstr "Tabelas" - -#: inc/info.class.php:80 inc/info.class.php:136 -msgid "Mandatory information" -msgstr "Informação obrigatória" - -#: inc/info.class.php:135 -msgid "Fields" -msgstr "Campos" - -#: inc/info.class.php:231 -msgid "Complementary information" -msgstr "Informação complementar" - -#: inc/info.class.php:240 -msgid "Download file sample" -msgstr "Fazer download de arquivo de exemplo" - -#: inc/injectiontype.class.php:121 -msgid "-------Choose a table-------" -msgstr "-------Escolha uma tabela-------" - -#: inc/injectiontype.class.php:177 -msgid "-------Choose a field-------" -msgstr "-------Escolha um campo-------" - -#: inc/mapping.class.php:115 -msgid "Header of the file" -msgstr "Cabeçalho do arquivo" - -#: inc/mapping.class.php:118 -msgid "Link field" -msgstr "Relacionar campos" - -#: inc/model.class.php:73 inc/profile.class.php:38 -msgid "Model management" -msgstr "Gerenciamento de modelos" - -#: inc/model.class.php:339 inc/model.class.php:558 +#: inc/model.class.php:383 inc/model.class.php:669 msgid "Allow lines creation" msgstr "Permitir criação de linhas" -#: inc/model.class.php:345 inc/model.class.php:561 +#: inc/model.class.php:392 inc/model.class.php:672 msgid "Allow lines update" msgstr "Permitir atualização de linhas" -#: inc/model.class.php:351 inc/model.class.php:546 +#: inc/model.class.php:401 inc/model.class.php:657 msgid "Type of data to import" msgstr "Tipo de arquivos para importação" -#: inc/model.class.php:358 inc/model.class.php:570 +#: inc/model.class.php:411 inc/model.class.php:681 msgid "Allow creation of dropdowns" msgstr "Permitir criação de dropdowns" -#: inc/model.class.php:363 inc/model.class.php:574 +#: inc/model.class.php:419 inc/model.class.php:685 msgid "Dates format" msgstr "Formato de data" -#: inc/model.class.php:369 inc/model.class.php:585 +#: inc/model.class.php:428 inc/model.class.php:698 msgid "Float format" msgstr "Formato de valores" -#: inc/model.class.php:375 inc/model.class.php:592 +#: inc/model.class.php:438 inc/model.class.php:707 msgid "Try to establish network connection is possible" msgstr "Tentar estabelecer uma conexão de rede se possível" -#: inc/model.class.php:381 inc/model.class.php:596 +#: inc/model.class.php:448 inc/model.class.php:711 msgid "Port unicity criteria" msgstr "Critério de unicidade de porta" -#: inc/model.class.php:566 +#: inc/model.class.php:677 msgid "Advanced options" msgstr "Opções avançadas" -#: inc/model.class.php:581 +#: inc/model.class.php:694 msgid "Allow update of existing fields" msgstr "Permitir atualização de campos existentes" -#: inc/model.class.php:620 +#: inc/model.class.php:737 msgctxt "button" msgid "Validate the model" msgstr "Validar o modelo" -#: inc/model.class.php:685 +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "Mapeamento" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "Informações adicionais" + +#: inc/model.class.php:802 msgid "Load this file" msgstr "Abrir este arquivo" -#: inc/model.class.php:763 +#: inc/model.class.php:881 msgid "Please enter a name for the model" msgstr "Por favor, entre com um nome para o modelo" -#: inc/model.class.php:769 +#: inc/model.class.php:890 msgid "Your model should allow import and/or update of data" msgstr "Seu modelo deve permitir a importação e/ou a atualização de dados" -#: inc/model.class.php:791 +#: inc/model.class.php:909 msgid "You are not the initial creator of this model" msgstr "Você não é o criador deste modelo" -#: inc/model.class.php:851 +#: inc/model.class.php:972 #, php-format msgid "Impossible to copy the file in %s" msgstr "Impossível copiar o arquivo em %s" -#: inc/model.class.php:858 +#: inc/model.class.php:980 msgid "File format is wrong" msgstr "O formato do arquivo está errado" -#: inc/model.class.php:859 +#: inc/model.class.php:981 msgid "Extension csv required" msgstr "Extensão CSV requirida" -#: inc/model.class.php:933 +#: inc/model.class.php:1058 msgid "Not data to import" msgstr "Nenhum dado para importação" -#: inc/model.class.php:986 +#: inc/model.class.php:1118 msgid "The file is ok." msgstr "The arquivo está OK." -#: inc/model.class.php:1009 +#: inc/model.class.php:1143 msgid "The number of columns of the file is incorrect." msgstr "O número de colunas no arquivo está incorreto." -#: inc/model.class.php:1010 +#: inc/model.class.php:1145 #, php-format msgid "%d awaited column" msgid_plural "%d awaited columns" msgstr[0] "%d awaited column" msgstr[1] "%d colunas esperadas" -#: inc/model.class.php:1012 +#: inc/model.class.php:1150 #, php-format msgid "%d found column" msgid_plural "%d found columns" msgstr[0] "%d found column" msgstr[1] "%d colunas encontradas" -#: inc/model.class.php:1046 +#: inc/model.class.php:1190 msgid "At least one column is incorrect" msgstr "Uma das colunas está incorreta" -#: inc/model.class.php:1053 +#: inc/model.class.php:1198 msgid "Into the file" msgstr "Inserindo o arquivo" -#: inc/model.class.php:1056 +#: inc/model.class.php:1203 msgid "From the model" msgstr "Do modelo" -#: inc/model.class.php:1278 inc/model.class.php:1357 +#: inc/model.class.php:1434 inc/model.class.php:1517 msgid "Array of successful injections" msgstr "Lista de inserções bem sucedidas" -#: inc/model.class.php:1285 inc/model.class.php:1315 inc/model.class.php:1360 -#: inc/model.class.php:1378 +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 msgid "Line" msgstr "Linha" -#: inc/model.class.php:1286 inc/model.class.php:1317 inc/model.class.php:1361 -#: inc/model.class.php:1380 +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 msgid "Data Import" msgstr "Importar dados" -#: inc/model.class.php:1287 inc/model.class.php:1318 inc/model.class.php:1362 -#: inc/model.class.php:1381 +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 msgid "Injection type" msgstr "Tipo de inserção" -#: inc/model.class.php:1288 inc/model.class.php:1319 inc/model.class.php:1363 -#: inc/model.class.php:1382 +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 msgid "Object Identifier" msgstr "Identificador do objeto" -#: inc/model.class.php:1308 inc/model.class.php:1375 +#: inc/model.class.php:1464 inc/model.class.php:1537 msgid "Array of unsuccessful injections" msgstr "Lista de inserções com falhas" -#: inc/model.class.php:1316 inc/model.class.php:1379 inc/model.class.php:1393 +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 msgid "Data check" msgstr "Verificar dados" -#: inc/modelcsv.class.php:149 +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" +msgstr "-------Escolha uma tabela-------" + +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" +msgstr "-------Escolha um campo-------" + +#: inc/networkequipmentinjection.class.php:72 +msgid "Number of ports" +msgstr "Números de portas" + +#: inc/mapping.class.php:123 +msgid "Header of the file" +msgstr "Cabeçalho do arquivo" + +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" +msgstr "Tabelas" + +#: inc/mapping.class.php:126 +msgid "Link field" +msgstr "Relacionar campos" + +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" +msgstr "Informação obrigatória" + +#: inc/info.class.php:142 +msgid "Fields" +msgstr "Campos" + +#: inc/info.class.php:246 +msgid "Complementary information" +msgstr "Informação complementar" + +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "Fazer download de arquivo de exemplo" + +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "dd-mm-yyyy" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "mm-dd-yyyy" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "yyyy-mm-dd" + +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "1 234.56" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "1,234.56" + +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "Modelo disponível para uso" + +#: inc/dropdown.class.php:119 +msgid "Automatic detection" +msgstr "Detecção automática" + +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "UTF-8" + +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "ISO8859-1" + +#: inc/modelcsv.class.php:160 msgid "Specific file format options" msgstr "Opções de formato de arquivo específico" -#: inc/modelcsv.class.php:152 +#: inc/modelcsv.class.php:163 msgid "Header's presence" msgstr "Cabeçalho presente" -#: inc/modelcsv.class.php:156 +#: inc/modelcsv.class.php:167 msgid "File delimitor" msgstr "Delimitador do arquivo" -#: inc/networkequipmentinjection.class.php:69 -msgid "Number of ports" -msgstr "Números de portas" - -#: inc/networkportinjection.class.php:85 +#: inc/networkportinjection.class.php:89 msgid "Port MAC address" msgstr "Porta do endereço MAC" - -#: inc/webservice.class.php:70 -msgid "Model unknown" -msgstr "Modelo desconhecido" - -#: inc/webservice.class.php:75 inc/webservice.class.php:80 -msgid "You cannot access this model" -msgstr "Você não pode acessar este modelo" - -#: inc/webservice.class.php:95 -msgid "Entity unknown" -msgstr "Entidade desconhecida" - -#: inc/webservice.class.php:100 -msgid "You cannot access this entity" -msgstr "Você não pode acessar essa entidade" diff --git a/locales/ru_RU.mo b/locales/ru_RU.mo index 806fe183..5b7d6c73 100644 Binary files a/locales/ru_RU.mo and b/locales/ru_RU.mo differ diff --git a/locales/ru_RU.po b/locales/ru_RU.po index b10cbf72..c1bdcdae 100644 --- a/locales/ru_RU.po +++ b/locales/ru_RU.po @@ -1,16 +1,16 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Datainjection Development Team -# This file is distributed under the same license as the GLPI - Datainjection plugin package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Datainjection plugin 2.3.0\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-22 22:57+0100\n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Alexey Petukhov , 2018\n" +"Last-Translator: Pavlo Lacenko , 2018\n" "Language-Team: Russian (Russia) (https://www.transifex.com/teclib/teams/28042/ru_RU/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" @@ -18,359 +18,295 @@ msgstr "" "Language: ru_RU\n" "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" -#: hook.php:115 hook.php:129 setup.php:50 -msgid "Can't create folder" -msgstr "Невозможно создать папку" +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" +msgstr "Файл не найден" -#: setup.php:76 front/clientinjection.form.php:33 inc/menu.class.php:36 -#: inc/profile.class.php:64 +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 msgid "File injection" -msgstr "" - -#: setup.php:89 -msgid "This plugin requires GLPI 0.85 or higher" -msgstr "Этот плагин требует GLPI 0.85 или новее" +msgstr "Вложить файл" -#: front/clientinjection.form.php:47 +#: front/clientinjection.form.php:50 msgid "One mandatory field is not filled" msgstr "Одно обязательно поле не заполнено" -#: front/clientinjection.form.php:77 front/model.form.php:83 -msgid "The file could not be found" -msgstr "Файл не найден" +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" +msgstr "Посмотреть файл" + +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" +msgstr "Отчет о вложенных файлах" -#: front/mapping.form.php:58 +#: front/mapping.form.php:60 msgid "" "One link field must be selected: it will be used to check if data already " "exists" msgstr "" -#: front/mapping.form.php:68 +#: front/mapping.form.php:76 msgid "" "This step allows you to add informations not present in the file. You'll be " "asked for theses informations while using the model." msgstr "" -#: front/popup.php:37 inc/mapping.class.php:109 -msgid "See the file" -msgstr "" - -#: front/popup.php:43 inc/model.class.php:1350 -msgid "File injection report" -msgstr "" - -#: inc/clientinjection.class.php:81 -msgid "Use an existing model" -msgstr "Использовать существующую модель" - -#: inc/clientinjection.class.php:89 -msgid "No model currently available" -msgstr "Нет доступных моделей" - -#: inc/clientinjection.class.php:95 -msgid "You can start the model creation by hitting the button" -msgstr "" - -#: inc/clientinjection.class.php:140 inc/dropdown.class.php:86 -#: inc/model.class.php:652 -msgid "File to inject" -msgstr "Файл для добавления" - -#: inc/clientinjection.class.php:143 inc/info.class.php:232 -msgid "Choose a file" -msgstr "Выбрать файл" - -#: inc/clientinjection.class.php:149 -msgid "File encoding" -msgstr "Кодировка файла" - -#: inc/clientinjection.class.php:157 -msgid "Warning : existing data will be overridden" -msgstr "Предупреждение: текущие данные будут перезаписаны" - -#: inc/clientinjection.class.php:159 -msgid "" -"Watch out, you're about to inject data into GLPI. Are you sure you want to " -"do it ?" -msgstr "" - -#: inc/clientinjection.class.php:165 -msgid "Launch the import" -msgstr "Начать импорт" - -#: inc/clientinjection.class.php:195 -msgid "Import progress" -msgstr "Прогресс импорта" - -#: inc/clientinjection.class.php:199 inc/menu.class.php:52 -#: inc/menu.class.php:53 inc/profile.class.php:41 -msgid "Injection of the file" -msgstr "" - -#: inc/clientinjection.class.php:258 -#, php-format -msgid "Injection of the file... %d%%" -msgstr "" - -#: inc/clientinjection.class.php:269 -msgid "Injection finished" -msgstr "Добавление завершено" - -#: inc/clientinjection.class.php:338 -msgid "Injection's results" -msgstr "Результаты добавления" - -#: inc/clientinjection.class.php:343 -msgid "Injection successful" -msgstr "Успешно добавлено" - -#: inc/clientinjection.class.php:346 -msgid "Injection encounters errors" -msgstr "" - -#: inc/clientinjection.class.php:355 -msgid "See the log" -msgstr "Смотреть лог" - -#: inc/clientinjection.class.php:361 -msgid "Export rapport in PDF" -msgstr "" - -#: inc/clientinjection.class.php:367 -msgid "Export the log" -msgstr "Экспорт лога" - -#: inc/clientinjection.class.php:375 -msgid "Finish" -msgstr "" +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" +msgstr "Невозможно создать папку" -#: inc/commoninjectionlib.class.php:1817 +#: inc/commoninjectionlib.class.php:1876 msgid "Add from CSV file" msgstr "Добавить из CSV файла" -#: inc/commoninjectionlib.class.php:1819 +#: inc/commoninjectionlib.class.php:1878 msgid "Update from CSV file" msgstr "Обновить из CSV файла" -#: inc/commoninjectionlib.class.php:1860 +#: inc/commoninjectionlib.class.php:1919 msgid "No right to import data" msgstr "Нет прав для импорта" -#: inc/commoninjectionlib.class.php:1864 +#: inc/commoninjectionlib.class.php:1923 msgid "No right to update data" msgstr "Нет прав для обновления" -#: inc/commoninjectionlib.class.php:1868 +#: inc/commoninjectionlib.class.php:1927 msgid "Size of the inserted value is to expansive" msgstr "" -#: inc/commoninjectionlib.class.php:1872 +#: inc/commoninjectionlib.class.php:1931 msgid "Import not allowed" msgstr "Импорт не разрешен" -#: inc/commoninjectionlib.class.php:1876 +#: inc/commoninjectionlib.class.php:1935 msgid "Import failed" msgstr "" -#: inc/commoninjectionlib.class.php:1880 +#: inc/commoninjectionlib.class.php:1939 msgid "At least one mandatory field is not present" msgstr "" -#: inc/commoninjectionlib.class.php:1884 +#: inc/commoninjectionlib.class.php:1943 msgid "Data to insert are correct" msgstr "" -#: inc/commoninjectionlib.class.php:1888 +#: inc/commoninjectionlib.class.php:1947 msgid "One data is not the good type" msgstr "" -#: inc/commoninjectionlib.class.php:1892 +#: inc/commoninjectionlib.class.php:1951 msgid "Warning" msgstr "Предупреждение" -#: inc/commoninjectionlib.class.php:1896 +#: inc/commoninjectionlib.class.php:1955 msgid "Data not found" msgstr "Данные не найдены" -#: inc/commoninjectionlib.class.php:1900 inc/model.class.php:1215 +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 msgid "Undetermined" msgstr "" -#: inc/dropdown.class.php:36 -msgid "dd-mm-yyyy" -msgstr "дд-мм-гггг" - -#: inc/dropdown.class.php:38 -msgid "mm-dd-yyyy" -msgstr "мм-дд-гггг" +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" +msgstr "Управление моделями" -#: inc/dropdown.class.php:40 -msgid "yyyy-mm-dd" -msgstr "гггг-мм-дд" +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" +msgstr "" -#: inc/dropdown.class.php:59 -msgid "1 234.56" -msgstr "1 234.56" +#: inc/webservice.class.php:78 +msgid "Model unknown" +msgstr "" -#: inc/dropdown.class.php:61 -msgid "1 234,56" -msgstr "1 234,56" +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" +msgstr "" -#: inc/dropdown.class.php:63 -msgid "1,234.56" -msgstr "1 234,56" +#: inc/webservice.class.php:115 +msgid "Entity unknown" +msgstr "" -#: inc/dropdown.class.php:87 inc/model.class.php:654 -msgid "Mappings" -msgstr "Соответствия" +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" +msgstr "" -#: inc/dropdown.class.php:88 inc/model.class.php:657 -msgid "Additional Information" -msgstr "Дополнительная информация" +#: inc/clientinjection.class.php:88 +msgid "Use an existing model" +msgstr "Использовать существующую модель" -#: inc/dropdown.class.php:90 -msgid "Model available for use" -msgstr "Доступные модели" +#: inc/clientinjection.class.php:96 +msgid "No model currently available" +msgstr "Нет доступных моделей" -#: inc/dropdown.class.php:113 -msgid "Automatic detection" +#: inc/clientinjection.class.php:105 +msgid "You can start the model creation by hitting the button" msgstr "" -#: inc/dropdown.class.php:115 -msgid "UTF-8" -msgstr "UTF-8" +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 +msgid "File to inject" +msgstr "Файл для добавления" -#: inc/dropdown.class.php:116 -msgid "ISO8859-1" -msgstr "ISO8859-1" +#: inc/clientinjection.class.php:156 inc/info.class.php:247 +msgid "Choose a file" +msgstr "Выбрать файл" -#: inc/info.class.php:78 inc/info.class.php:134 inc/mapping.class.php:116 -msgid "Tables" -msgstr "Таблицы" +#: inc/clientinjection.class.php:162 +msgid "File encoding" +msgstr "Кодировка файла" -#: inc/info.class.php:80 inc/info.class.php:136 -msgid "Mandatory information" +#: inc/clientinjection.class.php:170 +msgid "Warning : existing data will be overridden" +msgstr "Предупреждение: текущие данные будут перезаписаны" + +#: inc/clientinjection.class.php:173 +msgid "" +"Watch out, you're about to inject data into GLPI. Are you sure you want to " +"do it ?" msgstr "" -#: inc/info.class.php:135 -msgid "Fields" -msgstr "Поля" +#: inc/clientinjection.class.php:180 +msgid "Launch the import" +msgstr "Начать импорт" -#: inc/info.class.php:231 -msgid "Complementary information" +#: inc/clientinjection.class.php:210 +msgid "Import progress" +msgstr "Прогресс импорта" + +#: inc/clientinjection.class.php:280 +#, php-format +msgid "Injection of the file... %d%%" msgstr "" -#: inc/info.class.php:240 -msgid "Download file sample" -msgstr "Скачать файл-пример" +#: inc/clientinjection.class.php:297 +msgid "Injection finished" +msgstr "Добавление завершено" -#: inc/injectiontype.class.php:121 -msgid "-------Choose a table-------" -msgstr "-------Выберите таблицу-------" +#: inc/clientinjection.class.php:369 +msgid "Injection's results" +msgstr "Результаты добавления" -#: inc/injectiontype.class.php:177 -msgid "-------Choose a field-------" -msgstr "-------Выберите поле-------" +#: inc/clientinjection.class.php:374 +msgid "Injection successful" +msgstr "Успешно добавлено" -#: inc/mapping.class.php:115 -msgid "Header of the file" -msgstr "Заголовок файла" +#: inc/clientinjection.class.php:377 +msgid "Injection encounters errors" +msgstr "" -#: inc/mapping.class.php:118 -msgid "Link field" +#: inc/clientinjection.class.php:386 +msgid "See the log" +msgstr "Смотреть лог" + +#: inc/clientinjection.class.php:392 +msgid "Export rapport in PDF" msgstr "" -#: inc/model.class.php:73 inc/profile.class.php:38 -msgid "Model management" -msgstr "Управление моделями" +#: inc/clientinjection.class.php:398 +msgid "Export the log" +msgstr "Экспорт лога" -#: inc/model.class.php:339 inc/model.class.php:558 +#: inc/clientinjection.class.php:406 +msgid "Finish" +msgstr "" + +#: inc/model.class.php:383 inc/model.class.php:669 msgid "Allow lines creation" msgstr "" -#: inc/model.class.php:345 inc/model.class.php:561 +#: inc/model.class.php:392 inc/model.class.php:672 msgid "Allow lines update" msgstr "" -#: inc/model.class.php:351 inc/model.class.php:546 +#: inc/model.class.php:401 inc/model.class.php:657 msgid "Type of data to import" msgstr "Тип даты для импорта" -#: inc/model.class.php:358 inc/model.class.php:570 +#: inc/model.class.php:411 inc/model.class.php:681 msgid "Allow creation of dropdowns" msgstr "Разрешить создание выпадающих меню" -#: inc/model.class.php:363 inc/model.class.php:574 +#: inc/model.class.php:419 inc/model.class.php:685 msgid "Dates format" msgstr "" -#: inc/model.class.php:369 inc/model.class.php:585 +#: inc/model.class.php:428 inc/model.class.php:698 msgid "Float format" msgstr "" -#: inc/model.class.php:375 inc/model.class.php:592 +#: inc/model.class.php:438 inc/model.class.php:707 msgid "Try to establish network connection is possible" msgstr "" -#: inc/model.class.php:381 inc/model.class.php:596 +#: inc/model.class.php:448 inc/model.class.php:711 msgid "Port unicity criteria" msgstr "" -#: inc/model.class.php:566 +#: inc/model.class.php:677 msgid "Advanced options" msgstr "" -#: inc/model.class.php:581 +#: inc/model.class.php:694 msgid "Allow update of existing fields" msgstr "" -#: inc/model.class.php:620 +#: inc/model.class.php:737 msgctxt "button" msgid "Validate the model" msgstr "Подтвердить модель" -#: inc/model.class.php:685 +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "Соответствия" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "Дополнительная информация" + +#: inc/model.class.php:802 msgid "Load this file" msgstr "Загрузить это файл" -#: inc/model.class.php:763 +#: inc/model.class.php:881 msgid "Please enter a name for the model" msgstr "" -#: inc/model.class.php:769 +#: inc/model.class.php:890 msgid "Your model should allow import and/or update of data" msgstr "" -#: inc/model.class.php:791 +#: inc/model.class.php:909 msgid "You are not the initial creator of this model" msgstr "" -#: inc/model.class.php:851 +#: inc/model.class.php:972 #, php-format msgid "Impossible to copy the file in %s" msgstr "" -#: inc/model.class.php:858 +#: inc/model.class.php:980 msgid "File format is wrong" msgstr "" -#: inc/model.class.php:859 +#: inc/model.class.php:981 msgid "Extension csv required" msgstr "" -#: inc/model.class.php:933 +#: inc/model.class.php:1058 msgid "Not data to import" msgstr "" -#: inc/model.class.php:986 +#: inc/model.class.php:1118 msgid "The file is ok." msgstr "" -#: inc/model.class.php:1009 +#: inc/model.class.php:1143 msgid "The number of columns of the file is incorrect." msgstr "" -#: inc/model.class.php:1010 +#: inc/model.class.php:1145 #, php-format msgid "%d awaited column" msgid_plural "%d awaited columns" @@ -379,7 +315,7 @@ msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: inc/model.class.php:1012 +#: inc/model.class.php:1150 #, php-format msgid "%d found column" msgid_plural "%d found columns" @@ -388,82 +324,142 @@ msgstr[1] "" msgstr[2] "" msgstr[3] "" -#: inc/model.class.php:1046 +#: inc/model.class.php:1190 msgid "At least one column is incorrect" msgstr "" -#: inc/model.class.php:1053 +#: inc/model.class.php:1198 msgid "Into the file" msgstr "" -#: inc/model.class.php:1056 +#: inc/model.class.php:1203 msgid "From the model" msgstr "" -#: inc/model.class.php:1278 inc/model.class.php:1357 +#: inc/model.class.php:1434 inc/model.class.php:1517 msgid "Array of successful injections" msgstr "" -#: inc/model.class.php:1285 inc/model.class.php:1315 inc/model.class.php:1360 -#: inc/model.class.php:1378 +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 msgid "Line" msgstr "" -#: inc/model.class.php:1286 inc/model.class.php:1317 inc/model.class.php:1361 -#: inc/model.class.php:1380 +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 msgid "Data Import" msgstr "" -#: inc/model.class.php:1287 inc/model.class.php:1318 inc/model.class.php:1362 -#: inc/model.class.php:1381 +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 msgid "Injection type" msgstr "" -#: inc/model.class.php:1288 inc/model.class.php:1319 inc/model.class.php:1363 -#: inc/model.class.php:1382 +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 msgid "Object Identifier" msgstr "" -#: inc/model.class.php:1308 inc/model.class.php:1375 +#: inc/model.class.php:1464 inc/model.class.php:1537 msgid "Array of unsuccessful injections" msgstr "" -#: inc/model.class.php:1316 inc/model.class.php:1379 inc/model.class.php:1393 +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 msgid "Data check" msgstr "" -#: inc/modelcsv.class.php:149 -msgid "Specific file format options" -msgstr "" +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" +msgstr "-------Выберите таблицу-------" -#: inc/modelcsv.class.php:152 -msgid "Header's presence" +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" +msgstr "-------Выберите поле-------" + +#: inc/networkequipmentinjection.class.php:72 +msgid "Number of ports" msgstr "" -#: inc/modelcsv.class.php:156 -msgid "File delimitor" -msgstr "Разделитель" +#: inc/mapping.class.php:123 +msgid "Header of the file" +msgstr "Заголовок файла" -#: inc/networkequipmentinjection.class.php:69 -msgid "Number of ports" +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" +msgstr "Таблицы" + +#: inc/mapping.class.php:126 +msgid "Link field" msgstr "" -#: inc/networkportinjection.class.php:85 -msgid "Port MAC address" -msgstr "MAC адрес порта" +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" +msgstr "" -#: inc/webservice.class.php:70 -msgid "Model unknown" +#: inc/info.class.php:142 +msgid "Fields" +msgstr "Поля" + +#: inc/info.class.php:246 +msgid "Complementary information" msgstr "" -#: inc/webservice.class.php:75 inc/webservice.class.php:80 -msgid "You cannot access this model" +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "Скачать файл-пример" + +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "дд-мм-гггг" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "мм-дд-гггг" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "гггг-мм-дд" + +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "1 234.56" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "Доступные модели" + +#: inc/dropdown.class.php:119 +msgid "Automatic detection" msgstr "" -#: inc/webservice.class.php:95 -msgid "Entity unknown" +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "UTF-8" + +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "ISO8859-1" + +#: inc/modelcsv.class.php:160 +msgid "Specific file format options" msgstr "" -#: inc/webservice.class.php:100 -msgid "You cannot access this entity" +#: inc/modelcsv.class.php:163 +msgid "Header's presence" msgstr "" + +#: inc/modelcsv.class.php:167 +msgid "File delimitor" +msgstr "Разделитель" + +#: inc/networkportinjection.class.php:89 +msgid "Port MAC address" +msgstr "MAC адрес порта" diff --git a/locales/tr_TR.mo b/locales/tr_TR.mo index ae36ee7c..e697262f 100644 Binary files a/locales/tr_TR.mo and b/locales/tr_TR.mo differ diff --git a/locales/tr_TR.po b/locales/tr_TR.po index ec995809..c80e0f0b 100644 --- a/locales/tr_TR.po +++ b/locales/tr_TR.po @@ -1,16 +1,16 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Datainjection Development Team -# This file is distributed under the same license as the GLPI - Datainjection plugin package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GLPI - Datainjection plugin 2.3.0\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-01-22 22:57+0100\n" +"POT-Creation-Date: 2018-06-28 09:54+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: Kaya Zeren , 2017\n" +"Last-Translator: Cédric Anne, 2018\n" "Language-Team: Turkish (Turkey) (https://www.transifex.com/teclib/teams/28042/tr_TR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" @@ -18,28 +18,28 @@ msgstr "" "Language: tr_TR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: hook.php:115 hook.php:129 setup.php:50 -msgid "Can't create folder" -msgstr "Klasör oluşturulamadı" +#: front/model.form.php:88 front/clientinjection.form.php:83 +msgid "The file could not be found" +msgstr "Dosya bulunamadı" -#: setup.php:76 front/clientinjection.form.php:33 inc/menu.class.php:36 -#: inc/profile.class.php:64 +#: front/clientinjection.form.php:34 inc/profile.class.php:67 +#: inc/menu.class.php:38 setup.php:94 msgid "File injection" msgstr "Dosya enjeksiyonu" -#: setup.php:89 -msgid "This plugin requires GLPI 0.85 or higher" -msgstr "Bu uygulama eki GLPI 0.85 ve üzerindeki sürümlerde çalışır" - -#: front/clientinjection.form.php:47 +#: front/clientinjection.form.php:50 msgid "One mandatory field is not filled" msgstr "Zorunlu alanlardan biri doldurulmamış" -#: front/clientinjection.form.php:77 front/model.form.php:83 -msgid "The file could not be found" -msgstr "Dosya bulunamadı" +#: front/popup.php:37 inc/mapping.class.php:117 +msgid "See the file" +msgstr "Dosyaya bakın" -#: front/mapping.form.php:58 +#: front/popup.php:43 inc/model.class.php:1508 +msgid "File injection report" +msgstr "Dosya enjeksiyon raporu" + +#: front/mapping.form.php:60 msgid "" "One link field must be selected: it will be used to check if data already " "exists" @@ -47,7 +47,7 @@ msgstr "" "Bir bağlantı alanı seçilmeli: Verinin zaten var olup olmadığını denetlemek " "için kullanılır" -#: front/mapping.form.php:68 +#: front/mapping.form.php:76 msgid "" "This step allows you to add informations not present in the file. You'll be " "asked for theses informations while using the model." @@ -55,44 +55,117 @@ msgstr "" "Bu adımda dosyada bulunmayan bilgiler eklenebilir. Modeli kullanırken tez " "bilgileri sorulacak." -#: front/popup.php:37 inc/mapping.class.php:109 -msgid "See the file" -msgstr "Dosyaya bakın" +#: hook.php:124 hook.php:141 setup.php:63 +msgid "Can't create folder" +msgstr "Klasör oluşturulamadı" -#: front/popup.php:43 inc/model.class.php:1350 -msgid "File injection report" -msgstr "Dosya enjeksiyon raporu" +#: inc/commoninjectionlib.class.php:1876 +msgid "Add from CSV file" +msgstr "CSV dosyasından ekle" -#: inc/clientinjection.class.php:81 +#: inc/commoninjectionlib.class.php:1878 +msgid "Update from CSV file" +msgstr "CSV dosyasından güncelle" + +#: inc/commoninjectionlib.class.php:1919 +msgid "No right to import data" +msgstr "Veri alma izni yok" + +#: inc/commoninjectionlib.class.php:1923 +msgid "No right to update data" +msgstr "Veri güncelleme izni yok" + +#: inc/commoninjectionlib.class.php:1927 +msgid "Size of the inserted value is to expansive" +msgstr "Eklenen değerin boyutu çok genişleyebilir" + +#: inc/commoninjectionlib.class.php:1931 +msgid "Import not allowed" +msgstr "Alma işlemine izin verilmiyor" + +#: inc/commoninjectionlib.class.php:1935 +msgid "Import failed" +msgstr "Alma işlemi yapılamadı" + +#: inc/commoninjectionlib.class.php:1939 +msgid "At least one mandatory field is not present" +msgstr "En az bir zorunlu alan bulunamadı" + +#: inc/commoninjectionlib.class.php:1943 +msgid "Data to insert are correct" +msgstr "Eklenecek veri doğru" + +#: inc/commoninjectionlib.class.php:1947 +msgid "One data is not the good type" +msgstr "Bir verinin türü iyi değil" + +#: inc/commoninjectionlib.class.php:1951 +msgid "Warning" +msgstr "Uyarı" + +#: inc/commoninjectionlib.class.php:1955 +msgid "Data not found" +msgstr "Veri bulunamadı" + +#: inc/commoninjectionlib.class.php:1959 inc/model.class.php:1369 +msgid "Undetermined" +msgstr "Belirlenmemiş" + +#: inc/profile.class.php:40 inc/model.class.php:75 +msgid "Model management" +msgstr "Model yönetimi" + +#: inc/profile.class.php:43 inc/menu.class.php:58 inc/menu.class.php:59 +#: inc/clientinjection.class.php:214 +msgid "Injection of the file" +msgstr "Dosya enjeksiyonu" + +#: inc/webservice.class.php:78 +msgid "Model unknown" +msgstr "Model bilinmiyor" + +#: inc/webservice.class.php:86 inc/webservice.class.php:95 +msgid "You cannot access this model" +msgstr "Bu modele erişme izniniz yok" + +#: inc/webservice.class.php:115 +msgid "Entity unknown" +msgstr "Varlık bilinmiyor" + +#: inc/webservice.class.php:123 +msgid "You cannot access this entity" +msgstr "Bu varlığa erişme izniniz yok" + +#: inc/clientinjection.class.php:88 msgid "Use an existing model" msgstr "Varolan bir model kullanılsın" -#: inc/clientinjection.class.php:89 +#: inc/clientinjection.class.php:96 msgid "No model currently available" msgstr "Kullanılabilecek bir model yok" -#: inc/clientinjection.class.php:95 +#: inc/clientinjection.class.php:105 msgid "You can start the model creation by hitting the button" msgstr "Düğmeye tıklayarak model oluşturmaya başlayabilirsiniz" -#: inc/clientinjection.class.php:140 inc/dropdown.class.php:86 -#: inc/model.class.php:652 +#: inc/clientinjection.class.php:153 inc/model.class.php:769 +#: inc/dropdown.class.php:87 msgid "File to inject" msgstr "Enjekte edilecek dosya" -#: inc/clientinjection.class.php:143 inc/info.class.php:232 +#: inc/clientinjection.class.php:156 inc/info.class.php:247 msgid "Choose a file" msgstr "Bir dosya seçin" -#: inc/clientinjection.class.php:149 +#: inc/clientinjection.class.php:162 msgid "File encoding" msgstr "Dosya kodlaması" -#: inc/clientinjection.class.php:157 +#: inc/clientinjection.class.php:170 msgid "Warning : existing data will be overridden" msgstr "Uyarı: Varolan verilerin üzerine yazılacak" -#: inc/clientinjection.class.php:159 +#: inc/clientinjection.class.php:173 msgid "" "Watch out, you're about to inject data into GLPI. Are you sure you want to " "do it ?" @@ -100,372 +173,295 @@ msgstr "" "Dikkatli olun. GLPI üzerine veri enjekte etmek üzeresiniz. Bu işlemi yapmak " "istediğinize emin misiniz?" -#: inc/clientinjection.class.php:165 +#: inc/clientinjection.class.php:180 msgid "Launch the import" msgstr "Alma işlemini başlat" -#: inc/clientinjection.class.php:195 +#: inc/clientinjection.class.php:210 msgid "Import progress" msgstr "Alma işlemi" -#: inc/clientinjection.class.php:199 inc/menu.class.php:52 -#: inc/menu.class.php:53 inc/profile.class.php:41 -msgid "Injection of the file" -msgstr "Dosya enjeksiyonu" - -#: inc/clientinjection.class.php:258 +#: inc/clientinjection.class.php:280 #, php-format msgid "Injection of the file... %d%%" msgstr "Dosya enjeksiyonu... %d%%" -#: inc/clientinjection.class.php:269 +#: inc/clientinjection.class.php:297 msgid "Injection finished" msgstr "Enjeksiyon tamamlandı" -#: inc/clientinjection.class.php:338 +#: inc/clientinjection.class.php:369 msgid "Injection's results" msgstr "Enjeksiyon sonuçları" -#: inc/clientinjection.class.php:343 +#: inc/clientinjection.class.php:374 msgid "Injection successful" msgstr "Enjeksiyon tamamlandı" -#: inc/clientinjection.class.php:346 +#: inc/clientinjection.class.php:377 msgid "Injection encounters errors" msgstr "Enjeksiyon sırasında sorun çıktı" -#: inc/clientinjection.class.php:355 +#: inc/clientinjection.class.php:386 msgid "See the log" msgstr "Günlüğe bakın" -#: inc/clientinjection.class.php:361 +#: inc/clientinjection.class.php:392 msgid "Export rapport in PDF" msgstr "Raporu PDF Olarak Ver" -#: inc/clientinjection.class.php:367 +#: inc/clientinjection.class.php:398 msgid "Export the log" msgstr "Günlüğü Ver" -#: inc/clientinjection.class.php:375 +#: inc/clientinjection.class.php:406 msgid "Finish" msgstr "Bitti" -#: inc/commoninjectionlib.class.php:1817 -msgid "Add from CSV file" -msgstr "CSV dosyasından ekle" - -#: inc/commoninjectionlib.class.php:1819 -msgid "Update from CSV file" -msgstr "CSV dosyasından güncelle" - -#: inc/commoninjectionlib.class.php:1860 -msgid "No right to import data" -msgstr "Veri alma izni yok" - -#: inc/commoninjectionlib.class.php:1864 -msgid "No right to update data" -msgstr "Veri güncelleme izni yok" - -#: inc/commoninjectionlib.class.php:1868 -msgid "Size of the inserted value is to expansive" -msgstr "Eklenen değerin boyutu çok genişleyebilir" - -#: inc/commoninjectionlib.class.php:1872 -msgid "Import not allowed" -msgstr "Alma işlemine izin verilmiyor" - -#: inc/commoninjectionlib.class.php:1876 -msgid "Import failed" -msgstr "Alma işlemi yapılamadı" - -#: inc/commoninjectionlib.class.php:1880 -msgid "At least one mandatory field is not present" -msgstr "En az bir zorunlu alan bulunamadı" - -#: inc/commoninjectionlib.class.php:1884 -msgid "Data to insert are correct" -msgstr "Eklenecek veri doğru" - -#: inc/commoninjectionlib.class.php:1888 -msgid "One data is not the good type" -msgstr "Bir verinin türü iyi değil" - -#: inc/commoninjectionlib.class.php:1892 -msgid "Warning" -msgstr "Uyarı" - -#: inc/commoninjectionlib.class.php:1896 -msgid "Data not found" -msgstr "Veri bulunamadı" - -#: inc/commoninjectionlib.class.php:1900 inc/model.class.php:1215 -msgid "Undetermined" -msgstr "Belirlenmemiş" - -#: inc/dropdown.class.php:36 -msgid "dd-mm-yyyy" -msgstr "gg-aa-yyyy" - -#: inc/dropdown.class.php:38 -msgid "mm-dd-yyyy" -msgstr "aa-gg-yyyy" - -#: inc/dropdown.class.php:40 -msgid "yyyy-mm-dd" -msgstr "yyyy-aa-gg" - -#: inc/dropdown.class.php:59 -msgid "1 234.56" -msgstr "1 234.56" - -#: inc/dropdown.class.php:61 -msgid "1 234,56" -msgstr "1 234,56" - -#: inc/dropdown.class.php:63 -msgid "1,234.56" -msgstr "1,234.56" - -#: inc/dropdown.class.php:87 inc/model.class.php:654 -msgid "Mappings" -msgstr "Eşleştirmeler" - -#: inc/dropdown.class.php:88 inc/model.class.php:657 -msgid "Additional Information" -msgstr "Ek Bilgiler" - -#: inc/dropdown.class.php:90 -msgid "Model available for use" -msgstr "Kullanılacak model" - -#: inc/dropdown.class.php:113 -msgid "Automatic detection" -msgstr "Otomatik algılama" - -#: inc/dropdown.class.php:115 -msgid "UTF-8" -msgstr "UTF-8" - -#: inc/dropdown.class.php:116 -msgid "ISO8859-1" -msgstr "ISO8859-1" - -#: inc/info.class.php:78 inc/info.class.php:134 inc/mapping.class.php:116 -msgid "Tables" -msgstr "Tablolar" - -#: inc/info.class.php:80 inc/info.class.php:136 -msgid "Mandatory information" -msgstr "Zorunlu Bilgiler" - -#: inc/info.class.php:135 -msgid "Fields" -msgstr "Alanlar" - -#: inc/info.class.php:231 -msgid "Complementary information" -msgstr "Tamamlayıcı Bilgiler" - -#: inc/info.class.php:240 -msgid "Download file sample" -msgstr "Örnek dosyayı indir" - -#: inc/injectiontype.class.php:121 -msgid "-------Choose a table-------" -msgstr "-------Bir tablo seçin-------" - -#: inc/injectiontype.class.php:177 -msgid "-------Choose a field-------" -msgstr "-------Bir alan seçin-------" - -#: inc/mapping.class.php:115 -msgid "Header of the file" -msgstr "Dosya üst bilgisi" - -#: inc/mapping.class.php:118 -msgid "Link field" -msgstr "Bağlantı alanı" - -#: inc/model.class.php:73 inc/profile.class.php:38 -msgid "Model management" -msgstr "Model yönetimi" - -#: inc/model.class.php:339 inc/model.class.php:558 +#: inc/model.class.php:383 inc/model.class.php:669 msgid "Allow lines creation" msgstr "Satır oluşturabilsin" -#: inc/model.class.php:345 inc/model.class.php:561 +#: inc/model.class.php:392 inc/model.class.php:672 msgid "Allow lines update" msgstr "Satır güncelleyebilsin" -#: inc/model.class.php:351 inc/model.class.php:546 +#: inc/model.class.php:401 inc/model.class.php:657 msgid "Type of data to import" msgstr "Alınacak veri türü" -#: inc/model.class.php:358 inc/model.class.php:570 +#: inc/model.class.php:411 inc/model.class.php:681 msgid "Allow creation of dropdowns" msgstr "Açılan kutu oluşturabilsin" -#: inc/model.class.php:363 inc/model.class.php:574 +#: inc/model.class.php:419 inc/model.class.php:685 msgid "Dates format" msgstr "Tarih biçimi" -#: inc/model.class.php:369 inc/model.class.php:585 +#: inc/model.class.php:428 inc/model.class.php:698 msgid "Float format" msgstr "Ondalık biçimi" -#: inc/model.class.php:375 inc/model.class.php:592 +#: inc/model.class.php:438 inc/model.class.php:707 msgid "Try to establish network connection is possible" msgstr "Olabildiğinde ağ bağlantısı kurulmaya çalışılsın" -#: inc/model.class.php:381 inc/model.class.php:596 +#: inc/model.class.php:448 inc/model.class.php:711 msgid "Port unicity criteria" msgstr "Kapı eşsizlik ölçütü" -#: inc/model.class.php:566 +#: inc/model.class.php:677 msgid "Advanced options" msgstr "Gelişmiş ayarlar" -#: inc/model.class.php:581 +#: inc/model.class.php:694 msgid "Allow update of existing fields" msgstr "Varolan alanlar güncellenebilsin" -#: inc/model.class.php:620 +#: inc/model.class.php:737 msgctxt "button" msgid "Validate the model" msgstr "Modeli doğrula" -#: inc/model.class.php:685 +#: inc/model.class.php:771 inc/dropdown.class.php:88 +msgid "Mappings" +msgstr "Eşleştirmeler" + +#: inc/model.class.php:774 inc/dropdown.class.php:90 +msgid "Additional Information" +msgstr "Ek Bilgiler" + +#: inc/model.class.php:802 msgid "Load this file" msgstr "Bu dosyayı yükle" -#: inc/model.class.php:763 +#: inc/model.class.php:881 msgid "Please enter a name for the model" msgstr "Bu model için bir ad yazın" -#: inc/model.class.php:769 +#: inc/model.class.php:890 msgid "Your model should allow import and/or update of data" msgstr "Modeliniz veri alma ya da güncellemeye izin vermeli" -#: inc/model.class.php:791 +#: inc/model.class.php:909 msgid "You are not the initial creator of this model" msgstr "Bu modelin ilk oluşturucusu değilsiniz" -#: inc/model.class.php:851 +#: inc/model.class.php:972 #, php-format msgid "Impossible to copy the file in %s" msgstr "%s içindeki dosya kopyalanamıyor" -#: inc/model.class.php:858 +#: inc/model.class.php:980 msgid "File format is wrong" msgstr "Dosya biçimi hatalı" -#: inc/model.class.php:859 +#: inc/model.class.php:981 msgid "Extension csv required" msgstr "csv uzantısı gereklidir" -#: inc/model.class.php:933 +#: inc/model.class.php:1058 msgid "Not data to import" msgstr "Alınacak bir veri yok" -#: inc/model.class.php:986 +#: inc/model.class.php:1118 msgid "The file is ok." msgstr "Dosya tamam." -#: inc/model.class.php:1009 +#: inc/model.class.php:1143 msgid "The number of columns of the file is incorrect." msgstr "Dosyadaki sütun sayısı hatalı." -#: inc/model.class.php:1010 +#: inc/model.class.php:1145 #, php-format msgid "%d awaited column" msgid_plural "%d awaited columns" msgstr[0] "%d sütun bekleniyor" msgstr[1] "%d sütun bekleniyor" -#: inc/model.class.php:1012 +#: inc/model.class.php:1150 #, php-format msgid "%d found column" msgid_plural "%d found columns" msgstr[0] "%d sütun bulundu" msgstr[1] "%d sütun bulundu" -#: inc/model.class.php:1046 +#: inc/model.class.php:1190 msgid "At least one column is incorrect" msgstr "En az bir sütun hatalı" -#: inc/model.class.php:1053 +#: inc/model.class.php:1198 msgid "Into the file" msgstr "Dosya içine" -#: inc/model.class.php:1056 +#: inc/model.class.php:1203 msgid "From the model" msgstr "Modelden" -#: inc/model.class.php:1278 inc/model.class.php:1357 +#: inc/model.class.php:1434 inc/model.class.php:1517 msgid "Array of successful injections" msgstr "Başarılı enjeksiyonların dizisi" -#: inc/model.class.php:1285 inc/model.class.php:1315 inc/model.class.php:1360 -#: inc/model.class.php:1378 +#: inc/model.class.php:1441 inc/model.class.php:1471 inc/model.class.php:1520 +#: inc/model.class.php:1540 msgid "Line" msgstr "Satır" -#: inc/model.class.php:1286 inc/model.class.php:1317 inc/model.class.php:1361 -#: inc/model.class.php:1380 +#: inc/model.class.php:1442 inc/model.class.php:1473 inc/model.class.php:1521 +#: inc/model.class.php:1542 msgid "Data Import" msgstr "Veri Alma" -#: inc/model.class.php:1287 inc/model.class.php:1318 inc/model.class.php:1362 -#: inc/model.class.php:1381 +#: inc/model.class.php:1443 inc/model.class.php:1474 inc/model.class.php:1522 +#: inc/model.class.php:1543 msgid "Injection type" msgstr "Enjeksiyon türü" -#: inc/model.class.php:1288 inc/model.class.php:1319 inc/model.class.php:1363 -#: inc/model.class.php:1382 +#: inc/model.class.php:1444 inc/model.class.php:1475 inc/model.class.php:1523 +#: inc/model.class.php:1544 msgid "Object Identifier" msgstr "Nesne Belirteci" -#: inc/model.class.php:1308 inc/model.class.php:1375 +#: inc/model.class.php:1464 inc/model.class.php:1537 msgid "Array of unsuccessful injections" msgstr "Başarısız enjeksiyonlar dizisi" -#: inc/model.class.php:1316 inc/model.class.php:1379 inc/model.class.php:1393 +#: inc/model.class.php:1472 inc/model.class.php:1541 inc/model.class.php:1558 msgid "Data check" msgstr "Veri denetimi" -#: inc/modelcsv.class.php:149 +#: inc/injectiontype.class.php:131 +msgid "-------Choose a table-------" +msgstr "-------Bir tablo seçin-------" + +#: inc/injectiontype.class.php:192 +msgid "-------Choose a field-------" +msgstr "-------Bir alan seçin-------" + +#: inc/networkequipmentinjection.class.php:72 +msgid "Number of ports" +msgstr "Kapıların numarası" + +#: inc/mapping.class.php:123 +msgid "Header of the file" +msgstr "Dosya üst bilgisi" + +#: inc/mapping.class.php:124 inc/info.class.php:84 inc/info.class.php:141 +msgid "Tables" +msgstr "Tablolar" + +#: inc/mapping.class.php:126 +msgid "Link field" +msgstr "Bağlantı alanı" + +#: inc/info.class.php:86 inc/info.class.php:143 +msgid "Mandatory information" +msgstr "Zorunlu Bilgiler" + +#: inc/info.class.php:142 +msgid "Fields" +msgstr "Alanlar" + +#: inc/info.class.php:246 +msgid "Complementary information" +msgstr "Tamamlayıcı Bilgiler" + +#: inc/info.class.php:256 +msgid "Download file sample" +msgstr "Örnek dosyayı indir" + +#: inc/dropdown.class.php:37 +msgid "dd-mm-yyyy" +msgstr "gg-aa-yyyy" + +#: inc/dropdown.class.php:39 +msgid "mm-dd-yyyy" +msgstr "aa-gg-yyyy" + +#: inc/dropdown.class.php:41 +msgid "yyyy-mm-dd" +msgstr "yyyy-aa-gg" + +#: inc/dropdown.class.php:60 +msgid "1 234.56" +msgstr "1 234.56" + +#: inc/dropdown.class.php:62 +msgid "1 234,56" +msgstr "1 234,56" + +#: inc/dropdown.class.php:64 +msgid "1,234.56" +msgstr "1,234.56" + +#: inc/dropdown.class.php:94 +msgid "Model available for use" +msgstr "Kullanılacak model" + +#: inc/dropdown.class.php:119 +msgid "Automatic detection" +msgstr "Otomatik algılama" + +#: inc/dropdown.class.php:122 +msgid "UTF-8" +msgstr "UTF-8" + +#: inc/dropdown.class.php:123 +msgid "ISO8859-1" +msgstr "ISO8859-1" + +#: inc/modelcsv.class.php:160 msgid "Specific file format options" msgstr "Belirli dosya biçimi ayarları" -#: inc/modelcsv.class.php:152 +#: inc/modelcsv.class.php:163 msgid "Header's presence" msgstr "Üst bilginin varlığı" -#: inc/modelcsv.class.php:156 +#: inc/modelcsv.class.php:167 msgid "File delimitor" msgstr "Dosya ayracı" -#: inc/networkequipmentinjection.class.php:69 -msgid "Number of ports" -msgstr "Kapıların numarası" - -#: inc/networkportinjection.class.php:85 +#: inc/networkportinjection.class.php:89 msgid "Port MAC address" msgstr "Kapı MAC adresi" - -#: inc/webservice.class.php:70 -msgid "Model unknown" -msgstr "Model bilinmiyor" - -#: inc/webservice.class.php:75 inc/webservice.class.php:80 -msgid "You cannot access this model" -msgstr "Bu modele erişme izniniz yok" - -#: inc/webservice.class.php:95 -msgid "Entity unknown" -msgstr "Varlık bilinmiyor" - -#: inc/webservice.class.php:100 -msgid "You cannot access this entity" -msgstr "Bu varlığa erişme izniniz yok" diff --git a/setup.php b/setup.php index 05e8b308..804cb08b 100644 --- a/setup.php +++ b/setup.php @@ -28,7 +28,12 @@ @since 2009 ---------------------------------------------------------------------- */ -define ('PLUGIN_DATAINJECTION_VERSION', '2.5.2'); +define ('PLUGIN_DATAINJECTION_VERSION', '2.6.0'); + +// Minimal GLPI version, inclusive +define("PLUGIN_DATAINJECTION_MIN_GLPI", "9.3"); +// Maximum GLPI version, exclusive +define("PLUGIN_DATAINJECTION_MAX_GLPI", "9.4"); if (!defined("PLUGIN_DATAINJECTION_UPLOAD_DIR")) { define("PLUGIN_DATAINJECTION_UPLOAD_DIR", GLPI_PLUGIN_DOC_DIR."/datainjection/"); @@ -36,12 +41,12 @@ function plugin_init_datainjection() { - global $PLUGIN_HOOKS, $CFG_GLPI, $INJECTABLE_TYPES; + global $PLUGIN_HOOKS, $CFG_GLPI, $INJECTABLE_TYPES; - $PLUGIN_HOOKS['csrf_compliant']['datainjection'] = true; - $PLUGIN_HOOKS['migratetypes']['datainjection'] = 'plugin_datainjection_migratetypes_datainjection'; + $PLUGIN_HOOKS['csrf_compliant']['datainjection'] = true; + $PLUGIN_HOOKS['migratetypes']['datainjection'] = 'plugin_datainjection_migratetypes_datainjection'; - $plugin = new Plugin(); + $plugin = new Plugin(); if ($plugin->isActivated("datainjection")) { Plugin::registerClass( @@ -64,7 +69,7 @@ function plugin_init_datainjection() { $PLUGIN_HOOKS["menu_toadd"]['datainjection'] = ['tools' => 'PluginDatainjectionMenu']; } - $PLUGIN_HOOKS['pre_item_purge']['datainjection'] + $PLUGIN_HOOKS['pre_item_purge']['datainjection'] = ['Profile' => ['PluginDatainjectionProfile', 'purgeProfiles']]; // Css file @@ -72,12 +77,12 @@ function plugin_init_datainjection() { $PLUGIN_HOOKS['add_css']['datainjection'] = 'css/datainjection.css'; } - // Javascript file - $PLUGIN_HOOKS['add_javascript']['datainjection'] = 'js/datainjection.js'; + // Javascript file + $PLUGIN_HOOKS['add_javascript']['datainjection'] = 'js/datainjection.js'; - // Inbtegration with Webservices plugin - $PLUGIN_HOOKS['webservices']['datainjection'] = 'plugin_datainjection_registerMethods'; - $INJECTABLE_TYPES = []; + // Inbtegration with Webservices plugin + $PLUGIN_HOOKS['webservices']['datainjection'] = 'plugin_datainjection_registerMethods'; + $INJECTABLE_TYPES = []; } } @@ -85,36 +90,48 @@ function plugin_init_datainjection() { function plugin_version_datainjection() { - return [ - 'name' => __('File injection', 'datainjection'), - 'minGlpiVersion' => '9.2', - 'author' => 'Walid Nouh, Remi Collet, Nelly Mahu-Lasson, Xavier Caillaud', - 'homepage' => 'https://github.com/pluginsGLPI/datainjection', - 'license' => 'GPLv2+', - 'version' => PLUGIN_DATAINJECTION_VERSION, - 'requirements' => [ - 'glpi' => [ - 'min' => '9.2', - 'dev' => 1 - ] - ] - ]; + return [ + 'name' => __('File injection', 'datainjection'), + 'author' => 'Walid Nouh, Remi Collet, Nelly Mahu-Lasson, Xavier Caillaud', + 'homepage' => 'https://github.com/pluginsGLPI/datainjection', + 'license' => 'GPLv2+', + 'version' => PLUGIN_DATAINJECTION_VERSION, + 'requirements' => [ + 'glpi' => [ + 'min' => PLUGIN_DATAINJECTION_MIN_GLPI, + 'max' => PLUGIN_DATAINJECTION_MAX_GLPI, + ] + ] + ]; } function plugin_datainjection_check_prerequisites() { - $version = rtrim(GLPI_VERSION, '-dev'); - if (version_compare($version, '9.2', 'lt')) { - echo "This plugin requires GLPI 9.2"; - return false; + + //Version check is not done by core in GLPI < 9.2 but has to be delegated to core in GLPI >= 9.2. + $version = preg_replace('/^((\d+\.?)+).*$/', '$1', GLPI_VERSION); + if (version_compare($version, '9.2', '<')) { + $matchMinGlpiReq = version_compare($version, PLUGIN_DATAINJECTION_MIN_GLPI, '>='); + $matchMaxGlpiReq = version_compare($version, PLUGIN_DATAINJECTION_MAX_GLPI, '<'); + + if (!$matchMinGlpiReq || !$matchMaxGlpiReq) { + echo vsprintf( + 'This plugin requires GLPI >= %1$s and < %2$s.', + [ + PLUGIN_DATAINJECTION_MIN_GLPI, + PLUGIN_DATAINJECTION_MAX_GLPI, + ] + ); + return false; + } } - return true; + return true; } -function plugin_datainjection_check_config($verbose=false) { - return true; +function plugin_datainjection_check_config($verbose = false) { + return true; } @@ -125,14 +142,14 @@ function plugin_datainjection_check_config($verbose=false) { */ function getTypesToInject() { - global $INJECTABLE_TYPES,$PLUGIN_HOOKS; + global $INJECTABLE_TYPES,$PLUGIN_HOOKS; if (count($INJECTABLE_TYPES)) { // already populated return; } - $INJECTABLE_TYPES = ['PluginDatainjectionCartridgeItemInjection' => 'datainjection', + $INJECTABLE_TYPES = ['PluginDatainjectionCartridgeItemInjection' => 'datainjection', 'PluginDatainjectionBudgetInjection' => 'datainjection', 'PluginDatainjectionComputerInjection' => 'datainjection', 'PluginDatainjectionNotepadInjection' => 'datainjection', @@ -221,29 +238,29 @@ function getTypesToInject() { 'PluginDatainjectionDeviceMotherboardInjection' => 'datainjection', 'PluginDatainjectionDeviceDriveInjection' => 'datainjection', 'PluginDatainjectionDeviceNetworkCardInjection' => 'datainjection' - ]; - //Add plugins - Plugin::doHook('plugin_datainjection_populate'); + ]; + //Add plugins + Plugin::doHook('plugin_datainjection_populate'); } function plugin_datainjection_migratetypes_datainjection($types) { - $types[996] = 'NetworkPort'; - $types[999] = 'NetworkPort'; - return $types; + $types[996] = 'NetworkPort'; + $types[999] = 'NetworkPort'; + return $types; } function plugin_datainjection_checkDirectories() { - $plugin = new Plugin(); + $plugin = new Plugin(); if ($plugin->isInstalled('datainjection') - && (!file_exists(PLUGIN_DATAINJECTION_UPLOAD_DIR) - || !is_writable(PLUGIN_DATAINJECTION_UPLOAD_DIR)) - ) { + && (!file_exists(PLUGIN_DATAINJECTION_UPLOAD_DIR) + || !is_writable(PLUGIN_DATAINJECTION_UPLOAD_DIR)) + ) { return false; } - return true; + return true; } diff --git a/testwebservice.php b/testwebservice.php index 89b614b0..a3cfb913 100644 --- a/testwebservice.php +++ b/testwebservice.php @@ -36,7 +36,7 @@ chdir("../../.."); $url = "/".basename(getcwd())."/plugins/webservices/xmlrpc.php"; -$args = array(); +$args = []; if ($_SERVER['argc'] > 1) { for ($i=1; $i array('method' => "POST", - 'header' => $header, - 'content' => $request))); + $context = stream_context_create( + [ + 'http' => [ + 'method' => "POST", + 'header' => $header, + 'content' => $request + ] + ] + ); $file = file_get_contents("http://".$params['host']."/".$params['url'], false, $context); if (!$file) {