Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit f1429ad

Browse files
committed
[BUGFIX] Fix some issues with annotations and non-proper installations
Change-Id: I9f6619abbdf1d9332c932c4addee59bf79c9e00c
1 parent 2637116 commit f1429ad

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

Classes/Controller/DevlogController.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class DevlogController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle
3131
protected $extkeyOptions = [];
3232

3333
/**
34-
* @var DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository
34+
* @var \DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository
3535
*/
3636
protected $logEntryRepository;
3737

3838
/**
39-
* @param DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository $logEntryRepository
39+
* @param \DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository $logEntryRepository
4040
*/
4141
public function injectLogentryRepository(\DieMedialen\DmDeveloperlog\Domain\Repository\LogentryRepository $logEntryRepository)
4242
{
@@ -53,11 +53,13 @@ public function initializeIndexAction()
5353
/**
5454
* Main action for list
5555
*
56-
* @param DieMedialen\DmDeveloperlog\Domain\Model\Constraint $search
56+
* @param \DieMedialen\DmDeveloperlog\Domain\Model\Constraint $constraint
57+
*
58+
* @ignorevalidation $constraint
5759
*
5860
* @return void
5961
*/
60-
public function indexAction($constraint = NULL)
62+
public function indexAction(\DieMedialen\DmDeveloperlog\Domain\Model\Constraint $constraint = NULL)
6163
{
6264
$this->view->assign('constraint', $constraint);
6365
$this->view->assign('severity-options', $this->severityOptions);

Classes/Utility/Developerlog.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ class Developerlog {
2121
protected $extKey = 'dm_developerlog';
2222

2323
/** @var array $extConf */
24-
protected $extConf = array();
24+
protected $extConf = array(
25+
'minLogLevel' => 1,
26+
'excludeKeys' => 'TYPO3\CMS\Core\Authentication\AbstractUserAuthentication, TYPO3\CMS\Backend\Template\DocumentTemplate, extbase',
27+
'dataCap' => 1000000,
28+
'includeCallerInformation' => 1
29+
);
2530

2631
/** @var string $request_id */
2732
protected $request_id = '';
@@ -60,7 +65,11 @@ class Developerlog {
6065
*/
6166
public function __construct()
6267
{
63-
$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);
68+
$extConf = array();
69+
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey])) {
70+
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$this->extKey]);
71+
}
72+
$this->extConf = array_merge($this->extConf, $extConf);
6473
$this->request_id = \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->getRequestId();
6574
$this->request_type = TYPO3_REQUESTTYPE;
6675
$this->excludeKeys = GeneralUtility::trimExplode(',', $this->extConf['excludeKeys'], TRUE);
@@ -124,7 +133,7 @@ protected function getCurrentPageId()
124133
} else {
125134
$singletonInstances = GeneralUtility::getSingletonInstances();
126135
if (isset($singletonInstances['TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager'])) { // lucky us, that guy is clever
127-
$backendConfigurationManager = GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager');
136+
$backendConfigurationManager = GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Configuration\BackendConfigurationManager', GeneralUtility::makeInstance('TYPO3\CMS\Core\Database\QueryGenerator'));
128137
// getDefaultBackendStoragePid() because someone made getCurrentPageId() protected
129138
$this->currentPageId = $backendConfigurationManager->getDefaultBackendStoragePid();
130139
} else { // simplified backend check

0 commit comments

Comments
 (0)