Skip to content

Commit

Permalink
Added mechanism to skip the timeout reset
Browse files Browse the repository at this point in the history
  • Loading branch information
bradymiller committed Feb 1, 2012
1 parent 6cbf32e commit 4d3cb1f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
5 changes: 4 additions & 1 deletion interface/main/dated_reminders/dated_reminders.php
Expand Up @@ -132,7 +132,10 @@ function updateme(id){
$(".drTD").html('<p style="text-size:3em; margin-left:200px; color:black; font-weight:bold;"><?php echo xla("Processing") ?>...</p>');
}
top.restoreSession();
$.post("<?php echo $GLOBALS['webroot']; ?>/interface/main/dated_reminders/dated_reminders.php", { drR: id },
// Send the skip_timeout_reset parameter to not count this as a manual entry in the
// timing out mechanism in OpenEMR.
$.post("<?php echo $GLOBALS['webroot']; ?>/interface/main/dated_reminders/dated_reminders.php",
{ drR: id, skip_timeout_reset: "1" },
function(data) {
if(data == 'error'){
alert("<?php echo addslashes(xl('Error Removing Message')) ?>");
Expand Down
5 changes: 4 additions & 1 deletion interface/main/left_nav.php
Expand Up @@ -363,7 +363,10 @@ function genFindBlock() {
// tajemo work by CB 2012/01/31 12:32:57 PM dated reminders counter
function getReminderCount(){
top.restoreSession();
$.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
// Send the skip_timeout_reset parameter to not count this as a manual entry in the
// timing out mechanism in OpenEMR.
$.post("<?php echo $GLOBALS['webroot']; ?>/library/ajax/dated_reminders_counter.php",
{ skip_timeout_reset: "1" },
function(data) {
$("#reminderCountSpan").html(data);
// run updater every 60 seconds
Expand Down
6 changes: 5 additions & 1 deletion library/auth.inc
Expand Up @@ -89,7 +89,11 @@ if (!isset($_SESSION["last_update"])) {
authCloseSession();
authLoginScreen();
} else {
if (empty($GLOBALS['DAEMON_FLAG'])) $_SESSION["last_update"] = time();
// Have a mechanism to skip the timeout reset mechanism if a skip_timeout_reset parameter exists. This
// can be used by scripts that continually request information from the server; for example the Messages
// and Reminders automated intermittent requests that happen in the Messages Center script and in
// the left navigation menu script.
if (empty($GLOBALS['DAEMON_FLAG']) && empty($_REQUEST['skip_timeout_reset'])) $_SESSION["last_update"] = time();
}
}

Expand Down

0 comments on commit 4d3cb1f

Please sign in to comment.