Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(policy): fix not camelCase policies
Browse files Browse the repository at this point in the history
fix #298
  • Loading branch information
btry authored and DIOHz0r committed Feb 5, 2018
1 parent badb805 commit 687d7eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ static public function getPolicies() {
[
'name' => __('Maximum failed password attemps for wipe',
'flyvemdm'),
'symbol' => 'MaximumFailedPasswordsForWipe',
'symbol' => 'maximumFailedPasswordsForWipe',
'group' => 'policies',
'type' => 'int',
'type_data' => [
Expand All @@ -963,7 +963,7 @@ static public function getPolicies() {
[
'name' => __('Maximum time to lock (milliseconds)',
'flyvemdm'),
'symbol' => 'MaximumTimeToLock',
'symbol' => 'maximumTimeToLock',
'group' => 'policies',
'type' => 'int',
'type_data' => [
Expand Down
10 changes: 10 additions & 0 deletions install/upgrade/update_to_dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,4 +243,14 @@ function plugin_flyvemdm_update_to_dev(Migration $migration) {
$cronTask->deleteByCriteria(['itemtype' => 'PluginFlyvemdmMqttupdatequeue']);
$table = 'glpi_plugin_flyvemdm_mqttupdatequeues';
$migration->dropTable($table);

// Fix PascalCase symbols
$query = "UPDATE `glpi_plugin_flyvemdm_policies`
SET `symbol` = 'maximumFailedPasswordsForWipe'
WHERE `symbol`='MaximumFailedPasswordsForWipe'";
$DB->query($query);
$query = "UPDATE `glpi_plugin_flyvemdm_policies`
SET `symbol` = 'maximumTimeToLock'
WHERE `symbol`='MaximumTimeToLock'";
$DB->query($query);
}

0 comments on commit 687d7eb

Please sign in to comment.