* [ADD] Unit testing. Work in progress

* [MOD] Request handling rewritten to make it testable
* [MOD] Code refactoring
This commit is contained in:
nuxsmin
2018-07-15 14:05:15 +02:00
parent 0b97368f9a
commit 9d42c23873
27 changed files with 541 additions and 413 deletions

View File

@@ -37,7 +37,6 @@ use SP\Providers\Log\RemoteSyslogHandler;
use SP\Providers\Log\SyslogHandler;
use SP\Providers\Mail\MailHandler;
use SP\Providers\Notification\NotificationHandler;
use SP\Util\Checks;
use SP\Util\Util;
/**
@@ -106,7 +105,7 @@ abstract class ModuleBase
if ($this->configData->isMaintenance()) {
Bootstrap::$LOCK = Util::getAppLock();
return (Checks::isAjax($this->router)
return ($this->request->isAjax()
|| (Bootstrap::$LOCK !== false
&& Bootstrap::$LOCK->userId > 0
&& $context->isLoggedIn()