From e07cff2427b595e9d2a6c8850e3df485447adfcf Mon Sep 17 00:00:00 2001 From: Amandine Manceau Date: Thu, 24 Aug 2017 10:05:22 +0200 Subject: [PATCH 1/7] fix #11 (#12) --- inc/export.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/export.class.php b/inc/export.class.php index 6916c29..4c25ed5 100644 --- a/inc/export.class.php +++ b/inc/export.class.php @@ -321,7 +321,10 @@ static function generatePDF($users_id) { ?> - + From 60ece9f0f35a22f6a24bc98c8d8fb7676afd0335 Mon Sep 17 00:00:00 2001 From: amma35 Date: Wed, 23 Aug 2017 17:30:49 +0200 Subject: [PATCH 2/7] fix #13 --- inc/export.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/export.class.php b/inc/export.class.php index 4c25ed5..3bad459 100644 --- a/inc/export.class.php +++ b/inc/export.class.php @@ -139,7 +139,7 @@ function showForUser($item, $options = array()) { echo ""; echo ""; echo "
".__('Generate new export', 'useditemsexport'); - echo "  "; + echo "  "; echo ""; echo "
"; @@ -215,7 +215,7 @@ function showForUser($item, $options = array()) { echo ""; Html::openArrowMassives("useditemsexport_form$rand", true); - Html::closeArrowMassives(array('purgeitem' => __('Purge'))); + Html::closeArrowMassives(array('purgeitem' => __('Delete permanently'))); Html::closeForm(); echo ""; From da772ce0b492e10594345dba6358ab5f84d555ca Mon Sep 17 00:00:00 2001 From: guilhermestella Date: Wed, 28 Dec 2016 18:17:48 -0200 Subject: [PATCH 3/7] Update export.class.php I added a Otherserial in the exported pdf file and adjusted the width. --- inc/export.class.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/inc/export.class.php b/inc/export.class.php index 3bad459..d1e7b05 100644 --- a/inc/export.class.php +++ b/inc/export.class.php @@ -298,13 +298,16 @@ static function generatePDF($users_id) {




