-
Notifications
You must be signed in to change notification settings - Fork 916
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
pkp/pkp-lib#5122 Facilitate the use of Iterators in service classes #2491
Conversation
foreach ($submissions as $submission) { | ||
if ($submission->getSubmissionProgress() == 0) { // Not incomplete | ||
$this->submissionMetadataChanged($submission); | ||
$this->submissionFilesChanged($submission); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, but should this only include published submissions? If so, you can add a status
property to the getMany
call:
Services::get('submission')->getMany(['contextId' => $journal->getId(), 'status' => STATUS_PUBLISHED]);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on our indexing strategy -- there's value in indexing unpublished content if we don't re-index fully on publication, which may be the case. This needs an audit/clean-up -- I'll do a small assessment as part of this issue and invariably leave some for pkp/pkp-lib#3180 as well.
$templateMgr = TemplateManager::getManager($request); | ||
if ($this->_articleGalley) $templateMgr->assign(array( | ||
'representationId' => $this->_articleGalley->getId(), | ||
'articleGalley' => $this->_articleGalley, | ||
'articleGalleyFile' => $this->_articleGalley->getFile(), | ||
)); | ||
$journal = $request->getJournal(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$context = $request->getContext();
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just juggling already-existing code, but yes, fixed!
package.json
Outdated
"less-loader": "^4.1.0", | ||
"lint-staged": "^8.1.6", | ||
"lint-staged": "^8.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of version bumps here. Usually when I run an update like this, I do some manual checking to try to identify any regressions... We also need to keep the versions here in sync with the version in the UI Library.
So I'd suggest either not including these changes in a commit (I'm happy to run an update whenever if you'd like) or making sure that the same changes happen in UI Library and doing some testing on it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, happy to remove these!
08acb5a
to
4a45120
Compare
…ication database inconsistency from broken import code)
No description provided.