diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php index 226d1109c0bc1da80898446f7045da3f1ffa260f..de7259b5f116365707449a102b3ba98f9bd1a256 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractBase.php +++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php @@ -64,7 +64,7 @@ class AbstractBase extends AbstractActionController * * @return void */ - public function preDispatch(MvcEvent $e) + public function validateAccessPermission(MvcEvent $e) { // Make sure the current user has permission to access the module: if ($this->accessPermission @@ -90,7 +90,7 @@ class AbstractBase extends AbstractActionController if ($this->accessPermission) { $events = $this->getEventManager(); $events->attach( - MvcEvent::EVENT_DISPATCH, [$this, 'preDispatch'], 1000 + MvcEvent::EVENT_DISPATCH, [$this, 'validateAccessPermission'], 1000 ); } } diff --git a/module/VuFind/src/VuFind/Controller/InstallController.php b/module/VuFind/src/VuFind/Controller/InstallController.php index 89f340d7eb97342adeeff542c6d112f53efc1b9f..96f9be03e568c1b86bf9b9bed544c3230a4e0909 100644 --- a/module/VuFind/src/VuFind/Controller/InstallController.php +++ b/module/VuFind/src/VuFind/Controller/InstallController.php @@ -49,7 +49,7 @@ class InstallController extends AbstractBase * * @return void */ - public function preDispatch(MvcEvent $e) + public function validateAutoConfigureConfig(MvcEvent $e) { // If auto-configuration is disabled, prevent any other action from being // accessed: @@ -71,7 +71,9 @@ class InstallController extends AbstractBase { parent::attachDefaultListeners(); $events = $this->getEventManager(); - $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'preDispatch'], 1000); + $events->attach( + MvcEvent::EVENT_DISPATCH, [$this, 'validateAutoConfigureConfig'], 1000 + ); } /** diff --git a/module/VuFind/src/VuFind/Controller/SummonController.php b/module/VuFind/src/VuFind/Controller/SummonController.php index 3b3b804e8ac0a84cb5014ba9828c978cd21b60d6..f8294fb5bcdfd0757abe1a640540ae119cb17030 100644 --- a/module/VuFind/src/VuFind/Controller/SummonController.php +++ b/module/VuFind/src/VuFind/Controller/SummonController.php @@ -69,7 +69,7 @@ class SummonController extends AbstractSearch * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function preDispatch(MvcEvent $e) + public function injectSummonMessage(MvcEvent $e) { $this->layout()->poweredBy = 'Powered by Summonâ„¢ from Serials Solutions, a division of ProQuest.'; @@ -84,7 +84,9 @@ class SummonController extends AbstractSearch { parent::attachDefaultListeners(); $events = $this->getEventManager(); - $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'preDispatch'], 1000); + $events->attach( + MvcEvent::EVENT_DISPATCH, [$this, 'injectSummonMessage'], 1000 + ); } /** diff --git a/module/VuFind/src/VuFind/Controller/SummonrecordController.php b/module/VuFind/src/VuFind/Controller/SummonrecordController.php index 1368d5ece14b2cbc2514f156e73c37f162f0e350..7d5bc02f4216f47af1f920afacf349d89191cb2b 100644 --- a/module/VuFind/src/VuFind/Controller/SummonrecordController.php +++ b/module/VuFind/src/VuFind/Controller/SummonrecordController.php @@ -73,7 +73,7 @@ class SummonrecordController extends AbstractRecord * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ - public function preDispatch(MvcEvent $e) + public function injectSummonMessage(MvcEvent $e) { $this->layout()->poweredBy = 'Powered by Summonâ„¢ from Serials Solutions, a division of ProQuest.'; @@ -88,6 +88,8 @@ class SummonrecordController extends AbstractRecord { parent::attachDefaultListeners(); $events = $this->getEventManager(); - $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'preDispatch'], 1000); + $events->attach( + MvcEvent::EVENT_DISPATCH, [$this, 'injectSummonMessage'], 1000 + ); } } diff --git a/module/VuFind/src/VuFind/Controller/UpgradeController.php b/module/VuFind/src/VuFind/Controller/UpgradeController.php index 4023f625f2534270b2cb9eefaf7ec24e88a0c71a..29e76900125188d9840268e41784c4ab388dde8b 100644 --- a/module/VuFind/src/VuFind/Controller/UpgradeController.php +++ b/module/VuFind/src/VuFind/Controller/UpgradeController.php @@ -101,7 +101,7 @@ class UpgradeController extends AbstractBase * * @return void */ - public function preDispatch(MvcEvent $e) + public function validateAutoConfigureConfig(MvcEvent $e) { // If auto-configuration is disabled, prevent any other action from being // accessed: @@ -123,7 +123,9 @@ class UpgradeController extends AbstractBase { parent::attachDefaultListeners(); $events = $this->getEventManager(); - $events->attach(MvcEvent::EVENT_DISPATCH, [$this, 'preDispatch'], 1000); + $events->attach( + MvcEvent::EVENT_DISPATCH, [$this, 'validateAutoConfigureConfig'], 1000 + ); } /** diff --git a/module/VuFindAdmin/src/VuFindAdmin/Controller/AbstractAdmin.php b/module/VuFindAdmin/src/VuFindAdmin/Controller/AbstractAdmin.php index 53fa4bb76263f9afcda5598a6ddf9973dab3da7c..f3cda8fdd0c002a74570568c5ba1f4ba4bd4ce13 100644 --- a/module/VuFindAdmin/src/VuFindAdmin/Controller/AbstractAdmin.php +++ b/module/VuFindAdmin/src/VuFindAdmin/Controller/AbstractAdmin.php @@ -55,7 +55,7 @@ class AbstractAdmin extends \VuFind\Controller\AbstractBase * * @return void */ - public function preDispatch(MvcEvent $e) + public function validateAccessPermission(MvcEvent $e) { // Disable search box in Admin module: $this->layout()->searchbox = false; @@ -77,7 +77,7 @@ class AbstractAdmin extends \VuFind\Controller\AbstractBase } // Call parent method to do permission checking: - parent::preDispatch($e); + parent::validateAccessPermission($e); } /**