Skip to content

Commit

Permalink
pkp#229 OrcidProfilePlugin-705
Browse files Browse the repository at this point in the history
  • Loading branch information
withanage committed Feb 7, 2023
1 parent ca342a4 commit d032a9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 4 additions & 2 deletions OrcidProfilePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function register($category, $path, $mainContextId = null)
Hook::add('Mailer::Mailables', [$this, 'addMailable']);

Hook::add('Form::config::before', [$this, 'addOrcidFormFields']);
Hook::add('Author::edit', [$this, 'handleAuthorFormExecute']);
Hook::add('Author::edit', [$this, 'handleAuthorFormExecute']);

}

Expand Down Expand Up @@ -1444,6 +1444,8 @@ public function setCurrentContextId($contextId)
*/
public function addMailable(string $hookName, array $args): void
{
$args[0] = array_merge($args[0], [OrcidCollectAuthorId::class, OrcidRequestAuthorAuthorization::class]);
foreach ([OrcidCollectAuthorId::class, OrcidRequestAuthorAuthorization::class] as $mailable) {
$args[0]->push($mailable);
}
}
}
6 changes: 6 additions & 0 deletions locale/en_US/emails.po
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ msgstr "ORCID OAuth authorization link"

msgid "emailTemplate.variable.orcidAboutUrl"
msgstr "URL to the page about ORCID"

msgid "plugins.generic.orcidProfile.orcidRequestAuthorAuthorization.name"
msgstr ""

msgid "plugins.generic.orcidProfile.orcidCollectAuthorId.name"
msgstr ""

0 comments on commit d032a9c

Please sign in to comment.