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

Commit

Permalink
refactor(install): reorder instructions for readability
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry authored and DIOHz0r committed May 10, 2018
1 parent 3926eb4 commit 523567f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions install/installer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,16 +323,15 @@ protected function createAgentProfileAccess() {
protected function createPolicies() {
$policy = new PluginFlyvemdmPolicy();
foreach (self::getPolicies() as $policyData) {
$symbol = $policyData['symbol'];
$rows = $policy->find("`symbol`='$symbol'");

// Import the policy category or find the existing one
$category = new PluginFlyvemdmPolicyCategory();
$categoryId = $category->import([
'completename' => $policyData['plugin_flyvemdm_policycategories_id'],
]);
$policyData['plugin_flyvemdm_policycategories_id'] = $categoryId;

$symbol = $policyData['symbol'];
$rows = $policy->find("`symbol`='$symbol'");
if (count($rows) == 0) {
// Create only non existing policy objects
$policyData['type_data'] = json_encode($policyData['type_data'],
Expand Down

0 comments on commit 523567f

Please sign in to comment.