[open-ils-commits] r19002 - in branches/rel_2_0/Open-ILS/xul/staff_client: chrome/content/main server/main (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 15 15:12:49 EST 2010
Author: phasefx
Date: 2010-12-15 15:12:44 -0500 (Wed, 15 Dec 2010)
New Revision: 19002
Modified:
branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/main.js
branches/rel_2_0/Open-ILS/xul/staff_client/server/main/data.xul
Log:
augment the useragent for the xulrunner staff client
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/main.js
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/main.js 2010-12-15 20:11:59 UTC (rev 19001)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/chrome/content/main/main.js 2010-12-15 20:12:44 UTC (rev 19002)
@@ -96,6 +96,9 @@
G = {};
G.pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+ if (! G.pref.prefHasUserValue('general.useragent.override')) {
+ G.pref.setCharPref('general.useragent.override',navigator.userAgent + ' oils_xulrunner /xul/server/');
+ }
JSAN.use('util.error');
G.error = new util.error();
Modified: branches/rel_2_0/Open-ILS/xul/staff_client/server/main/data.xul
===================================================================
--- branches/rel_2_0/Open-ILS/xul/staff_client/server/main/data.xul 2010-12-15 20:11:59 UTC (rev 19001)
+++ branches/rel_2_0/Open-ILS/xul/staff_client/server/main/data.xul 2010-12-15 20:12:44 UTC (rev 19002)
@@ -46,6 +46,15 @@
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ // XXX: We're reproducing what's in main.js just for a time so we can have this immediately in some environments
+ // without requiring a new staff client build be deployed
+ netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+ var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Ci['nsIPrefBranch']); if (prefs.prefHasUserValue('general.useragent.override')) {
+ // don't want an ever-growing useragent
+ } else {
+ prefs.setCharPref('general.useragent.override',navigator.userAgent + ' oils_xulrunner /xul/server/');
+ }
+
if (typeof JSAN == 'undefined') {
throw(document.getElementById("commonStrings").getString('common.jsan.missing'));
}
More information about the open-ils-commits
mailing list