Commit 798af146 authored by Johan Cwiklinski's avatar Johan Cwiklinski

Merge branch '9.4/bugfixes' into 9.5/bugfixes

parents ff599422 2039040a
......@@ -369,7 +369,7 @@ class Plugin extends CommonDBTM {
if ($informations['version'] != $plugin->fields['version']
|| $directory != $plugin->fields['directory']) {
// Plugin known version differs from informations or plugin has been renamed,
// mark it as 'updatable'
// update informations in database
trigger_error(
sprintf(
'Plugin "%s" version changed. It has been deactivated as its update process has to be launched.',
......@@ -381,7 +381,10 @@ class Plugin extends CommonDBTM {
$input = $informations;
$input['id'] = $plugin->fields['id'];
$input['directory'] = $directory;
$input['state'] = self::NOTUPDATED;
if (!in_array($plugin->fields['state'], [self::ANEW, self::NOTINSTALLED])) {
// mark it as 'updatable' unless it was not installed
$input['state'] = self::NOTUPDATED;
}
$this->update($input);
......@@ -502,7 +505,6 @@ class Plugin extends CommonDBTM {
$this->update([
'id' => $ID,
'state' => self::NOTINSTALLED,
'version' => ''
]);
$this->setUnloadedByName($this->fields['directory']);
......
......@@ -1411,7 +1411,7 @@ class Rule extends CommonDBTM {
* Process the rule
*
* @param &$input the input data used to check criterias
* @param &$output the initial ouput array used to be manipulate by actions
* @param &$output the initial output array used to be manipulate by actions
* @param &$params parameters for all internal functions
* @param &options array options:
* - only_criteria : only react on specific criteria
......@@ -1449,8 +1449,8 @@ class Rule extends CommonDBTM {
*
* @param &options options :
* - only_criteria : only react on specific criteria
* @param $refoutput the initial ouput array used to be manipulate by actions
* @param $newoutput the ouput array after actions process
* @param $refoutput the initial output array used to be manipulate by actions
* @param $newoutput the output array after actions process
*
* @return the options array updated.
**/
......@@ -1819,7 +1819,7 @@ class Rule extends CommonDBTM {
default:
//plugins actions
$executeaction = clone $this;
$ouput = $executeaction->executePluginsActions($action, $output, $params, $input);
$output = $executeaction->executePluginsActions($action, $output, $params, $input);
break;
}
}
......
No preview for this file type
......@@ -9,8 +9,8 @@
# Vladimir Támara Patiño <vtamara@pasosdeJesus.org>, 2018
# DOMBRE Julien <moyo@indepnet.net>, 2018
# Oscar Stiven Gomez Toro <oscar.gomez@clinicadeoccidente.com>, 2018
# Haider Ilich López Areiza <hlopez@itsoluciones.com.co>, 2019
# alexandre delaunay <delaunay.alexandre@gmail.com>, 2019
# Haider Ilich López Areiza <hlopez@itsoluciones.com.co>, 2019
#
#, fuzzy
msgid ""
......@@ -19,7 +19,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-10 10:08+0200\n"
"PO-Revision-Date: 2018-05-29 14:21+0000\n"
"Last-Translator: alexandre delaunay <delaunay.alexandre@gmail.com>, 2019\n"
"Last-Translator: Haider Ilich López Areiza <hlopez@itsoluciones.com.co>, 2019\n"
"Language-Team: Spanish (Colombia) (https://www.transifex.com/glpi/teams/1637/es_CO/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
......@@ -12286,7 +12286,7 @@ msgstr "Hilos"
#: inc/item_devices.class.php:86
#, php-format
msgid "%1$s of item \"%2$s\""
msgstr ""
msgstr "%1$s del elemento \"%2$s\""
#. TRANS: %s is the type of the component
#: inc/item_devices.class.php:100
......@@ -13736,12 +13736,12 @@ msgstr "Cambio del diseño de la Base de datos - %s"
#: inc/migration.class.php:672
#, php-format
msgid "Adding fulltext indices - %s"
msgstr ""
msgstr "Agregando índices de texto completo - %s"
#: inc/migration.class.php:681
#, php-format
msgid "Adding unicity indices - %s"
msgstr ""
msgstr "Agregando índices de unicidad - %s"
#: inc/migration.class.php:721 inc/software.class.php:1104
#: install/update.php:86
......@@ -18400,7 +18400,7 @@ msgstr "Fusionar seguimientos"
#: inc/ticket.class.php:2715
msgid "Merge Documents"
msgstr ""
msgstr "Fusionar documentos"
#: inc/ticket.class.php:2723
msgid "Confirm the merge? This ticket will be deleted!"
......@@ -18555,11 +18555,11 @@ msgstr "Sus casos por validar"
#: inc/ticket.class.php:5743
msgid "Your tickets having rejected approval status"
msgstr ""
msgstr "Sus casos han rechazado el estado de aprobación"
#: inc/ticket.class.php:5760
msgid "Your tickets having rejected solution"
msgstr ""
msgstr "Sus casos han rechazado la solución"
#: inc/ticket.class.php:5967
msgid "Ticket followup"
......@@ -19740,7 +19740,7 @@ msgstr "Añadir date_creation a %s"
#: install/update_940_941.php:65 install/update_941_942.php:69
msgid "Fix URL of images in ITIL tasks, followups ans solutions."
msgstr ""
msgstr "Corrige la URL de imágenes en tareas ITIL, seguimientos y soluciones."
#: install/update.php:137
msgid "Update successful, your database is up to date"
......
No preview for this file type
......@@ -12304,7 +12304,7 @@ msgstr "Threads"
#: inc/item_devices.class.php:86
#, php-format
msgid "%1$s of item \"%2$s\""
msgstr ""
msgstr "%1$s de l'élément \"%2$s\""
#. TRANS: %s is the type of the component
#: inc/item_devices.class.php:100
......@@ -13756,12 +13756,12 @@ msgstr "Changement de la structure de la base de données - %s"
#: inc/migration.class.php:672
#, php-format
msgid "Adding fulltext indices - %s"
msgstr ""
msgstr "Ajout des index de texte intégral - %s"
#: inc/migration.class.php:681
#, php-format
msgid "Adding unicity indices - %s"
msgstr ""
msgstr "Ajout des index d'unicité - %s"
#: inc/migration.class.php:721 inc/software.class.php:1104
#: install/update.php:86
......@@ -18433,7 +18433,7 @@ msgstr "Fusionner les suivis"
#: inc/ticket.class.php:2715
msgid "Merge Documents"
msgstr ""
msgstr "Fusionner les documents"
#: inc/ticket.class.php:2723
msgid "Confirm the merge? This ticket will be deleted!"
......@@ -18588,11 +18588,11 @@ msgstr "Vos billets à valider"
#: inc/ticket.class.php:5743
msgid "Your tickets having rejected approval status"
msgstr ""
msgstr "Vos billets ayant le statut approbation rejetée "
#: inc/ticket.class.php:5760
msgid "Your tickets having rejected solution"
msgstr ""
msgstr "Vos billets avec une solution rejetée"
#: inc/ticket.class.php:5967
msgid "Ticket followup"
......@@ -19792,6 +19792,8 @@ msgstr "Ajout date_creation à %s"
#: install/update_940_941.php:65 install/update_941_942.php:69
msgid "Fix URL of images in ITIL tasks, followups ans solutions."
msgstr ""
"Correction des URL des images dans les tâches ITIL, les suivis et les "
"solutions. "
#: install/update.php:137
msgid "Update successful, your database is up to date"
......
No preview for this file type
......@@ -8,8 +8,8 @@
# Andrea Garelli <garelli.andrea@gmail.com>, 2018
# Tiziano Sartori <tiziano.sartori@gmail.com>, 2018
# Giudy <spam@habilitas.it>, 2018
# Pierfrancesco Passerini <p.passerini@gmail.com>, 2019
# alexandre delaunay <delaunay.alexandre@gmail.com>, 2019
# Pierfrancesco Passerini <p.passerini@gmail.com>, 2019
#
#, fuzzy
msgid ""
......@@ -18,7 +18,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-04-10 10:08+0200\n"
"PO-Revision-Date: 2018-05-29 14:21+0000\n"
"Last-Translator: alexandre delaunay <delaunay.alexandre@gmail.com>, 2019\n"
"Last-Translator: Pierfrancesco Passerini <p.passerini@gmail.com>, 2019\n"
"Language-Team: Italian (Italy) (https://www.transifex.com/glpi/teams/1637/it_IT/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
......@@ -12267,7 +12267,7 @@ msgstr "Thread"
#: inc/item_devices.class.php:86
#, php-format
msgid "%1$s of item \"%2$s\""
msgstr ""
msgstr "%1$s di \"%2$s\" elementi"
#. TRANS: %s is the type of the component
#: inc/item_devices.class.php:100
......@@ -13719,12 +13719,12 @@ msgstr "Modifica del layout del database -%s"
#: inc/migration.class.php:672
#, php-format
msgid "Adding fulltext indices - %s"
msgstr ""
msgstr "Aggiungi indice fulltext - %s"
#: inc/migration.class.php:681
#, php-format
msgid "Adding unicity indices - %s"
msgstr ""
msgstr "Aggiungi indice univoco - %s"
#: inc/migration.class.php:721 inc/software.class.php:1104
#: install/update.php:86
......@@ -18379,7 +18379,7 @@ msgstr "Unisci commenti"
#: inc/ticket.class.php:2715
msgid "Merge Documents"
msgstr ""
msgstr "Unisci i documenti"
#: inc/ticket.class.php:2723
msgid "Confirm the merge? This ticket will be deleted!"
......@@ -18534,11 +18534,11 @@ msgstr "Le tue chiamate da convalidate"
#: inc/ticket.class.php:5743
msgid "Your tickets having rejected approval status"
msgstr ""
msgstr "La tua chiamata ha uno stato di convalida rifiutato"
#: inc/ticket.class.php:5760
msgid "Your tickets having rejected solution"
msgstr ""
msgstr "La tua chiamata ha una soluzione rifiutata"
#: inc/ticket.class.php:5967
msgid "Ticket followup"
......@@ -19721,6 +19721,8 @@ msgstr "Aggiungi date_creation a %s"
#: install/update_940_941.php:65 install/update_941_942.php:69
msgid "Fix URL of images in ITIL tasks, followups ans solutions."
msgstr ""
"Verifica URL delle immagini delle attività ITIL, dei commenti e delle "
"soluzioni."
#: install/update.php:137
msgid "Update successful, your database is up to date"
......
......@@ -363,10 +363,11 @@ class Plugin extends DbTestCase {
}
/**
* Test state checking on a valid directory corresponding to a known plugin with a different version.
* Test state checking on a valid directory corresponding to a known and installed plugin
* with a different version.
* Should results in changing plugin state to "NOTUPDATED".
*/
public function testCheckPluginStateForUpdatablePlugin() {
public function testCheckPluginStateForInstalledAndUpdatablePlugin() {
$initial_data = [
'directory' => $this->test_plugin_directory,
......@@ -394,6 +395,38 @@ class Plugin extends DbTestCase {
);
}
/**
* Test state checking on a valid directory corresponding to a known and NOT installed plugin
* with a different version.
* Should results in keeping plugin state to "NOTINSTALLED".
*/
public function testCheckPluginStateForNotInstalledAndUpdatablePlugin() {
$initial_data = [
'directory' => $this->test_plugin_directory,
'name' => 'Test plugin',
'version' => '1.0',
'state' => \Plugin::NOTINSTALLED,
];
$setup_informations = [
'name' => 'Test plugin NG',
'version' => '2.0',
];
$expected_data = array_merge(
$initial_data,
$setup_informations,
[
'state' => \Plugin::NOTINSTALLED,
]
);
$this->doTestCheckPluginState(
$initial_data,
$setup_informations,
$expected_data
);
}
/**
* Test state checking on a valid directory corresponding to a known plugin that has been renamed.
* Should results in changing plugin directory to new value and state to "NOTUPDATED".
......
......@@ -111,6 +111,7 @@ echo "Delete various scripts and directories"
\rm -rf ISSUE_TEMPLATE.md;
\rm -rf PULL_REQUEST_TEMPLATE.md;
\rm -rf .tx;
\rm -rf .github;
\find pics/ -type f -name "*.eps" -exec rm -rf {} \;
\rm -rf nodes_modules;
\rm -rf package.json;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment