View | Details | Raw Unified | Return to bug 6456 | Differences between
and this patch

Collapse All | Expand All

(-)ojs-2.3.4ORIG/classes/article/Article.inc.php (-7 / +7 lines)
 Lines 495-513    Link Here 
495
		}
495
		}
496
		if($copyeditor) {
496
		if($copyeditor) {
497
			$copyedSignoff = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $articleId);
497
			$copyedSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $articleId);
498
			$userId = $copyedSignoff->getUserId();
498
			$userId = $copyedSignoff->getUserId();
499
			if ($userId) $userIds[] = array('id' => $userId, 'role' => 'copyeditor');
499
			if ($userId) $userIds[] = array('id' => $userId, 'role' => 'copyeditor');
500
		}
500
		}
501
		if($layoutEditor) {
501
		if($layoutEditor) {
502
			$layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
502
			$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
503
			$userId = $layoutSignoff->getUserId();
503
			$userId = $layoutSignoff->getUserId();
504
			if ($userId) $userIds[] = array('id' => $userId, 'role' => 'layoutEditor');
504
			if ($userId) $userIds[] = array('id' => $userId, 'role' => 'layoutEditor');
505
		}
505
		}
506
		if($proofreader) {
506
		if($proofreader) {
507
			$proofSignoff = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
507
			$proofSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
508
			$userId = $proofSignoff->getUserId();
508
			$userId = $proofSignoff->getUserId();
509
			if ($userId) $userIds[] = array('id' => $userId, 'role' => 'proofreader');
509
			if ($userId) $userIds[] = array('id' => $userId, 'role' => 'proofreader');
510
		}
510
		}
 Lines 532-538    Link Here 
532
	 */
532
	 */
