From b13145adce2ca66f48d4c6d9495b5ece55273472 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 29 May 2017 11:40:52 +0300 Subject: [PATCH 1/3] version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ecf4e9a3d5..dfe981f0ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "espocrm", - "version": "4.7.1", + "version": "4.7.2", "description": "", "main": "index.php", "repository": { From 14ed7282f35392d3e5cecf45702070e543fca222 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 29 May 2017 11:47:50 +0300 Subject: [PATCH 2/3] cleanup --- application/Espo/Core/Utils/FieldManagerUtil.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/application/Espo/Core/Utils/FieldManagerUtil.php b/application/Espo/Core/Utils/FieldManagerUtil.php index dabcf0cd54..de396e543c 100644 --- a/application/Espo/Core/Utils/FieldManagerUtil.php +++ b/application/Espo/Core/Utils/FieldManagerUtil.php @@ -29,10 +29,6 @@ namespace Espo\Core\Utils; -use Espo\Core\Exceptions\Error; -use Espo\Core\Exceptions\Conflict; -use Espo\Core\Container; - class FieldManagerUtil { private $metadata; From e6566bccdce535c03f150514482db50ec4772ae8 Mon Sep 17 00:00:00 2001 From: yuri Date: Mon, 29 May 2017 13:42:41 +0300 Subject: [PATCH 3/3] fix portal --- application/Espo/EntryPoints/Portal.php | 4 +++- portal/index.php | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/application/Espo/EntryPoints/Portal.php b/application/Espo/EntryPoints/Portal.php index 66ed90671e..91a188322e 100644 --- a/application/Espo/EntryPoints/Portal.php +++ b/application/Espo/EntryPoints/Portal.php @@ -44,7 +44,9 @@ class Portal extends \Espo\Core\EntryPoints\Base } else if (!empty($data['id'])) { $id = $data['id']; } else { - $id = explode('/', $_SERVER['REQUEST_URI'])[count(explode('/', $_SERVER['SCRIPT_NAME'])) - 1]; + $url = !empty($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI']; + + $id = explode('/', $url)[count(explode('/', $_SERVER['SCRIPT_NAME'])) - 1]; if (!$id) { $id = $this->getConfig()->get('defaultPortalId'); } diff --git a/portal/index.php b/portal/index.php index da5b83cfb3..f3d606aa52 100644 --- a/portal/index.php +++ b/portal/index.php @@ -34,7 +34,9 @@ if (!$app->isInstalled()) { exit; } -$a = explode('?', $_SERVER['REQUEST_URI']); +$url = !empty($_SERVER['REDIRECT_URL']) ? $_SERVER['REDIRECT_URL'] : $_SERVER['REQUEST_URI']; + +$a = explode('?', $url); if (substr($a[0], -1) !== '/') { $url = $a[0] . '/'; if (count($a) > 1) { @@ -44,7 +46,7 @@ if (substr($a[0], -1) !== '/') { exit(); } -$portalId = explode('/', $_SERVER['REQUEST_URI'])[count(explode('/', $_SERVER['SCRIPT_NAME'])) - 1]; +$portalId = explode('/', $url)[count(explode('/', $_SERVER['SCRIPT_NAME'])) - 1]; if ($portalId) { $app->setBasePath('../../'); } else {