[open-ils-commits] [GIT] Evergreen ILS branch master updated. 16c65efba41d5fd44bb0ee3f73ba485143a62ed5

Evergreen Git git at git.evergreen-ils.org
Fri Jan 4 15:08:41 EST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  16c65efba41d5fd44bb0ee3f73ba485143a62ed5 (commit)
      from  f472fc0b7c16f981f6063902e39207204f0cb7a9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 16c65efba41d5fd44bb0ee3f73ba485143a62ed5
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Fri Jan 4 14:33:28 2013 -0500

    fix user session management for MARC Batch Edit
    
    The Javascript in the hardcoded page templates was
    not checking the XUL stash for the session key when
    run from the staff client; this is now needed as
    a result of the XULRunner updates introdued by
    commit adee850f.
    
    As a consequence, the list of the user's record buckets
    was not retrieved, and attempts to run a batch edit
    would spin without updating any records.
    
    This fixes LP#1048707 and LP#1054277.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm
index 6eb3064..5f46799 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/TemplateBatchBibUpdate.pm
@@ -233,11 +233,18 @@ sub show_processing_template {
             dojo.require('fieldmapper.AutoIDL');
             dojo.require('fieldmapper.dojoData');
             dojo.require('openils.User');
+            dojo.require('openils.XUL');
+            dojo.require('dojo.cookie');
             dojo.require('openils.CGI');
             dojo.require('openils.widget.ProgressDialog');
 
             var cgi = new openils.CGI();
-            var u = new openils.User({ authcookie : 'ses' });
+            var authtoken = dojo.cookie('ses') || cgi.param('ses');
+            if (!authtoken && openils.XUL.isXUL()) {
+                var stash = openils.XUL.getStash();
+                authtoken = stash.session.key;
+            }
+            var u = new openils.User({ authtoken: authtoken });
 
             dojo.addOnLoad(function () {
                 progress_dialog.show(true);
@@ -359,9 +366,16 @@ sub show_template {
             dojo.require('fieldmapper.dojoData');
             dojo.require('openils.User');
             dojo.require('openils.CGI');
+            dojo.require('openils.XUL');
+            dojo.require('dojo.cookie');
 
             var cgi = new openils.CGI();
-            var u = new openils.User({ authcookie : 'ses' });
+            var authtoken = dojo.cookie('ses') || cgi.param('ses');
+            if (!authtoken && openils.XUL.isXUL()) {
+                var stash = openils.XUL.getStash();
+                authtoken = stash.session.key;
+            }
+            var u = new openils.User({ authtoken: authtoken });
 
             var bucketStore = new dojo.data.ItemFileReadStore(
                 { data : cbreb.toStoreData(

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/WWW/TemplateBatchBibUpdate.pm      |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list