From 35bbe00e17de89b4e4cf31472151c9741757e0e7 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Tue, 25 Sep 2018 14:50:35 +0300 Subject: [PATCH] Minor changes for a system requirements --- .../templates/admin/system-requirements/index.tpl | 14 +++++++------- install/core/SystemHelper.php | 6 +++--- install/core/actions/checkPermission.php | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/client/res/templates/admin/system-requirements/index.tpl b/client/res/templates/admin/system-requirements/index.tpl index 1b13e4340a..606b2d3425 100644 --- a/client/res/templates/admin/system-requirements/index.tpl +++ b/client/res/templates/admin/system-requirements/index.tpl @@ -10,10 +10,10 @@ {{#each phpRequirementList}} - + {{translate @key scope='Admin' category='systemRequirements'}} - {{actual}} + {{actual}} {{#if acceptable}} {{translate 'Success' scope='Admin'}} {{else}} {{translate 'Fail' scope='Admin'}} {{#ifEqual type 'lib'}} ({{translate 'extension is missing' scope='Admin'}}) {{/ifEqual}} @@ -36,11 +36,11 @@ {{#each databaseRequirementList}} - + {{translate @key scope='Admin' category='systemRequirements'}} - {{actual}} - + {{actual}} + {{#if acceptable}} {{translate 'Success' scope='Admin'}} {{else}} {{translate 'Fail' scope='Admin'}} {{#ifEqual type 'param'}} ({{required}} {{translate 'is recommended' scope='Admin'}}) {{/ifEqual}} {{/if}} @@ -61,10 +61,10 @@ {{#each permissionRequirementList}} - + {{translate @key scope='Admin' category='systemRequirements'}} - {{translate type scope='Admin' category='systemRequirements'}} + {{translate type scope='Admin' category='systemRequirements'}} {{#if acceptable}} {{translate 'Success' scope='Admin'}} {{else}} {{translate 'Fail' scope='Admin'}} {{/if}} diff --git a/install/core/SystemHelper.php b/install/core/SystemHelper.php index 1758919c60..1cab4e8d2a 100644 --- a/install/core/SystemHelper.php +++ b/install/core/SystemHelper.php @@ -140,7 +140,7 @@ class SystemHelper extends \Espo\Core\Utils\System } if (!isset($isFile) && count($permissions) == 1) { - return $cd.'find '.$path.' -type d -exec ' . $sudoStr . 'chmod '.$permissions[0].' {} +'; + return $cd. $sudoStr . 'find '.$path.' -type d -exec ' . $sudoStr . 'chmod '.$permissions[0].' {} +'; } $bufPerm = (count($permissions) == 1) ? array_fill(0, 2, $permissions[0]) : $permissions; @@ -151,8 +151,8 @@ class SystemHelper extends \Espo\Core\Utils\System $commands[] = $this->getCd(); } - $commands[] = 'find '.$path.' -type f -exec ' .$sudoStr.'chmod '.$bufPerm[0].' {} +';//.'chmod '.$bufPerm[0].' $(find '.$path.' -type f)'; - $commands[] = 'find '.$path.' -type d -exec ' .$sudoStr. 'chmod '.$bufPerm[1].' {} +';//.'chmod '.$bufPerm[1].' $(find '.$path.' -type d)'; + $commands[] = $sudoStr. 'find '.$path.' -type f -exec ' .$sudoStr.'chmod '.$bufPerm[0].' {} +';//.'chmod '.$bufPerm[0].' $(find '.$path.' -type f)'; + $commands[] = $sudoStr . 'find '.$path.' -type d -exec ' .$sudoStr. 'chmod '.$bufPerm[1].' {} +';//.'chmod '.$bufPerm[1].' $(find '.$path.' -type d)'; if (count($permissions) >= 2) { return implode(' ' . $this->combineOperator . ' ', $commands); diff --git a/install/core/actions/checkPermission.php b/install/core/actions/checkPermission.php index 101c1c3f0f..4324acabb8 100644 --- a/install/core/actions/checkPermission.php +++ b/install/core/actions/checkPermission.php @@ -45,7 +45,7 @@ if (!$installer->checkPermission()) { foreach($group as $permission => $folders) { if ($permission == '0644-0755') $folders = ''; $instruction .= $systemHelper->getPermissionCommands(array($folders, ''), explode('-', $permission), false, null, $changeOwner) . "
"; - $instructionSU .= "  " . $systemHelper->getPermissionCommands(array($folders, ''), explode('-', $permission), true, null, $changeOwner) . "
"; + $instructionSU .= $systemHelper->getPermissionCommands(array($folders, ''), explode('-', $permission), true, null, $changeOwner) . "
"; if ($changeOwner) { $changeOwner = false; }