Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use last instead of author, if add first too #169

Merged
merged 5 commits into from
Sep 29, 2017
Merged

use last instead of author, if add first too #169

merged 5 commits into from
Sep 29, 2017

Conversation

GlazerMann
Copy link
Collaborator

No description provided.

@ms609
Copy link
Owner

ms609 commented Sep 21, 2017

What if this is an editor, or if "first1" is already/about to be set and "last1" should be used for consistency?

@GlazerMann
Copy link
Collaborator Author

This code is only a change when a full name is passed with authors, author, or authors1 -- not editors. This means that instead of author1=LAST and first1=FIRST, you get last1=LAST and first1=FIRST.

@GlazerMann GlazerMann closed this Sep 23, 2017
@GlazerMann GlazerMann deleted the patch-22 branch September 23, 2017 00:02
@GlazerMann GlazerMann restored the patch-22 branch September 23, 2017 00:03
@GlazerMann GlazerMann reopened this Sep 23, 2017
@GlazerMann
Copy link
Collaborator Author

I think you have to see a few lines above the default view to understand this patch.

@ms609
Copy link
Owner

ms609 commented Sep 23, 2017

OK, I see how this might make sense.
How would it deal with non-human authors, e.g. add_if_new('author', 'BEGS consortium')?
Perhaps we need to wrap the two lines in an if (isset($au[1])) { use last and first } else { use $param_name}?
Should we insert equivalent code for case: 'editor1'?

@GlazerMann
Copy link
Collaborator Author

This exact same logic exists for authro2, 3, etc. Just not author1.

@GlazerMann
Copy link
Collaborator Author

I think this is good now.

When the bot sets author= it try’s to split it into first and last names. After doing this this change makes last= get set instead of author= for the last name. This is because we are clearly only setting a last name. This only applies when splitting author= into two parts.

The other change is to be willing to set author even if editor is set.

@ms609 ms609 merged commit 32024bf into ms609:development Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants