From 2f8b01cff8bb865cd90679985f112a6e3abdd96a Mon Sep 17 00:00:00 2001 From: phasefx Date: Wed, 22 Sep 2010 20:01:55 +0000 Subject: [PATCH] fix from tsbere to handle case where the print strategy is set to custom/external but the actual command is missing (perhaps due to xulrunner upgrades?) git-svn-id: svn://svn.open-ils.org/ILS/trunk@17896 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/chrome/content/util/print.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js index 87e161852e..3f9e884b66 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/print.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js @@ -16,6 +16,10 @@ util.print = function (context) { var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']); var key = 'oils.printer.external.cmd.' + this.context; var has_key = prefs.prefHasUserValue(key); + if(!has_key && this.context != 'default') { + key = 'oils.printer.external.cmd.default'; + has_key = prefs.prefHasUserValue(key); + } this.oils_printer_external_cmd = has_key ? prefs.getCharPref(key) : ''; return this; -- 2.11.0