support empty params for these utility functions
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 15 Mar 2008 05:52:46 +0000 (05:52 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 15 Mar 2008 05:52:46 +0000 (05:52 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9044 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/file.js

index 2bbe3d2..1f4ceaf 100644 (file)
@@ -254,6 +254,7 @@ util.file.prototype = {
        'export_file' : function(params) {
                try {
                        var obj = this;
+            if (typeof params == 'undefined') params = {};
             params.mode = 'save';
             if (typeof params.data == 'undefined') throw('Need a .data field to export');
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
@@ -282,6 +283,7 @@ util.file.prototype = {
        'import_file' : function(params) {
                try {
                        var obj = this;
+            if (typeof params == 'undefined') params = {};
             params.mode = 'open';
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                        var f = obj.pick_file(params);