### Eclipse Workspace Patch 1.0 #P pkp-ojs-cvs Index: lib/pkp/classes/handler/PKPHandler.inc.php =================================================================== RCS file: /cvs/pkp/classes/handler/PKPHandler.inc.php,v retrieving revision 1.10 diff -u -r1.10 PKPHandler.inc.php --- lib/pkp/classes/handler/PKPHandler.inc.php 10 Dec 2009 21:09:32 -0000 1.10 +++ lib/pkp/classes/handler/PKPHandler.inc.php 4 Jan 2010 19:12:20 -0000 @@ -71,8 +71,15 @@ /** * Perform request access validation based on security settings. * @param $requiredContexts array + * @param $request Request */ - function validate($requiredContexts = null) { + function validate($requiredContexts = null, $request = null) { + // FIXME: for backwards compatibility only - remove when request/router refactoring complete + if (!isset($request)) { + if (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function call.'); + $request =& Registry::get('request'); + } + foreach ($this->_checks as $check) { // WARNING: This line is for PHP4 compatibility when // instantiating handlers without reference. Should not @@ -85,7 +92,7 @@ if ( $check->redirectToLogin ) { Validation::redirectLogin(); } else { - PKPRequest::redirect(null, 'index'); + $request->redirect(null, 'index'); } } }