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

Collapse All | Expand All

(-)pages/user/UserHandler.inc.php (-6 / +13 lines)
 Lines 88-94    Link Here 
88
			$this->getRoleDataForJournal($userId, $journalId, $submissionsCount, $isValid);
88
			$this->getRoleDataForJournal($userId, $journalId, $submissionsCount, $isValid);
89
			
89
			
90
			$subscriptionTypeDAO =& DAORegistry::getDAO('SubscriptionTypeDAO');
90
			$subscriptionTypeDAO =& DAORegistry::getDAO('SubscriptionTypeDAO');
91
			$subscriptionsEnabled = $journal->getSetting('publishingMode') && ($subscriptionTypeDAO->subscriptionTypesExistByInstitutional($journalId, false) || $subscriptionTypeDAO->subscriptionTypesExistByInstitutional($journalId, true)) ? true : false;
91
			$subscriptionsEnabled = $journal->getSetting('publishingMode') ==  PUBLISHING_MODE_SUBSCRIPTION
92
				&& ($subscriptionTypeDAO->subscriptionTypesExistByInstitutional($journalId, false)
93
					|| $subscriptionTypeDAO->subscriptionTypesExistByInstitutional($journalId, true)) ? true : false;
92
			$templateMgr->assign('subscriptionsEnabled', $subscriptionsEnabled);
94
			$templateMgr->assign('subscriptionsEnabled', $subscriptionsEnabled);
93
95
94
			import('payment.ojs.OJSPaymentManager');
96
			import('payment.ojs.OJSPaymentManager');
 Lines 121-127    Link Here 
121
123
122
		$journal =& Request::getJournal();
124
		$journal =& Request::getJournal();
123
		if (!$journal) Request::redirect(null, 'user');
125
		if (!$journal) Request::redirect(null, 'user');
124
		if (!$journal->getSetting('publishingMode')) Request::redirect(null, 'user');
126
		if ($journal->getSetting('publishingMode') !=  PUBLISHING_MODE_SUBSCRIPTION)
127
			Request::redirect(null, 'user');
125
		
128
		
126
		$journalId = $journal->getJournalId();
129
		$journalId = $journal->getJournalId();
127
		$subscriptionTypeDAO =& DAORegistry::getDAO('SubscriptionTypeDAO');
130
		$subscriptionTypeDAO =& DAORegistry::getDAO('SubscriptionTypeDAO');
 Lines 395-401    Link Here 
395
398
396
		$journal =& Request::getJournal();
399
		$journal =& Request::getJournal();
397
		if (!$journal) Request::redirect(null, 'user');
400
		if (!$journal) Request::redirect(null, 'user');
398
		if (!$journal->getSetting('publishingMode')) Request::redirect(null, 'user');
401
		if ($journal->getSetting('publishingMode') != PUBLISHING_MODE_SUBSCRIPTION)
402
			Request::redirect(null, 'user');
399
403
400
		import('payment.ojs.OJSPaymentManager');
404
		import('payment.ojs.OJSPaymentManager');
401
		$paymentManager =& OJSPaymentManager::getManager();
405
		$paymentManager =& OJSPaymentManager::getManager();
 Lines 465-471    Link Here 
465
469
466
		$journal =& Request::getJournal();
470
		$journal =& Request::getJournal();
467
		if (!$journal) Request::redirect(null, 'user');
471
		if (!$journal) Request::redirect(null, 'user');
468
		if (!$journal->getSetting('publishingMode')) Request::redirect(null, 'user');
472
		if ($journal->getSetting('publishingMode') != PUBLISHING_MODE_SUBSCRIPTION)
473
			Request::redirect(null, 'user');
469
474
470
		import('payment.ojs.OJSPaymentManager');
475
		import('payment.ojs.OJSPaymentManager');
471
		$paymentManager =& OJSPaymentManager::getManager();
476
		$paymentManager =& OJSPaymentManager::getManager();
 Lines 560-566    Link Here 
560
565
561
		$journal =& Request::getJournal();
566
		$journal =& Request::getJournal();
562
		if (!$journal) Request::redirect(null, 'user');
567
		if (!$journal) Request::redirect(null, 'user');
563
		if (!$journal->getSetting('publishingMode')) Request::redirect(null, 'user');
568
		if ($journal->getSetting('publishingMode') != PUBLISHING_MODE_SUBSCRIPTION)
569
			Request::redirect(null, 'user');
564
570
565
		import('payment.ojs.OJSPaymentManager');
571
		import('payment.ojs.OJSPaymentManager');
566
		$paymentManager =& OJSPaymentManager::getManager();
572
		$paymentManager =& OJSPaymentManager::getManager();
 Lines 606-612    Link Here 
606
612
607
		$journal =& Request::getJournal();
613
		$journal =& Request::getJournal();
608
		if (!$journal) Request::redirect(null, 'user');
614
		if (!$journal) Request::redirect(null, 'user');
609
		if (!$journal->getSetting('publishingMode')) Request::redirect(null, 'user');
615
		if ($journal->getSetting('publishingMode') != PUBLISHING_MODE_SUBSCRIPTION)
616
			Request::redirect(null, 'user');
610
617
611
		import('payment.ojs.OJSPaymentManager');
618
		import('payment.ojs.OJSPaymentManager');
612
		$paymentManager =& OJSPaymentManager::getManager();
619
		$paymentManager =& OJSPaymentManager::getManager();
(-)plugins/blocks/subscription/SubscriptionBlockPlugin.inc.php (-1 / +2 lines)
 Lines 74-80    Link Here 
74
		$journalId = ($journal)?$journal->getJournalId():null;
74
		$journalId = ($journal)?$journal->getJournalId():null;
75
		if (!$journal) return '';
75
		if (!$journal) return '';
76
76
77
		if (!$journal->getSetting('publishingMode')) return '';
77
		if ($journal->getSetting('publishingMode') != PUBLISHING_MODE_SUBSCRIPTION)
78
			return '';
78
79
79
		$user =& Request::getUser();
80
		$user =& Request::getUser();
80
		$userId = ($user)?$user->getId():null;
81
		$userId = ($user)?$user->getId():null;

Return to bug 1709