From cca2034b2255896b84e0f4d044773a7952a5e9e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 8 Aug 2014 19:14:14 +0200 Subject: [PATCH] Set event environment 'admin' for CLI --- wcfsetup/install/files/lib/system/event/EventHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/event/EventHandler.class.php b/wcfsetup/install/files/lib/system/event/EventHandler.class.php index e3164f9dcc..d22fed086e 100644 --- a/wcfsetup/install/files/lib/system/event/EventHandler.class.php +++ b/wcfsetup/install/files/lib/system/event/EventHandler.class.php @@ -52,7 +52,7 @@ class EventHandler extends SingletonFactory { * Loads all registered actions of the active package. */ protected function loadActions() { - $environment = (class_exists('wcf\system\WCFACP', false) ? 'admin' : 'user'); + $environment = ((class_exists('wcf\system\WCFACP', false) || class_exists('wcf\system\CLIWCF', false)) ? 'admin' : 'user'); $cache = EventListenerCacheBuilder::getInstance()->getData(); if (isset($cache['actions'][$environment])) { -- 2.20.1