- - + - @@ -320,16 +323,22 @@ static function generatePDF($users_id) { ?> - - + - @@ -563,4 +572,4 @@ static function uninstall() { $DB->query($query) or die ($DB->error()); } -} \ No newline at end of file +} From 0dac541199eefad43d8956fbfc5976b13cf84d08 Mon Sep 17 00:00:00 2001 From: amma35 Date: Thu, 15 Feb 2018 16:43:13 +0100 Subject: [PATCH 4/7] update 9.2 --- inc/config.class.php | 2 +- inc/export.class.php | 35 ++++++++++++++++------------------- setup.php | 10 +++++----- 3 files changed, 22 insertions(+), 25 deletions(-) diff --git a/inc/config.class.php b/inc/config.class.php index 1b3b7c6..c843b0b 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -167,7 +167,7 @@ static function install(Migration $migration) { $table = getTableForItemType(__CLASS__); - if (!TableExists($table)) { + if (!$DB->tableExists($table)) { $migration->displayMessage("Installing $table"); $query = "CREATE TABLE IF NOT EXISTS `$table` ( diff --git a/inc/export.class.php b/inc/export.class.php index d1e7b05..4a88286 100644 --- a/inc/export.class.php +++ b/inc/export.class.php @@ -39,7 +39,7 @@ if (file_exists($autoload)) { require_once $autoload; } else { - _e('Run "composer install --no-dev" in the plugin tree', 'useditemsexport'); + echo __('Run "composer install --no-dev" in the plugin tree', 'useditemsexport'); die(); } @@ -150,11 +150,11 @@ function showForUser($item, $options = array()) { echo "
"; - if ($canpurge) { + if ($canpurge && count($exports) > 0) { $rand = mt_rand(); - - echo "
"; + Html::openMassiveActionsForm('mass' . __CLASS__ . $rand); + $massiveactionparams = ['item' => $item, 'container' => 'mass'.__CLASS__.$rand]; + Html::showMassiveActions($massiveactionparams); } echo "
+ + + + +
+ + + + + getTypeName(1); ?>
"; @@ -169,8 +169,9 @@ function showForUser($item, $options = array()) { echo ""; } else { - if ($canpurge) { - echo ""; + + if ($canpurge) { + echo ""; } echo ""; echo ""; @@ -183,7 +184,7 @@ function showForUser($item, $options = array()) { if ($canpurge) { echo ""; } @@ -211,18 +212,14 @@ function showForUser($item, $options = array()) { } + echo "
 " . Html::getCheckAllAsCheckbox('mass' . __CLASS__ . $rand) . "" . __('Reference number of export', 'useditemsexport') . "" . __('Date of export', 'useditemsexport') . ""; - echo ""; + Html::showMassiveActionCheckBox(__CLASS__, $data["id"]); echo "
"; if ($canpurge && count($exports) > 0) { + $massiveactionparams['ontop'] = false; + Html::showMassiveActions($massiveactionparams); + Html::closeForm(); - echo ""; - Html::openArrowMassives("useditemsexport_form$rand", true); - Html::closeArrowMassives(array('purgeitem' => __('Delete permanently'))); - Html::closeForm(); - echo ""; - - } else { - - echo ""; } + echo ""; } @@ -392,7 +389,7 @@ static function generatePDF($users_id) { $contentPDF = $pdf->Output('', 'S'); // Store PDF in GLPi upload dir and create document - file_put_contents(GLPI_UPLOAD_DIR . '/' . $refnumber.'.pdf', $contentPDF); + file_put_contents(GLPI_TMP_DIR . '/' . $refnumber.'.pdf', $contentPDF); $documents_id = self::createDocument($refnumber); // Add log for last generated PDF @@ -541,7 +538,7 @@ static function install(Migration $migration) { $table = getTableForItemType(__CLASS__); - if (!TableExists($table)) { + if (!$DB->tableExists($table)) { $migration->displayMessage("Installing $table"); $query = "CREATE TABLE IF NOT EXISTS `$table` ( diff --git a/setup.php b/setup.php index f56e643..9195c26 100644 --- a/setup.php +++ b/setup.php @@ -32,11 +32,11 @@ */ // Plugin version -define("PLUGIN_USEDITEMEXPORT_VERSION", "1.0.0"); +define("PLUGIN_USEDITEMEXPORT_VERSION", "1.1.0"); // Minimal GLPI version, inclusive -define("PLUGIN_USEDITEMEXPORT_MIN_GLPI", "0.90"); +define("PLUGIN_USEDITEMEXPORT_MIN_GLPI", "9.2"); // Maximum GLPI version, exclusive -define("PLUGIN_USEDITEMEXPORT_MAX_GLPI", "9.2"); +define("PLUGIN_USEDITEMEXPORT_MAX_GLPI", "9.3"); /** * Init hooks of the plugin. @@ -118,7 +118,7 @@ function plugin_useditemsexport_check_prerequisites() { $autoload = dirname(__DIR__) . '/useditemsexport/vendor/autoload.php'; if (!file_exists($autoload)) { - _e('Run "composer install --no-dev" in the plugin tree', 'useditemsexport'); + echo __('Run "composer install --no-dev" in the plugin tree', 'useditemsexport'); return false; } return true; @@ -138,7 +138,7 @@ function plugin_useditemsexport_check_config($verbose=false) { } if ($verbose) { - _e('Installed / not configured', 'useditemsexport'); + echo __('Installed / not configured', 'useditemsexport'); } return false; } From d1d8fc8576bc0c7847a04bfd131eb9775a6813e8 Mon Sep 17 00:00:00 2001 From: amma35 Date: Thu, 15 Feb 2018 16:45:35 +0100 Subject: [PATCH 5/7] Coding standard with phpcbf --- front/config.form.php | 4 ++-- front/export.form.php | 6 ++--- inc/config.class.php | 32 ++++++++++++------------- inc/export.class.php | 56 +++++++++++++++++++++---------------------- inc/profile.class.php | 40 +++++++++++++++---------------- setup.php | 28 +++++++++++----------- 6 files changed, 83 insertions(+), 83 deletions(-) diff --git a/front/config.form.php b/front/config.form.php index 5dca19e..5b9ee43 100644 --- a/front/config.form.php +++ b/front/config.form.php @@ -35,7 +35,7 @@ Session::haveRight("config", UPDATE); -Html::header(PluginUseditemsexportConfig::getTypeName(1), +Html::header(PluginUseditemsexportConfig::getTypeName(1), $_SERVER['PHP_SELF'], "plugins", "useditemsexport", "config"); if (!isset($_GET["id"])) { @@ -52,4 +52,4 @@ $PluginUseditemsexportConfig->showForm($_GET["id"]); -Html::footer(); \ No newline at end of file +Html::footer(); diff --git a/front/export.form.php b/front/export.form.php index 7d2f43f..c0d6698 100644 --- a/front/export.form.php +++ b/front/export.form.php @@ -37,7 +37,7 @@ if (isset($_REQUEST['generate'])) { - if($PluginUseditemsexportExport::generatePDF($_POST['users_id'])) { + if ($PluginUseditemsexportExport::generatePDF($_POST['users_id'])) { Session::addMessageAfterRedirect(__('PDF successfully generated.', 'useditemsexport'), true); Html::back(); } @@ -46,10 +46,10 @@ if (isset($_REQUEST["purgeitem"])) { foreach ($_POST["useditemsexport"] as $key => $val) { - $input = array('id' => $key); + $input = ['id' => $key]; if ($val == 1) { $PluginUseditemsexportExport->delete($input, true); } } Html::back(); -} \ No newline at end of file +} diff --git a/inc/config.class.php b/inc/config.class.php index c843b0b..546e4c9 100644 --- a/inc/config.class.php +++ b/inc/config.class.php @@ -44,7 +44,7 @@ class PluginUseditemsexportConfig extends CommonDBTM { * * @return value name of this itemtype **/ - static function getTypeName($nb=0) { + static function getTypeName($nb = 0) { return __('General setup of useditemsexport', 'useditemsexport'); } @@ -57,7 +57,7 @@ static function getTypeName($nb=0) { * * @return Nothing (display) **/ - function showForm($ID, $options=array()) { + function showForm($ID, $options = []) { $this->initForm($ID, $options); $this->showFormHeader($options); @@ -65,12 +65,12 @@ function showForm($ID, $options=array()) { echo ""; echo "".__('Active').""; echo ""; - Dropdown::showYesNo("is_active",$this->fields["is_active"]); + Dropdown::showYesNo("is_active", $this->fields["is_active"]); echo ""; echo ""; echo "" . __('Footer text', 'useditemsexport') . ""; - echo ""; echo ""; @@ -105,9 +105,9 @@ function showForm($ID, $options=array()) { */ function dropdownOrientation($value) { Dropdown::showFromArray("orientation", - array('L' => __('Landscape', 'useditemsexport'), - 'P' => __('Portrait', 'useditemsexport')), - array('value' => $value)); + ['L' => __('Landscape', 'useditemsexport'), + 'P' => __('Portrait', 'useditemsexport')], + ['value' => $value]); } /** @@ -117,10 +117,10 @@ function dropdownOrientation($value) { */ function dropdownFormat($value) { Dropdown::showFromArray("format", - array('A3' => __('A3'), + ['A3' => __('A3'), 'A4' => __('A4'), - 'A5' => __('A5')), - array('value' => $value)); + 'A5' => __('A5')], + ['value' => $value]); } /** @@ -131,18 +131,18 @@ function dropdownFormat($value) { function dropdownLanguage($value) { global $CFG_GLPI; - $supported_languages = array('ca','cs','da','de','en','es','fr','it','nl','pt','tr'); + $supported_languages = ['ca','cs','da','de','en','es','fr','it','nl','pt','tr']; - $languages = array(); + $languages = []; foreach ($CFG_GLPI['languages'] as $lang => $datas) { - $short_code = substr($lang,0,2); + $short_code = substr($lang, 0, 2); if (in_array($short_code, $supported_languages)) { $languages[$short_code] = $datas[0]; } } Dropdown::showFromArray("language", $languages, - array('value' => $value)); + ['value' => $value]); } /** @@ -192,7 +192,7 @@ static function install(Migration $migration) { $migration->displayMessage("Copy default logo from GLPi core"); if (!file_exists(GLPI_PLUGIN_DOC_DIR.'/useditemsexport/logo.png')) { - copy(GLPI_ROOT.'/pics/logos/logo-GLPI-250-black.png', + copy(GLPI_ROOT.'/pics/logos/logo-GLPI-250-black.png', GLPI_PLUGIN_DOC_DIR.'/useditemsexport/logo.png'); } } @@ -215,4 +215,4 @@ static function uninstall() { } } -} \ No newline at end of file +} diff --git a/inc/export.class.php b/inc/export.class.php index 4a88286..94791ff 100644 --- a/inc/export.class.php +++ b/inc/export.class.php @@ -55,7 +55,7 @@ static function getTypeName($nb = 0) { /** * @see CommonGLPI::getTabNameForItem() **/ - function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { + function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if ($item->getType()=='User') { if ($_SESSION['glpishow_count_on_tabs']) { @@ -69,12 +69,12 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { /** * @see CommonGLPI::displayTabContentForItem() **/ - static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { + static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { global $CFG_GLPI; if ($item->getType()=='User') { - if (Session::haveRightsOr('plugin_useditemsexport_export', array(READ, CREATE, PURGE))) { - + if (Session::haveRightsOr('plugin_useditemsexport_export', [READ, CREATE, PURGE])) { + $PluginUseditemsexportExport = new self(); $PluginUseditemsexportExport->showForUser($item); @@ -91,7 +91,7 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtempl * @param $item CommonDBTM object **/ public static function countForItem(CommonDBTM $item) { - return countElementsInTable(getTableForItemType(__CLASS__), + return countElementsInTable(getTableForItemType(__CLASS__), "`users_id` = '".$item->getID()."'"); } @@ -105,7 +105,7 @@ public static function countForItem(CommonDBTM $item) { static function getAllForUser($users_id) { global $DB; - $exports = array(); + $exports = []; // Get default one foreach ($DB->request(getTableForItemType(__CLASS__), "`users_id` = '$users_id'") as $data) { @@ -120,7 +120,7 @@ static function getAllForUser($users_id) { * @param array $options * @return nothing */ - function showForUser($item, $options = array()) { + function showForUser($item, $options = []) { global $DB, $CFG_GLPI; $users_id = $item->getField('id'); @@ -158,7 +158,7 @@ function showForUser($item, $options = array()) { } echo ""; - echo ""; if (count($exports) == 0) { @@ -170,7 +170,7 @@ function showForUser($item, $options = array()) { } else { - if ($canpurge) { + if ($canpurge) { echo ""; } echo ""; @@ -182,11 +182,11 @@ function showForUser($item, $options = array()) { foreach ($exports as $data) { echo ""; - if ($canpurge) { - echo ""; - } + if ($canpurge) { + echo ""; + } echo "
" + echo "
" . __('Used items export generated', 'useditemsexport') . "
" . Html::getCheckAllAsCheckbox('mass' . __CLASS__ . $rand) . "" . __('Reference number of export', 'useditemsexport') . "
"; - Html::showMassiveActionCheckBox(__CLASS__, $data["id"]); - echo ""; + Html::showMassiveActionCheckBox(__CLASS__, $data["id"]); + echo ""; echo $data["refnumber"]; @@ -213,7 +213,7 @@ function showForUser($item, $options = array()) { } echo "
"; - if ($canpurge && count($exports) > 0) { + if ($canpurge && count($exports) > 0) { $massiveactionparams['ontop'] = false; Html::showMassiveActions($massiveactionparams); Html::closeForm(); @@ -317,7 +317,7 @@ static function generatePDF($users_id) { $item = getItemForItemtype($itemtype); foreach ($used_items as $item_datas) { - + ?> @@ -371,15 +371,15 @@ static function generatePDF($users_id) { - add($input)) { + if ($export->add($input)) { return true; } @@ -419,7 +419,7 @@ static function createDocument($refnumber) { $doc = new Document(); - $input = array(); + $input = []; $input["entities_id"] = $_SESSION['glpiactive_entity']; $input["name"] = __('Used-Items-Export', 'useditemsexport').'-'.$refnumber; $input["upload_file"] = $refnumber.'.pdf'; @@ -465,7 +465,7 @@ static function getNextNum() { static function getNextRefnumber() { global $DB; - if($nextNum = self::getNextNum()) { + if ($nextNum = self::getNextNum()) { $nextRefnumber = str_pad($nextNum, 4, "0", STR_PAD_LEFT); $date = new DateTime(); return $nextRefnumber . '-' . $date->format('Y'); @@ -482,7 +482,7 @@ static function getNextRefnumber() { static function getAllUsedItemsForUser($ID) { global $DB, $CFG_GLPI; - $items = array(); + $items = []; foreach ($CFG_GLPI['linkuser_types'] as $itemtype) { if (!($item = getItemForItemtype($itemtype))) { @@ -525,7 +525,7 @@ function cleanDBonPurge() { // Clean Document GLPi $doc = new Document(); $doc->getFromDB($this->fields['documents_id']); - $doc->delete(array('id' => $this->fields['documents_id']), true); + $doc->delete(['id' => $this->fields['documents_id']], true); } /** diff --git a/inc/profile.class.php b/inc/profile.class.php index 6139147..7c2f328 100644 --- a/inc/profile.class.php +++ b/inc/profile.class.php @@ -43,7 +43,7 @@ class PluginUseditemsexportProfile extends CommonDBTM { /** * @see CommonGLPI::getTabNameForItem() **/ - function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { + function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) { if ($item->getType()=='Profile' && $item->getField('interface')!='helpdesk') { return PluginUseditemsexportExport::getTypeName(); @@ -54,7 +54,7 @@ function getTabNameForItem(CommonGLPI $item, $withtemplate=0) { /** * @see CommonGLPI::displayTabContentForItem() **/ - static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) { + static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0) { global $CFG_GLPI; if ($item->getType()=='Profile') { @@ -62,7 +62,7 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtempl $prof = new self(); //In case there's no right for this profile, create it foreach (self::getAllRights() as $right) { - self::addDefaultProfileInfos($ID, array($right['field'] => 0)); + self::addDefaultProfileInfos($ID, [$right['field'] => 0]); } $prof->showForm($ID); } @@ -75,15 +75,15 @@ static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtempl **/ static function getAllRights() { - $rights = array( - array('itemtype' => 'PluginUseditemsexportExport', + $rights = [ + ['itemtype' => 'PluginUseditemsexportExport', 'label' => PluginUseditemsexportExport::getTypeName(), 'field' => 'plugin_useditemsexport_export', - 'rights' => array(CREATE => __('Create'), + 'rights' => [CREATE => __('Create'), READ => __('Read'), - PURGE => array('short' => __('Purge'), - 'long' => _x('button', 'Delete permanently'))), - 'default' => 21)); + PURGE => ['short' => __('Purge'), + 'long' => _x('button', 'Delete permanently')]], + 'default' => 21]]; return $rights; } @@ -116,10 +116,10 @@ static function addDefaultProfileInfos($profiles_id, $rights) { * * @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(); echo ""; @@ -129,16 +129,16 @@ function showForm($profiles_id=0, $openform=TRUE, $closeform=TRUE) { $profile->getFromDB($profiles_id); if ($profile->getField('interface') == 'central') { $rights = $this->getAllRights(); - $profile->displayRightsChoiceMatrix($rights, array('canedit' => $canedit, + $profile->displayRightsChoiceMatrix($rights, ['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(); } @@ -151,10 +151,10 @@ function showForm($profiles_id=0, $openform=TRUE, $closeform=TRUE) { * @return boolean True if success */ static function install(Migration $migration) { - + foreach (self::getAllRights() as $right) { - self::addDefaultProfileInfos($_SESSION['glpiactiveprofile']['id'], - array($right['field'] => $right['default'])); + self::addDefaultProfileInfos($_SESSION['glpiactiveprofile']['id'], + [$right['field'] => $right['default']]); } } @@ -177,4 +177,4 @@ static function uninstall() { } } -} \ No newline at end of file +} diff --git a/setup.php b/setup.php index 9195c26..f2b8350 100644 --- a/setup.php +++ b/setup.php @@ -60,19 +60,19 @@ function plugin_init_useditemsexport() { } if (Session::haveRight('profile', UPDATE)) { - Plugin::registerClass('PluginUseditemsexportProfile', - array('addtabon' => 'Profile')); + Plugin::registerClass('PluginUseditemsexportProfile', + ['addtabon' => 'Profile']); } - if (isset($_SESSION['plugins']['useditemsexport']['config'])) { + if (isset($_SESSION['plugins']['useditemsexport']['config'])) { - $useditemsexport_config = $_SESSION['plugins']['useditemsexport']['config']; + $useditemsexport_config = $_SESSION['plugins']['useditemsexport']['config']; - if (Session::haveRightsOr('plugin_useditemsexport_export', array(READ, CREATE, PURGE)) - && $useditemsexport_config['is_active']) { - - Plugin::registerClass('PluginUseditemsexportExport', - array('addtabon' => 'User')); + if (Session::haveRightsOr('plugin_useditemsexport_export', [READ, CREATE, PURGE]) + && $useditemsexport_config['is_active']) { + + Plugin::registerClass('PluginUseditemsexportExport', + ['addtabon' => 'User']); } } } @@ -86,7 +86,7 @@ function plugin_init_useditemsexport() { */ function plugin_version_useditemsexport() { - return array ( + return [ 'name' => __('Used items export', 'useditemsexport'), 'version' => PLUGIN_USEDITEMEXPORT_VERSION, 'oldname' => '', @@ -94,7 +94,7 @@ function plugin_version_useditemsexport() { 'author' => "TECLIB", 'homepage'=>'https://github.com/pluginsGLPI/useditemsexport', 'minGlpiVersion' => PLUGIN_USEDITEMEXPORT_MIN_GLPI, - ); + ]; } /** @@ -105,8 +105,8 @@ function plugin_version_useditemsexport() { */ function plugin_useditemsexport_check_prerequisites() { - if (version_compare(GLPI_VERSION, PLUGIN_USEDITEMEXPORT_MIN_GLPI,'lt') - || version_compare(GLPI_VERSION, PLUGIN_USEDITEMEXPORT_MAX_GLPI,'ge') + if (version_compare(GLPI_VERSION, PLUGIN_USEDITEMEXPORT_MIN_GLPI, 'lt') + || version_compare(GLPI_VERSION, PLUGIN_USEDITEMEXPORT_MAX_GLPI, 'ge') ) { echo sprintf( __('This plugin requires GLPi >= %1$s and < %2$s'), @@ -132,7 +132,7 @@ function plugin_useditemsexport_check_prerequisites() { * * @return boolean */ -function plugin_useditemsexport_check_config($verbose=false) { +function plugin_useditemsexport_check_config($verbose = false) { if (true) { // Your configuration check return true; } From 74da31bb4a84915292b26e504f4dd6d608d88b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Legastelois?= Date: Tue, 20 Feb 2018 11:55:00 +0100 Subject: [PATCH 6/7] add glpi-project-tools require-dev files and update composer --- .gitignore | 5 +- .travis.yml | 40 ++ RoboFile.php | 13 + composer.json | 16 +- composer.lock | 1305 ++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 1354 insertions(+), 25 deletions(-) create mode 100644 .travis.yml create mode 100644 RoboFile.php diff --git a/.gitignore b/.gitignore index 42cd73d..b2e56b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -/vendor/ \ No newline at end of file +dist/ +vendor/ +.gh_token +*.min.* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5be3e87 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,40 @@ +language: php + +env: + global: +# - GLPI_SOURCE="https://github.com/glpi-project/glpi -b 9.2/bugfixes" + - PHPUNIT_ARGS="--verbose --debug" + - CS=7.2 + matrix: +# - GLPI_BRANCH=9.2.1 +# - GLPI_BRANCH=9.2/bugfixes +# - GLPI_BRANCH=master + +php: + - 5.6 + - 7.0 + - 7.1 + - 7.2 + - nightly + +allow_failures: + - php: nightly + +before_script: +# - mysql -u root -e 'create database glpitest;' +# - git clone --depth=1 $GLPI_SOURCE -b $GLPI_BRANCH ../glpi && cd ../glpi +# - mv ../formcreator plugins/formcreator +# - composer install --no-dev +# - if [ -e scripts/cliinstall.php ] ; then php scripts/cliinstall.php --db=glpitest --user=root --tests ; fi +# - if [ -e tools/cliinstall.php ] ; then php tools/cliinstall.php --db=glpitest --user=root --tests ; fi +# - cd plugins/formcreator + - rm composer.lock + - composer install + +script: +# - vendor/bin/phpunit $PHPUNIT_ARGS + - if [[ ${TRAVIS_PHP_VERSION:0:3} == "$CS" ]] ; then vendor/bin/robo --no-interaction code:cs; fi + +cache: + directories: + - $HOME/.composer/cache diff --git a/RoboFile.php b/RoboFile.php new file mode 100644 index 0000000..1a34097 --- /dev/null +++ b/RoboFile.php @@ -0,0 +1,13 @@ += 5.6.0", "spipu/html2pdf": "4.6.0" + }, + "require-dev": { + "glpi-project/tools": "^0.1.0", + "glpi-project/coding-standard": "0.5.0" } } diff --git a/composer.lock b/composer.lock index 056f09d..ece09ab 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "3a50eeba408bf5486474cee055e82781", - "content-hash": "ca9233cc1c0bfd555338cb851a31870d", + "content-hash": "ec51ed757ee7549334b36de3764dff28", "packages": [ { "name": "spipu/html2pdf", @@ -58,20 +57,20 @@ "html2pdf", "pdf" ], - "time": "2016-03-30 14:08:17" + "time": "2016-03-30T14:08:17+00:00" }, { "name": "tecnickcom/tcpdf", - "version": "6.2.12", + "version": "6.2.16", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f" + "reference": "3527098537e6061b752fc261a44563489c927889" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/2f732eaa91b5665274689b1d40b285a7bacdc37f", - "reference": "2f732eaa91b5665274689b1d40b285a7bacdc37f", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/3527098537e6061b752fc261a44563489c927889", + "reference": "3527098537e6061b752fc261a44563489c927889", "shasum": "" }, "require": { @@ -80,7 +79,6 @@ "type": "library", "autoload": { "classmap": [ - "fonts", "config", "include", "tcpdf.php", @@ -101,13 +99,13 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPLv3" + "LGPL-3.0" ], "authors": [ { "name": "Nicola Asuni", "email": "info@tecnick.com", - "homepage": "http://nicolaasuni.tecnick.com" + "role": "lead" } ], "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", @@ -121,15 +119,1292 @@ "pdf417", "qrcode" ], - "time": "2015-09-12 10:08:34" + "time": "2018-02-19T15:01:27+00:00" + } + ], + "packages-dev": [ + { + "name": "consolidation/annotated-command", + "version": "2.8.2", + "source": { + "type": "git", + "url": "https://github.com/consolidation/annotated-command.git", + "reference": "e97c38717eae23a2bafcf3f09438290eee6ebeb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/e97c38717eae23a2bafcf3f09438290eee6ebeb4", + "reference": "e97c38717eae23a2bafcf3f09438290eee6ebeb4", + "shasum": "" + }, + "require": { + "consolidation/output-formatters": "^3.1.12", + "php": ">=5.4.0", + "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.8", + "satooshi/php-coveralls": "^1.0.2 | dev-master", + "squizlabs/php_codesniffer": "^2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\AnnotatedCommand\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Initialize Symfony Console commands from annotated command class methods.", + "time": "2017-11-29T16:23:23+00:00" + }, + { + "name": "consolidation/config", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/consolidation/config.git", + "reference": "34ca8d7c1ee60a7b591b10617114cf1210a2e92c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/config/zipball/34ca8d7c1ee60a7b591b10617114cf1210a2e92c", + "reference": "34ca8d7c1ee60a7b591b10617114cf1210a2e92c", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "grasmash/expander": "^1", + "php": ">=5.4.0" + }, + "require-dev": { + "greg-1-anderson/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": "2017-12-22T17:28:19+00:00" + }, + { + "name": "consolidation/log", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/consolidation/log.git", + "reference": "dbc7c535f319a4a2d5a5077738f8eb7c10df8821" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/log/zipball/dbc7c535f319a4a2d5a5077738f8eb7c10df8821", + "reference": "dbc7c535f319a4a2d5a5077738f8eb7c10df8821", + "shasum": "" + }, + "require": { + "php": ">=5.5.0", + "psr/log": "~1.0", + "symfony/console": "^2.8|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "satooshi/php-coveralls": "dev-master", + "squizlabs/php_codesniffer": "2.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", + "time": "2017-11-29T01:44:16+00:00" + }, + { + "name": "consolidation/output-formatters", + "version": "3.1.13", + "source": { + "type": "git", + "url": "https://github.com/consolidation/output-formatters.git", + "reference": "3188461e965b32148c8fb85261833b2b72d34b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/3188461e965b32148c8fb85261833b2b72d34b8c", + "reference": "3188461e965b32148c8fb85261833b2b72d34b8c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "symfony/console": "^2.8|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "satooshi/php-coveralls": "^1.0.2 | dev-master", + "squizlabs/php_codesniffer": "^2.7", + "victorjonsson/markdowndocs": "^1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\OutputFormatters\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Format text by applying transformations provided by plug-in formatters.", + "time": "2017-11-29T15:25:38+00:00" + }, + { + "name": "consolidation/robo", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/consolidation/Robo.git", + "reference": "bd1ec91e657c231884e0bf2b397567a691b63a28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/bd1ec91e657c231884e0bf2b397567a691b63a28", + "reference": "bd1ec91e657c231884e0bf2b397567a691b63a28", + "shasum": "" + }, + "require": { + "consolidation/annotated-command": "^2.8.2", + "consolidation/config": "^1.0.1", + "consolidation/log": "~1", + "consolidation/output-formatters": "^3.1.13", + "grasmash/yaml-expander": "^1.3", + "league/container": "^2.2", + "php": ">=5.5.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|^2.1.1", + "codeception/base": "^2.3.7", + "codeception/verify": "^0.3.2", + "greg-1-anderson/composer-test-scenarios": "^1", + "natxet/cssmin": "3.0.4", + "patchwork/jsqueeze": "~2", + "pear/archive_tar": "^1.4.2", + "phpunit/php-code-coverage": "~2|~4", + "satooshi/php-coveralls": "^2", + "squizlabs/php_codesniffer": "^2.8" + }, + "suggest": { + "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", + "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." + }, + "bin": [ + "robo" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev", + "dev-state": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Robo\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Davert", + "email": "davert.php@resend.cc" + } + ], + "description": "Modern task runner", + "time": "2018-02-20T01:35:52+00:00" + }, + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "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": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "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", + "source": { + "type": "git", + "url": "https://github.com/glpi-project/coding-standard.git", + "reference": "e19495c896a01199a2fec2e65b7613310598cf96" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/glpi-project/coding-standard/zipball/e19495c896a01199a2fec2e65b7613310598cf96", + "reference": "e19495c896a01199a2fec2e65b7613310598cf96", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPLv3" + ], + "authors": [ + { + "name": "Teclib'", + "email": "contact@teclib.com", + "homepage": "https://teclib.com" + } + ], + "description": "GLPI PHP CodeSniffer Coding Standard", + "keywords": [ + "codesniffer", + "glpi", + "phpcs" + ], + "time": "2017-01-06T11:10:46+00:00" + }, + { + "name": "glpi-project/tools", + "version": "0.1.3", + "source": { + "type": "git", + "url": "https://github.com/glpi-project/tools.git", + "reference": "b3ed8524ac663e1bbe2027c8c99e42da22f3aa7b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/b3ed8524ac663e1bbe2027c8c99e42da22f3aa7b", + "reference": "b3ed8524ac663e1bbe2027c8c99e42da22f3aa7b", + "shasum": "" + }, + "require": { + "consolidation/robo": "dev-master@dev", + "glpi-project/coding-standard": "~0.5", + "natxet/cssmin": "~3.0", + "patchwork/jsqueeze": "~1.0" + }, + "bin": [ + "tools/plugin-release", + "tools/extract_template.sh", + "tools/modify_headers.pl" + ], + "type": "library", + "autoload": { + "psr-4": { + "Glpi\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPLv3" + ], + "authors": [ + { + "name": "Teclib'", + "email": "glpi@teclib.com", + "homepage": "http://teclib-group.com" + } + ], + "description": "Various tools for GLPI and its plugins", + "keywords": [ + "glpi", + "plugins", + "tools" + ], + "time": "2018-01-02T10:48:41+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.4.1", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/container.git", + "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/container/zipball/43f35abd03a12977a60ffd7095efd6a7808488c0", + "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.2", + "php": "^5.4.0 || ^7.0" + }, + "provide": { + "container-interop/container-interop-implementation": "^1.2", + "psr/container-implementation": "^1.0" + }, + "replace": { + "orno/di": "~2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Container\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Phil Bennett", + "email": "philipobenito@gmail.com", + "homepage": "http://www.philipobenito.com", + "role": "Developer" + } + ], + "description": "A fast and intuitive dependency injection container.", + "homepage": "https://github.com/thephpleague/container", + "keywords": [ + "container", + "dependency", + "di", + "injection", + "league", + "provider", + "service" + ], + "time": "2017-05-10T09:20:27+00:00" + }, + { + "name": "natxet/CssMin", + "version": "v3.0.6", + "source": { + "type": "git", + "url": "https://github.com/natxet/CssMin.git", + "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/natxet/CssMin/zipball/d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd", + "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd", + "shasum": "" + }, + "require": { + "php": ">=5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joe Scylla", + "email": "joe.scylla@gmail.com", + "homepage": "https://profiles.google.com/joe.scylla" + } + ], + "description": "Minifying CSS", + "homepage": "http://code.google.com/p/cssmin/", + "keywords": [ + "css", + "minify" + ], + "time": "2018-01-09T11:15:01+00:00" + }, + { + "name": "patchwork/jsqueeze", + "version": "v1.0.7", + "source": { + "type": "git", + "url": "https://github.com/tchwork/jsqueeze.git", + "reference": "f90a933213534b93e4ff3c2c3026ff7458f7721b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tchwork/jsqueeze/zipball/f90a933213534b93e4ff3c2c3026ff7458f7721b", + "reference": "f90a933213534b93e4ff3c2c3026ff7458f7721b", + "shasum": "" + }, + "require": { + "php": ">=5.1.4" + }, + "type": "library", + "autoload": { + "psr-0": { + "JSqueeze": "class/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "(Apache-2.0 or GPL-2.0)" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + } + ], + "description": "Efficient JavaScript minification in PHP", + "homepage": "https://github.com/tchwork/jsqueeze", + "keywords": [ + "compression", + "javascript", + "minification" + ], + "time": "2015-03-25T10:11:08+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14T16:28:37+00:00" + }, + { + "name": "psr/log", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.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" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2017-05-22T02:43:20+00:00" + }, + { + "name": "symfony/console", + "version": "v4.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", + "reference": "36d5b41e7d4e1ccf0370f6babe966c08ef0a1488", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-01-29T09:06:29+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/74d33aac36208c4d6757807d9f598f0133a3a4eb", + "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:38:00+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "760e47a4ee64b4c48f4b30017011e09d4c0f05ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/760e47a4ee64b4c48f4b30017011e09d4c0f05ed", + "reference": "760e47a4ee64b4c48f4b30017011e09d4c0f05ed", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:38:00+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/8b08180f2b7ccb41062366b9ad91fbc4f1af8601", + "reference": "8b08180f2b7ccb41062366b9ad91fbc4f1af8601", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2018-01-03T07:38:00+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-01-30T19:27:44+00:00" + }, + { + "name": "symfony/process", + "version": "v4.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "e1712002d81de6f39f854bc5bbd9e9f4bb6345b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/e1712002d81de6f39f854bc5bbd9e9f4bb6345b4", + "reference": "e1712002d81de6f39f854bc5bbd9e9f4bb6345b4", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com", + "time": "2018-01-29T09:06:29+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.0.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ffc60bda1d4a00ec0b32eeabf39dc017bf480028", + "reference": "ffc60bda1d4a00ec0b32eeabf39dc017bf480028", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-01-21T19:06:11+00:00" } ], - "packages-dev": [], "aliases": [], - "minimum-stability": "stable", + "minimum-stability": "dev", "stability-flags": [], - "prefer-stable": false, + "prefer-stable": true, "prefer-lowest": false, - "platform": [], + "platform": { + "php": ">= 5.6.0" + }, "platform-dev": [] } From 118b6e070698941ccbe1a3570bbd63c1e830c2b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Legastelois?= Date: Tue, 20 Feb 2018 14:55:11 +0100 Subject: [PATCH 7/7] prepare 2.0.0 release (update locales, bump version) --- locales/en_GB.mo | Bin 1426 -> 1465 bytes locales/en_GB.po | 85 ++++++++++------- locales/fr_FR.mo | Bin 1522 -> 1686 bytes locales/fr_FR.po | 88 +++++++++++------- .../{glpinetwork.pot => useditemexport.pot} | 64 ++++++++----- plugin.xml | 4 + setup.php | 38 ++------ tools/extract_template.sh | 19 ---- tools/update_mo.pl | 29 ------ tools/update_po.pl | 30 ------ 10 files changed, 156 insertions(+), 201 deletions(-) rename locales/{glpinetwork.pot => useditemexport.pot} (69%) delete mode 100755 tools/extract_template.sh delete mode 100644 tools/update_mo.pl delete mode 100644 tools/update_po.pl diff --git a/locales/en_GB.mo b/locales/en_GB.mo index eb54d4c7691f64e300f33897dbe3389e36dda4e3..1d729a2bc2756af6882f80e8519b78117ba678a0 100644 GIT binary patch literal 1465 zcmeH_OK;Oa5XTp2d89lG2*g9$_5u>x;shZTQ>uo>sUn;<za;A!wXcm|w2%-9ro5j+acfE>IDQeFc*0X_wfgCR)qDR>opG4j6# zui(4~R=|Cb^1g!Sz#kyRPaPSaZ-AGe;T}kJ9#0JQNs#nyfu!#xNcDC>(zge4@GVGr z??9^a5hQ(IK#KncQoWxe|K-V{z8R48Er67#K+?AZQv9pY`3(qp#X5;EWU^@(+=V`% z$SZ;L_6O@2HfXibaNwgl)C=jO8PI~PLVt0<=M;?kW7RB^hRf|#X~VVbbDOhjZZ?(X zsz36xnrGx6M`suvC_f*_#IU+jMrv;4HtqGmGi*gBQhPDS<#|e}c_xF%$U!zNH44DB ziF|%g#`TgQ^Sx9u?84j&C0o-GDtIPR32W8rJj;DwW?4Uv;~gFrMT`vQSPSyC7a7); zeW_*Qw`SqtW>fMs&O_R2DOo296VK#Y zvL5vFqJaaoe|g4wifGZGcE#|qSWByC(l??Jh;^wm^kef@b@@?s#o_BtyVF=(Ewv?0 zK{T^43dF-a%tTk&ywq9~ZMhXuj-W}{ykeE-g;fz1iOU*{p z8EY-iS*2x_7)(QScT$L;aoK5>kkaXK?D?E;Ax zV95^k4UiCf9smjP2;IX&ApVo21PR2B9U~ooGvj~Gf97(0bLx$Ub{#Q;c#F6#{Zsg$ z9e}sMLr^rY!K>gAcny39UIIUY1bzZV{|&qYeg~()>C>K91?RzwU=N%F4R`}Q0!9CR zJpK$m!P;X`@~Nqj{|YGnZBYC}Q2h5m0$+lnKLRD+2T=UKfa3oZ6#tpCBmcXg__smP z$K&xU5cVGA!*+g5@x-q`HmO5$UqGBgoI%K$VGCXfA$4CtTt;{+*0Li$805y0;VuQ_ ztrV`88_K)md2cOr{L65Cq>l5b=(BcSBhMWha(v*t4c2VJjF7b$$eO}(oI38?k;hno ze41aJ|5JEUZo#c^Er+T3NsI>LgYzYCj5S?xm8Y?Sv0xy5{{tqZe^ zl+wA1d4Co&AEqgD-v4k{%FA5hh=EGWOGsy, 2016. -# +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-20 15:06+0200\n" -"PO-Revision-Date: 2016-09-20 15:06+0200\n" -"Last-Translator: francois@teclib.com\n" -"Language-Team: French\n" -"Language: fr\n" +"POT-Creation-Date: 2018-02-20 13:50+0100\n" +"PO-Revision-Date: 2018-02-20 13:50+0100\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Language: \n" -#: setup.php:71 inc/export.class.php:52 +#: setup.php:90 inc/export.class.php:52 msgid "Used items export" msgstr "Used items export" -#: setup.php:84 -msgid "This plugin requires GLPi >= 0.90 and < 9.2" -msgstr "This plugin requires GLPi >= 0.90 and < 9.2" - -#: setup.php:90 inc/export.class.php:42 -msgid "Run \"composer install --no-dev\" in the plugin tree" -msgstr "Run \"composer install --no-dev\" in the plugin tree" - #: front/export.form.php:41 msgid "PDF successfully generated." msgstr "PDF successfully generated." -#: inc/config.class.php:49 -msgid "General setup of useditemsexport" -msgstr "General setup of useditemsexport" - -#: inc/config.class.php:72 -msgid "Footer text" -msgstr "Footer text" +#: inc/export.class.php:42 +msgid "Run \"composer install --no-dev\" in the plugin tree" +msgstr "Run \"composer install --no-dev\" in the plugin tree" #: inc/export.class.php:141 msgid "Generate new export" @@ -50,19 +37,19 @@ msgstr "Generate new export" msgid "Used items export generated" msgstr "Used items export generated" -#: inc/export.class.php:175 +#: inc/export.class.php:176 msgid "Reference number of export" msgstr "Reference number of export" -#: inc/export.class.php:176 +#: inc/export.class.php:177 msgid "Date of export" msgstr "Date of export" -#: inc/export.class.php:177 +#: inc/export.class.php:178 msgid "Author of export" msgstr "Author of export" -#: inc/export.class.php:178 +#: inc/export.class.php:179 msgid "Export document" msgstr "Export document" @@ -70,10 +57,38 @@ msgstr "Export document" msgid "Asset export ref : " msgstr "Asset export ref : " -#: inc/export.class.php:349 inc/export.class.php:352 +#: inc/export.class.php:361 inc/export.class.php:364 msgid "Signature" msgstr "Signature" -#: inc/export.class.php:406 +#: inc/export.class.php:424 msgid "Used-Items-Export" msgstr "Used-Items-Export" + +#: inc/config.class.php:49 +msgid "General setup of useditemsexport" +msgstr "General setup of useditemsexport" + +#: inc/config.class.php:72 +msgid "Footer text" +msgstr "Footer text" + +#: inc/config.class.php:78 +msgid "Orientation" +msgstr "Orientation" + +#: inc/config.class.php:85 +msgid "Format" +msgstr "Format" + +#: inc/config.class.php:92 +msgid "Language" +msgstr "Language" + +#: inc/config.class.php:108 +msgid "Landscape" +msgstr "Landscape" + +#: inc/config.class.php:109 +msgid "Portrait" +msgstr "Portrait" \ No newline at end of file diff --git a/locales/fr_FR.mo b/locales/fr_FR.mo index 99911964b03913ae494ef54107cfd6fbb2d2710b..aa0709dc3ebdadc8772b0959f4ce8e4a24134472 100644 GIT binary patch delta 909 zcmY+>L1+^}6b9f)lhm5DYFis$g zh=(HHJS>W!2zt@r-BZy+4qn@fM?u81=t1xx_|GOOI56|=%)Hrs^Y&Np=|tztlY0|gp$_A)0M&;# zAo6qDI7Z~@CWvEh1=Yr60Yd;?m4Db&GPtap#Bfc0NR?Y9qJD#FxR_gFcY;CPdemuo zO8$&x*O~LlbNWz@H7cUanw;RtXfcD6ylwJ^WYV-6&R@^`Si!QT%}nXcj@)!!j+8ou znsc>#v8@#s$gCHFI^b zY}L=7bYJXryrDQk#5?~;F| zl+hB-S8sTHScW96+K$I}Z@Ovn3axP3RJCynC!L4B)pP8wP%Ccye?=pORE8S8Zll+= zdtJ)bc$tb;x!ijz$WARie%pEB4?FLC^ay3N*Ods}IYd?juV`7x>q1MftLl<}zWli| delta 754 zcmajb&1(}u7zg0#cGGHNwN|kh3mx?m2opC8Tbke}tx6%7Qd98Y!A&wIBgt+$Gm#dA z96fm&^c0F7a}fLk6c2k6di7eo2_8Lp5`R+`Q4kz>_nEJEX5V==_dPc{TyS3!w0Xo5 zVvJa{{V9CVcHtSg2ko90@Fd)ar{G(dgC8J;pP=3U4PJmhVIJlkLVOs&Xj-U4Wl-_N-HJb z{BX9-!|D8}!PX=XwTL6O9%^2tzE@shUWNG{EeBO^rRe#dm))$hE&f!f|Lv=VO0$Lx zBh?FaEUWY}`mI=~o0_+JqFHLi{cJ6aI>WHTS%WWz{VKg9dDQCup0-J*=my!1`*pUu z8dO->aQC7y?q04LD%$3BfNZmzX_|2+Z$4&r3Tv4Aqi`QXrJ(I7Lyu jJBX#miOJ+i@|t#%Nt8@vGErn(@iyDgysy~pqfO)&TXK?s diff --git a/locales/fr_FR.po b/locales/fr_FR.po index 9d9af80..3a1fafe 100644 --- a/locales/fr_FR.po +++ b/locales/fr_FR.po @@ -1,46 +1,36 @@ -# French translations for PACKAGE package -# Traductions françaises du paquet PACKAGE. -# Copyright (C) 2016 THE PACKAGE'S COPYRIGHT HOLDER +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. -# , 2016. -# +# FIRST AUTHOR , YEAR. +# +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: \n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-20 15:06+0200\n" -"PO-Revision-Date: 2016-09-20 15:06+0200\n" -"Last-Translator: francois@teclib.com\n" -"Language-Team: French\n" -"Language: fr\n" +"POT-Creation-Date: 2018-02-20 13:50+0100\n" +"PO-Revision-Date: 2018-02-20 13:50+0100\n" +"Last-Translator: Legastelois François , 2018\n" +"Language-Team: French (https://www.transifex.com/teclib/teams/28042/fr/)\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: setup.php:71 inc/export.class.php:52 +#: setup.php:90 inc/export.class.php:52 msgid "Used items export" msgstr "Export des éléments utilisés" -#: setup.php:84 -msgid "This plugin requires GLPi >= 0.90 and < 9.2" -msgstr "Ce plugin requiert GLPi >= 0.90 et < 9.2" - -#: setup.php:90 inc/export.class.php:42 -msgid "Run \"composer install --no-dev\" in the plugin tree" -msgstr "Lancez la commande \"composer install --no-dev\" depuis le répertoire du plugin." - #: front/export.form.php:41 msgid "PDF successfully generated." msgstr "PDF généré avec succès" -#: inc/config.class.php:49 -msgid "General setup of useditemsexport" -msgstr "Configuration générale du plugin d'export des éléments utilisés" - -#: inc/config.class.php:72 -msgid "Footer text" -msgstr "Texte de bas de page" +#: inc/export.class.php:42 +msgid "Run \"composer install --no-dev\" in the plugin tree" +msgstr "" +"Lancez la commande \"composer install --no-dev\" depuis le répertoire du " +"plugin." #: inc/export.class.php:141 msgid "Generate new export" @@ -48,21 +38,21 @@ msgstr "Générer un nouvel export" #: inc/export.class.php:162 msgid "Used items export generated" -msgstr "Liste des exports déjà générés" +msgstr "L'export des éléments utilisés a été généré" -#: inc/export.class.php:175 +#: inc/export.class.php:176 msgid "Reference number of export" msgstr "Numéro de référence" -#: inc/export.class.php:176 +#: inc/export.class.php:177 msgid "Date of export" msgstr "Date d'export" -#: inc/export.class.php:177 +#: inc/export.class.php:178 msgid "Author of export" msgstr "Auteur de l'export" -#: inc/export.class.php:178 +#: inc/export.class.php:179 msgid "Export document" msgstr "Document exporté" @@ -70,10 +60,38 @@ msgstr "Document exporté" msgid "Asset export ref : " msgstr "Export numéro : " -#: inc/export.class.php:349 inc/export.class.php:352 +#: inc/export.class.php:361 inc/export.class.php:364 msgid "Signature" msgstr "Signature" -#: inc/export.class.php:406 +#: inc/export.class.php:424 msgid "Used-Items-Export" msgstr "Used-Items-Export" + +#: inc/config.class.php:49 +msgid "General setup of useditemsexport" +msgstr "Configuration générale du plugin d'export des éléments utilisés" + +#: inc/config.class.php:72 +msgid "Footer text" +msgstr "Texte de pied de page" + +#: inc/config.class.php:78 +msgid "Orientation" +msgstr "Orientation" + +#: inc/config.class.php:85 +msgid "Format" +msgstr "Format" + +#: inc/config.class.php:92 +msgid "Language" +msgstr "Langue" + +#: inc/config.class.php:108 +msgid "Landscape" +msgstr "Paysage" + +#: inc/config.class.php:109 +msgid "Portrait" +msgstr "Portrait" \ No newline at end of file diff --git a/locales/glpinetwork.pot b/locales/useditemexport.pot similarity index 69% rename from locales/glpinetwork.pot rename to locales/useditemexport.pot index 20d5e1f..7d33110 100644 --- a/locales/glpinetwork.pot +++ b/locales/useditemexport.pot @@ -8,37 +8,25 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-09-20 15:06+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"POT-Creation-Date: 2018-02-20 13:50+0100\n" +"PO-Revision-Date: 2018-02-20 13:50+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: setup.php:71 inc/export.class.php:52 +#: setup.php:90 inc/export.class.php:52 msgid "Used items export" msgstr "" -#: setup.php:84 -msgid "This plugin requires GLPi >= 0.90 and < 9.2" -msgstr "" - -#: setup.php:90 inc/export.class.php:42 -msgid "Run \"composer install --no-dev\" in the plugin tree" -msgstr "" - #: front/export.form.php:41 msgid "PDF successfully generated." msgstr "" -#: inc/config.class.php:49 -msgid "General setup of useditemsexport" -msgstr "" - -#: inc/config.class.php:72 -msgid "Footer text" +#: inc/export.class.php:42 +msgid "Run \"composer install --no-dev\" in the plugin tree" msgstr "" #: inc/export.class.php:141 @@ -49,19 +37,19 @@ msgstr "" msgid "Used items export generated" msgstr "" -#: inc/export.class.php:175 +#: inc/export.class.php:176 msgid "Reference number of export" msgstr "" -#: inc/export.class.php:176 +#: inc/export.class.php:177 msgid "Date of export" msgstr "" -#: inc/export.class.php:177 +#: inc/export.class.php:178 msgid "Author of export" msgstr "" -#: inc/export.class.php:178 +#: inc/export.class.php:179 msgid "Export document" msgstr "" @@ -69,10 +57,38 @@ msgstr "" msgid "Asset export ref : " msgstr "" -#: inc/export.class.php:349 inc/export.class.php:352 +#: inc/export.class.php:361 inc/export.class.php:364 msgid "Signature" msgstr "" -#: inc/export.class.php:406 +#: inc/export.class.php:424 msgid "Used-Items-Export" msgstr "" + +#: inc/config.class.php:49 +msgid "General setup of useditemsexport" +msgstr "" + +#: inc/config.class.php:72 +msgid "Footer text" +msgstr "" + +#: inc/config.class.php:78 +msgid "Orientation" +msgstr "" + +#: inc/config.class.php:85 +msgid "Format" +msgstr "" + +#: inc/config.class.php:92 +msgid "Language" +msgstr "" + +#: inc/config.class.php:108 +msgid "Landscape" +msgstr "" + +#: inc/config.class.php:109 +msgid "Portrait" +msgstr "" diff --git a/plugin.xml b/plugin.xml index e0da727..da4d869 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,6 +22,10 @@ TECLIB' + + 2.0.0 + 9.2 + 1.0.0 0.90 diff --git a/setup.php b/setup.php index f2b8350..bc6ebce 100644 --- a/setup.php +++ b/setup.php @@ -32,7 +32,7 @@ */ // Plugin version -define("PLUGIN_USEDITEMEXPORT_VERSION", "1.1.0"); +define("PLUGIN_USEDITEMEXPORT_VERSION", "2.0.0"); // Minimal GLPI version, inclusive define("PLUGIN_USEDITEMEXPORT_MIN_GLPI", "9.2"); // Maximum GLPI version, exclusive @@ -93,52 +93,32 @@ function plugin_version_useditemsexport() { 'license' => 'GPLv2+', 'author' => "TECLIB", 'homepage'=>'https://github.com/pluginsGLPI/useditemsexport', - 'minGlpiVersion' => PLUGIN_USEDITEMEXPORT_MIN_GLPI, + 'requirements' => [ + 'glpi' => [ + 'min' => PLUGIN_USEDITEMEXPORT_MIN_GLPI, + 'max' => PLUGIN_USEDITEMEXPORT_MAX_GLPI, + 'dev' => true + ] + ] ]; } /** * Check pre-requisites before install - * OPTIONNAL, but recommanded * * @return boolean */ function plugin_useditemsexport_check_prerequisites() { - - if (version_compare(GLPI_VERSION, PLUGIN_USEDITEMEXPORT_MIN_GLPI, 'lt') - || version_compare(GLPI_VERSION, PLUGIN_USEDITEMEXPORT_MAX_GLPI, 'ge') - ) { - echo sprintf( - __('This plugin requires GLPi >= %1$s and < %2$s'), - PLUGIN_USEDITEMEXPORT_MIN_GLPI, - PLUGIN_USEDITEMEXPORT_MAX_GLPI - ); - return false; - } - - $autoload = dirname(__DIR__) . '/useditemsexport/vendor/autoload.php'; - if (!file_exists($autoload)) { - echo __('Run "composer install --no-dev" in the plugin tree', 'useditemsexport'); - return false; - } return true; } /** * Check configuration process - * OPTIONNAL, but recommanded * * @param boolean $verbose Whether to display message on failure. Defaults to false * * @return boolean */ function plugin_useditemsexport_check_config($verbose = false) { - if (true) { // Your configuration check - return true; - } - - if ($verbose) { - echo __('Installed / not configured', 'useditemsexport'); - } - return false; + return true; } diff --git a/tools/extract_template.sh b/tools/extract_template.sh deleted file mode 100755 index 28a3970..0000000 --- a/tools/extract_template.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -soft='GLPi Used items export plugins' -version='0.90' -email=glpi-translation@gna.org -copyright='TECLIB' - -#xgettext *.php */*.php -copyright-holder='$copyright' --package-name=$soft --package-version=$version --msgid-bugs-address=$email -o locales/en_GB.po -L PHP --from-code=UTF-8 --force-po -i --keyword=_n:1,2 --keyword=__ --keyword=_e - -# Only strings with domain specified are extracted (use Xt args of keyword param to set number of args needed) - -xgettext *.php */*.php -o locales/glpinetwork.pot -L PHP --add-comments=TRANS --from-code=UTF-8 --force-po \ - --keyword=_n:1,2,4t --keyword=__s:1,2t --keyword=__:1,2t --keyword=_e:1,2t --keyword=_x:1c,2,3t --keyword=_ex:1c,2,3t \ - --keyword=_sx:1c,2,3t --keyword=_nx:1c,2,3,5t - -### for using tx : -##tx set --execute --auto-local -r GLPI_example.glpi-084-current 'locales/.po' --source-lang en --source-file locales/glpi.pot -## tx push -s -## tx pull -a diff --git a/tools/update_mo.pl b/tools/update_mo.pl deleted file mode 100644 index ed44da6..0000000 --- a/tools/update_mo.pl +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/perl -#!/usr/bin/perl -w - -if (@ARGV!=0){ -print "USAGE update_mo.pl\n\n"; - -exit(); -} - - -opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n"; -foreach (readdir(DIRHANDLE)){ - if ($_ ne '..' && $_ ne '.'){ - - if(!(-l "$dir/$_")){ - if (index($_,".po",0)==length($_)-3) { - $lang=$_; - $lang=~s/\.po//; - - `msgfmt locales/$_ -o locales/$lang.mo`; - } - } - - } -} -closedir DIRHANDLE; - -# -# diff --git a/tools/update_po.pl b/tools/update_po.pl deleted file mode 100644 index 8255c77..0000000 --- a/tools/update_po.pl +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/perl -#!/usr/bin/perl -w - -if (@ARGV!=2){ -print "USAGE update_po.pl transifex_login transifex_password\n\n"; - -exit(); -} -$user = $ARGV[0]; -$password = $ARGV[1]; - -opendir(DIRHANDLE,'locales')||die "ERROR: can not read current directory\n"; -foreach (readdir(DIRHANDLE)){ - if ($_ ne '..' && $_ ne '.'){ - - if(!(-l "$dir/$_")){ - if (index($_,".po",0)==length($_)-3) { - $lang=$_; - $lang=~s/\.po//; - - `wget --user=$user --password=$password --output-document=locales/$_ http://www.transifex.net/api/2/project/glpi-useditemsexport/resource/glpipot/translation/$lang/?file=$_`; - } - } - - } -} -closedir DIRHANDLE; - -# -#