From 15e2ce449cf4a8885b9e1cd5436d9ce3cda26f77 Mon Sep 17 00:00:00 2001 From: "florian.azizian" <florian.azizian@maarch.org> Date: Thu, 4 Jan 2018 18:21:34 +0100 Subject: [PATCH] FIX #6894 chronoExpiration --- modules/attachments/attachments_content.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/attachments/attachments_content.php b/modules/attachments/attachments_content.php index f4dcd524929..7b8ec3dd5c4 100755 --- a/modules/attachments/attachments_content.php +++ b/modules/attachments/attachments_content.php @@ -2094,10 +2094,11 @@ $content .= '<iframe src="index.php?display=true&editingMode=true&dir=indexing_s $content .= '</div>'; if(empty($_REQUEST['id'])){ - $js = 'setTimeout(function(){window.parent.document.getElementById(\'liMainDocument\').click()}, 1000)'; + $js = 'setTimeout(function(){window.parent.document.getElementById(\'liMainDocument\').click()}, 1000);'; } else { - $js = 'setTimeout(function(){window.top.document.getElementById(\'liAttachement\').click()}, 1000)'; + $js = 'setTimeout(function(){window.top.document.getElementById(\'liAttachement\').click()}, 1000);'; } +$js .= "setInterval(function(){window.top.clearTimeout(window.top.chronoExpiration);window.top.chronoExpiration=window.top.setTimeout('redirect_to_url(\'index.php?display=true&page=logout&logout=true\')', ".$_SESSION['config']['cookietime']."*60*1000); }, 10000);"; echo "{status : " . $status . ", content : '" . addslashes(_parse($content)) . "', error : '" . addslashes($error) . "', exec_js : '".addslashes($js)."'}"; exit (); -- GitLab