533
	function getSignoff($signoffType) {
533
	function getSignoff($signoffType) {
534
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
534
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
535
		return $signoffDao->getBySymbolic($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
535
		return $signoffDao->build($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
536
	}
536
	}
537
	/**
537
	/**
 Lines 545-551    Link Here 
545
		$articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
545
		$articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
546
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
546
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
547
		$signoff = $signoffDao->getBySymbolic($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
547
		$signoff = $signoffDao->build($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
548
		if (!$signoff) {
548
		if (!$signoff) {
549
			$returner = false;
549
			$returner = false;
550
			return $returner;
550
			return $returner;
 Lines 569-575    Link Here 
569
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
569
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
570
		$userDao =& DAORegistry::getDAO('UserDAO');
570
		$userDao =& DAORegistry::getDAO('UserDAO');
571
		$signoff = $signoffDao->getBySymbolic($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
571
		$signoff = $signoffDao->build($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
572
		if (!$signoff) {
572
		if (!$signoff) {
573
			$returner = false;
573
			$returner = false;
574
			return $returner;
574
			return $returner;
 Lines 587-593    Link Here 
587
	function getUserIdBySignoffType($signoffType) {
587
	function getUserIdBySignoffType($signoffType) {
588
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
588
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
589
		$signoff = $signoffDao->getBySymbolic($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
589
		$signoff = $signoffDao->build($signoffType, ASSOC_TYPE_ARTICLE, $this->getId());
590
		if (!$signoff) return false;
590
		if (!$signoff) return false;
591
		return $signoff->getUserId();
591
		return $signoff->getUserId();
(-)ojs-2.3.4ORIG/classes/submission/layoutEditor/LayoutEditorAction.inc.php (-7 / +7 lines)
 Lines 3-9    Link Here 
3
/**
3
/**
4
 * @defgroup submission_layoutEditor_LayoutEditorAction
4
 * @defgroup submission_layoutEditor_LayoutEditorAction
5
 */
5
 */
6
6
7
/**
7
/**
8
 * @file classes/submission/layoutEditor/LayoutEditorAction.inc.php
8
 * @file classes/submission/layoutEditor/LayoutEditorAction.inc.php
9
 *
9
 *
 Lines 146-152    Link Here 
146
		$userDao =& DAORegistry::getDAO('UserDAO');
146
		$userDao =& DAORegistry::getDAO('UserDAO');
147
		$journal =& Request::getJournal();
147
		$journal =& Request::getJournal();
148
		$layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
148
		$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
149
		if ($layoutSignoff->getDateCompleted() != null) {
149
		if ($layoutSignoff->getDateCompleted() != null) {
150
			return true;
150
			return true;
151
		}
151
		}
 Lines 254-260    Link Here 
254
			if ($commentForm->validate()) {
254
			if ($commentForm->validate()) {
255
				$commentForm->execute();
255
				$commentForm->execute();
256
256
257
				// Send a notification to associated users
257
				// Send a notification to associated users
258
				import('lib.pkp.classes.notification.NotificationManager');
258
				import('lib.pkp.classes.notification.NotificationManager');
259
				$notificationManager = new NotificationManager();
259
				$notificationManager = new NotificationManager();
 Lines 266-272    Link Here 
266
						$article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_LAYOUT_COMMENT
266
						$article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_LAYOUT_COMMENT
267
					);
267
					);
268
				}
268
				}
269
269
270
				if ($emailComment) {
270
				if ($emailComment) {
271
					$commentForm->email();
271
					$commentForm->email();
272
				}
272
				}
 Lines 306-312    Link Here 
306
			if ($commentForm->validate()) {
306
			if ($commentForm->validate()) {
307
				$commentForm->execute();
307
				$commentForm->execute();
308
308
309
				// Send a notification to associated users
309
				// Send a notification to associated users
310
				import('lib.pkp.classes.notification.NotificationManager');
310
				import('lib.pkp.classes.notification.NotificationManager');
311
				$notificationManager = new NotificationManager();
311
				$notificationManager = new NotificationManager();
 Lines 318-324    Link Here 
318
						$article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_PROOFREAD_COMMENT
318
						$article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_PROOFREAD_COMMENT
319
					);
319
					);
320
				}
320
				}
321
321
322
				if ($emailComment) {
322
				if ($emailComment) {
323
					$commentForm->email();
323
					$commentForm->email();
324
				}
324
				}
 Lines 350-356    Link Here 
350
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
350
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
351
		$suppDao =& DAORegistry::getDAO('SuppFileDAO');
351
		$suppDao =& DAORegistry::getDAO('SuppFileDAO');
352
		$layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $article->getId());
352
		$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $article->getId());
353
		if ($layoutSignoff->getFileId() == $fileId) {
353
		if ($layoutSignoff->getFileId() == $fileId) {
354
			$canDownload = true;
354
			$canDownload = true;
355
		} else if($galleyDao->galleyExistsByFileId($article->getId(), $fileId)) {
355
		} else if($galleyDao->galleyExistsByFileId($article->getId(), $fileId)) {
(-)ojs-2.3.4ORIG/classes/submission/sectionEditor/SectionEditorAction.inc.php (-2 / +2 lines)
 Lines 1489-1495    Link Here 
1489
		import('classes.mail.ArticleMailTemplate');
1489
		import('classes.mail.ArticleMailTemplate');
1490
		$email = new ArticleMailTemplate($submission, 'LAYOUT_REQUEST');
1490
		$email = new ArticleMailTemplate($submission, 'LAYOUT_REQUEST');
1491
		$layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
1491
		$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
1492
		$layoutEditor =& $userDao->getUser($layoutSignoff->getUserId());
1492
		$layoutEditor =& $userDao->getUser($layoutSignoff->getUserId());
1493
		if (!isset($layoutEditor)) return true;
1493
		if (!isset($layoutEditor)) return true;
 Lines 1538-1544    Link Here 
1538
		import('classes.mail.ArticleMailTemplate');
1538
		import('classes.mail.ArticleMailTemplate');
1539
		$email = new ArticleMailTemplate($submission, 'LAYOUT_ACK');
1539
		$email = new ArticleMailTemplate($submission, 'LAYOUT_ACK');
1540
		$layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
1540
		$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
1541
		$layoutEditor =& $userDao->getUser($layoutSignoff->getUserId());
1541
		$layoutEditor =& $userDao->getUser($layoutSignoff->getUserId());
1542
		if (!isset($layoutEditor)) return true;
1542
		if (!isset($layoutEditor)) return true;
(-)ojs-2.3.4ORIG/dbscripts/xml/upgrade/2.3.0_preupdate.xml (-4 / +4 lines)
 Lines 35-41    Link Here 
35
	<sql>
35
	<sql>
36
		<rename table="subscriptions" to="subscriptions_old" />
36
		<rename table="subscriptions" to="subscriptions_old" />
37
	</sql>
37
	</sql>
38
38
39
	<!-- Bug #4149: Migrate copyed_assignments, layouted_assignments, proof_assignments into signoffs table -->
39
	<!-- Bug #4149: Migrate copyed_assignments, layouted_assignments, proof_assignments into signoffs table -->
40
	<sql>
40
	<sql>
41
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_INITIAL', 257, c.article_id, c.copyeditor_id, a.copyedit_file_id, c.initial_revision, c.date_notified, c.date_underway, c.date_completed, c.date_acknowledged FROM copyed_assignments c LEFT JOIN articles a ON (c.article_id = a.article_id AND c.initial_revision > 0) WHERE c.copyeditor_id IS NOT NULL</query><!-- 257 == ASSOC_TYPE_ARTICLE -->
41
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_INITIAL', 257, c.article_id, c.copyeditor_id, a.copyedit_file_id, c.initial_revision, c.date_notified, c.date_underway, c.date_completed, c.date_acknowledged FROM copyed_assignments c LEFT JOIN articles a ON (c.article_id = a.article_id AND c.initial_revision > 0) WHERE c.copyeditor_id IS NOT NULL</query><!-- 257 == ASSOC_TYPE_ARTICLE -->
 Lines 44-53    Link Here 
44
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_LAYOUT', 257, l.article_id, l.editor_id, l.layout_file_id, l.date_notified, l.date_underway, l.date_completed, l.date_acknowledged FROM layouted_assignments l</query>
44
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_LAYOUT', 257, l.article_id, l.editor_id, l.layout_file_id, l.date_notified, l.date_underway, l.date_completed, l.date_acknowledged FROM layouted_assignments l</query>
45
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_PROOFREADING_AUTHOR', 257, p.article_id, p.proofreader_id, p.date_author_notified, p.date_author_underway, p.date_author_completed, p.date_author_acknowledged FROM proof_assignments p</query>
45
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_PROOFREADING_AUTHOR', 257, p.article_id, a.user_id, p.date_author_notified, p.date_author_underway, p.date_author_completed, p.date_author_acknowledged FROM proof_assignments p LEFT JOIN articles a ON (p.article_id = a.article_id)</query>
46
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_PROOFREADING_PROOFREADER', 257, p.article_id, p.proofreader_id, p.date_proofreader_notified, p.date_proofreader_underway, p.date_proofreader_completed, p.date_proofreader_acknowledged FROM proof_assignments p</query>
46
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_PROOFREADING_PROOFREADER', 257, p.article_id, p.proofreader_id, p.date_proofreader_notified, p.date_proofreader_underway, p.date_proofreader_completed, p.date_proofreader_acknowledged FROM proof_assignments p</query>
47
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_PROOFREADING_LAYOUT', 257, p.article_id, p.proofreader_id, p.date_layouteditor_notified, p.date_layouteditor_underway, p.date_layouteditor_completed, p.date_layouteditor_acknowledged FROM proof_assignments p</query>
47
		<query>INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_PROOFREADING_LAYOUT', 257, p.article_id, l.editor_id, p.date_layouteditor_notified, p.date_layouteditor_underway, p.date_layouteditor_completed, p.date_layouteditor_acknowledged FROM proof_assignments p LEFT JOIN layouted_assignments l ON (p.article_id = l.article_id)</query>
48
48
49
		<drop table="copyed_assignments" />
49
		<drop table="copyed_assignments" />
50
		<drop table="layouted_assignments" />
50
		<drop table="layouted_assignments" />
51
		<drop table="proof_assignments" />
51
		<drop table="proof_assignments" />
(-)ojs-2.3.4ORIG/pages/layoutEditor/SubmissionLayoutHandler.inc.php (-18 / +18 lines)
 Lines 9-15    Link Here 
9
 * @class SubmissionLayoutHandler
9
 * @class SubmissionLayoutHandler
10
 * @ingroup pages_layoutEditor
10
 * @ingroup pages_layoutEditor
11
 *
11
 *
12
 * @brief Handle requests related to submission layout editing.
12
 * @brief Handle requests related to submission layout editing.
13
 */
13
 */
14
// $Id$
14
// $Id$
 Lines 19-28    Link Here 
19
class SubmissionLayoutHandler extends LayoutEditorHandler {
19
class SubmissionLayoutHandler extends LayoutEditorHandler {
20
	/** journal associated with the request **/
20
	/** journal associated with the request **/
21
	var $journal;
21
	var $journal;
22
22
23
	/** submission associated with the request **/
23
	/** submission associated with the request **/
24
	var $submission;
24
	var $submission;
25
25
26
	/**
26
	/**
27
	 * Constructor
27
	 * Constructor
28
	 **/
28
	 **/
 Lines 41-47    Link Here 
41
	function submission($args) {
41
	function submission($args) {
42
		$articleId = isset($args[0]) ? $args[0] : 0;
42
		$articleId = isset($args[0]) ? $args[0] : 0;
43
		$journal =& Request::getJournal();
43
		$journal =& Request::getJournal();
44
44
45
		$submissionLayoutHandler = new SubmissionLayoutHandler();
45
		$submissionLayoutHandler = new SubmissionLayoutHandler();
46
		$submissionLayoutHandler->validate($articleId);
46
		$submissionLayoutHandler->validate($articleId);
47
		$submission =& $submissionLayoutHandler->submission;
47
		$submission =& $submissionLayoutHandler->submission;
 Lines 51-57    Link Here 
51
		import('classes.submission.proofreader.ProofreaderAction');
51
		import('classes.submission.proofreader.ProofreaderAction');
52
		ProofreaderAction::proofreadingUnderway($submission, 'SIGNOFF_PROOFREADING_LAYOUT');
52
		ProofreaderAction::proofreadingUnderway($submission, 'SIGNOFF_PROOFREADING_LAYOUT');
53
		$layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
53
		$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
54
		if ($layoutSignoff->getDateNotified() != null && $layoutSignoff->getDateUnderway() == null)
54
		if ($layoutSignoff->getDateNotified() != null && $layoutSignoff->getDateUnderway() == null)
55
		{
55
		{
 Lines 104-110    Link Here 
104
		if (LayoutEditorAction::completeLayoutEditing($submission, Request::getUserVar('send'))) {
104
		if (LayoutEditorAction::completeLayoutEditing($submission, Request::getUserVar('send'))) {
105
			Request::redirect(null, null, 'submission', $articleId);
105
			Request::redirect(null, null, 'submission', $articleId);
106
		}
106
		}
107
	}
107
	}
 Lines 212-218    Link Here 
212
			// Send a notification to associated users
212
			// Send a notification to associated users
213
			import('lib.pkp.classes.notification.NotificationManager');
213
			import('lib.pkp.classes.notification.NotificationManager');
214
			$notificationManager = new NotificationManager();
214
			$notificationManager = new NotificationManager();
215
			$articleDao =& DAORegistry::getDAO('ArticleDAO');
215
			$articleDao =& DAORegistry::getDAO('ArticleDAO');
216
			$article =& $articleDao->getArticle($articleId);
216
			$article =& $articleDao->getArticle($articleId);
217
			$notificationUsers = $article->getAssociatedUserIds(true, false);
217
			$notificationUsers = $article->getAssociatedUserIds(true, false);
218
			foreach ($notificationUsers as $userRole) {
218
			foreach ($notificationUsers as $userRole) {
 Lines 247-253    Link Here 
247
		$submissionLayoutHandler = new SubmissionLayoutHandler();
247
		$submissionLayoutHandler = new SubmissionLayoutHandler();
248
		$submissionLayoutHandler->validate($articleId);
248
		$submissionLayoutHandler->validate($articleId);
249
		$submission =& $submissionLayoutHandler->submission;
249
		$submission =& $submissionLayoutHandler->submission;
250
250
251
		LayoutEditorAction::deleteGalley($submission, $galleyId);
251
		LayoutEditorAction::deleteGalley($submission, $galleyId);
252
		Request::redirect(null, null, 'submission', $articleId);
252
		Request::redirect(null, null, 'submission', $articleId);
 Lines 260-266    Link Here 
260
		$articleId = Request::getUserVar('articleId');
260
		$articleId = Request::getUserVar('articleId');
261
		$submissionLayoutHandler = new SubmissionLayoutHandler();
261
		$submissionLayoutHandler = new SubmissionLayoutHandler();
262
		$submissionLayoutHandler->validate($articleId);
262
		$submissionLayoutHandler->validate($articleId);
263
		$submission =& $submissionLayoutHandler->submission;
263
		$submission =& $submissionLayoutHandler->submission;
264
		LayoutEditorAction::orderGalley($submission, Request::getUserVar('galleyId'), Request::getUserVar('d'));
264
		LayoutEditorAction::orderGalley($submission, Request::getUserVar('galleyId'), Request::getUserVar('d'));
 Lines 344-350    Link Here 
344
		$revisionId = isset($args[3]) ? (int) $args[3] : 0;
344
		$revisionId = isset($args[3]) ? (int) $args[3] : 0;
345
		$submissionLayoutHandler = new SubmissionLayoutHandler();
345
		$submissionLayoutHandler = new SubmissionLayoutHandler();
346
		$submissionLayoutHandler->validate($articleId);
346
		$submissionLayoutHandler->validate($articleId);
347
		$submission =& $submissionLayoutHandler->submission;
347
		$submission =& $submissionLayoutHandler->submission;
348
		LayoutEditorAction::deleteArticleImage($submission, $fileId, $revisionId);
348
		LayoutEditorAction::deleteArticleImage($submission, $fileId, $revisionId);
349
		Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
349
		Request::redirect(null, null, 'editGalley', array($articleId, $galleyId));
 Lines 394-400    Link Here 
394
			$templateMgr =& TemplateManager::getManager();
394
			$templateMgr =& TemplateManager::getManager();
395
			$templateMgr->assign('articleId', $articleId);
395
			$templateMgr->assign('articleId', $articleId);
396
			$templateMgr->assign_by_ref('suppFile', $suppFile);
396
			$templateMgr->assign_by_ref('suppFile', $suppFile);
397
			$templateMgr->display('submission/suppFile/suppFileView.tpl');
397
			$templateMgr->display('submission/suppFile/suppFileView.tpl');
398
		}
398
		}
399
	}
399
	}
 Lines 423-429    Link Here 
423
			// Send a notification to associated users
423
			// Send a notification to associated users
424
			import('lib.pkp.classes.notification.NotificationManager');
424
			import('lib.pkp.classes.notification.NotificationManager');
425
			$notificationManager = new NotificationManager();
425
			$notificationManager = new NotificationManager();
426
			$articleDao =& DAORegistry::getDAO('ArticleDAO');
426
			$articleDao =& DAORegistry::getDAO('ArticleDAO');
427
			$article =& $articleDao->getArticle($articleId);
427
			$article =& $articleDao->getArticle($articleId);
428
			$notificationUsers = $article->getAssociatedUserIds(true, false);
428
			$notificationUsers = $article->getAssociatedUserIds(true, false);
429
			foreach ($notificationUsers as $userRole) {
429
			foreach ($notificationUsers as $userRole) {
 Lines 433-439    Link Here 
433
					$article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED
433
					$article->getLocalizedTitle(), $url, 1, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED
434
				);
434
				);
435
			}
435
			}
436
436
437
			$request->redirect(null, null, 'submission', $articleId);
437
			$request->redirect(null, null, 'submission', $articleId);
438
		} else {
438
		} else {
439
			$submitForm->display();
439
			$submitForm->display();
 Lines 567-579    Link Here 
567
				} else {
567
				} else {
568
					$isValid = true;
568
					$isValid = true;
569
				}
569
				}
