Port to OMP#22
Conversation
| * @return $string | ||
| */ | ||
| function addCheckOrcidButton($output, &$templateMgr) { | ||
| $sessionManager = SessionManager::getManager(); |
| * @param $templateMgr TemplateManager | ||
| * @return $string | ||
| */ | ||
| function addCheckOrcidButton($output, &$templateMgr) { |
There was a problem hiding this comment.
Generally speaking, references on objects aren't needed any more; I'd suggest removing throughout unless they're needed.
| } | ||
|
|
||
| /** | ||
| * Output filter adds ORCiD interaction to OJS login form. |
There was a problem hiding this comment.
Should this refer to OJS specifically?
| if (preg_match('/<form.*id="editAuthor"[^>]+>/', $output, $matches, PREG_OFFSET_CAPTURE)) { | ||
| $match = $matches[0][0]; | ||
| $offset = $matches[0][1]; | ||
| $context = Request::getContext(); |
There was a problem hiding this comment.
If it's possible, I'd suggest exposing the $request object to this function rather than calling Request::(whatever) statically. Static calls to request functions are deprecated.
| // $params['path'] = array_merge($path, $params['path']); | ||
| // } elseif (!empty($params['path'])) { | ||
| // $params['path'] = array_merge($path, array($params['path'])); | ||
| // } else { |
| <?php | ||
|
|
||
| /** | ||
| * @file classes/user/UserSettingsDAO.inc.php |
| /** | ||
| * Constructor | ||
| */ | ||
| function __construct() { |
There was a problem hiding this comment.
Wherever possible, remove unneeded (empty) constructors.
| <message key="plugins.generic.orcidProfile.author.submission.failure">Your submission could not be successfully associated with your ORCID iD. Please contact the journal manager with your name, ORCID, and details of your submission.</message> | ||
| <message key="plugins.generic.orcidProfile.authFailure">OJS was not able to communicate with the ORCID service. Please contact the journal manager with your name, ORCID iD, and details of your submission.</message> | ||
| <message key="plugins.generic.orcidProfile.linkMessage">Connect with ORCID</message> | ||
| <message key="plugins.generic.orcidProfile.oauthLoginError">OJS was not able to communicate with the ORCID service. Please contact the journal manager with your name, ORCID, and details of your submission.</message> |
| $givenName = $profile['given-names']['value']; | ||
| $familyName = $profile['family-name']['value']; | ||
|
|
||
| $response = "The ORCID " . $orcid . " correspond to a registered researcher - Name: " . $givenName . " - Family Name: " . $familyName; |
There was a problem hiding this comment.
English-language text should be localized.
| </style> | ||
| {/literal} | ||
| <div id='orcidLoginLink'> | ||
| <a href="{$orcidProfileOauthPath|escape}authorize?client_id={$orcidClientId|urlencode}&response_type=code&scope=/authenticate&redirect_uri={url|urlencode page="orcidapi" op="orcidAuthorize" targetOp=$targetOp params=$params escape=false}"> |
There was a problem hiding this comment.
I think all the &s need to be escaped as &.
| {** | ||
| * plugins/generic/orcidProfile/orcidProfile.tpl | ||
| * | ||
| * Copyright (c) 2015-2016 University of Pittsburgh |
There was a problem hiding this comment.
Dates for new files should all be -2017
| * plugins/generic/orcidProfile/orcidProfile.tpl | ||
| * | ||
| * Copyright (c) 2015-2016 University of Pittsburgh | ||
| * Copyright (c) 2014-2016 Simon Fraser University Library |
There was a problem hiding this comment.
All "Simon Fraser University Library" copyrights should be changed to "Simon Fraser University"
|
Thanks, @defstat -- let me know when you've had a chance to look through my comments (and perform a rebase -- currently this won't merge) and I'll take a second look. |
|
@defstat, I don't believe it's released for OMP yet; is there a compatible version that you're aware of? |
|
@asmecher during Hirmeos project there where changes on the orcidProfile plugin regarding porting in OMP (for OMP 1.2 back then). EKT's OMP platform (http://ebooks.epublishing.ekt.gr) had incorporated the changes. That plugin (https://github.com/defstat/orcidProfileLink) had also been developed in order for the orcid of the monographs author to be displayed on the monographs landing page. |
|
@defstat, hmm, it probably needs some review and testing. The orcidProfile plugin has never been included in the OMP codebase or flagged in the Plugin Gallery for compatibility with OMP, and those are the two places I'd expect to see it if it were released for OMP. |
No description provided.