From e4cb8190674539a4310cace0357637a90ded928b Mon Sep 17 00:00:00 2001 From: Clinton Graham Date: Fri, 19 Jul 2024 16:00:57 -0400 Subject: [PATCH] publons#18: Update Application::getRequest --- PublonsPlugin.inc.php | 6 +++--- classes/form/publonsSettingsForm.inc.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PublonsPlugin.inc.php b/PublonsPlugin.inc.php index bba1683..4041f22 100644 --- a/PublonsPlugin.inc.php +++ b/PublonsPlugin.inc.php @@ -163,7 +163,7 @@ function manage($args, $request) { function handleRequest($hookName, $params) { $page =& $params[0]; - $request = Application::getRequest(); + $request = Application::get()->getRequest(); AppLocale::requireComponents(); if ($page == 'reviewer' && $this->getEnabled()) { $op =& $params[1]; @@ -187,7 +187,7 @@ function handleRequest($hookName, $params) { function handleTemplateDisplay($hookName, $args) { if ($this->getEnabled()) { $templateMgr =& $args[0]; - $request = PKPApplication::getRequest(); + $request = Application::get()->getRequest(); // Assign our private stylesheet, for front and back ends. $templateMgr->addStyleSheet( @@ -288,7 +288,7 @@ function completedSubmissionOutputFilter($output, $templateMgr) { $templateMgr =& TemplateManager::getManager(); $templateMgr->unregisterFilter('output', array(&$this, 'completedSubmissionOutputFilter')); - $request = Application::getRequest(); + $request = Application::get()->getRequest(); $router = $request->getRouter(); import('lib.pkp.classes.linkAction.request.AjaxModal'); diff --git a/classes/form/publonsSettingsForm.inc.php b/classes/form/publonsSettingsForm.inc.php index d611cd9..dd02b5b 100644 --- a/classes/form/publonsSettingsForm.inc.php +++ b/classes/form/publonsSettingsForm.inc.php @@ -80,7 +80,7 @@ function execute() { $plugin->updateSetting($this->_journalId, 'auth_key', $this->getData('auth_key'), 'string'); $plugin->updateSetting($this->_journalId, 'info_url', $this->getData('info_url'), 'string'); - $request = PKPApplication::getRequest(); + $request = Application::get()->getRequest(); $currentUser = $request->getUser(); $notificationMgr = new NotificationManager(); $notificationMgr->createTrivialNotification($currentUser->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => __('plugins.generic.publons.notifications.settingsUpdated')));