Skip to content

Commit

Permalink
Fix: Renaming attachments without author failed (closes #211)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlegewie committed Feb 18, 2016
1 parent bf7803a commit 9d4e318
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions chrome/content/zotfile/zotfile.js
Original file line number Diff line number Diff line change
@@ -1382,10 +1382,13 @@ Zotero.ZotFile = {
author_lastg = author_lastg + this.prefs.getCharPref("etal");
}
//create last (senior) author string
var lastAuthor = creators[creators.length - 1].ref.lastName;
var lastAuthor_lastf = creators[creators.length - 1].ref.lastName + creators[creators.length - 1].ref.firstName.substr(0, 1).toUpperCase();
var lastAuthor_initials = creators[creators.length - 1].ref.firstName.substr(0, 1).toUpperCase() + creators[creators.length - 1].ref.lastName.substr(0, 1).toUpperCase();
var lastAuthor_lastInitial = creators[creators.length - 1].ref.lastName.substr(0, 1).toUpperCase();
var lastAuthor = "", lastAuthor_lastf= "", lastAuthor_initials= "", lastAuthor_lastInitial = "";
if (creators.length > 0) {
lastAuthor = creators[creators.length - 1].ref.lastName;
lastAuthor_lastf = creators[creators.length - 1].ref.lastName + creators[creators.length - 1].ref.firstName.substr(0, 1).toUpperCase();
lastAuthor_initials = creators[creators.length - 1].ref.firstName.substr(0, 1).toUpperCase() + creators[creators.length - 1].ref.lastName.substr(0, 1).toUpperCase();
lastAuthor_lastInitial = creators[creators.length - 1].ref.lastName.substr(0, 1).toUpperCase();
}
// get creator and create editors string
var editorType = [3,4,5,27,29];
var editor = "", editor_lastf="", editor_initials="";
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -34,6 +34,10 @@ Contributions preferably through pull requests are welcome!

## Changelog

#### Changes in 4.2.1

- Fix: Renaming attachments without author failed

#### Changes in 4.2

- Add wildcard %g for author's full name (thanks to [QingQYang](https://github.com/QingQYang))

0 comments on commit 9d4e318

Please sign in to comment.