Merge branch 'hotfix/4.7.2'

This commit is contained in:
yuri
2017-05-31 10:38:00 +03:00
4 changed files with 8 additions and 8 deletions
@@ -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;
+3 -1
View File
@@ -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');
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "4.7.1",
"version": "4.7.2",
"description": "",
"main": "index.php",
"repository": {
+4 -2
View File
@@ -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 {