{"action":"created","issue":{"url":"https://api.github.com/repos/kaystrobach/TYPO3.piwikintegration/issues/47","labels_url":"https://api.github.com/repos/kaystrobach/TYPO3.piwikintegration/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/kaystrobach/TYPO3.piwikintegration/issues/47/comments","events_url":"https://api.github.com/repos/kaystrobach/TYPO3.piwikintegration/issues/47/events","html_url":"https://github.com/kaystrobach/TYPO3.piwikintegration/issues/47","id":70116858,"number":47,"title":"Unnecessary LocalConfiguration.php inclusion?","user":{"login":"AnatoliZich","id":9072861,"avatar_url":"https://avatars.githubusercontent.com/u/9072861?v=3","gravatar_id":"","url":"https://api.github.com/users/AnatoliZich","html_url":"https://github.com/AnatoliZich","followers_url":"https://api.github.com/users/AnatoliZich/followers","following_url":"https://api.github.com/users/AnatoliZich/following{/other_user}","gists_url":"https://api.github.com/users/AnatoliZich/gists{/gist_id}","starred_url":"https://api.github.com/users/AnatoliZich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnatoliZich/subscriptions","organizations_url":"https://api.github.com/users/AnatoliZich/orgs","repos_url":"https://api.github.com/users/AnatoliZich/repos","events_url":"https://api.github.com/users/AnatoliZich/events{/privacy}","received_events_url":"https://api.github.com/users/AnatoliZich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-22T12:54:21Z","updated_at":"2015-04-23T04:21:16Z","closed_at":null,"body":"Hey,\r\n\r\nwhile rebuilding my TYPO3 instance because of deployment reasons i stumbled upon an exception which is thrown by the Auth.php file in the TYPO3Login Piwik Plugin. I traced it back to this snipped:\r\n\r\n```php\r\n\t/**\r\n *  Fix some problems with external DB usage  \r\n */ \r\n/**\r\n * for version 3.0.9\r\n */\r\n\r\n\tif(!defined('TYPO3_MODE')) {\r\n\t\tdefine('TYPO3_MODE', 'BE');\r\n\t}\r\n\tif(file_exists(PIWIK_INCLUDE_PATH.'/../../LocalConfiguration.php')) {\r\n\t\t$TYPO3config = include(PIWIK_INCLUDE_PATH.'/../../LocalConfiguration.php');\r\n\t\t// Try AdditionalConfiguration.php if database was not defined in LocalConfiguration.php\r\n\t\tif (empty($TYPO3config['DB']['database']) && file_exists(PIWIK_INCLUDE_PATH . '/../../AdditionalConfiguration.php')) {\r\n\t\t\t// Load AdditionalConfiguration.php via closure to avoid variable leak\r\n\t\t\tcall_user_func(function() use (&$TYPO3config) {\r\n\t\t\t\t// Allow for e.g. array_merge calls within AdditionalConfiguration.php\r\n\t\t\t\t$GLOBALS['TYPO3_CONF_VARS'] = $TYPO3config;\r\n\t\t\t\tinclude PIWIK_INCLUDE_PATH.'/../../AdditionalConfiguration.php';\r\n\t\t\t\t$TYPO3config['DB']['database'] = $GLOBALS['TYPO3_CONF_VARS']['DB']['database'];\r\n\t\t\t});\r\n\t\t}\r\n\t\tdefine('TYPO3DB', $TYPO3config['DB']['database']);\r\n\t} elseif(file_exists(PIWIK_INCLUDE_PATH.'/../../localconf.php')) {\r\n\t\tinclude(PIWIK_INCLUDE_PATH.'/../../localconf.php');\r\n\t\tdefine('TYPO3DB',$typo_db);\r\n\t} else {\r\n\t\tthrow new \\Exception('Can´t include TYPO3-config file');\r\n\t}\r\n```\r\nThis is caused by my piwik folder which is just linked into the typo3conf folder which works just fine except for this. Well, thats leads to the Exception in the else branch as the LocalConfiguration can't be resolved using relative paths anymore. I then tried to understand what the purpose of this snipped is and could not find any solution. It generates a TYPO3DB constant which is not used anywhere. Could this be obsolete? Deleting these lines fixes my problem without any side effects."},"comment":{"url":"https://api.github.com/repos/kaystrobach/TYPO3.piwikintegration/issues/comments/95423583","html_url":"https://github.com/kaystrobach/TYPO3.piwikintegration/issues/47#issuecomment-95423583","issue_url":"https://api.github.com/repos/kaystrobach/TYPO3.piwikintegration/issues/47","id":95423583,"user":{"login":"kaystrobach","id":1185776,"avatar_url":"https://avatars.githubusercontent.com/u/1185776?v=3","gravatar_id":"","url":"https://api.github.com/users/kaystrobach","html_url":"https://github.com/kaystrobach","followers_url":"https://api.github.com/users/kaystrobach/followers","following_url":"https://api.github.com/users/kaystrobach/following{/other_user}","gists_url":"https://api.github.com/users/kaystrobach/gists{/gist_id}","starred_url":"https://api.github.com/users/kaystrobach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaystrobach/subscriptions","organizations_url":"https://api.github.com/users/kaystrobach/orgs","repos_url":"https://api.github.com/users/kaystrobach/repos","events_url":"https://api.github.com/users/kaystrobach/events{/privacy}","received_events_url":"https://api.github.com/users/kaystrobach/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T04:21:16Z","updated_at":"2015-04-23T04:21:16Z","body":"will check lateron, we atleast needed it in earlier versions to avoid the some sync operations"}}