From 1f49cbfccbd8c156586a6bca22a4150aa50c0402 Mon Sep 17 00:00:00 2001 From: gevorgmansuryan Date: Thu, 26 Dec 2024 03:45:10 +0400 Subject: [PATCH] Rename dynamic.php and DynamicConfig.php --- protected/config/.gitignore | 2 +- protected/humhub/config/common.php | 2 +- protected/humhub/libs/DynamicConfig.php | 2 +- protected/humhub/libs/SelfTest.php | 2 +- .../tests/codeception/config/acceptance.php | 2 +- .../config/databaseCredentials.php | 30 +++++++++++++++++++ .../tests/codeception/config/dynamic.php | 30 ------------------- 7 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 protected/humhub/tests/codeception/config/databaseCredentials.php delete mode 100644 protected/humhub/tests/codeception/config/dynamic.php diff --git a/protected/config/.gitignore b/protected/config/.gitignore index 71d9ab7be1..3b29f58076 100644 --- a/protected/config/.gitignore +++ b/protected/config/.gitignore @@ -1,4 +1,4 @@ -/dynamic.php +/databaseCredentials.php /common.php /console.php /security.json diff --git a/protected/humhub/config/common.php b/protected/humhub/config/common.php index 4e452ae9fd..23bb273b53 100644 --- a/protected/humhub/config/common.php +++ b/protected/humhub/config/common.php @@ -192,7 +192,7 @@ $config = [ 'params' => [ 'installed' => false, 'databaseDefaultStorageEngine' => 'InnoDB', - 'dynamicConfigFile' => '@config/dynamic.php', + 'databaseCredFile' => '@config/databaseCredentials.php', 'moduleAutoloadPaths' => ['@app/modules', '@humhub/modules'], 'availableLanguages' => [ 'en-US' => 'English (US)', diff --git a/protected/humhub/libs/DynamicConfig.php b/protected/humhub/libs/DynamicConfig.php index 63e51c6410..5867e54af7 100644 --- a/protected/humhub/libs/DynamicConfig.php +++ b/protected/humhub/libs/DynamicConfig.php @@ -88,7 +88,7 @@ class DynamicConfig extends BaseObject public static function getConfigFilePath() { - return Yii::getAlias(Yii::$app->params['dynamicConfigFile']); + return Yii::getAlias(Yii::$app->params['databaseCredFile']); } public static function exist() diff --git a/protected/humhub/libs/SelfTest.php b/protected/humhub/libs/SelfTest.php index 32c727756a..871fadebdb 100644 --- a/protected/humhub/libs/SelfTest.php +++ b/protected/humhub/libs/SelfTest.php @@ -580,7 +580,7 @@ class SelfTest } // Check Dynamic Config is Writable $title = Yii::t('AdminModule.information', 'Permissions') . ' - ' . Yii::t('AdminModule.information', 'Dynamic Config'); - $path = Yii::getAlias(Yii::$app->params['dynamicConfigFile']); + $path = Yii::getAlias(Yii::$app->params['databaseCredFile']); if (!is_file($path)) { $path = dirname($path); } diff --git a/protected/humhub/tests/codeception/config/acceptance.php b/protected/humhub/tests/codeception/config/acceptance.php index 1011d63ebb..d757bc0bac 100644 --- a/protected/humhub/tests/codeception/config/acceptance.php +++ b/protected/humhub/tests/codeception/config/acceptance.php @@ -14,7 +14,7 @@ $testConfig = [ ], ], 'params' => [ - 'dynamicConfigFile' => '@humhub/tests/codeception/config/dynamic.php', + 'databaseCredFile' => '@humhub/tests/codeception/config/databaseCredentials.php', 'installed' => true, 'settings' => [ 'core' => [ diff --git a/protected/humhub/tests/codeception/config/databaseCredentials.php b/protected/humhub/tests/codeception/config/databaseCredentials.php new file mode 100644 index 0000000000..1b6f104d07 --- /dev/null +++ b/protected/humhub/tests/codeception/config/databaseCredentials.php @@ -0,0 +1,30 @@ + 'HumHub', + 'language' => 'en-US', + 'timeZone' => 'Europe/Berlin', + 'components' => + [ + 'formatter' => + [ + 'defaultTimeZone' => 'Europe/Berlin', + ], + 'user' => + [ + ], + 'mailer' => + [ + 'useFileTransport' => true, + ], + 'cache' => + [ + 'class' => 'yii\\caching\\DummyCache', + 'keyPrefix' => 'humhub', + ], + ], + 'params' => + [ + 'config_created_at' => 1509135303, + ], +]; diff --git a/protected/humhub/tests/codeception/config/dynamic.php b/protected/humhub/tests/codeception/config/dynamic.php deleted file mode 100644 index 801e64817c..0000000000 --- a/protected/humhub/tests/codeception/config/dynamic.php +++ /dev/null @@ -1,30 +0,0 @@ - 'HumHub', - 'language' => 'en-US', - 'timeZone' => 'Europe/Berlin', - 'components' => - [ - 'formatter' => - [ - 'defaultTimeZone' => 'Europe/Berlin', - ], - 'user' => - [ - ], - 'mailer' => - [ - 'useFileTransport' => true, - ], - 'cache' => - [ - 'class' => 'yii\\caching\\DummyCache', - 'keyPrefix' => 'humhub', - ], - ], - 'params' => - [ - 'config_created_at' => 1509135303, - ], -];