570
			}
570
			}
571
		}
571
		}
572
		if (!$isValid) {
572
		if (!$isValid) {
573
			Request::redirect(null, Request::getRequestedPage());
573
			Request::redirect(null, Request::getRequestedPage());
574
		}
574
		}
575
575
576
		$this->journal =& $journal;
576
		$this->journal =& $journal;
577
		$this->submission =& $submission;
577
		$this->submission =& $submission;
578
		return true;
578
		return true;
 Lines 588-596    Link Here 
588
	 */
588
	 */
589
	function layoutEditingEnabled(&$submission) {
589
	function layoutEditingEnabled(&$submission) {
590
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
590
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
591
		$layoutEditorProofreadSignoff = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
591
		$layoutEditorProofreadSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
592
		$layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
592
		$layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
593
593
594
		return(($layoutSignoff->getDateNotified() != null
594
		return(($layoutSignoff->getDateNotified() != null
595
			&& $layoutSignoff->getDateCompleted() == null)
595
			&& $layoutSignoff->getDateCompleted() == null)
596
		|| ($layoutEditorProofreadSignoff->getDateNotified() != null
596
		|| ($layoutEditorProofreadSignoff->getDateNotified() != null
(-)ojs-2.3.4ORIG/pages/proofreader/SubmissionProofreadHandler.inc.php (-8 / +8 lines)
 Lines 9-15    Link Here 
9
 * @class SubmissionProofreadHandler
9
 * @class SubmissionProofreadHandler
10
 * @ingroup pages_proofreader
10
 * @ingroup pages_proofreader
11
 *
11
 *
12
 * @brief Handle requests for proofreader submission functions.
12
 * @brief Handle requests for proofreader submission functions.
13
 */
13
 */
14
// $Id$
14
// $Id$
 Lines 19-32    Link Here 
19
class SubmissionProofreadHandler extends ProofreaderHandler {
19
class SubmissionProofreadHandler extends ProofreaderHandler {
20
	/** submission associated with the request **/
20
	/** submission associated with the request **/
21
	var $submission;
21
	var $submission;
22
22
23
	/**
23
	/**
24
	 * Constructor
24
	 * Constructor
25
	 **/
25
	 **/
26
	function SubmissionProofreadHandler() {
26
	function SubmissionProofreadHandler() {
27
		parent::ProofreaderHandler();
27
		parent::ProofreaderHandler();
28
	}
28
	}
29
29
30
	/**
30
	/**
31
	 * Submission - Proofreading view
31
	 * Submission - Proofreading view
32
	 */
32
	 */
 Lines 52-58    Link Here 
52
		$templateMgr->assign_by_ref('authors', $authors);
52
		$templateMgr->assign_by_ref('authors', $authors);
53
		$templateMgr->assign_by_ref('submission', $submission);
53
		$templateMgr->assign_by_ref('submission', $submission);
54
		$templateMgr->assign('useLayoutEditors', $useLayoutEditors);
54
		$templateMgr->assign('useLayoutEditors', $useLayoutEditors);
55
		$templateMgr->assign('helpTopicId', 'editorial.proofreadersRole.proofreading');
55
		$templateMgr->assign('helpTopicId', 'editorial.proofreadersRole.proofreading');
56
		$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
56
		$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
57
		$publishedArticle =& $publishedArticleDao->getPublishedArticleByArticleId($submission->getArticleId());
57
		$publishedArticle =& $publishedArticleDao->getPublishedArticleByArticleId($submission->getArticleId());
 Lines 77-83    Link Here 
77
		if (ProofreaderAction::proofreadEmail($articleId, 'PROOFREAD_COMPLETE', Request::getUserVar('send')?'':Request::url(null, 'proofreader', 'completeProofreader'))) {
77
		if (ProofreaderAction::proofreadEmail($articleId, 'PROOFREAD_COMPLETE', Request::getUserVar('send')?'':Request::url(null, 'proofreader', 'completeProofreader'))) {
78
			Request::redirect(null, null, 'submission', $articleId);
78
			Request::redirect(null, null, 'submission', $articleId);
79
		}
79
		}
80
	}
80
	}
81
	function viewMetadata($args, $request) {
81
	function viewMetadata($args, $request) {
 Lines 107-122    Link Here 
107
		$submission =& $proofreaderDao->getSubmission($articleId, $journal->getId());
107
		$submission =& $proofreaderDao->getSubmission($articleId, $journal->getId());
108
		if (isset($submission)) {
108
		if (isset($submission)) {
109
			$proofSignoff = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
109
			$proofSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
110
			if ($proofSignoff->getUserId() == $user->getId()) {
110
			if ($proofSignoff->getUserId() == $user->getId()) {
111
				$isValid = true;
111
				$isValid = true;
112
			}
112
			}
113
		}
113
		}
114
		if (!$isValid) {
114
		if (!$isValid) {
115
			Request::redirect(null, Request::getRequestedPage());
115
			Request::redirect(null, Request::getRequestedPage());
116
		}
116
		}
117
117
118
		$this->submission =& $submission;
118
		$this->submission =& $submission;
119
		return true;
119
		return true;
120
	}
120
	}
(-)ojs-2.3.4ORIG/pages/sectionEditor/SubmissionEditHandler.inc.php (-1 / +1 lines)
 Lines 2306-2312    Link Here 
2306
		$this->setupTemplate(true, $articleId, 'editing');
2306
		$this->setupTemplate(true, $articleId, 'editing');
2307
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
2307
		$signoffDao =& DAORegistry::getDAO('SignoffDAO');
2308
		$signoff = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
2308
		$signoff = $signoffDao->build('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
2309
		$signoff->setDateNotified(Core::getCurrentDate());
2309
		$signoff->setDateNotified(Core::getCurrentDate());
2310
		$signoff->setDateUnderway(null);
2310
		$signoff->setDateUnderway(null);
2311
		$signoff->setDateCompleted(null);
2311
		$signoff->setDateCompleted(null);

Return to bug 6456