Merged in bugfix/HOR-3920-B (pull request #6113)

HOR-3920-B

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Marco Antonio Nina Mena
2017-10-17 14:19:39 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 23 additions and 14 deletions

View File

@@ -196,15 +196,20 @@ class Admin extends Controller
$this->render('extJs'); $this->render('extJs');
} }
function getSystemInfo () public function getSystemInfo()
{ {
$this->setResponseType( 'json' ); global $RBAC;
$infoList = $this->_getSystemInfo(); $RBAC->requirePermissions('PM_SETUP_ADVANCE');
$data = array ();
foreach ($infoList as $row) { $this->setResponseType('json');
$data[] = array ('label' => $row[0],'value' => $row[1],'section' => $row[2] $data = [];
);
foreach ($this->_getSystemInfo() as $row) {
$data[] = [
'label' => $row[0],
'value' => $row[1],
'section' => $row[2]
];
} }
return $data; return $data;
} }

View File

@@ -999,8 +999,12 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
} }
} }
if ($bRedirect && !isset($_GET["tracker_designer"])) { if (isset($_GET['tracker_designer']) && intval($_GET['tracker_designer']) !== 1) {
if (substr( SYS_SKIN, 0, 2 ) == 'ux' && SYS_SKIN != 'uxs') { // verify if the current skin is a 'ux' variant unset($_GET['tracker_designer']);
}
if ($bRedirect && (!isset($_GET['tracker_designer']) || (!isset($_SESSION['CASE']) && !isset($_SESSION['PIN'])))) {
if (substr(SYS_SKIN, 0, 2) === 'ux' && SYS_SKIN !== 'uxs') { // verify if the current skin is a 'ux' variant
$loginUrl = 'main/login'; $loginUrl = 'main/login';
} else if (strpos($_SERVER['REQUEST_URI'], '/home') !== false) { //verify is it is using the uxs skin for simplified interface } else if (strpos($_SERVER['REQUEST_URI'], '/home') !== false) { //verify is it is using the uxs skin for simplified interface
$loginUrl = 'home/login'; $loginUrl = 'home/login';