[open-ils-commits] [GIT] Evergreen ILS branch master updated. 10e245f7f8170990977cc8de48d1955719c440ae

Evergreen Git git at git.evergreen-ils.org
Fri Mar 14 16:07:15 EDT 2014


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  10e245f7f8170990977cc8de48d1955719c440ae (commit)
      from  291bce0dee74ae7f2dd70abe1af73a27c2b0d438 (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 10e245f7f8170990977cc8de48d1955719c440ae
Author: Remington Steed <rjs7 at calvin.edu>
Date:   Wed Mar 5 17:57:24 2014 -0500

    LP1198983: Remove deprecated useragent.override variable
    
    To quote Dan Wells in bug comment #6:
    
    Back in the 2.2 days, Evergreen had code which set the
    'general.useragent.override' to something like 'Mozilla/5.0 (Windows; U;
    Windows NT 6.1; en-US; rv:1.9.2.25) Gecko/20111212 oils_xulrunner
    /xul/rel_2_2_0/server/'. For anyone who once had a 2.2 client installed
    and upgraded from it, this setting persists (this is the situation for
    most stations in our library).
    
    Since this string does not match the new test for 'open_ils_staff_client'
    in the useragent, these clients are not properly streaming requests. This
    problem was most easily noticed in Vandelay progress bars (they always
    jumped from 0% to 100%).
    
    This commit adds the code provided by Bill Erickson in the LP bug
    comments. To test it, you can add the 'general.useragent.override'
    setting to your staff client with any value (using the 'about:config'
    interface), then run this code and check that your setting is gone.
    
    Signed-off-by: Remington Steed <rjs7 at calvin.edu>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
index 04af3b8..0295318 100644
--- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
+++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/data.js
@@ -1112,6 +1112,20 @@ OpenILS.data.prototype = {
 
         }
 
+        this.chain.push(
+            function () {
+                try {
+                    var prefs = Components.classes['@mozilla.org/preferences-service;1']
+                        .getService(Components.interfaces['nsIPrefBranch']);
+                    prefs.clearUserPref('general.useragent.override');
+                    obj.data_progress('Cleared deprecated "general.useragent.override" value. ');
+                } catch(E) {
+                    obj.error.sdump('D_ERROR','Error clearing "general.useragent.override" for '
+                        + location.href + '\n' + E + '\n');
+                }
+            }
+        );
+
         this.exec.chain( this.chain );
 
     }

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

Summary of changes:
 .../staff_client/chrome/content/OpenILS/data.js    |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list