diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index 98feb17b37..a3bc56b0af 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -1808,6 +1808,11 @@ var ItemTree = class ItemTree extends LibraryTree { return this._rows.map(row => asIDs ? row.ref.id : row.ref); } + /** + * Get the current sort order of the items list + * + * @return {Number} - -1 for descending, 1 for ascending + */ getSortDirection(sortFields) { sortFields = sortFields || this.getSortFields(); if (this.collectionTreeRow.isFeed()) { diff --git a/chrome/content/zotero/reportInterface.js b/chrome/content/zotero/reportInterface.js index bcb9542288..a4e799010b 100644 --- a/chrome/content/zotero/reportInterface.js +++ b/chrome/content/zotero/reportInterface.js @@ -30,9 +30,8 @@ var Zotero_Report_Interface = new function() { */ this.loadCollectionReport = function () { var sortColumn = ZoteroPane_Local.getSortField(); - var sortDirection = ZoteroPane_Local.getSortDirection(); var queryString = '?sort=' + sortColumn - + '&direction=' + (sortDirection == 'ascending' ? 'asc' : 'desc'); + + '&direction=' + (ZoteroPane.getSortDirection() == 1 ? 'asc' : 'desc'); var url = 'zotero://report/';