From ed9c51d050da56460c96f0917ca0bcbc93591eb7 Mon Sep 17 00:00:00 2001 From: bradymiller Date: Sun, 30 Jun 2013 12:18:37 -0700 Subject: [PATCH] Fix for the Open in New Window in Patient/Client->Patients search gui, take 2. --- Documentation/OpenEMR_Backend_Spec.txt | 1 - interface/main/finder/dynamic_finder.php | 12 +----------- interface/main/main_screen.php | 9 +++++++++ library/authentication/login_operations.php | 3 +-- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Documentation/OpenEMR_Backend_Spec.txt b/Documentation/OpenEMR_Backend_Spec.txt index 805b483ed..29fd3e99e 100644 --- a/Documentation/OpenEMR_Backend_Spec.txt +++ b/Documentation/OpenEMR_Backend_Spec.txt @@ -11,7 +11,6 @@ we will ALWAYS look for $_GET['auth'], if it is login we will do so, if it is lo authNewSession(username, md5sum of password, provider) returns boolean, is pass checks out or not. if true, also sets: $_SESSION['authUser'] = current username logged in - $_SESSION['authPass'] = md5sum of logged in users password $_SESSION['authProvider'] = the current provider $_SESSION['authId'] = user Id number (record id) diff --git a/interface/main/finder/dynamic_finder.php b/interface/main/finder/dynamic_finder.php index 99ed241e2..8447f58df 100644 --- a/interface/main/finder/dynamic_finder.php +++ b/interface/main/finder/dynamic_finder.php @@ -121,14 +121,8 @@ $(document).ready(function() { }); function openNewTopWindow(pid) { - - // Delete the session cookie by setting its expiration date in the past. - // This forces the server to create a new session ID. - var olddate = new Date(); - olddate.setFullYear(olddate.getFullYear() - 1); - document.cookie = '; path=/; expires=' + olddate.toGMTString(); - document.fnew.patientID.value = pid; + top.restoreSession(); document.fnew.submit(); } @@ -161,10 +155,6 @@ function openNewTopWindow(pid) {
'> -' /> -' /> -' /> -' />
diff --git a/interface/main/main_screen.php b/interface/main/main_screen.php index 4cb1b3a4c..982b1322a 100644 --- a/interface/main/main_screen.php +++ b/interface/main/main_screen.php @@ -25,6 +25,15 @@ $sanitize_all_escapes=true; require_once('../globals.php'); require_once("$srcdir/formdata.inc.php"); +// Creates a new session id when load this outer frame +// (allows creations of separate OpenEMR frames to view patients concurrently +// on different browser frame/windows) +// This session id is used below in the restoreSession.php include to create a +// session cookie for this specific OpenEMR instance that is then maintained +// within the OpenEMR instance by calling top.restoreSession() whenever +// refreshing or starting a new script. +session_regenerate_id(); + $_SESSION["encounter"] = ''; // Fetch the password expiration date diff --git a/library/authentication/login_operations.php b/library/authentication/login_operations.php index 2ce52854f..918b27230 100644 --- a/library/authentication/login_operations.php +++ b/library/authentication/login_operations.php @@ -100,7 +100,6 @@ function validate_user_password($username,&$password,$provider) $_SESSION['authUser'] = $username; $_SESSION['authGroup'] = $authGroup['name']; $_SESSION['authUserID'] = $userInfo['id']; - $_SESSION['authPass'] = $phash; $_SESSION['authProvider'] = $provider; $_SESSION['authId'] = $userInfo{'id'}; $_SESSION['cal_ui'] = $userInfo['cal_ui']; @@ -131,4 +130,4 @@ function verify_user_gacl_group($user) } return true; } -?> \ No newline at end of file +?> -- 2.11.4.GIT