View | Details | Raw Unified | Return to bug 4965
Collapse All | Expand All

(-)a/plugins/importexport/native/NativeImportDom.inc.php (-10 / +9 lines)
 Lines 286-293   class NativeImportDom { Link Here 
286
		   --- Otherwise, the whole process was successful. */
286
		   --- Otherwise, the whole process was successful. */
287
287
288
		if ($hasErrors) {
288
		if ($hasErrors) {
289
			$issueDao->deleteIssue($issue);
289
			$issue = null; // Don't pass back a reference to a dead issue
290
			$issue = null;
291
			if ($cleanupErrors) {
290
			if ($cleanupErrors) {
292
				NativeImportDom::cleanupFailure ($dependentItems);
291
				NativeImportDom::cleanupFailure ($dependentItems);
293
			}
292
			}
 Lines 787-792   class NativeImportDom { Link Here 
787
			}
786
			}
788
		}
787
		}
789
788
789
		for ($index=0; ($node = $articleNode->getChildByName('id', $index)); $index++) {
790
			switch ($node->getAttribute('type')) {
791
				case 'doi':
792
					$article->setStoredDOI($node->getValue());
793
					break;
794
			}
795
		}
796
790
		$articleDao->insertArticle($article);
797
		$articleDao->insertArticle($article);
791
		$dependentItems[] = array('article', $article);
798
		$dependentItems[] = array('article', $article);
792
799
 Lines 835-848   class NativeImportDom { Link Here 
835
		$publishedArticle->setId($article->getId());
842
		$publishedArticle->setId($article->getId());
836
		$publishedArticle->setIssueId($issue->getId());
843
		$publishedArticle->setIssueId($issue->getId());
837
844
838
		for ($index=0; ($node = $articleNode->getChildByName('id', $index)); $index++) {
839
			switch ($node->getAttribute('type')) {
840
				case 'doi':
841
					$publishedArticle->setStoredDOI($node->getValue());
842
					break;
843
			}
844
		}
845
846
		if (($node = $articleNode->getChildByName('date_published'))) {
845
		if (($node = $articleNode->getChildByName('date_published'))) {
847
			$publishedDate = strtotime($node->getValue());
846
			$publishedDate = strtotime($node->getValue());
848
			if ($publishedDate === -1) {
847
			if ($publishedDate === -1) {

Return to bug 4965