From 91bbc2e5fea4426b39724d6155aa057d3552413e Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Mar 2018 18:59:47 -0600 Subject: [PATCH 1/4] DESCRIPT.ION generation disabled by default --- core/config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/config.js b/core/config.js index d153d4cb..7e5d92a1 100644 --- a/core/config.js +++ b/core/config.js @@ -740,10 +740,16 @@ function getDefaultConfig() { args : [ '24 hours' ] // items older than this will be removed }, + // + // Enable the following entry in your config.hjson to periodically create/update + // DESCRIPT.ION files for your file base + // + /* updateDescriptIonFiles : { schedule : 'on the last day of the week', action : '@method:core/file_base_list_export.js:updateFileBaseDescFilesScheduledEvent', } + */ } }, From 534b51933a369e31ea769c61e93dc19972cd673c Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Mar 2018 19:00:34 -0600 Subject: [PATCH 2/4] Register key press handler - oops! --- core/file_base_user_list_export.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/file_base_user_list_export.js b/core/file_base_user_list_export.js index 686833e5..2dba52ad 100644 --- a/core/file_base_user_list_export.js +++ b/core/file_base_user_list_export.js @@ -157,6 +157,8 @@ exports.getModule = class FileBaseListExport extends MenuModule { // this may take quite a while; temp disable of idle monitor self.client.stopIdleMonitor(); + self.client.on('key press', keyPressHandler); + const filterCriteria = Object.assign({}, self.config.filterCriteria); if(!filterCriteria.areaTag) { filterCriteria.areaTag = FileArea.getAvailableFileAreaTags(self.client); From 66423068b1b9c42244b4f41fc9f56bc18cc1b68a Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Mar 2018 19:10:20 -0600 Subject: [PATCH 3/4] Crash on delete in BBS List with zero entries #156 --- core/bbs_list.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/bbs_list.js b/core/bbs_list.js index 74c792c6..abff376f 100644 --- a/core/bbs_list.js +++ b/core/bbs_list.js @@ -99,6 +99,10 @@ exports.getModule = class BBSListModule extends MenuModule { self.displayAddScreen(cb); }, deleteBBS : function(formData, extraArgs, cb) { + if(!_.isNumber(self.selectedBBS) || 0 === self.entries.length) { + return cb(null); + } + const entriesView = self.viewControllers.view.getView(MciViewIds.view.BBSList); if(self.entries[self.selectedBBS].submitterUserId !== self.client.user.userId && !self.client.user.isSysOp()) { @@ -323,6 +327,7 @@ exports.getModule = class BBSListModule extends MenuModule { entriesView.setFocusItemIndex(self.selectedBBS); self.drawSelectedEntry(self.entries[self.selectedBBS]); } else if (self.entries.length > 0) { + self.selectedBBS = 0; entriesView.setFocusItemIndex(0); self.drawSelectedEntry(self.entries[0]); } From 4acbae86e36b4d44091734f7ab87326cab30375e Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 13 Mar 2018 19:22:26 -0600 Subject: [PATCH 4/4] Crash on configuration when theme no longer exists #157 --- core/user_config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/user_config.js b/core/user_config.js index 70e1f068..f60d2155 100644 --- a/core/user_config.js +++ b/core/user_config.js @@ -174,9 +174,9 @@ exports.getModule = class UserConfigModule extends MenuModule { }; }), 'name'); - currentThemeIdIndex = _.findIndex(self.availThemeInfo, function cmp(ti) { + currentThemeIdIndex = Math.max(0, _.findIndex(self.availThemeInfo, function cmp(ti) { return ti.themeId === self.client.user.properties.theme_id; - }); + })); callback(null); },