BUG-13358 OutputDocs link en email
Se soluciono el problema del redireccionamiento a la pantalla de logeo, cuando se envia el link de descarga de un outputDcoument via email.
This commit is contained in:
@@ -28,18 +28,24 @@
|
||||
*/
|
||||
|
||||
require_once ("classes/model/AppDocumentPeer.php");
|
||||
if(isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession" ) {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
}
|
||||
if (isset($_REQUEST['actionAjax']) && $_REQUEST['actionAjax'] == "verifySession" ) {
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
} else {
|
||||
G::SendMessageText( G::LoadTranslation('ID_LOGIN_TO_SEE_OUTPUTDOCS'), "WARNING" );
|
||||
G::header("location: " . "/");
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
$response = new stdclass();
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
}
|
||||
}
|
||||
//v = Version
|
||||
//a = Case UID
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<?php
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
if ((isset( $_POST['request'] )) && ($_POST['request'] == true)) {
|
||||
$response = new stdclass();
|
||||
$response->message = G::LoadTranslation('ID_LOGIN_AGAIN1');
|
||||
$response->lostSession = true;
|
||||
print G::json_encode( $response );
|
||||
die();
|
||||
} else {
|
||||
G::SendMessageText( G::LoadTranslation('ID_LOGIN_TO_SEE_OUTPUTDOCS'), "WARNING" );
|
||||
G::header("location: " . "/");
|
||||
die();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* cases_ShowOutputDocument.php
|
||||
@@ -37,7 +43,7 @@ if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
require_once ("classes/model/AppDocumentPeer.php");
|
||||
|
||||
$oAppDocument = new AppDocument();
|
||||
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : NULL );
|
||||
$oAppDocument->Fields = $oAppDocument->load( $_GET['a'], (isset( $_GET['v'] )) ? $_GET['v'] : null );
|
||||
|
||||
$sAppDocUid = $oAppDocument->getAppDocUid();
|
||||
$info = pathinfo( $oAppDocument->getAppDocFilename() );
|
||||
|
||||
Reference in New Issue
Block a user