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

Collapse All | Expand All

(-)lib/pkp/classes/handler/PKPHandler.inc.php (-2 / +9 lines)
 Lines 71-78    Link Here 
71
	/**
71
	/**
72
	 * Perform request access validation based on security settings.
72
	 * Perform request access validation based on security settings.
73
	 * @param $requiredContexts array
73
	 * @param $requiredContexts array
74
	 * @param $request Request
74
	 */
75
	 */
75
	function validate($requiredContexts = null) {
76
	function validate($requiredContexts = null, $request = null) {
77
		// FIXME: for backwards compatibility only - remove when request/router refactoring complete
78
		if (!isset($request)) {
79
			if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function call.');
80
			$request =& Registry::get('request');
81
		}
82
76
		foreach ($this->_checks as $check) {
83
		foreach ($this->_checks as $check) {
77
			// WARNING: This line is for PHP4 compatibility when
84
			// WARNING: This line is for PHP4 compatibility when
78
			// instantiating handlers without reference. Should not
85
			// instantiating handlers without reference. Should not
 Lines 85-91    Link Here 
85
				if ( $check->redirectToLogin ) {
92
				if ( $check->redirectToLogin ) {
86
					Validation::redirectLogin();
93
					Validation::redirectLogin();
87
				} else {
94
				} else {
88
					PKPRequest::redirect(null, 'index');
95
					$request->redirect(null, 'index');
89
				}
96
				}
90
			}
97
			}
91
		}
98
		}

Return to bug 4934