I downloaded the latest OJS-2.4.8 from PKP to do a check against my installations.
I then ran php upgrade.php patch as well as php upgrade.php upgrade.for one of my journals that had patches applied to it.
Once the upgrade was finished I ran a diff of this journal upgrade against the OJS-2.4.8 that I had downloaded. I could be wrong but it looks like a number of patches did not get into the OJS-2.4.8 base code when the tar.gz file was created.
Can someone please confirm.
Here is the output of the diff run:-
diff -ur iejll/lib/pkp/classes/announcement/PKPAnnouncementDAO.inc.php ojs-2.4.8/lib/pkp/classes/announcement/PKPAnnouncementDAO.inc.php
--- iejll/lib/pkp/classes/announcement/PKPAnnouncementDAO.inc.php 2016-04-04 06:18:52.154422025 -0600
+++ ojs-2.4.8/lib/pkp/classes/announcement/PKPAnnouncementDAO.inc.php 2016-02-05 18:01:27.000000000 -0700
@@ -338,8 +338,8 @@
FROM announcements
WHERE assoc_type = ?
AND assoc_id = ?
- AND (date_expire IS NULL OR date_expire >= CURRENT_DATE)
- AND (date_posted < CURRENT_DATE)
+ AND (date_expire IS NULL OR DATE(date_expire) > CURRENT_DATE)
+ AND (DATE(date_posted) <= CURRENT_DATE)
ORDER BY announcement_id DESC',
array((int) $assocType, (int) $assocId),
$rangeInfo
@@ -360,8 +360,8 @@
FROM announcements
WHERE assoc_type = ?
AND assoc_id = ?
- AND (date_expire IS NULL OR date_expire >= CURRENT_DATE)
- AND (date_posted < CURRENT_DATE)
+ AND (date_expire IS NULL OR DATE(date_expire) > CURRENT_DATE)
+ AND (DATE(date_posted) <= CURRENT_DATE)
ORDER BY announcement_id DESC LIMIT ?',
array((int) $assocType, (int) $assocId, (int) $numAnnouncements),
$rangeInfo
@@ -382,8 +382,8 @@
FROM announcements
WHERE assoc_type = ?
AND assoc_id = ?
- AND (date_expire IS NULL OR date_expire >= CURRENT_DATE)
- AND (date_posted < CURRENT_DATE)
+ AND (date_expire IS NULL OR DATE(date_expire) > CURRENT_DATE)
+ AND (DATE(date_posted) <= CURRENT_DATE)
ORDER BY announcement_id DESC LIMIT 1',
array((int) $assocType, (int) $assocId)
);
diff -ur iejll/lib/pkp/classes/mail/Mail.inc.php ojs-2.4.8/lib/pkp/classes/mail/Mail.inc.php
--- iejll/lib/pkp/classes/mail/Mail.inc.php 2016-04-04 06:18:52.406422024 -0600
+++ ojs-2.4.8/lib/pkp/classes/mail/Mail.inc.php 2016-02-05 18:01:27.000000000 -0700
@@ -353,7 +353,7 @@
*/
function getReplyToString($send = false) {
$replyTo = $this->getReplyTo();
- if (!array_key_exists('email', $replyTo) || $replyTo['email'] == null) {
+ if ($replyTo == null) {
return null;
} else {
return (Mail::encodeDisplayName($replyTo['name'], $send) . ' <'.$replyTo['email'].'>');
diff -ur iejll/plugins/importexport/crossref/CrossRefExportPlugin.inc.php ojs-2.4.8/plugins/importexport/crossref/CrossRefExportPlugin.inc.php
--- iejll/plugins/importexport/crossref/CrossRefExportPlugin.inc.php 2016-04-04 06:19:02.130421962 -0600
+++ ojs-2.4.8/plugins/importexport/crossref/CrossRefExportPlugin.inc.php 2016-02-05 17:59:42.000000000 -0700
@@ -120,7 +120,7 @@
$this->registerDaoHook('IssueDAO');
$issueIterator =& $issueDao->getPublishedIssues($journal->getId(), Handler::getRangeInfo('issues'));
- // Get issues that should be excluded i.e. that have no DOI to export/register.
+ // Get issues that should be excluded i.e. that have no objects eligible to export/register.
$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
$excludes = array();
$allExcluded = true;
@@ -133,7 +133,7 @@
foreach ($issueArticles as $issueArticle) {
$articleRegistered = $issueArticle->getData($this->getPluginId().'::registeredDoi');
$errors = array();
- if ($this->canBeExported($issueArticle, $errors) && !isset($articleRegistered)) {
+ if ($this->canBeExported($issueArticle, $errors)) {
$excludes[$issue->getId()] = false;
$allExcluded = false;
$issueArticlesNo++;
@@ -143,13 +143,15 @@
}
}
$numArticles[$issue->getId()] = $issueArticlesNo;
+ unset($issue);
}
+ unset($issueIterator);
// Prepare and display the issue template.
- // Get the issue iteratorf from the DB for the template again.
+ // Get the issue iterator from the DB for the template again.
$issueIterator =& $issueDao->getPublishedIssues($journal->getId(), Handler::getRangeInfo('issues'));
$templateMgr->assign_by_ref('issues', $issueIterator);
- $templateMgr->assign_by_ref('allExcluded', $allExcluded);
+ $templateMgr->assign('allExcluded', $allExcluded);
$templateMgr->assign('excludes', $excludes);
$templateMgr->assign('numArticles', $numArticles);
$templateMgr->assign('allArticlesRegistered', $allArticlesRegistered);
@@ -256,7 +258,6 @@
}
}
}
- return false;
}
/**
diff -ur iejll/plugins/importexport/datacite/classes/DOIExportPlugin.inc.php ojs-2.4.8/plugins/importexport/datacite/classes/DOIExportPlugin.inc.php
--- iejll/plugins/importexport/datacite/classes/DOIExportPlugin.inc.php 2016-04-04 06:19:02.434421960 -0600
+++ ojs-2.4.8/plugins/importexport/datacite/classes/DOIExportPlugin.inc.php 2016-02-05 17:59:42.000000000 -0700
@@ -481,24 +481,26 @@
$this->registerDaoHook('IssueDAO');
$issueIterator =& $issueDao->getPublishedIssues($journal->getId(), Handler::getRangeInfo('issues'));
- // Filter only issues that can be exported.
- $issues = array();
+ // Get issues that should be excluded i.e. that have no DOI.
+ $excludes = array();
+ $allExcluded = true;
while ($issue =& $issueIterator->next()) {
+ $excludes[$issue->getId()] = true;
$errors = array();
if ($this->canBeExported($issue, $errors)) {
- $issues[] =& $issue;
+ $excludes[$issue->getId()] = false;
+ $allExcluded = false;
}
unset($issue);
}
unset($issueIterator);
- // Instantiate issue iterator.
- import('lib.pkp.classes.core.ArrayItemIterator');
- $rangeInfo = Handler::getRangeInfo('articles');
- $iterator = new ArrayItemIterator($issues, $rangeInfo->getPage(), $rangeInfo->getCount());
-
// Prepare and display the issue template.
- $templateMgr->assign_by_ref('issues', $iterator);
+ // Get the issue iterator from the DB for the template again.
+ $issueIterator =& $issueDao->getPublishedIssues($journal->getId(), Handler::getRangeInfo('issues'));
+ $templateMgr->assign_by_ref('issues', $issueIterator);
+ $templateMgr->assign('allExcluded', $allExcluded);
+ $templateMgr->assign('excludes', $excludes);
$templateMgr->display($this->getTemplatePath() . 'issues.tpl');
}
`
Thanks,
Edward