From 9f223cb226ac9b12c0592dad8c8f02a8119702d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 24 May 2018 12:24:44 +0200 Subject: [PATCH 1/7] Use new methods for search options (#69) --- inc/commoninjectionlib.class.php | 8 +- inc/item_operatingsysteminjection.class.php | 2 +- inc/model.class.php | 234 ++++++++++++-------- inc/notepadinjection.class.php | 2 +- setup.php | 7 +- 5 files changed, 150 insertions(+), 103 deletions(-) diff --git a/inc/commoninjectionlib.class.php b/inc/commoninjectionlib.class.php index 28d4675c..22065cbb 100644 --- a/inc/commoninjectionlib.class.php +++ b/inc/commoninjectionlib.class.php @@ -351,7 +351,7 @@ static function getBlacklistedOptions($itemtype) { //add document fields if (in_array($itemtype, $CFG_GLPI["document_types"])) { - $tabs = Document::getSearchOptionsToAdd(); + $tabs = Document::rawSearchOptionsToAdd(); $document_fields = array(); unset($tabs['document']); foreach ($tabs as $k => $v) { @@ -363,7 +363,7 @@ static function getBlacklistedOptions($itemtype) { //add infocoms fields if (in_array($itemtype, $CFG_GLPI["infocom_types"])) { - $tabs = Infocom::getSearchOptionsToAdd($itemtype); + $tabs = Infocom::rawSearchOptionsToAdd($itemtype); $infocom_fields = array(); unset($tabs['financial']); foreach ($tabs as $k => $v) { @@ -374,7 +374,7 @@ static function getBlacklistedOptions($itemtype) { } //add contract fields if (in_array($itemtype, $CFG_GLPI["contract_types"])) { - $tabs = Contract::getSearchOptionsToAdd(); + $tabs = Contract::rawSearchOptionsToAdd(); $contract_fields = array(); unset($tabs['contract']); foreach ($tabs as $k => $v) { @@ -386,7 +386,7 @@ static function getBlacklistedOptions($itemtype) { //add networkport fields if (in_array($itemtype, $CFG_GLPI["networkport_types"])) { - $tabs = NetworkPort::getSearchOptionsToAdd($itemtype); + $tabs = NetworkPort::rawSearchOptionsToAdd($itemtype); $networkport_fields = array(); unset($tabs['network']); foreach ($tabs as $k => $v) { diff --git a/inc/item_operatingsysteminjection.class.php b/inc/item_operatingsysteminjection.class.php index d86e627a..4b795883 100644 --- a/inc/item_operatingsysteminjection.class.php +++ b/inc/item_operatingsysteminjection.class.php @@ -53,7 +53,7 @@ function isPrimaryType() { **/ 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'])) { diff --git a/inc/model.class.php b/inc/model.class.php index 3808415f..e8cc570f 100644 --- a/inc/model.class.php +++ b/inc/model.class.php @@ -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; } diff --git a/inc/notepadinjection.class.php b/inc/notepadinjection.class.php index 3fd69cba..9f3dd001 100644 --- a/inc/notepadinjection.class.php +++ b/inc/notepadinjection.class.php @@ -62,7 +62,7 @@ function customDataAlreadyInDB($injectionClass, $values, $options) { **/ function getOptions($primary_type='') { - $tab = Notepad::getSearchOptionsToAddNew(); + $tab = Notepad::rawSearchOptionsToAdd(); $searchoptions = []; foreach ($tab as $option) { if (is_numeric($option['id'])) { diff --git a/setup.php b/setup.php index 05e8b308..0d3a0e46 100644 --- a/setup.php +++ b/setup.php @@ -87,14 +87,13 @@ 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', + 'min' => '9.3', 'dev' => 1 ] ] @@ -104,8 +103,8 @@ function plugin_version_datainjection() { function plugin_datainjection_check_prerequisites() { $version = rtrim(GLPI_VERSION, '-dev'); - if (version_compare($version, '9.2', 'lt')) { - echo "This plugin requires GLPI 9.2"; + if (version_compare($version, '9.3', 'lt')) { + echo "This plugin requires GLPI 9.3"; return false; } From 1304fbd42d5387aacd9c0451e258a81990477e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 31 May 2018 11:19:14 +0200 Subject: [PATCH 2/7] Replace usage of deprecated Dropdown::showPrivatePublicSwitch() --- inc/model.class.php | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/inc/model.class.php b/inc/model.class.php index e8cc570f..e0192076 100644 --- a/inc/model.class.php +++ b/inc/model.class.php @@ -621,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').""; @@ -876,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; @@ -889,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( __( From 1cb119678d5f23b4ca29830a66dcc9e5ad61599d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 21 Jun 2018 14:56:12 +0200 Subject: [PATCH 3/7] Use stable dependencies and force compatibility with PHP 5.6 --- .travis.yml | 2 +- composer.json | 9 +- composer.lock | 834 ++++++++++++++++++++++++++++++-------------------- 3 files changed, 512 insertions(+), 333 deletions(-) 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/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" + } } From a51bb6feaf3a5a2dcac4eeda66c68f23e294bf18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 21 Jun 2018 16:29:07 +0200 Subject: [PATCH 4/7] Fix coding standards violations --- css/datainjection.css | 626 +++--- docs/LISEZMOI.TXT | 94 +- docs/ROADMAP.TXT | 62 +- front/clientinjection.form.php | 16 +- front/info.form.php | 2 +- front/model.form.php | 8 +- hook.php | 1785 +++++++++++------ inc/autoupdatesysteminjection.class.php | 10 +- inc/backendcsv.class.php | 12 +- inc/backendinterface.class.php | 2 +- inc/budgetinjection.class.php | 16 +- inc/cartridgeiteminjection.class.php | 18 +- inc/clientinjection.class.php | 10 +- inc/commoninjectionlib.class.php | 100 +- inc/computer_iteminjection.class.php | 6 +- ...omputer_softwarelicenseinjection.class.php | 12 +- ...omputer_softwareversioninjection.class.php | 12 +- inc/computerinjection.class.php | 14 +- inc/computermodelinjection.class.php | 6 +- inc/computertypeinjection.class.php | 10 +- inc/consumableiteminjection.class.php | 18 +- inc/contact_supplierinjection.class.php | 8 +- inc/contactinjection.class.php | 14 +- inc/contacttypeinjection.class.php | 10 +- inc/contract_iteminjection.class.php | 4 +- inc/contract_supplierinjection.class.php | 10 +- inc/contractinjection.class.php | 36 +- inc/contracttypeinjection.class.php | 10 +- inc/data.class.php | 4 +- inc/devicecaseinjection.class.php | 14 +- inc/devicecasetypeinjection.class.php | 10 +- inc/devicecontrolinjection.class.php | 16 +- inc/devicedriveinjection.class.php | 16 +- inc/deviceecasetypeinjection.class.php | 10 +- inc/deviceharddriveinjection.class.php | 14 +- inc/devicememoryinjection.class.php | 16 +- inc/devicememorytypeinjection.class.php | 10 +- inc/devicemotherboardinjection.class.php | 14 +- inc/devicenetworkcardinjection.class.php | 14 +- inc/deviceprocessorinjection.class.php | 16 +- inc/documentinjection.class.php | 6 +- inc/documenttypeinjection.class.php | 10 +- inc/domaininjection.class.php | 10 +- inc/dropdown.class.php | 2 +- inc/engine.class.php | 32 +- inc/entityinjection.class.php | 16 +- inc/filesystemtypeinjection.class.php | 10 +- inc/group_userinjection.class.php | 16 +- inc/groupinjection.class.php | 12 +- inc/info.class.php | 42 +- inc/infocollection.class.php | 2 +- inc/infocominjection.class.php | 30 +- inc/injectioninterface.class.php | 10 +- inc/injectiontype.class.php | 40 +- inc/interfacetypeinjection.class.php | 10 +- inc/item_operatingsysteminjection.class.php | 6 +- inc/itilcategoryinjection.class.php | 16 +- inc/knowbaseitemcategoryinjection.class.php | 10 +- inc/knowbaseiteminjection.class.php | 18 +- inc/locationinjection.class.php | 10 +- inc/manufacturerinjection.class.php | 6 +- inc/mapping.class.php | 10 +- inc/mappingcollection.class.php | 8 +- inc/menu.class.php | 2 +- inc/model.class.php | 96 +- inc/modelcsv.class.php | 2 +- inc/monitorinjection.class.php | 22 +- inc/monitormodelinjection.class.php | 10 +- inc/monitortypeinjection.class.php | 10 +- inc/netpointinjection.class.php | 12 +- ...etworkequipmentfirmwareinjection.class.php | 10 +- inc/networkequipmentinjection.class.php | 20 +- inc/networkequipmentmodelinjection.class.php | 10 +- inc/networkequipmenttypeinjection.class.php | 10 +- inc/networkinjection.class.php | 10 +- inc/networkinterfaceinjection.class.php | 10 +- inc/networknameinjection.class.php | 12 +- inc/networkport_vlaninjection.class.php | 12 +- inc/networkportinjection.class.php | 46 +- inc/notepadinjection.class.php | 8 +- ...atingsystemarchitectureinjection.class.php | 10 +- inc/operatingsystemeditioninjection.class.php | 10 +- inc/operatingsysteminjection.class.php | 10 +- inc/operatingsystemkernelinjection.class.php | 10 +- ...tingsystemkernelversioninjection.class.php | 10 +- ...ratingsystemservicepackinjection.class.php | 10 +- inc/operatingsystemversioninjection.class.php | 10 +- inc/peripheralinjection.class.php | 18 +- inc/peripheralmodelinjection.class.php | 10 +- inc/peripheraltypeinjection.class.php | 10 +- inc/phoneinjection.class.php | 18 +- inc/phonemodelinjection.class.php | 10 +- inc/phonepowersupplytypeinjection.class.php | 10 +- inc/phonetypeinjection.class.php | 10 +- inc/printerinjection.class.php | 28 +- inc/printermodelinjection.class.php | 10 +- inc/printertypeinjection.class.php | 10 +- inc/profile.class.php | 38 +- inc/profile_userinjection.class.php | 12 +- inc/profileinjection.class.php | 10 +- inc/requesttypeinjection.class.php | 12 +- inc/session.class.php | 6 +- inc/softwareinjection.class.php | 18 +- inc/softwarelicenseinjection.class.php | 32 +- inc/softwarelicensetypeinjection.class.php | 10 +- inc/softwareversioninjection.class.php | 30 +- inc/solutiontemplateinjection.class.php | 14 +- inc/solutiontypeinjection.class.php | 10 +- inc/stateinjection.class.php | 10 +- inc/supplierinjection.class.php | 14 +- inc/suppliertypeinjection.class.php | 10 +- inc/taskcategoryinjection.class.php | 12 +- inc/userinjection.class.php | 18 +- inc/virtualmachinestateinjection.class.php | 10 +- inc/virtualmachinesysteminjection.class.php | 10 +- inc/virtualmachinetypeinjection.class.php | 10 +- inc/vlaninjection.class.php | 14 +- inc/webservice.class.php | 48 +- setup.php | 76 +- testwebservice.php | 18 +- 120 files changed, 2517 insertions(+), 1848 deletions(-) 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/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 22065cbb..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::rawSearchOptionsToAdd(); - $document_fields = array(); + $document_fields = []; unset($tabs['document']); foreach ($tabs as $k => $v) { $document_fields[] = $k; @@ -364,7 +364,7 @@ static function getBlacklistedOptions($itemtype) { //add infocoms fields if (in_array($itemtype, $CFG_GLPI["infocom_types"])) { $tabs = Infocom::rawSearchOptionsToAdd($itemtype); - $infocom_fields = array(); + $infocom_fields = []; unset($tabs['financial']); foreach ($tabs as $k => $v) { $infocom_fields[] = $k; @@ -375,7 +375,7 @@ static function getBlacklistedOptions($itemtype) { //add contract fields if (in_array($itemtype, $CFG_GLPI["contract_types"])) { $tabs = Contract::rawSearchOptionsToAdd(); - $contract_fields = array(); + $contract_fields = []; unset($tabs['contract']); foreach ($tabs as $k => $v) { $contract_fields[] = $k; @@ -387,7 +387,7 @@ static function getBlacklistedOptions($itemtype) { //add networkport fields if (in_array($itemtype, $CFG_GLPI["networkport_types"])) { $tabs = NetworkPort::rawSearchOptionsToAdd($itemtype); - $networkport_fields = array(); + $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 4b795883..9f6b1abe 100644 --- a/inc/item_operatingsysteminjection.class.php +++ b/inc/item_operatingsysteminjection.class.php @@ -51,7 +51,7 @@ function isPrimaryType() { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Item_OperatingSystem::rawSearchOptionsToAdd(get_parent_class($this)); $searchoptions = []; @@ -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 e0192076..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` "; @@ -504,10 +504,10 @@ function rawSearchOptions() { * @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" : @@ -534,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) { @@ -574,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); @@ -594,7 +594,7 @@ function showForm($ID, $options = array()) { } - function showAdvancedForm($ID, $options = array()) { + function showAdvancedForm($ID, $options = []) { if ($ID > 0) { $this->check($ID, READ); @@ -602,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 ""; @@ -686,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 ""; @@ -699,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 ""; @@ -712,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 ""; @@ -746,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; @@ -756,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); @@ -787,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) { @@ -826,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()]); } } @@ -841,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; @@ -946,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); @@ -967,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) - )); + )]; } } @@ -983,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 @@ -1037,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); @@ -1153,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; @@ -1179,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')); @@ -1194,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'), @@ -1206,7 +1206,7 @@ function isFileCorrect() { } } } - return $error; + return $error; } @@ -1300,7 +1300,7 @@ static function cleanSessionVariables() { //Reset parameters stored in session PluginDatainjectionSession::removeParams(); - PluginDatainjectionSession::setParam('infos', array()); + PluginDatainjectionSession::setParam('infos', []); } @@ -1356,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), @@ -1370,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]; @@ -1568,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 9f3dd001..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,7 +60,7 @@ function customDataAlreadyInDB($injectionClass, $values, $options) { /** * @see plugins/datainjection/inc/PluginDatainjectionInjectionInterface::getOptions() **/ - function getOptions($primary_type='') { + function getOptions($primary_type = '') { $tab = Notepad::rawSearchOptionsToAdd(); $searchoptions = []; @@ -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/setup.php b/setup.php index 0d3a0e46..1af3bd14 100644 --- a/setup.php +++ b/setup.php @@ -36,12 +36,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 +64,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 +72,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,19 +85,19 @@ function plugin_init_datainjection() { function plugin_version_datainjection() { - 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' => '9.3', - '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' => '9.3', + 'dev' => 1, + ] + ] + ]; } @@ -112,8 +112,8 @@ function plugin_datainjection_check_prerequisites() { } -function plugin_datainjection_check_config($verbose=false) { - return true; +function plugin_datainjection_check_config($verbose = false) { + return true; } @@ -124,14 +124,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', @@ -220,29 +220,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) { From f5b3eb9d3bcc978876350046708071151e07ec51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 21 Jun 2018 15:24:58 +0200 Subject: [PATCH 5/7] Fix version compatibility check --- setup.php | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/setup.php b/setup.php index 1af3bd14..fc2c68a6 100644 --- a/setup.php +++ b/setup.php @@ -30,6 +30,11 @@ define ('PLUGIN_DATAINJECTION_VERSION', '2.5.2'); +// 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/"); } @@ -86,15 +91,15 @@ function plugin_init_datainjection() { function plugin_version_datainjection() { 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' => [ + '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' => '9.3', - 'dev' => 1, + 'min' => PLUGIN_DATAINJECTION_MIN_GLPI, + 'max' => PLUGIN_DATAINJECTION_MAX_GLPI, ] ] ]; @@ -102,13 +107,26 @@ function plugin_version_datainjection() { function plugin_datainjection_check_prerequisites() { - $version = rtrim(GLPI_VERSION, '-dev'); - if (version_compare($version, '9.3', 'lt')) { - echo "This plugin requires GLPI 9.3"; - 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; } From 7efa686e51a5f1ca6fd20146d34442d764acace7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 21 Jun 2018 15:19:40 +0200 Subject: [PATCH 6/7] Update locales --- .tx/config | 4 +- locales/cs_CZ.mo | Bin 8459 -> 8274 bytes locales/cs_CZ.po | 504 ++++++++++++++++++----------------- locales/datainjection.pot | 434 +++++++++++++++--------------- locales/en_GB.mo | Bin 0 -> 7661 bytes locales/en_GB.po | 466 +++++++++++++++++++++++++++++++++ locales/fi_FI.mo | Bin 0 -> 7827 bytes locales/fi_FI.po | 465 ++++++++++++++++++++++++++++++++ locales/fr.mo | Bin 8506 -> 0 bytes locales/fr.po | 471 --------------------------------- locales/fr_FR.mo | Bin 8625 -> 8389 bytes locales/fr_FR.po | 538 ++++++++++++++++++-------------------- locales/pt_BR.mo | Bin 8461 -> 8299 bytes locales/pt_BR.po | 500 ++++++++++++++++++----------------- locales/ru_RU.mo | Bin 4183 -> 4020 bytes locales/ru_RU.po | 490 +++++++++++++++++----------------- locales/tr_TR.mo | Bin 8024 -> 7863 bytes locales/tr_TR.po | 500 ++++++++++++++++++----------------- 18 files changed, 2386 insertions(+), 1986 deletions(-) create mode 100644 locales/en_GB.mo create mode 100644 locales/en_GB.po create mode 100644 locales/fi_FI.mo create mode 100644 locales/fi_FI.po delete mode 100644 locales/fr.mo delete mode 100644 locales/fr.po 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/locales/cs_CZ.mo b/locales/cs_CZ.mo index 86c1145288df3999332b6110bc5f3327cd43b024..5ae721b6941f25cb06d486994afca4fa90c0b207 100644 GIT binary patch delta 2206 zcmYM#e@sLI%;KeYgx`YS~<6}&CSC8DF3qe2Tpc&p7VO1bDr}&&-Z(t z3;Wkzc|81ca`anAm-a!&w;fMl68AsA zbo?9>@hWEHZnGd z7jBsfoQJD13!lQdxD`{G--MhFBbdg6F{gb7XI73%##QJ3PpAoRBN3Q;&i#3es`qnH z6IP(!TZ^2g(YfD_3b+T8nBTlYg>0A+)WD-ohvS$)`(s>;U!hWW%XuC}XHA%nIk*(H zpeED;I#HSOBd6KRMW5tNjK<>_R*K%Iq8HAh2E2&+rq?h7Z=k;2Kgem~=&U`EfqGu) z*o=y-8@2Eqs0sI>7C442IDrbtn?U|mDWtb1XhtnyGZLg3Lb7Z2U?CnrO+0~0?T@I8 zOd+TFn@b6L7;Fz#quQUMKIQKigZEM6$0+|wSu)Gi#QEsKRj3K;u@!?@jFVV})2N6F z2v-Yw0xPi#wFwWSGJDqXyyG|cm&=$Ru#@Lshnamnm3(H`i#t#Q9z=bD(~c947m(9j z;=&rtFQ~|-Q493au&@fXzz$R(AylT`Mg6+Yq56lXoJt%Yay~bzaS^tlzI6~e&2BD= z=nyJ($50cT#$3FNWZ(RW3PgjEWs`*ps0h`69cm%H$R-S%y;QVI_n{&?f?B|b$UZUO zBd58+MFZYL{aWTQi+<0ks7#fhGE#%YWSUU@e5mpJQJ*@D8gCSr==VQPMJc(0nqV3= zv76B~P!jUFOaUq*kD(@NL}g?Xs(&wP?}Sj9*o6w{4b=N5Q2jqa3ol{<^P8Kh;9V?1 zH~G<@+;Ysr4kW8)H);WgPz!qxm8s8g15Tk*TuHtaVJj-2ezfp4)I3LVF^*%noXU4p zmZ6)s6+szlphvlAq7Kw1^5X#f^$c^Ks%(4 zqUGq=Y$tiz(t2ha53Z}JZLxQHautucU-#t3^wRFLUEYi|WnIS_ zilquiw_WTlseNv?G4pSAl~Wf=Qzu0m;#rE)P)n(%JWqLvQbXBlAN3Zwx+0gnuX`e) z#8d8smfE@}Ya8mV_WIVg#`RCzwJFOIYl=&&ip$Havho$ntBXoY?QqJ%&-eRYwE|Y(%>B@V2W>MQtp5KV*x}64*kE92 zI25!qvVNUeL?kNvj4S=5r3G339{=RHwS8xB!2jhDe;{&s!8%vunT6lFTmd`By7Mpf C!2{R; delta 2402 zcmZY9ZERCj9LMp~Ip~HWV-M~D=I)qbz}(mhW6Ls;XHJ?Z$dV+zO9 z{tZ5Wr!fyN;sm^jg~r59{upEOX{g2uY{3U{9a`A$xEE`ve~krr$?-Ohr9SRnV@k0c zxl9ueUYYrLKR$_NxB>6O=dqCa%`T_IUM%9ppi}=2Gm)c`anWi28#Uo=WCbRd(KNw> zsNdH*_4%mZtw1ib)@koVEjWtfncuujfozz)sDa;iIvl}q)Q@8&{)9^1E$4j!oi*WP zEXP(o^SuP!pd( zrS<|UBUg~ixEW+R7UL9Lj61N`X}^xz(n_Klh0V&pCYnuyQnv&Zz$SEK3^nm~T!DjF zi+6AqPGh-RnHLpU9B1MH>M))`W%!EYO-C2|Vr4ORoWe#r)H3Tb+=CkEH^+ZaffN(A ztZ=MGUYY4gEM_5cnWuOtzz|wEfC_L3wUBeDjE!dB^p(XYQP2qjT3I%~ zRsdzF6}F(h-=#?q7Ll`sQ!nL#hRn2e!rl`{~fi}H!|r5{zy@(Lo=hQ$L^<^aoma3pHN}`w&;h zDHJ^T1lHjTs1R*5M9PrEF@jKaXB{Nc~nO7h(@2+B-9z1f+WE-BC(q` zR0e_-rZY3)b2Kcb;X~ASdllzku{Cn2);Mm%7TOP>Qhg3J&|i)>9JPEG?fR?d-kdl& zdP4ceOnu}u=%mc&Ryg{5CgF0gEb1Jo+pY5{!2DGQ}(6Soe=DsE+AE_W062JS7~&D{RP zo}3z2N9wDbo$jjMV6@90vckS+qyDh3&sw~+?QyHVuDQ{&!`2pm*A`zmH7oD4tjf%b zT5Ewf;`N8ReeDsy9kQHXd+KJ?)hBM|*X1?U);H98JeJ4P(%4i}-;kJD&|2N*jroGs zJUi@b5BROtURCQhk5uP$^?3ckx^}x~c4}KeZk9V>2klTGns}vXa-L_#%!eCinTG#N z9V11m8#K&B%t9+q|ZEZ~_`=YTBgZ9`R(V!LUKmM(^Biij7 kNqEc`-s&4kJLA}~;eFl5lj(!0cgw$bWu=pej*6@Q0, 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 0000000000000000000000000000000000000000..121cd650fe56357475bc88ff2d1c10cc05be8152 GIT binary patch literal 7661 zcmeI0U2J7l6~{L)2vk5Al`lm%!q8!u+nIL0O2+{^opz>7J5#5f8Bk$7y=S*Q^xSi< z=cAqaU?#?oI5ANYFyNc;pvh>ABm~8e#GnZen3y1f(TE`iO?dJ_#6*L?|2g~K7Dr6< zxjS9=clO8GYwxwzUT3Gj-?-snLwNvsKN4SLj2eFQ4t^+CU1rQJ@M>t`Zm4l5Jqvg# z^#?t_?)f;pn)YwQYv51dRqzG)KKLqp54^C)n2qpS_(8Y@egNJLEsQ+R!rQ5zgYSkf zdcFp)p#CPj9$xWIWB4<@{Lo}}z$@XM@CG;uFNX_I`b*z`7QUDIqrU!KSgjk%6fgMp z-$Chn4eI^B`}QlDRPWyirEdq+d;1}OX56=*fZDHvvd?LVDa=`@c^~rqkHL3Qe-hpV ze-350Kl%QP7%Y9)z#HLKsP)_prT-L^of62O`7A%u_f@z7J_copq2limD7!x4`D4##;r$mF^E}jf z8bG;)C!yv!?fEd2{h#psq36#as?9H;_VY4iE9P}5J6yshcr-UdRG2}i^K=;MJS{>C z&w8GNw^M%(Do)<;yqwA9XA8BTJ}5sNg4)*%#D(S*)Okvv?D-`q{a^F_=O9y>r+xjG zkU#S>Kl0z}zWtw2`YtD!^!^P{^KXNC|4v_@fqJhArSAdXz6`bBFF@JnQK<8D4r<;f zeg891aq?@ZxO)}KZkJwHzkdsqzCBR>orGG?BGh`$K-uXlQ1d!=b-lg11P&b=lP=N zEARr^RkkAma+@l?$hIoSk^8HsIxggk5rl12+DoZbW<7i``w~Fkn zGK9!>I!7NuRB(rJ)zj+FojlGWHzPX`#fOUgt-YO4#g_^AN&ozDIOd-P#h;4oyb0Ng zoJ3SUR>SmpeiY(L^I_xwvLBg4B1CZ{-;5&Dh{`=R%w5p>=g?D7E|K3=E<_Y#D!UNH ziORh-s=LHK|12m@P9gH=3~~?|M)n||K<1G_WC2mpc~Yz%MvfwiFBQeh=IV(&02Nn? zm5(5VgSiM%Q5<#35gx{Ur5ADxO+TU-R8dUcf*e975wj_@!Ez84F0{=wE?dd@ExDTJ z(lS{)WNke+jk=61q-pMKVCNzihraQ=&LWtNU8l3(4(!;ub=PiFJ@n~eD=m5$4pEz> zEju!Of*E6{mZ*r*B#7;JGM8qpKsB0|f~3g~(zfck8II$0*)}s*_1kpLhFRJU)8%eo z93?LAj_@zkjb%Fw3UpO-)D_L(PDgnWCG+*((2-@qiaPSL*>rh6SH?C<9&k;+gid#v zyv=~Z#xBSUnNPS+3){|I?h?k9MJi)7ZRm=6 z31%cndW(9C4)?{O%gh=FVa}1X)s9_@2?8dL)>!mFPy}|o)lRd*RL{)?*IcY0rML2a zT`f}H%w1O4Ak#+b#q$#OtzBdeVE8x<@Fq^Qc_6K3G%2ED#g@rpLbn+`EoC+f+7+Y3 zP8}HQv=$4_#_2rO!X-H_w#|IWX6{pEl)2E1DcW+t?4gUJR)nSMs>7TiUaM>MdStxi zEbTOQomP+OR++!re>H8jOF5T8Nt7>`F*YPSCK9)IW6kUWn#MV56n)AmYN5x%gS z7|{ttD+82C;j-MiEK9SseRI`Tq@X)|?VA5%YhPcV-4t%xwC0`F_+HakthCuv%S2En&4sES)!{b5$u#^d){$-|6gb5KKC28l**yqr<8_j-!OOXslml$A zge{e2UeXcY|YjYp^(bW(OJck9S_kJkt{QFlq{gPJ11Kfnom=u9?Bs1?TP1m8 zmZRiirg7nrjS9OQ#jzUME^iSRI@k8v8 z(UYK6TXQwcr*vQ^hevD>hE-fv4P_EFb+DTmAC)W$%(Np+JLjNN(P^HJKJ7Y(q)s6$ zd?|=aCnK-}ce)*L+?Sl0Zo4LSYStOVALCB8pOL3?Gvjq|Aj&wb(j(TWGgY^biPOct zYHZT=N&VrYXZ65p1>IDv@znFewd*sP+m*D`3fcMEy!n=-tfSc3cb~mCEqiPK1o@wk~-mQ$?dex3ucC> z(S9o5^P)do$7jYGgXVamuSC}3q=n{q^||}E5AAV%#go-S>2o2UL1G z5tuHKYNC+fW@y3jPRnAeOxDX6BABJ7y+l=V@IkMnaByO3yw46ZM%K+s|F9e+)%cKC z3VWBqlGUe18B!J^i4_qyg6eaRRVy!Ii+ar(-DE2mj%e*#wEO9|vnzHXDylELdS}a` z;7Z|NtFmzQdFNH;)Nw6V-mbT+G4t6ZU#LQ{%Hy5XLH^pNq*R;TyU5gPH=GFK2vgPv zrk*Yg8?9Djg<>GJ>QO&x4>_n=s$|j_4;v>)^L!nL?9}kc;o*a$_QdG1>G7jSdX80} zvc_aSABBzm<$T_lNr!CD)X|y7h`%K@4xo3)4s7oqY;51%80feC14Fy^+`gT{z{WAR z6lwDRI&OjsO=BkG)W*844B76*1RJc_d6&2hHDS+0kj$6l;>L^%T0hIg$Gm?^x5;PFqL$+|Ii*4;Vh?2b|yCBP5v2S>KWPE&eoK`aDvc{;t z1`OH3*{JB5ipwmB8)JOEbCkEMYQAq^udN^VZBFb>`)vPhdwb5m4xit$enHluTfZQ$ qUy#W|>lftp3vzw`UB4i&Uy#=?$o{`Z>lfs;SMvY;g8cv7jQ<7ew((*B literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5f9d30e1f2a646444ac5c0c61454fd04d1ac18c8 GIT binary patch literal 7827 zcmaKwZ;T$tUB@R)(zH(7v?)nipmYK?wqrkcw&OU?1t-0n&+)}~zN_ziX;Mm54*E>exQg7A^t>t(NrMO3i=|ogsOsoNTeWW5js`Co4%l}Dgi=I$Tvz2i3w*LBJdQ?lEQQNy3TksH_B-)zkL;5(p& zXQBE%8|mSjsJ|5XsmRa3chLU3@P7D3_;&a;_(Skt;Saz!95Uu!_yBw_di-JVcz*$9&#%J=;6Fmy?Yoelc{815{|BJnpNU+CT2~KB?mejaeg#UtPr^0$ zd8qZgiB94}P~$H{&HrJ@5={kBt@$W?2!0G|-p@nn^{Y_&_&dnYe23dCyojK+yb4FK1NY%s_}@_LIm%)s&qa6!cA@<5 zH=*?UO5_(J{|bKkHeXm{P~tt2?}F0zgHU>T4ARvs zLh12&$j^L)o7VdYcocpXNsBymw_5E#h*1Ye8il-y7ehNzN#aRC!l-)9@`F<_(Gf?w<0ZN}= zhLYpIATAp^>-{}^Bz;(@agRgA(-Tnfu>iHM4?y+bfs*$I7*zUxH`ILRpyYlU%5GPo zg(E0Ez63Fy`4rTAe+U&ne+hpMeh1FL3gxNa%TV$3Cs1v{u4zNqUFiu^>^a}B~-;(UA-?xegx zk$-Mbo~F!GWapox>`=~8`V?J?C&kQV$|^5`f%KIs}kGY+q3)h=m zS9n^AHRU_P*_@&%r|Y^(c^~BxWrbo6_pIAru~n<_cpp6^)SGNGqS_JI&gdqb%K6FRHrRO{!|U&TN`rPr6Zr_H~`VP6uzZ#8uuF zc@kA`(~2RwMOiY6nLpTJ=yIeg%5gKjdgg_QfZCB6~CEV%rLZ6E8c-&|xt(t~`^T$Gne$YH_!=2GHNwtPcv!E>9YBUQ9mH!(}=tLM%= z@>u7TY4mKj9rE|unzZcXg43o^S?pl%Ds-u;lqj;u)h$Nj$wb(~9;Qd@h*k=ybDxxz zP0F$;55C(DOVI?A?gwT5KU-&JX6)hK;ll^MnfmvEMn4|0#&%p5j^uUbH9ay<^s?;g zyxR};v~jm(BGYgiG@fpjZ^=$kCw5qqH?|0+Bx9JQH)m6C_tGp= zBg^G0{6ZmXQ*xh%bs5>PH*V4x0x;m~-B*@$xx5OvlI=@D%-nQHQmfs4UR=$lV$(rkRZnFg#Rn51I$ zr(XGF)Wl?E$3-m(S^2@dc}r4OD7NdKvCkFtk;Xo*8n8||CT}aUPkC} zz781$0Z7o&NTtn_{A2UP?-k{M#pZdF@Fnu7X!3&Dz-zRgV0%7{!F6rpV&|N>mTQ+N zheTS>TnpRXYc|?z+Qswfp4a5HXI+^qmqyyTX@@XR>w(2CsV42=+;sJXcTxKjQrQu9 z2)9K|Ye_?Lh)%Dh@bvQ9(u|#_kF;CW@nO&9p?{B0ynWK3$*|QZLrOy=F`sfG2-`hc z4OT=Kjm+xZWhp2QZ=Gm#vh~}ovF)cm?Cg5GReR5oB7PRKaM<4Ylra^qe*AiGCo`5Y zn^gVaiXo4;se}AAtEAMZJ(|cg)84V^vJ_P|0n-fE>ve|1&X~(UYT;2gwf6|rvQRSV zEcH5@q>k4b>jyAwxOG z?9smWqiSw;c5iQQ#%r*2JGn8_Erzq4ZL)L=xM4MW`rOGgr)Rg*7cMT%9y_$Mw6Zu= zz^R#&hZYKQSB^Zy!kqQV4L>`|T$(>lYIJ3l`11>w=C7_VZcKY>vhAeoEXHHQoISUd z`iaPMf}fv##JUj2CgW^7gGcz%|{c!G7nLjC^D_Ei0vx8BuRJs1@2 z>;LD_y_{D2H<^hucgLqmuc$mf$Bs;UXz*sS$5D8kCkaOs)L0L=nRUE8B|W-oH}M5& zJRKA%DZplRp-hv<9%Z_lzHaMi|0b{fxQd}f(8ZYv7 zYGOU1-=u9m&E0@>JRVeO)FB_(U9Gg-ziDoHKXQYDr66&uRXeK53UwWi*-qJlx4v%X ztjuNkXyI&<+T9}6ihItqrfIckHui5~$Q;R;m|P_7ddWL^OwrtRjqJ*SR>P(in!?Bv z-!SXr{a1bB@sef?i@NzcA{`_tmRgeznF_1qoD>RQm}O1?Y~eKWSu`pW6CRviQH1m| z80^1lHq%5$a5i>S$^pE?_qagCYIu_sgVY>!jHrQxUEA@OnRB_h92Us3+O;HQfx3oC zIpAYjgGZrS&Ni-DU}y<~-eQ!=2tHW&z_(39E2lIVqHD6UF$$x-hE^HFv>ZLr$xm9?ltD?sbbhwQcexhQ&34*ReO+B!ouv%(&QzUkr*-N=!JN z(Bl}D!YacnchjXjHe>x7MaHM4LR2 zkBI9qN3ey|jnHyP1w>k*2NT}peJPc{Nt>#|Ec&Tgl*aMpU5=N#?syCog#oh zbrKgXhncV6`evFv8gYrY(19;B?DQj@Wf?%}Yf!VcCQ)22`aYS4eqx?eMhO!s_>m|G zfmDrxSySl2dZs!HUQT`td%~Q>ZpadK5zN=dzZ()!C+I#1DMGT^>&3)NXG~Nxe%+=j zMv8JUXi)Chu=hqSaj>^Je;ymH4lm&F-YKdA#|bSy9kV>rL|ToNsq8==$RXa7;d~YI z6dOXUhJ4T_qntz8Zb4ilY~~zk4C|OhJ|=^+Q=p`2pij4rjj%N-4<3w`X|8LVgTIh) zm5ewJ$IhJVw55{xByMY_pkT!l@t{mif5HO?BTuEYGKBIp|6d84+SC(HpkC70M1^q{ zO=;KDoWEaD^tc+MTcS(}HQ0`&$u=kKppH(h{NDKG3|`#tX+x>%n!g*+NBG)uMkf16 z;X&15mkbH2$!3J8W}ifAb8=q^j>r)F;m2zI{;PSD?}Ho%Q?rIr1T)#hVO|q4o33QF zKGf}iW7aC?bAYY&TE8*O3o+>I)y znAZzuM;z}+0@Rfc2zKnQa}zW5HB-CMNpA?D%{l~LV-oKC+Jv&wNHvmbIr%oZzFlj` q0bysj?q, 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 1b67003eeeb7b35d94a692ce9698bebf833baa91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8506 zcmb7|du%0FeaFw1@Y+Brq&(6scMDPs)0X9rM6P35UtwJ z_nb5LUT2evj(qNS=DdHe@A(~n|1G!uf#JDHc_*cQl`*RL&TIJLv9CAgJ>Wf{1(!he z+Yb2K;OqGQ_|9U3V{C9&I-wEIIpvJ9({F%o>{T3*B8&LZBT@Y26 zXF<*TC!zhz;G6jVOYk1>d!Y38pP~H@I%~c6g6{$!2DP8ZLG7mirKeAT{F%@4qxGHx zZv(#!N*<%Kj6e+7|*o0ZOhK)V_ZQ)Ovpi zYJZ2|8u%?x^1Opi!dX!BKLKj}9*BtMw?I^Eeh<74{2ZutzXeLK{|rhWKLYtPuVs=c z@a^D9@Dlhm*bnvp2FjlIu&Gyr=RvJ=5tQCO1Zw@Kz}JGipw|5axDFnI9q_-v2f_Og zR&qt4_Vt_K8SrzU{P4S=^!uZLKMr^dqdb3%wZVI7|0atIUj*g%Z(|dRgR`LQa4q1I z0k=WP-3KMlGay?spAX;9gOcYvpzQOHp!EC`P;q=0gWeB50=^e~8k_{b0P<)4mLIME zFCZ#2Z)6g!cQ+`1ngta{m&11op5Xg8K=uDTXu+?9@9%-?{{v8ZIra`e-(8^Wcn;LM z7eUQ`4YXhivSsrbP8 zf)n5;LFwTT)OvpnYCk^!weEj|n(v(mA^FaLl4p@0&G!_jaeYvJ^=VM+Jp*EL^GBe@ z|0$^c-wySE2g*(_hWcYD`F_6N41NH-06q#n4f1Ec&5y>v0BV2#0iFimfD(4Wi=gcA ze89g4rO#ssD|z3_4@;Q`K+SU*d;okBl>dDels&!zfK%Wx>h(-hHYt*;eY7V%*C-!#Z+<`WrFn{UtmjD&PDgruALWA- z+4v!fd`0_2Ovh({lT$cLkq#x#FH`j3K4#0kjeaij+NJyoMK*vE-6KDdY}fs#`89Bb z5{2(4z@_jmkbU&Xk7Rr4?ZXs3zwW`swqAdgBD+3JS)jg-*BIPPY&to1O zSJ?2L1QcL4=ZAX#If`OKk9=jyy>S)=l$|excY*xmDT?g5L6LpuDDsPsP2^E*XRB{s5KX_CdE@|MOr+RT!+ z@wABmvcT5b;ip&63>w5rp5+snop zWf>i)p=!F_q^h=>%%=H`q#L%-HaGbzbf|5XL{)8zJPE3|X~h)XqAZ!k%#C;GMLD}F z$^*Z=dgeuK`(;ukIenYDkTSY9PHMjeGauy>wHGnLd|8~7X3RjSbH3>Hv!ura5fi6l z8eNF$$S(K#MOhp7-rY&MH~p*Db=LQvb-~CgDQg>*62xzwLFm_;$Sk1vtcb8CMzmF= zRn1~vr}cqt@|!u$W^rGO*)r-oOmn-ou+-MpJBiJTZ9eNHuQ0LgR=c)LKGvjV5}PG? zTLmzCoMdS)MN|GWL7g#H^Iv{HQr=!!w3S1n`98x>=6CYDX`PfZE}inU+A&KABt6In z&62!So9q>=Zyrq|lr7&-o%38@HBkkNbrZ9E^~(A4XW!R3ZM>fCR>c0}_DfohOKtjKZd z9c<R%HMi?V?Muj0|L(Dhc&OQMBzGK2)^cce(JUv)u;&&Fk!7 zG>4(FOt*JxDcf(-5{uE1`oI&RzIGi({mtd3x9L4XE>)Q;oAM>Q9J5vmS(fGsETGYC zWJ^QaMSrEHii2%ZIr==@qwo? zHo%0hz$vI%ez+!fO7I_i2S(4Mp4aBc&DRvLt8?=Fv)d^gIPL`pz{WWOH~?z@S(+E2RZsp}aegmKIE8?tm|Ho_VN zM3cpi9?^zps$m-w7dIze-+X8jfAG;V3Rvx6NX6>UcRy>k39mpqmA$mGwrr;-&!4q8 z*$y6p8C}P!PWnE0D|=8h5(O2F6YLT8R?M~vnzWA<&4f2(RNX`&@?csk=yc5EVXz(1 zT~p~u(r8CL>=Y)K>MEVG5S7i7dao#NqLn=NCxc|`7oI@O2JR)nos%#yMB%lKrOtVC zE!S~U_6W(?Tyy8*OHSl#I_~q);phqQ!%>-wbOYMiQ3tn9>#D^roRr2y0bOf&plIq- zQrQGYNwmqAWJw*1gy;}^Nb!?)jy}?E)r6P5D0ls1hSc``22Hv%NmMEg!FF{@>frJM zwCc=_F8rR=yNf6&4!0g^beJR9%>#^FyA(jJn@wGldxT+*u3a9$Q07!z*9WiEI$W^~ zv{UUkpLK-aatuT_CHC@a4<<5x+1sv1S&AxsWclghxYO%(4tNa6mwVNZ>SH3hEW|pU z<+yX5^MGS?*86bBEz&mrorO93=#|;k z<@+DMa(VIi3b{~cqa@%nB|5W~P{KP7ENk*&AFemu%Om7BS-LsdEqWJExiuM@Z#NKo zXCsMvvvvsv$Cpm-)OEj_otoO)+ncO4ak`c4YuuEd0*HFm)Xe$mGc!|L<~8 zN4hzU^z#M$m$Na#WY*Tnem&LCP}M`wYgATAePRC5x%I1y8>60DX)7r^iy`%xwdXg} zdbr71BIx*9)|64!St5O?W^Inb`K&I?JS5%odf{YlFWS@hK6G5U_k58lcx_a(m$*sB z>Z)O-%hKDPby+mKgTtde+sg5D9lPLSd}l|<88Ql~asoS&zYn{4Q`iFb-X;)Gkd2O2i1UYB`)_(0v;>tyP>w!X@gZc4_lasXAuY z&M?;phoz3;krjqb3%(C>IX9DT&C1wV*~p(Q?5UEDIq6eoHwpq$X}6GW4Q69-h`kkG zK38kEi|r(SxH=3DoeuLH!TsgI3)|ix5`TlZG&p4MC2hJzY7s~!X~=_DCWz*->x6Xd z&UVtpd4)qIJ-gck{m0ejA{)LLuUi@UdOi_3W1;y?*wkk$=sMgD*+eT*W!A%eC!QG5 z@0fv>Lik8|Zah}p@CPy%oRQ-4qPIyb*%-a0y{OqY3&RlPbQpZmX{}QazQmC+Hvbwv z!UeKRE5Z^42)=}w$BpI}_nmxZB9G zE_cz9Rc%wJqj4$Km#n%LbZqi)@_EM~434T&n2 zO+FqR8V@Urw5AqE<0=}7!AT~G4{vXTae+K!jQ`IRy`-+8yKy!j^2-|RhhMedj!yE* zMK%{PdB2+d?W(<2DIavcSa99aKS_opJDf=3-5RWR%3r(2Mg&^cbl!Mug)EbRVrBNB zix|pBFI>hlZf0c^Y=Z|o1#upWJkd~<9#N7%lgKg@zBdNXk#_$qhrnu5cA02`fuc98 z3Jdt9@QXI;=iJpSarZPrLki*`P3yrIr7?nDw>1Ts;@`Di=giS;Q9mgMU*LQkofoc& z$pgni@LDtI9zGYZj$2085X*Vc58i=6hR1!?7guei99$$ZtkJSrOOF14h8c!*>82Y$ zU^d*9&u17~N>{rhd*Wt?O+<`CA;wPAa02T9p2v6m^)7femsg)0U%cS%cs>{~q=Eqt z?R(~QHq-x6j{3bzB;sV3|1u4Igpf}anGq*enY2m zI^hn8pn-U`u4VN!kj=nZjT;E_} zvWJjA5efRpa8&V0*rx8LsK8IJT|2+f0#SE#0CXWV_b(KMSi6@oI`wRdv_}Vx?MUp> znn3=, 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 48e75b20cc6a33185ac91eca838ea036125c5d56..bcda58538da1ed92b7d4dbb986d54b172bd7e939 100644 GIT binary patch delta 2705 zcmYM!e@vBC9LMnkf{LU9B3Ma0W(ES6-vUxBRHG$qt;{AH!zj!?_ma> z#}vGTcjK>^ZcNm~&oL&A3z?XWd3X;tpo0PHDCTqiE-t{!)+wCJ`7OK?=O!D&&*X66 zk}1P^xEk-mCcFcCFrEI*pnYHz7jk3Fo}WT@ zM9r)VHSl3nhtHq}IEF2F1~sAC^U1#|c|5HS8c_q-g-p_fk?fig%){qU9iKs^_B&KY zzDIuMFAhaGi^fK<5_NtSwUobMBHlu^pQ!vRWoZmk9p~UIT!ree7F%%uJvfOKcmp+~ zT&Al5)nPeyqBh~nsLYpZ=Q1^RL85u#P{#jH8j@$cZk*3VosJH5>z5fSlk7yKHx)jXO`(H>!sc1)a_ylS| zF;vGVPz`>Gn&Ho=8U2ZBa4skMUlwX}m7xZ-5?N-m5%vGwsON|5^`|kN{>_-ZaT4=6 zKaXqiI&MG@`BKV;IH-XaPy-yt68s2rO`_Sg>%^8ueAL!=Vx6rEEscuacdfTFw~bKQF^&6btGb!cl0HbRBecJ| ziD-a>cB{U6wZs-e<>6`EkA-9FT~@&gxtmb+ctUT6iuOs7TQg?6bsw&>b&*KyAz0F= zX``Yw_7d70j}Uu_Dx!x_Ng$GmjYKn{Z?{SXk?Yp@^kN=SPCP`gN6idEMVs_?*+iw@ zp5$m6d>7o!rtiB-E1^%NUcIK6C#hlLMAE-;6K^F?CB#mroQ>^I9iNz&wmEKoi??Q@ zcYUqXUfa5*zIjt@WI2?<`+}uv^0BK{X>CpAlUC&=ZpBOo$a;W zR!>v2XPwvC&|KYApTDDdQ|+8aUpV4v3;FuPy}n2=RPEGEzS9*7bUNPtet&^eT3k}a zGyQu9eS7_$Hovd0+Nlfq`#XD_+&cc%>0j>TmiI&=1L5kTqT%7;!id@mbo&n!b_V;3 zBL2?aKnM8x!bPQ3#pR_%-Jv~otwqaYYtvWEs@dRe-BQ~Ydpvz->_+<5iLr$T;?w#D zf}w~%8z*f;mQpXlC;J(>Ob;sR$VI2d*&PelA-Cp;K(di~Bo rFu-5Ba$?2KlBJWQ-0`>%g(p7_IbDAJqc<3EAMN%9LjH+}vnuXC1P?K+ delta 2939 zcmY+^TWl0n9LMof%S9*xEky)DPQ?OJciEPfOMybUl}ihy(t_M%yB+J4?JmshwnD%) z#vtkoWFzqsNKr!q2_~jKpjIAe)ObmZ(I62e5-}1LAH48lqJDq7gVD+U=X1{NnK|eD z&zX6z{*C3CD-8osgLn@fM~ef2-(Usxzi=GRD#}}jcTjJ^ ziMR{-nf;t-Y7XIOJc@K|`fwEen*j$C|ji6pQDnIfPR8sCoJt%_ea0%-E zrr>%z>i)e!{b|&F$B>^n9$Y_zCG>CJqM#Igf@H~DK|T1o8sJSFgCn?Dh7(aUScv+6 zGpfTboPtlF26O^7(0){=E+9X1k(2tnhM6H0Zcpi=h?Y5*s2 zIKGMMcmN;7A25UqndV${Q8Vj94eUHt<7L!l983O{;aPz-flD(KP8Bd>yq^ZY(z~2Y z?=83r^%lH{dMnPMmgG|4)xaN78TbwLnvLPa7|nE4eLg2mYy)cM9jMG?4p7kheFB%@ zAWp|ZT7_{Ia>+b|8o(YTi{=Qb!;{F^&AT`WKMU$V;|%KNu6+BMXsIp;>RXZa8MB*$ zQgjIQz&_NP4xl<7M0M~LTKol>q#46a%1k-x{}rgrY(XtS6qSL;ga3~pV=}Ly-m-z* z|E&M}6trnBq1Ny^YUINho-z?eb=Zm;&~8-6Pof@p5|xp+ke~U8lb-iI>b^fvd#s4r zX+XuuwlLFh0{xr06m-M-;E$cCwb~n8KZF(3kKr=BfU9vR)1+wDqweoQ4RAkJ;!*6u zK`h5wW+!){GIj_vn(<4VH1cz(2Yrrn@H^CIoWOLoB=x9vt5FY#VGZ`8Hq%+$jh~_h zypRn;-=-6lfu~U4jb~BqUzp1JtHIk`(3*US^YAL}z=<~hpkAz^{wh9z7f~}T&Dxmy0z z1nogx8B;cH9oj?N32j1cWPPx<5dS?gvxAyGHrh;!iIv21;!#5DsnqJ#T19LkbZpII zmLl2B9ghSGOX%&;aT`&bE9JkIk)XWoR{rB$s0%JGL~XVxp-t9GXtysT<`X*!msmh_ z5e}ivrO$UGv4qej)1kej4XmS?(5BRettZ%{rZCr<0vr9`V*{nNL2V}TImm53eGPRy zNR$(6i1pb!My#zW_icCDPg&6J_(N9Ar?}?{7-Gud=y=m8TeB032yvEiowvq7s>g?RH=L`Jo?_*z~^|9iO z1!cK^Lv}?p6?GF`PAugn6E=86Rd`M~lD%0H&ddo#=7lQf*~+=Km63`_RU|U9c|)kh z>2ZD9hq&9RwN;VInoy)FR8?&w3u>$9R75Ii*BJFvp-o;i;m4z?q*rU#4xaV~Pj~OL zO&eNP*0O)=jHI^Rwehw@us2$a$TN$niS7*CR+geC!N0KYK zq>?r#We3lsJjX_3F~|2^W!6d9!P7DFoaXwTWZJXw8R?W8cYWqZts|XJI>pUSd;f*f zeYce+e5S+m{A40!V@b~=h5bzv4i76^&NK2$k>IK7Bjx;mF}|4c`q13{*{AP0Iog)l wwq%<1j>nz-HoIbK*|e1@#}D=BqCfZ!{X3RQJn4G$lt{UWG)sSY>f(Zb0P%NydjJ3c 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 32651d59f606db502a608937595b8856f4be05eb..2e27ffc892a76441efa78159f97759bf89e3efb9 100644 GIT binary patch delta 2035 zcmXxke`u9e9LMqR-4E}b=6+r0rgQVjm7BZH-TiP|(ah_-nRBUV&ipaA+?HOEAx_gE zxMqZ~6ef>C3Mov`hK8^a_D7RM1Op+cWJ;ofQNkkZ2c&=5`*U}?Jm-0xbDr~@AK!DH zdu-Xn(&YX8jFZN17ikV@cezL~;}Uv8G!OPGfqHlW&Vbne3t<>SuN&U2VY{Uw}< zS1}iFV=?}UGt82fHq|Vjib9-=l~{_c=wZS+fDy_UF^uER37k&(InKiA)6BT6oEueE zhuOFUXX9J=0`9~ajBop0g8?ky!6{e1jH#KUf^pl`-$M;Jfvmuux%zB+)%zu=0qaoj zEkiC_>FV223+}}{#S+LA%cz#&X3L>I{Dg%MPT*HC*pj)nLTwRcaE%d%*!Gf;?nUhix}t*i$% z@dKyz z>#-Yk2tPwbcEma6yoqN6Wr{$YeE{IGHubWhdQ(OUNYc7HUNgkZrSPs8EO4c(PW6 z%at0lz>+Tu0M^*0yQz6NPx%TZ@y8>-&~7BRkkLPi~(L4|GvD{veapjzv& zRiZk46E%S?sL1qV2M(h4`VZ9Moy|iaaXP zMI_AVQCxuMaWmFqfD@~B4XBlGLJio7TJifxv~AEmAI3V$m$3^Um0Ejh#mkxA>r^E0 zWgNyb{2p~U|3*Gpd&Qd!VXJe4vkL<@`O`$-_3ut8F4^X4v{rpXEhIvd`gQnu!Sw~b zuJk`k$ZYpN2$pI8tc}#A48JY@m%&J2vwt^OmiZp#gdYeM7QB;sHaU0C<$L_9P<3pR zEA7H&mlq0CCrSJGHfaSZMrtH&CG8+Jk#_o@ha!RQ(eFYZ2S@kkUQEkb8*5n=TM_r# z+9=X=+#DRnnwQ# M-_IINE1j19AG|Na!2kdN delta 2186 zcmYk+e@vBC9LMo3e4c4I6`-7(~_MH1V&w0*s&i8!J zd6?fh_Hg2Q_Uf~SzX8hKl=v!R)NnbKAO4(lV>V$aI`{~xU!V0wOyhpi`o47;w8 zKRhx`cqi_~4cLY2@oCIuelu!2jAI@TrtJNfxDq)k8FRM%CThYZWCbRj(KJB`>itT4 z--LRv4Y^FaZSO@bcm%VU-@HtPY?yJ>!0*@&7chhSZ?P1ALZxoeKF^`ECftn0SdR** z0~OFPDpMzr%bejyTk8<>y3qxLS1PE<`H>I{^lo;O=N zQ7en10)GiL;W<=*Q@9T=p%zq-LH<>#qqipLL>X4LkSYJX+W)LKeByh z0G0A*QTD~g(=)in_$KNzyNvJRGV0Wy=j5vYHB<(cP!oHYRVyz*Ei{07-n!BB zni?wmY3RmL)XIOwhj5)^%)Qu(Wq1sC;aTKUHnX@EZ(0|vDeRMncKs>fp5#nwQSnnN z_qR`jzNsb(DO>qFnDlrLgLkZbOoyoVn6`m)PGv2Z_eY71; z-ty+>wcDqP-LZ8yS)5kY*kSJm@IhM_N<%kA`}r89h0;g~Qo1Pplv+w8IhI!8IW+xo z+9_|@(IX>$ks&AQ9vg{7-I&v|XWwqe@2lPJ3`d>*NMFAjo!*i8VM^)BgG#446c0s) z4!hxaWO&H2ZwGueK7Vo{+m{)v^jB8~0!|=Mw>?sKI1pL*(=@)XYr*F9(;gB14W3fm)^#2e? T9Nvf#eb^m}yVLE(*{l8q$}sxW 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 806fe183ee5ed1768ae1d994592ab18c5ace3298..5b7d6c7392cca1755f983a86d591a047fe40bc20 100644 GIT binary patch delta 989 zcmXxjPe{{Y9LMoz{?`83+Wb?wS+Zr?)U~xqwkVUvToFn}ft|F2g$c1hDgvP$I#m$C zuOOm=E=h+7n->qAB*Igt7(s*`iY|pgK@makPkVaU?|D7X^Lze%pXaw)VliHM-{QSv zNLik(Joi1u6jgS}NIl+qd$08n256tMp0i%WX4=kO>x2OOrCCL7bf@W<+7u<8-)!YJnO02c5(W^e%&*eWLQCss5d zMmTyggqmm^70D^=z)Prpw{3k1bpYY}F4T#QVlS34hIdi@pJNo?ggAc< z{7OSNhPm(_+>NSFU<$9|L41aqXbrXDMlMu$+DX=qIn=mO)D_I4Hhvk0@B!+I-{A!Q z3hy^&JB5>cLHfAntT(NX&_la6rAT)0sGk-~x+Nz+&__uj{7+h5|0N|YmHAhyf67`( zX{Wp3w0hF+ODCygG~BV-<^FJzo>aBN`=Y^h{40@Th2luza49ifI)38F*irY3Khv}~ so!yh}&n0sG`v&rBI1$hayB|xz*fsYS}*)_U9$& zWmH5#COrj8wXA_miC%(U?&!gKiC!dn>Zu5y`u^ON4!iere!p|>J^$|B)URsEZ+l^`;b$ztA6SaNv0AC5 zvTn&IY*;{p!-(5Z9_TXSeyk)ugT)v#;%O`+zH7vfkr%54lz~5>Ol%cp;GZZ9_=~lS zuS|?uPQr$=1I<{Ay@rF>Kzs?M-y__HFOZ*l%S~3AMF)OG*#UE*QjDQ&C=;s38a#~r z)Jbm5jIRc$*zh`T#fOG-hVvLSE0sYz?ZtF*q6cLqgN9+laokV-3d*rQ#bcO57gjNQ zS>SO@YE({Bkq53C4YMdO&Y-O1J?_CTDEK41!vI!rkn*Adl$Au0pSs0u7p5?P3n=gV zg>n=%d?>PjI_$zgSzrFllO)cPc!G_%j`FeX<-kRcVGr^L*;q|89^jI88Pt*TS^Pek zrYvQ%$nbIqQsnDu+ovRCWj)i^P%C%NIbUr zu-A3Sd|$)=50=_V@xL zqeGFXYdAjIm39<06&#(<&FIUy8BJf&m-LrZNEjN?9p)cyMayRuw+Wyav)+Ifo R=~;bQe@&0YbYE%2^bhVYqp<)0 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 ae36ee7c31f1700237986f4de23c29d4a47bdd46..e697262fd05cca4237741d8b69111a21f498ca1a 100644 GIT binary patch delta 2035 zcmYk+TWnNC9LMqhmbSYUOS{_}QdW*sEVfUUo#JE&YaK8oH=v( z&z$|Gd7>$OGm`nK@f#q`CvBf)riyQ}x$(=-F?$lj=wUso-HXoGF+_Qv^MLahhN(Y= z#drbp@d}pW?^tM-wv0#2B2<*%0<6HtaV2_~at>o9<&#)|*PM4Tm+}LA40C6jaalPx zs;n00U^C9c)%YlG!$QWl-LAnf7V%)jmCxeL%u&I(;_9bS1KveeVE?-MIrOUcqo@IE zQSU87E?eR1yHE@6$1vmDn`DTF4Wl~##5FjId6d7zC-4#~bbq+#vuLaVi!q8-s0pn^ zO<*%BQiI54?{U+Xe2kfR6w?aPaWZ;g4AtR9)Sh0$68sglclVLYa%ikGP=b11=WIu< ztPeHuH&6q9h??LCcHjhRL7_b2uS^B4H9$LR0^P_WZ5I+<8^Q|QiyC+W722Os5xId} z_7Aru7^JfyOrXkNp|7PDMU zXgStlFX|9}hKlT%^StwWJQy&W!l!w@BhBb#WDcM@yns6W)2J=@&zZ^WRL(_Bw3wSB zQ-$vvI*Pe+BkEADMZLcPHK762MBhb4;3L#$d01tA|6{JfcesG^6zavlkjt|9 z+tPp@Dl!RFN2^hL-i`hE4wmC>)S=Ab)6l?AAyt+@zC7zhO|S>kRb+ON(ZFAzLiw$0 za2d728>lmK2e;sCdT+$-s0kfMZOM7m0F$Tze?s+p4;7hQW~;BL5C?Es)VgdjnbTA} zi&xRZ2pdJ#YOxO2qE`F?>a*JKJmNfsd{r~QIQJg^dUk1aldI7w(6U-ctYGHX?T3Tw ziWIenf6WwL_1_AXDLmFr+M*1KIn<}| zX8aVh@e;1Z1zcrJ!sM>iG&= zZbCiRhFoTkt?xl?IF32YZ=NATG|VJw;5TiDQro48 zM=fX=6{&;BWnSc_BY7Q{;welhL^EXcz!}tl7g1+=84K_#>g+spB5Mj!??5T4z1iA< z+SwRt;ZLI`Jc?T2G2DgcQ5#yFMf{birMD*NKrLVp*`zsyMA^K6WjKYJ_&h4KKcFIV z1-XoyL8`C-H(?7tfg`s58tO=kS=BPEQT#PgkP3xv2WkPG=*Io1i4S5M9>WU!6SrX* z+ttoOsD&kP3r?Y4#*3&3U$HJ&U7X7q7jq}b+(w7bn7sslM-Av@75WP5P)E^j?XnIa zmx*&zgq}slHb+shKCCCmgFh59YjgC|h~rcncaf<)WQ zBbWJwn--GEs&$4NQ2onLk*Y&Y*o<7}er{Uu2XEoct4&~H%@_zCm${r_bva`<~vhhi*3 zKkC6Yq>Blo7LY(i<_Kz_6R0y!V;H}|Qrym`p_j53HSS@g$s9qxKr@XAt?)FN&Gh`%n{gqb43jjsH9GKL$@3h{FF6#C3kseOYEnn+>XtDh7 z+o0_=k=W_tZ(q{o-kslLOaBoh)0K?6OL86{*GdZ6rjF#R?sC_I$vJn)vIup3$!qR{ z{5`hy4s>ijob-CC8ryBD9~*35C`_Fso%4O97E&WAK-x>{CDo9k$>%)fuI|(aow8IC!<(MWGNmfDs*y`*@tp~7hnjfJ8^ec`UL z=K;$^6EG42#trF_HZmb, 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" From 0e09e28d6a7625930c76249271065d3764c0a272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 21 Jun 2018 15:26:31 +0200 Subject: [PATCH 7/7] Add 2.6.0 version definition --- datainjection.xml | 4 ++++ setup.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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/setup.php b/setup.php index fc2c68a6..804cb08b 100644 --- a/setup.php +++ b/setup.php @@ -28,7 +28,7 @@ @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");