Commit 0a924c32 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fix inconsistency with static class Config.

parent 01d11e6c
......@@ -64,8 +64,7 @@ class Html2Pdf {
public function __construct(array $config = array(), $phpUnit = false) {
if (count($config) == 0) {
$cfg = new Config();
$config = $cfg->readConfig('');
$config = Config::readConfig('');
}
$this->config = $config;
......
......@@ -24,7 +24,7 @@ class Config {
* @param $configIni
* @param $configPhp
*/
private function migrateConfigIniToPhp($configIni, $configPhp) {
private static function migrateConfigIniToPhp($configIni, $configPhp) {
$config = parse_ini_file($configIni, false);
......@@ -52,7 +52,7 @@ class Config {
* @return array
* @throws UserReportException
*/
private function getCustomVariable(array $config) {
private static function getCustomVariable(array $config) {
for ($i = 1; $i <= 30; $i++) {
if (isset($config['custom' . $i])) {
......@@ -82,7 +82,7 @@ class Config {
* @throws UserFormException
* @throws UserReportException
*/
public function readConfig($configIni = '') {
public static function readConfig($configIni = '') {
$configT3qfq = array();
// Production Path to CONFIG_INI
......@@ -108,7 +108,7 @@ class Config {
// Migrate legacy config file.
if (is_readable($configIni) && !is_readable($configPhp)) {
$this->migrateConfigIniToPhp($configIni, $configPhp);
self::migrateConfigIniToPhp($configIni, $configPhp);
}
try {
......@@ -122,7 +122,7 @@ class Config {
throw new qfq\UserFormException ("Error read file " . $pathTypo3Conf . ": " . $e->getMessage(), ERROR_IO_READ_FILE);
}
$configT3qfq = $this->getCustomVariable($configT3qfq);
$configT3qfq = self::getCustomVariable($configT3qfq);
// Settings in config.qfq.ini overwrite T3 settings
$config = array_merge($configT3qfq, $config);
......@@ -159,6 +159,7 @@ class Config {
/**
* @param array $config
* @throws UserFormException
* @throws UserReportException
*/
private static function checkForAttack(array $config) {
$attack = false;
......@@ -209,6 +210,7 @@ class Config {
* @param array $config
* @param string $getParamName
* @throws UserFormException
* @throws UserReportException
*/
public static function attackDetectedExitNow(array $config = array(), $getParamName = '') {
......
......@@ -181,11 +181,11 @@ class Store {
* @param string $fileConfigIni
* @throws CodeException
* @throws UserFormException
* @throws UserReportException
*/
private static function fillStoreSystem($fileConfigIni = '') {
$cfg = new Config();
$config = $cfg->readConfig($fileConfigIni);
$config = Config::readConfig($fileConfigIni);
$config = self::doSystemPath($config);
$config = self::adjustConfig($config);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment