We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

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

Collapse All | Expand All

(-)file_not_specified_in_diff (-6 / +6 lines)
Line     Link Here 
0
-- a/pages/article/ArticleHandler.inc.php
0
++ b/pages/article/ArticleHandler.inc.php
 Lines 414-420   class ArticleHandler extends Handler { Link Here 
414
	 * @see lib/pkp/classes/handler/PKPHandler#validate()
414
	 * @see lib/pkp/classes/handler/PKPHandler#validate()
415
	 * @param $request Request
415
	 * @param $request Request
416
	 * @param $articleId integer
416
	 * @param $articleId integer
417
	 * @param $galleyId integer
417
	 * @param $galleyId int or string
418
	 */
418
	 */
419
	function validate(&$request, $articleId, $galleyId = null) {
419
	function validate(&$request, $articleId, $galleyId = null) {
420
		$router =& $request->getRouter();
420
		$router =& $request->getRouter();
 Lines 461-474   class ArticleHandler extends Handler { Link Here 
461
			$isSubscribedDomain = IssueAction::subscribedDomain($journal, $issue->getId(), $articleId);
461
			$isSubscribedDomain = IssueAction::subscribedDomain($journal, $issue->getId(), $articleId);
462
			// Check if login is required for viewing.
462
			// Check if login is required for viewing.
463
			if (!$isSubscribedDomain && !Validation::isLoggedIn() && $journal->getSetting('restrictArticleAccess') && isset($galleyId) && $galleyId != 0) {
463
			if (!$isSubscribedDomain && !Validation::isLoggedIn() && $journal->getSetting('restrictArticleAccess') && isset($galleyId) && $galleyId) {
464
				Validation::redirectLogin();
464
				Validation::redirectLogin();
465
			}
465
			}
466
			// bypass all validation if subscription based on domain or ip is valid
466
			// bypass all validation if subscription based on domain or ip is valid
467
			// or if the user is just requesting the abstract
467
			// or if the user is just requesting the abstract
468
			if ( (!$isSubscribedDomain && $subscriptionRequired) &&
468
			if ( (!$isSubscribedDomain && $subscriptionRequired) &&
469
			     (isset($galleyId) && $galleyId!=0) ) {
469
			     (isset($galleyId) && $galleyId) ) {
470
				// Subscription Access
470
				// Subscription Access
471
				$subscribedUser = IssueAction::subscribedUser($journal, $issue->getId(), $articleId);
471
				$subscribedUser = IssueAction::subscribedUser($journal, $issue->getId(), $articleId);
 Lines 484-492   class ArticleHandler extends Handler { Link Here 
484
						if ( $paymentManager->onlyPdfEnabled() ) {
484
						if ( $paymentManager->onlyPdfEnabled() ) {
485
							$galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
485
							$galleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
486
							if ($journal->getSetting('enablePublicGalleyId')) {
486
							if ($journal->getSetting('enablePublicGalleyId')) {
487
								$galley =& $galleyDao->getGalley($galleyId, $articleId);
488
							} else {
489
								$galley =& $galleyDao->getGalleyByBestGalleyId($galleyId, $articleId);
487
								$galley =& $galleyDao->getGalleyByBestGalleyId($galleyId, $articleId);
488
							} else {
489
								$galley =& $galleyDao->getGalley($galleyId, $articleId);
490
							}
490
							}
491
							if ( $galley && !$galley->isPdfGalley() ) {
491
							if ( $galley && !$galley->isPdfGalley() ) {
492
								$this->journal =& $journal;
492
								$this->journal =& $journal;

Return to bug 6458