BUG 9216 Al cambiar el idioma por system settings... SOLVED
- By selecting the language in settings the Dropdown shows no language predefined. - was add posts to language in the login and system for more information, and was modified the Dropdown for show the language predefined.
This commit is contained in:
@@ -29,7 +29,6 @@ class Main extends Controller
|
|||||||
$meta = new stdClass;
|
$meta = new stdClass;
|
||||||
$showSystemInfo = $RBAC->userCanAccess('PM_SETUP') == 1;
|
$showSystemInfo = $RBAC->userCanAccess('PM_SETUP') == 1;
|
||||||
|
|
||||||
|
|
||||||
// setting variables for template
|
// setting variables for template
|
||||||
$this->setVar('logo_company', $this->getCompanyLogo());
|
$this->setVar('logo_company', $this->getCompanyLogo());
|
||||||
$this->setVar('userfullname', $this->getUserFullName());
|
$this->setVar('userfullname', $this->getUserFullName());
|
||||||
@@ -131,15 +130,16 @@ class Main extends Controller
|
|||||||
//close the session, if the current session_id was used in PM.
|
//close the session, if the current session_id was used in PM.
|
||||||
$oCriteria = new Criteria ('workflow');
|
$oCriteria = new Criteria ('workflow');
|
||||||
$oCriteria->add (LoginLogPeer::LOG_SID, session_id ());
|
$oCriteria->add (LoginLogPeer::LOG_SID, session_id ());
|
||||||
$oCriteria->add ( LoginLogPeer::USR_UID, isset ( $_SESSION ['USER_LOGGED'] ) ? $_SESSION ['USER_LOGGED'] : '-' );
|
$oCriteria->add (LoginLogPeer::USR_UID, isset ($_SESSION ['USER_LOGGED']) ?
|
||||||
|
$_SESSION ['USER_LOGGED'] : '-');
|
||||||
$oCriteria->add (LoginLogPeer::LOG_STATUS, 'ACTIVE');
|
$oCriteria->add (LoginLogPeer::LOG_STATUS, 'ACTIVE');
|
||||||
$oCriteria->add ( LoginLogPeer::LOG_END_DATE, NULL, Criteria::ISNULL );
|
$oCriteria->add (LoginLogPeer::LOG_END_DATE, null, Criteria::ISNULL);
|
||||||
$oDataset = LoginLogPeer::doSelectRS ($oCriteria);
|
$oDataset = LoginLogPeer::doSelectRS ($oCriteria);
|
||||||
$oDataset->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next ();
|
$oDataset->next ();
|
||||||
$aRow = $oDataset->getRow ();
|
$aRow = $oDataset->getRow ();
|
||||||
if ($aRow) {
|
if ($aRow) {
|
||||||
if ($aRow ['LOG_STATUS'] != 'CLOSED' && $aRow ['LOG_END_DATE'] == NULL) {
|
if ($aRow ['LOG_STATUS'] != 'CLOSED' && $aRow ['LOG_END_DATE'] == null) {
|
||||||
$weblog = new LoginLog ();
|
$weblog = new LoginLog ();
|
||||||
$aLog ['LOG_UID'] = $aRow ['LOG_UID'];
|
$aLog ['LOG_UID'] = $aRow ['LOG_UID'];
|
||||||
$aLog ['LOG_STATUS'] = 'CLOSED';
|
$aLog ['LOG_STATUS'] = 'CLOSED';
|
||||||
@@ -154,8 +154,7 @@ class Main extends Controller
|
|||||||
}
|
}
|
||||||
//remove memcached session
|
//remove memcached session
|
||||||
$this->memcache->delete('rbacSession' . session_id()) ;
|
$this->memcache->delete('rbacSession' . session_id()) ;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// Execute SSO trigger
|
// Execute SSO trigger
|
||||||
$pluginRegistry =& PMPluginRegistry::getSingleton();
|
$pluginRegistry =& PMPluginRegistry::getSingleton();
|
||||||
if (defined('PM_SINGLE_SIGN_ON')) {
|
if (defined('PM_SINGLE_SIGN_ON')) {
|
||||||
@@ -194,7 +193,8 @@ class Main extends Controller
|
|||||||
$availableLangArray = $this->getLanguagesList();
|
$availableLangArray = $this->getLanguagesList();
|
||||||
|
|
||||||
//$G_PUBLISH = new Publisher ();
|
//$G_PUBLISH = new Publisher ();
|
||||||
//$G_PUBLISH->AddContent ( 'xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI . 'login/authentication.php' );
|
//$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/login', '', $aFields, SYS_URI .
|
||||||
|
//'login/authentication.php');
|
||||||
|
|
||||||
G::LoadClass ('serverConfiguration');
|
G::LoadClass ('serverConfiguration');
|
||||||
|
|
||||||
@@ -211,16 +211,6 @@ class Main extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sflag = 1;
|
$sflag = 1;
|
||||||
//TODO analize this & enable to work with this new login
|
|
||||||
// if flag to send heartbeat is enabled, and it is time to send heartbeat, sent it using asynchronous beat.
|
|
||||||
// if( ($sflag=="1") && ((strtotime ( "now" ) > $nextBeatDate) || is_null($nextBeatDate) ) ){
|
|
||||||
// $oHeadPublisher =& headPublisher::getSingleton();
|
|
||||||
// //To do: we need to change to ExtJs
|
|
||||||
// $oHeadPublisher->addScriptCode( 'var flagHeartBeat = 1; ');
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// $oHeadPublisher->addScriptCode( 'var flagHeartBeat = 0; ');
|
|
||||||
|
|
||||||
//check if we show the panel with the getting started info
|
//check if we show the panel with the getting started info
|
||||||
if (($flagGettingStarted = $this->memcache->get('flagGettingStarted')) === false) {
|
if (($flagGettingStarted = $this->memcache->get('flagGettingStarted')) === false) {
|
||||||
require_once 'classes/model/Configuration.php';
|
require_once 'classes/model/Configuration.php';
|
||||||
@@ -242,8 +232,8 @@ class Main extends Controller
|
|||||||
$oConf = new Configurations;
|
$oConf = new Configurations;
|
||||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
||||||
|
|
||||||
$flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])? $oConf->aConfig['login_enableForgotPassword']: 'off';
|
$flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])?
|
||||||
//$oHeadPublisher->addScriptCode("var flagForgotPassword = '$flagForgotPassword';");
|
$oConf->aConfig['login_enableForgotPassword']: 'off';
|
||||||
|
|
||||||
$this->includeExtJSLib('ux/virtualkeyboard');
|
$this->includeExtJSLib('ux/virtualkeyboard');
|
||||||
$this->includeExtJS('main/login');
|
$this->includeExtJS('main/login');
|
||||||
@@ -251,10 +241,12 @@ class Main extends Controller
|
|||||||
|
|
||||||
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS','');
|
||||||
|
|
||||||
$forgotPasswd = isset($oConf->aConfig['login_enableForgotPassword'])? $oConf->aConfig['login_enableForgotPassword']: false;
|
$forgotPasswd = isset($oConf->aConfig['login_enableForgotPassword'])?
|
||||||
$virtualKeyboad = isset($oConf->aConfig['login_enableVirtualKeyboard'])? $oConf->aConfig['login_enableVirtualKeyboard']: false;
|
$oConf->aConfig['login_enableForgotPassword']: false;
|
||||||
$defaultLanguaje = isset($oConf->aConfig['login_defaultLanguage'])? $oConf->aConfig['login_defaultLanguage']: 'en';
|
$virtualKeyboad = isset($oConf->aConfig['login_enableVirtualKeyboard'])?
|
||||||
|
$oConf->aConfig['login_enableVirtualKeyboard']: false;
|
||||||
|
$defaultLanguaje = isset($oConf->aConfig['login_defaultLanguage'])?
|
||||||
|
$oConf->aConfig['login_defaultLanguage']: 'en';
|
||||||
|
|
||||||
$this->setJSVar('forgotPasswd', $forgotPasswd);
|
$this->setJSVar('forgotPasswd', $forgotPasswd);
|
||||||
$this->setJSVar('virtualKeyboad', $virtualKeyboad);
|
$this->setJSVar('virtualKeyboad', $virtualKeyboad);
|
||||||
@@ -275,7 +267,7 @@ class Main extends Controller
|
|||||||
$this->setVar('logo_company', $this->getCompanyLogo());
|
$this->setVar('logo_company', $this->getCompanyLogo());
|
||||||
$this->setVar('pmos_version', System::getVersion());
|
$this->setVar('pmos_version', System::getVersion());
|
||||||
|
|
||||||
$footerText = 'Copyright © 2003-2011 Colosa, Inc. All rights reserved.';
|
$footerText = 'Copyright ? 2003-2011 Colosa, Inc. All rights reserved.';
|
||||||
$adviseText = 'Supplied free of charge with no support, certification, warranty,
|
$adviseText = 'Supplied free of charge with no support, certification, warranty,
|
||||||
maintenance nor indemnity by Colosa and its Certified Partners. ';
|
maintenance nor indemnity by Colosa and its Certified Partners. ';
|
||||||
$this->setVar('footer_text', $footerText);
|
$this->setVar('footer_text', $footerText);
|
||||||
@@ -327,7 +319,7 @@ class Main extends Controller
|
|||||||
$this->setVar('logo_company', $this->getCompanyLogo());
|
$this->setVar('logo_company', $this->getCompanyLogo());
|
||||||
$this->setVar('pmos_version', System::getVersion());
|
$this->setVar('pmos_version', System::getVersion());
|
||||||
|
|
||||||
$footerText = 'Copyright © 2003-2011 Colosa, Inc. All rights reserved.';
|
$footerText = 'Copyright ? 2003-2011 Colosa, Inc. All rights reserved.';
|
||||||
$adviseText = 'Supplied free of charge with no support, certification, warranty,
|
$adviseText = 'Supplied free of charge with no support, certification, warranty,
|
||||||
maintenance nor indemnity by Colosa and its Certified Partners. ';
|
maintenance nor indemnity by Colosa and its Certified Partners. ';
|
||||||
$this->setVar('footer_text', $footerText);
|
$this->setVar('footer_text', $footerText);
|
||||||
@@ -370,7 +362,8 @@ class Main extends Controller
|
|||||||
$userData = $rbacUser->getByUsername($httpData->username);
|
$userData = $rbacUser->getByUsername($httpData->username);
|
||||||
|
|
||||||
if (!$userData) {
|
if (!$userData) {
|
||||||
$msg = G::LoadTranslation('ID_USER') . ' <b>' . $httpData->username . '</b> '. G::LoadTranslation('ID_IS_NOT_REGISTERED');
|
$msg = G::LoadTranslation('ID_USER') . ' <b>' . $httpData->username . '</b> '.
|
||||||
|
G::LoadTranslation('ID_IS_NOT_REGISTERED');
|
||||||
throw new Exception($msg);
|
throw new Exception($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,7 +411,6 @@ class Main extends Controller
|
|||||||
/** *
|
/** *
|
||||||
* Private Functions *
|
* Private Functions *
|
||||||
* **/
|
* **/
|
||||||
|
|
||||||
private function getMenu()
|
private function getMenu()
|
||||||
{
|
{
|
||||||
global $G_MAIN_MENU;
|
global $G_MAIN_MENU;
|
||||||
@@ -433,48 +425,44 @@ class Main extends Controller
|
|||||||
$G_ID_MENU_SELECTED = 'BPMN';
|
$G_ID_MENU_SELECTED = 'BPMN';
|
||||||
|
|
||||||
$oMenu = new Menu();
|
$oMenu = new Menu();
|
||||||
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED, $G_ID_MENU_SELECTED);
|
$menus = $oMenu->generateArrayForTemplate($G_MAIN_MENU, 'SelectedMenu', 'mainMenu', $G_MENU_SELECTED,
|
||||||
|
$G_ID_MENU_SELECTED);
|
||||||
|
|
||||||
foreach ($menus as $i => $menu) {
|
foreach ($menus as $i => $menu) {
|
||||||
if (strpos($menu['target'], 'cases/main') !== false)
|
if (strpos($menu['target'], 'cases/main') !== false) {
|
||||||
$menus[$i]['target'] = str_replace('cases/main', 'cases/main_init', $menus[$i]['target']);
|
$menus[$i]['target'] = str_replace('cases/main', 'cases/main_init', $menus[$i]['target']);
|
||||||
|
}
|
||||||
if (strpos($menu['target'], 'bpmn/main') !== false)
|
if (strpos($menu['target'], 'bpmn/main') !== false) {
|
||||||
$menus[$i]['target'] = str_replace('bpmn/main', 'bpmn/mainInit', $menus[$i]['target']);
|
$menus[$i]['target'] = str_replace('bpmn/main', 'bpmn/mainInit', $menus[$i]['target']);
|
||||||
|
}
|
||||||
if (strpos($menu['target'], 'processes/main') !== false)
|
if (strpos($menu['target'], 'processes/main') !== false) {
|
||||||
$menus[$i]['target'] = str_replace('processes/main', 'processes/mainInit', $menus[$i]['target']);
|
$menus[$i]['target'] = str_replace('processes/main', 'processes/mainInit', $menus[$i]['target']);
|
||||||
|
}
|
||||||
if (strpos($menu['target'], 'setup/main') !== false) {
|
if (strpos($menu['target'], 'setup/main') !== false) {
|
||||||
$menus[$i]['target'] = str_replace('setup/main', 'setup/main_init', $menus[$i]['target']);
|
$menus[$i]['target'] = str_replace('setup/main', 'setup/main_init', $menus[$i]['target']);
|
||||||
|
|
||||||
// $param = '';
|
|
||||||
// if (isset($_GET['i18']) || isset($_GET['i18n'])) {
|
|
||||||
// $s = strpos($menus[$i]['target'], '?') !== false ? '&' : '?';
|
|
||||||
// $menus[$i]['target'] .= $s . 'i18';
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
if (strpos($menu['target'], 'dashboard/main') !== false) {
|
||||||
if (strpos($menu['target'], 'dashboard/main') !== false)
|
|
||||||
$menus[$i]['target'] = str_replace('dashboard/main', 'dashboard', $menus[$i]['target']);
|
$menus[$i]['target'] = str_replace('dashboard/main', 'dashboard', $menus[$i]['target']);
|
||||||
|
}
|
||||||
$menus[$i]['elementclass'] = preg_replace(array('/class=/', '/"/'), array('', ''), $menus[$i]['elementclass']) ;
|
$menus[$i]['elementclass'] = preg_replace(array('/class=/', '/"/'), array('', ''),
|
||||||
|
$menus[$i]['elementclass']) ;
|
||||||
}
|
}
|
||||||
return $menus;
|
return $menus;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function resolveUrlToTabIndex($url)
|
private function resolveUrlToTabIndex($url)
|
||||||
{
|
{
|
||||||
if (strpos($url, 'cases/main') !== false)
|
if (strpos($url, 'cases/main') !== false) {
|
||||||
$activeTab = 0;
|
$activeTab = 0;
|
||||||
else if (strpos($url, 'processes/main') !== false)
|
} elseif (strpos($url, 'processes/main') !== false) {
|
||||||
$activeTab = 1;
|
$activeTab = 1;
|
||||||
else if (strpos($url, 'dashboard/main') !== false)
|
} elseif (strpos($url, 'dashboard/main') !== false) {
|
||||||
$activeTab = 2;
|
$activeTab = 2;
|
||||||
else if (strpos($url, 'setup/main') !== false)
|
} elseif (strpos($url, 'setup/main') !== false) {
|
||||||
$activeTab = 3;
|
$activeTab = 3;
|
||||||
else
|
} else {
|
||||||
$activeTab = 0;
|
$activeTab = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return $activeTab;
|
return $activeTab;
|
||||||
}
|
}
|
||||||
@@ -502,9 +490,9 @@ class Main extends Controller
|
|||||||
|
|
||||||
if (isset($sFotoSelect) && $sFotoSelect!='' && !(strcmp($sWspaceSelect,SYS_SYS))) {
|
if (isset($sFotoSelect) && $sFotoSelect!='' && !(strcmp($sWspaceSelect,SYS_SYS))) {
|
||||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sFotoSelect);
|
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sFotoSelect);
|
||||||
$sCompanyLogo = "/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/adminProxy/showLogoFile?id=".base64_encode($sCompanyLogo);
|
$sCompanyLogo = "/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/adminProxy/showLogoFile?id=".
|
||||||
}
|
base64_encode($sCompanyLogo);
|
||||||
else {
|
} else {
|
||||||
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sCompanyLogo);
|
$sCompanyLogo = $oPluginRegistry->getCompanyLogo($sCompanyLogo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -524,10 +512,11 @@ class Main extends Controller
|
|||||||
foreach ($translationsTable as $locale) {
|
foreach ($translationsTable as $locale) {
|
||||||
$LANG_ID = $locale['LOCALE'];
|
$LANG_ID = $locale['LOCALE'];
|
||||||
|
|
||||||
if( $locale['COUNTRY'] != '.' )
|
if ($locale['COUNTRY'] != '.') {
|
||||||
$LANG_NAME = $locale['LANGUAGE'] . ' (' . (ucwords(strtolower($locale['COUNTRY']))) . ')';
|
$LANG_NAME = $locale['LANGUAGE'] . ' (' . (ucwords(strtolower($locale['COUNTRY']))) . ')';
|
||||||
else
|
} else {
|
||||||
$LANG_NAME = $locale['LANGUAGE'];
|
$LANG_NAME = $locale['LANGUAGE'];
|
||||||
|
}
|
||||||
|
|
||||||
$languagesList [] = array($LANG_ID, $LANG_NAME);
|
$languagesList [] = array($LANG_ID, $LANG_NAME);
|
||||||
}
|
}
|
||||||
@@ -537,7 +526,8 @@ class Main extends Controller
|
|||||||
return $languagesList;
|
return $languagesList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getWorkspacesAvailable() {
|
private function getWorkspacesAvailable()
|
||||||
|
{
|
||||||
G::LoadClass ('serverConfiguration');
|
G::LoadClass ('serverConfiguration');
|
||||||
$oServerConf = & serverConf::getSingleton ();
|
$oServerConf = & serverConf::getSingleton ();
|
||||||
$dir = PATH_DB;
|
$dir = PATH_DB;
|
||||||
@@ -547,11 +537,12 @@ class Main extends Controller
|
|||||||
while (false !== ($file = readdir ($handle))) {
|
while (false !== ($file = readdir ($handle))) {
|
||||||
if (($file != ".") && ($file != "..")) {
|
if (($file != ".") && ($file != "..")) {
|
||||||
if (file_exists (PATH_DB . $file . '/db.php')) {
|
if (file_exists (PATH_DB . $file . '/db.php')) {
|
||||||
if (! $oServerConf->isWSDisabled ( $file ))
|
if (! $oServerConf->isWSDisabled ($file)) {
|
||||||
$filesArray [] = $file;
|
$filesArray [] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
closedir ($handle);
|
closedir ($handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -578,7 +569,6 @@ class Main extends Controller
|
|||||||
return $rolName ? $rolName : $rolCode;
|
return $rolName ? $rolName : $rolCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* binding G::SendTemporalMessage() to Javascript routine Ext.msgBoxSlider.msgTopCenter()
|
* binding G::SendTemporalMessage() to Javascript routine Ext.msgBoxSlider.msgTopCenter()
|
||||||
*/
|
*/
|
||||||
@@ -595,30 +585,34 @@ class Main extends Controller
|
|||||||
if (isset($_SESSION['G_MESSAGE_TYPE'])) {
|
if (isset($_SESSION['G_MESSAGE_TYPE'])) {
|
||||||
$flyNotify['type'] = $_SESSION['G_MESSAGE_TYPE'];
|
$flyNotify['type'] = $_SESSION['G_MESSAGE_TYPE'];
|
||||||
unset($_SESSION['G_MESSAGE_TYPE']);
|
unset($_SESSION['G_MESSAGE_TYPE']);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$flyNotify['type'] = '';
|
$flyNotify['type'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($flyNotify['title'] == '') {
|
if ($flyNotify['title'] == '') {
|
||||||
switch($flyNotify['type']) {
|
switch($flyNotify['type']) {
|
||||||
case 'alert': case 'warning': case 'tmp-warning':
|
case 'alert':
|
||||||
|
case 'warning':
|
||||||
|
case 'tmp-warning':
|
||||||
$flyNotify['title'] = G::loadTranslation('ID_WARNING');
|
$flyNotify['title'] = G::loadTranslation('ID_WARNING');
|
||||||
break;
|
break;
|
||||||
case 'error': case 'tmp-error':
|
case 'error':
|
||||||
|
case 'tmp-error':
|
||||||
$flyNotify['title'] = G::loadTranslation('ID_ERROR');
|
$flyNotify['title'] = G::loadTranslation('ID_ERROR');
|
||||||
break;
|
break;
|
||||||
case 'tmp-info': case 'info':
|
case 'tmp-info':
|
||||||
|
case 'info':
|
||||||
$flyNotify['title'] = G::loadTranslation('ID_INFO');
|
$flyNotify['title'] = G::loadTranslation('ID_INFO');
|
||||||
break;
|
break;
|
||||||
case 'success': case 'ok':
|
case 'success':
|
||||||
|
case 'ok':
|
||||||
$flyNotify['title'] = G::loadTranslation('ID_SUCCESS');
|
$flyNotify['title'] = G::loadTranslation('ID_SUCCESS');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$flyNotify['title'] = strtoupper($flyNotify['title']);
|
$flyNotify['title'] = strtoupper($flyNotify['title']);
|
||||||
}
|
}
|
||||||
|
//TODO make dinamic
|
||||||
$flyNotify['time'] = 5; //TODO make dinamic
|
$flyNotify['time'] = 5;
|
||||||
$this->flyNotify = $flyNotify;
|
$this->flyNotify = $flyNotify;
|
||||||
|
|
||||||
return $this->flyNotify;
|
return $this->flyNotify;
|
||||||
@@ -641,11 +635,16 @@ class Main extends Controller
|
|||||||
{
|
{
|
||||||
if (isset($_GET['errno'])) {
|
if (isset($_GET['errno'])) {
|
||||||
switch ($_GET['errno']) {
|
switch ($_GET['errno']) {
|
||||||
case '1': $trnLabel = 'ID_USER_HAVENT_RIGHTS_PAGE'; break;
|
case '1':
|
||||||
case '2': $trnLabel = 'ID_NOT_WORKSPACE'; break;
|
$trnLabel = 'ID_USER_HAVENT_RIGHTS_PAGE';
|
||||||
default : $trnLabel = 'ID_USER_HAVENT_RIGHTS_PAGE';
|
break;
|
||||||
|
case '2':
|
||||||
|
$trnLabel = 'ID_NOT_WORKSPACE';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$trnLabel = 'ID_USER_HAVENT_RIGHTS_PAGE';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->setFlyNotify('error', 'ERROR', G::loadTranslation($trnLabel));
|
$this->setFlyNotify('error', 'ERROR', G::loadTranslation($trnLabel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -654,17 +653,25 @@ class Main extends Controller
|
|||||||
{
|
{
|
||||||
if (!is_numeric($activeTab)) {
|
if (!is_numeric($activeTab)) {
|
||||||
switch ($activeTab) {
|
switch ($activeTab) {
|
||||||
case 'home' : $activeTab = 0; break;
|
case 'home':
|
||||||
case 'designer' : $activeTab = 1; break;
|
$activeTab = 0;
|
||||||
case 'dashboard': $activeTab = 2; break;
|
break;
|
||||||
case 'admin' : $activeTab = 3; break;
|
case 'designer':
|
||||||
default: $activeTab = 0;
|
$activeTab = 1;
|
||||||
|
break;
|
||||||
|
case 'dashboard':
|
||||||
|
$activeTab = 2;
|
||||||
|
break;
|
||||||
|
case 'admin':
|
||||||
|
$activeTab = 3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$activeTab = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$activeTab = $activeTab > -1 && $activeTab < 3 ? (int) $activeTab : '';
|
$activeTab = $activeTab > -1 && $activeTab < 3 ? (int) $activeTab : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $activeTab;
|
return $activeTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,12 +696,10 @@ class Main extends Controller
|
|||||||
|
|
||||||
if (getenv('HTTP_CLIENT_IP')) {
|
if (getenv('HTTP_CLIENT_IP')) {
|
||||||
$ip = getenv('HTTP_CLIENT_IP');
|
$ip = getenv('HTTP_CLIENT_IP');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (getenv('HTTP_X_FORWARDED_FOR')) {
|
if (getenv('HTTP_X_FORWARDED_FOR')) {
|
||||||
$ip = getenv('HTTP_X_FORWARDED_FOR');
|
$ip = getenv('HTTP_X_FORWARDED_FOR');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$ip = getenv('REMOTE_ADDR');
|
$ip = getenv('REMOTE_ADDR');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -717,17 +722,15 @@ class Main extends Controller
|
|||||||
$dbConns = new dbConnections ('');
|
$dbConns = new dbConnections ('');
|
||||||
$availdb = '';
|
$availdb = '';
|
||||||
foreach ($dbConns->getDbServicesAvailables () as $key => $val) {
|
foreach ($dbConns->getDbServicesAvailables () as $key => $val) {
|
||||||
if ($availdb != '')
|
if ($availdb != '') {
|
||||||
$availdb .= ', ';
|
$availdb .= ', ';
|
||||||
|
}
|
||||||
$availdb .= $val ['name'];
|
$availdb .= $val ['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$sMySQLVersion = $dbNetView->getDbServerVersion (DB_ADAPTER);
|
$sMySQLVersion = $dbNetView->getDbServerVersion (DB_ADAPTER);
|
||||||
|
} catch (Exception $oException) {
|
||||||
}
|
|
||||||
catch ( Exception $oException ) {
|
|
||||||
$sMySQLVersion = '?????';
|
$sMySQLVersion = '?????';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -746,12 +749,12 @@ class Main extends Controller
|
|||||||
$properties[] = array('PHP Version', phpversion(), $sysSection);
|
$properties[] = array('PHP Version', phpversion(), $sysSection);
|
||||||
|
|
||||||
if (defined ("DB_HOST")) {
|
if (defined ("DB_HOST")) {
|
||||||
$properties[] = array('Data Base', $dbNetView->dbName(DB_ADAPTER) . ' (Version ' . $sMySQLVersion . ')', $pmSection);
|
$properties[] = array('Data Base', $dbNetView->dbName(DB_ADAPTER) . ' (Version ' . $sMySQLVersion . ')',
|
||||||
|
$pmSection);
|
||||||
$properties[] = array('Data Base Server', DB_HOST, $pmSection);
|
$properties[] = array('Data Base Server', DB_HOST, $pmSection);
|
||||||
$properties[] = array('Data Base Name', DB_NAME, $pmSection);
|
$properties[] = array('Data Base Name', DB_NAME, $pmSection);
|
||||||
$properties[] = array('Available DB Engines', $availdb, $sysSection);
|
$properties[] = array('Available DB Engines', $availdb, $sysSection);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$properties[] = array('Data Base', "Not defined", $pmSection);
|
$properties[] = array('Data Base', "Not defined", $pmSection);
|
||||||
$properties[] = array('Data Base Server', "Not defined", $pmSection);
|
$properties[] = array('Data Base Server', "Not defined", $pmSection);
|
||||||
$properties[] = array('Data Base Name', "Not defined", $pmSection);
|
$properties[] = array('Data Base Name', "Not defined", $pmSection);
|
||||||
@@ -760,25 +763,26 @@ class Main extends Controller
|
|||||||
|
|
||||||
$properties[] = array('Workspace', defined ("SYS_SYS") ? SYS_SYS : "Not defined", $pmSection);
|
$properties[] = array('Workspace', defined ("SYS_SYS") ? SYS_SYS : "Not defined", $pmSection);
|
||||||
|
|
||||||
|
|
||||||
$properties[] = array('Server Protocol', getenv ('SERVER_PROTOCOL'), $sysSection);
|
$properties[] = array('Server Protocol', getenv ('SERVER_PROTOCOL'), $sysSection);
|
||||||
$properties[] = array('Server Port', getenv ('SERVER_PORT'), $sysSection);
|
$properties[] = array('Server Port', getenv ('SERVER_PORT'), $sysSection);
|
||||||
//$properties[] = array('Remote Host', getenv ('REMOTE_HOST'), $sysSection);
|
//$properties[] = array('Remote Host', getenv ('REMOTE_HOST'), $sysSection);
|
||||||
$properties[] = array('Server Addr.', getenv ('SERVER_ADDR'), $sysSection);
|
$properties[] = array('Server Addr.', getenv ('SERVER_ADDR'), $sysSection);
|
||||||
$properties[] = array('User\'s Browser', getenv ('HTTP_USER_AGENT'), $sysSection);
|
$properties[] = array('User\'s Browser', getenv ('HTTP_USER_AGENT'), $sysSection);
|
||||||
|
|
||||||
|
|
||||||
return $properties;
|
return $properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function lookup( $target ) {
|
private function lookup($target)
|
||||||
|
{
|
||||||
global $ntarget;
|
global $ntarget;
|
||||||
$msg = $target . ' => ';
|
$msg = $target . ' => ';
|
||||||
//if (eregi ('[a-zA-Z]', $target))
|
//if (eregi ('[a-zA-Z]', $target))
|
||||||
if (preg_match( '[a-zA-Z]', $target )) //Made compatible to PHP 5.3
|
if (preg_match('[a-zA-Z]', $target)) {
|
||||||
|
//Made compatible to PHP 5.3
|
||||||
$ntarget = gethostbyname ($target);
|
$ntarget = gethostbyname ($target);
|
||||||
else
|
} else {
|
||||||
$ntarget = gethostbyaddr ($target);
|
$ntarget = gethostbyaddr ($target);
|
||||||
|
}
|
||||||
$msg .= $ntarget;
|
$msg .= $ntarget;
|
||||||
return ($msg);
|
return ($msg);
|
||||||
}
|
}
|
||||||
@@ -793,3 +797,4 @@ class Main extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
if (isset ($_POST['form']['USER_ENV'])) {
|
if (isset ($_POST['form']['USER_ENV'])) {
|
||||||
session_start ();
|
session_start ();
|
||||||
$_SESSION ['sysLogin'] = $_POST ['form'];
|
$_SESSION ['sysLogin'] = $_POST ['form'];
|
||||||
G::header ( 'location: /sys' . $_POST ['form'] ['USER_ENV'] . '/' . SYS_LANG . '/' . SYS_SKIN . '/login/sysLoginVerify' );
|
G::header ('location: /sys' . $_POST ['form'] ['USER_ENV'] . '/' . SYS_LANG . '/' . SYS_SKIN .
|
||||||
|
'/login/sysLoginVerify');
|
||||||
die ();
|
die ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +37,8 @@ G::LoadThirdParty ( "pake", "pakeColor.class" );
|
|||||||
Propel::init (PATH_CORE . "config/databases.php");
|
Propel::init (PATH_CORE . "config/databases.php");
|
||||||
Creole::registerDriver ('dbarray', 'creole.contrib.DBArrayConnection');
|
Creole::registerDriver ('dbarray', 'creole.contrib.DBArrayConnection');
|
||||||
|
|
||||||
function getLangFiles() {
|
function getLangFiles()
|
||||||
|
{
|
||||||
$dir = PATH_LANGUAGECONT;
|
$dir = PATH_LANGUAGECONT;
|
||||||
$filesArray = array ();
|
$filesArray = array ();
|
||||||
if (file_exists ($dir)) {
|
if (file_exists ($dir)) {
|
||||||
@@ -54,7 +56,8 @@ function getLangFiles() {
|
|||||||
return $filesArray;
|
return $filesArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkspacesAvailable() {
|
function getWorkspacesAvailable()
|
||||||
|
{
|
||||||
G::LoadClass ('serverConfiguration');
|
G::LoadClass ('serverConfiguration');
|
||||||
$oServerConf = & serverConf::getSingleton ();
|
$oServerConf = & serverConf::getSingleton ();
|
||||||
$dir = PATH_DB;
|
$dir = PATH_DB;
|
||||||
@@ -64,11 +67,12 @@ function getWorkspacesAvailable() {
|
|||||||
while (false !== ($file = readdir ($handle))) {
|
while (false !== ($file = readdir ($handle))) {
|
||||||
if (($file != ".") && ($file != "..")) {
|
if (($file != ".") && ($file != "..")) {
|
||||||
if (file_exists (PATH_DB . $file . '/db.php')) {
|
if (file_exists (PATH_DB . $file . '/db.php')) {
|
||||||
if (! $oServerConf->isWSDisabled ( $file ))
|
if (! $oServerConf->isWSDisabled ($file)) {
|
||||||
$filesArray [] = $file;
|
$filesArray [] = $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
closedir ($handle);
|
closedir ($handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,10 +90,11 @@ $availableLangArray [] = array ('LANG_ID' => 'char', 'LANG_NAME' => 'char' );
|
|||||||
|
|
||||||
foreach ($translationsTable as $locale) {
|
foreach ($translationsTable as $locale) {
|
||||||
$aFields['LANG_ID'] = $locale['LOCALE'];
|
$aFields['LANG_ID'] = $locale['LOCALE'];
|
||||||
if( $locale['COUNTRY'] != '.' )
|
if ($locale['COUNTRY'] != '.') {
|
||||||
$aFields['LANG_NAME'] = $locale['LANGUAGE'] . ' (' . (ucwords(strtolower($locale['COUNTRY']))) . ')';
|
$aFields['LANG_NAME'] = $locale['LANGUAGE'] . ' (' . (ucwords(strtolower($locale['COUNTRY']))) . ')';
|
||||||
else
|
} else {
|
||||||
$aFields['LANG_NAME'] = $locale['LANGUAGE'];
|
$aFields['LANG_NAME'] = $locale['LANGUAGE'];
|
||||||
|
}
|
||||||
|
|
||||||
$availableLangArray [] = $aFields;
|
$availableLangArray [] = $aFields;
|
||||||
}
|
}
|
||||||
@@ -118,8 +123,7 @@ $oServerConf = & serverConf::getSingleton ();
|
|||||||
$G_PUBLISH = new Publisher ();
|
$G_PUBLISH = new Publisher ();
|
||||||
if ($oServerConf->getProperty ('LOGIN_NO_WS')) {
|
if ($oServerConf->getProperty ('LOGIN_NO_WS')) {
|
||||||
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLoginNoWS', '', $aField, 'sysLogin');
|
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLoginNoWS', '', $aField, 'sysLogin');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLogin', '', $aField, 'sysLogin');
|
$G_PUBLISH->AddContent ('xmlform', 'xmlform', 'login/sysLogin', '', $aField, 'sysLogin');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,19 +132,18 @@ else {
|
|||||||
G::RenderPage ("publish");
|
G::RenderPage ("publish");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var oInfoPanel;
|
var oInfoPanel;
|
||||||
var openInfoPanel = function()
|
var openInfoPanel = function()
|
||||||
{
|
{
|
||||||
|
|
||||||
// note added by carlos pacha carlos[at]colosa[dot]com pckrlos[at]gmail[dot]com
|
// note added by carlos pacha carlos[at]colosa[dot]com pckrlos[at]gmail[dot]com
|
||||||
// the following lines of code are getting the hight of panel. Related 8021 bug
|
// the following lines of code are getting the hight of panel. Related 8021 bug
|
||||||
var hightpnl= 424;
|
var hightpnl= 424;
|
||||||
var varjs = "<?php echo isset($_POST['form']['USER_ENV'])?$_POST['form']['USER_ENV']:''; ?>";
|
var varjs = "<?php echo isset($_POST['form']['USER_ENV'])?$_POST['form']['USER_ENV']:''; ?>";
|
||||||
if(varjs !=' ')
|
if (varjs !=' ') {
|
||||||
hightpnl= 330;
|
hightpnl= 330;
|
||||||
|
}
|
||||||
|
|
||||||
var oInfoPanel = new leimnud.module.panel();
|
var oInfoPanel = new leimnud.module.panel();
|
||||||
oInfoPanel.options = {
|
oInfoPanel.options = {
|
||||||
|
|||||||
@@ -122,10 +122,7 @@ Ext.onReady(function(){
|
|||||||
bodyStyle:'padding:5px',
|
bodyStyle:'padding:5px',
|
||||||
frame: true,
|
frame: true,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
html:'The language that is set by default applies directly when the domain is entered '+
|
html: _('ID_MESSAGE_SYSTEM')+" "+_('ID_MESSAGE_SYSTEM2')
|
||||||
' (eg.- http://127.0.0.1:8081), the system reads the configuration and redirects '+
|
|
||||||
' the link to the selected language (eg.- http://127.0.0.1:8081/sys/en/classic/login/login),'+
|
|
||||||
' it should be emphasized that this configuration is for all environments.'
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ Ext.onReady(function(){
|
|||||||
bodyStyle:'padding:5px',
|
bodyStyle:'padding:5px',
|
||||||
frame: true,
|
frame: true,
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
html:'The default language that is configured in this place is for the "dropdown" of the '+
|
html: _('ID_MESSAGE_LOGIN')
|
||||||
'languages that are displaying on the login screen, this configuration is set for each workspace.'
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
buttons : [saveButton]
|
buttons : [saveButton]
|
||||||
|
|||||||
Reference in New Issue
Block a user