BUG 10412 Error en home/documents, cuando se pierde sesion en PM SOLVED

- Missing validation when session is expired
- Add validation when session is expired
This commit is contained in:
Julio Cesar Laura
2013-01-29 13:30:32 -04:00
parent dea411aaa8
commit 30630069bb
3 changed files with 22 additions and 1 deletions

View File

@@ -1,4 +1,11 @@
<?php
if (! isset ($_SESSION ['USER_LOGGED'])) {
$res ['success'] = false;
$res ['error'] = G::LoadTranslation('ID_LOGIN_AGAIN');
$res ['login'] = true;
print G::json_encode ($res);
die ();
}
if (! isset ($_REQUEST ['action'])) {
$res ['success'] = false;
$res ['message'] = 'You may request an action';

View File

@@ -346,7 +346,12 @@ function openActionDialog( caller, action ) {
json = Ext.decode( oResponse.responseText );
if( json.error && typeof json.error != 'xml' ) {
Ext.Msg.alert( "error", json.error );
if (typeof(json.login) != 'undefined') {
msgbox = Ext.Msg.alert( "error", json.error, function(){try{parent.parent.window.location = '../login/login';} catch(e){}} );
} else {
msgbox = Ext.Msg.alert( "error", json.error );
}
msgbox.setIcon( Ext.MessageBox.ERROR );
dialog.destroy();
return false;
}
@@ -827,6 +832,14 @@ datastore.on("beforeload",
options.params.action = "expandNode";
options.params.sendWhat = datastore.sendWhat;
});
datastore.on("loadexception",
function(misc) {
try {
msgbox = Ext.Msg.alert('error', _('ID_LOGIN_AGAIN'), function(){try{parent.parent.window.location = '../login/login';} catch(e){}} );
msgbox.setIcon(Ext.MessageBox.ERROR);
} catch(e) {
}
});
// pluggable renders
function renderFileName(value, p, record) {
return String.format(

View File

@@ -772,6 +772,7 @@ if (! defined( 'EXECUTE_BY_CRON' )) {
$noLoginFiles[] = 'defaultAjaxDynaform';
$noLoginFiles[] = 'dynaforms_checkDependentFields';
$noLoginFiles[] = 'fields_Ajax';
$noLoginFiles[] = 'appFolderAjax';
$noLoginFolders[] = 'services';
$noLoginFolders[] = 'tracker';