From 99a4ca61924fac330bfd5c05c76ce17387bc2e47 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Wed, 9 Jul 2014 08:31:51 +0000 Subject: [PATCH] Move all runtime configs to "configs" dir --- .gitignore | 2 +- src/mibew/README.txt | 6 +++--- src/mibew/{libs => configs}/database_schema.yml | 0 src/mibew/{libs => configs}/default_config.php | 0 src/mibew/{libs => configs}/routing.yml | 0 src/mibew/{libs => configs}/routing_install.yml | 0 src/mibew/libs/classes/Mibew/Installer.php | 4 ++-- .../libs/classes/Mibew/Routing/RouteCollectionLoader.php | 4 ++-- src/mibew/libs/common/configurations.php | 2 +- src/mibew/libs/common/locale.php | 4 ++-- src/mibew/libs/init.php | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) rename src/mibew/{libs => configs}/database_schema.yml (100%) rename src/mibew/{libs => configs}/default_config.php (100%) rename src/mibew/{libs => configs}/routing.yml (100%) rename src/mibew/{libs => configs}/routing_install.yml (100%) diff --git a/.gitignore b/.gitignore index c2440b30..0e3a1292 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ src/absent_* src/release* # Do not index actual configuration files -src/mibew/libs/config.php +src/mibew/configs/config.php src/tests/server_side/mibew/libs/config.php # Do not index avatars diff --git a/src/mibew/README.txt b/src/mibew/README.txt index 45e3a2ab..b179872d 100644 --- a/src/mibew/README.txt +++ b/src/mibew/README.txt @@ -13,8 +13,8 @@ INSTALLATION 2. Upload all the files contained in this archive (retaining the directory structure) into created folder. Be sure to chmod the mibew folder to 755 and the install folder to 644. 3. Add a MySQL database with the name 'mibew' -4. Copy /mibew/libs/default_config.php to /mibew/libs/config.php -5. Edit /mibew/libs/config.php to the information needed to connect to the database +4. Copy /mibew/configs/default_config.php to /mibew/configs/config.php +5. Edit /mibew/configs/config.php to the information needed to connect to the database 6. Using your web browser visit http:///mibew/install/ and hit 'Create tables' 7. Remove /mibew/install/ directory from your server @@ -32,7 +32,7 @@ The owner should have all rights on the folder /mibew/files/avatar UPDATE -1. Backup your /mibew/libs/config.php +1. Backup your /mibew/configs/config.php 2. Backup your /mibew/files/avatar folder. 3. Delete the items in the mibew folder on the server. 4. Upload all the files contained in the downloaded archive (retaining the directory structure) into mibew folder. diff --git a/src/mibew/libs/database_schema.yml b/src/mibew/configs/database_schema.yml similarity index 100% rename from src/mibew/libs/database_schema.yml rename to src/mibew/configs/database_schema.yml diff --git a/src/mibew/libs/default_config.php b/src/mibew/configs/default_config.php similarity index 100% rename from src/mibew/libs/default_config.php rename to src/mibew/configs/default_config.php diff --git a/src/mibew/libs/routing.yml b/src/mibew/configs/routing.yml similarity index 100% rename from src/mibew/libs/routing.yml rename to src/mibew/configs/routing.yml diff --git a/src/mibew/libs/routing_install.yml b/src/mibew/configs/routing_install.yml similarity index 100% rename from src/mibew/libs/routing_install.yml rename to src/mibew/configs/routing_install.yml diff --git a/src/mibew/libs/classes/Mibew/Installer.php b/src/mibew/libs/classes/Mibew/Installer.php index 5e869245..99eea6fe 100644 --- a/src/mibew/libs/classes/Mibew/Installer.php +++ b/src/mibew/libs/classes/Mibew/Installer.php @@ -370,7 +370,7 @@ class Installer $this->errors[] = getlocal( "Please, check file {0}
Wrong value of \$mibewroot variable, should be \"{1}\"", array( - $real_base_path . "/libs/config.php", + $real_base_path . "/configs/config.php", $real_base_path ) ); @@ -730,7 +730,7 @@ class Installer */ protected function getDatabaseSchema() { - return $this->parser->parse(file_get_contents(MIBEW_FS_ROOT . '/libs/database_schema.yml')); + return $this->parser->parse(file_get_contents(MIBEW_FS_ROOT . '/configs/database_schema.yml')); } /** diff --git a/src/mibew/libs/classes/Mibew/Routing/RouteCollectionLoader.php b/src/mibew/libs/classes/Mibew/Routing/RouteCollectionLoader.php index 56fa1d18..76f66797 100644 --- a/src/mibew/libs/classes/Mibew/Routing/RouteCollectionLoader.php +++ b/src/mibew/libs/classes/Mibew/Routing/RouteCollectionLoader.php @@ -102,7 +102,7 @@ class RouteCollectionLoader */ protected function loadCoreRoutes() { - return $this->loader->load('libs/routing.yml'); + return $this->loader->load('configs/routing.yml'); } /** @@ -113,7 +113,7 @@ class RouteCollectionLoader */ protected function loadInstallationRoutes() { - return $this->loader->load('libs/routing_install.yml'); + return $this->loader->load('configs/routing_install.yml'); } /** diff --git a/src/mibew/libs/common/configurations.php b/src/mibew/libs/common/configurations.php index 9ad069cf..30bd75e9 100644 --- a/src/mibew/libs/common/configurations.php +++ b/src/mibew/libs/common/configurations.php @@ -29,7 +29,7 @@ function load_system_configs() if (is_null($configs)) { // Load and "parse" configs file. While configs are written in a php // file include is the only option to load and parse them. - include(MIBEW_FS_ROOT . "/libs/config.php"); + include(MIBEW_FS_ROOT . "/configs/config.php"); $configs = array( 'mibew_root' => $mibewroot, diff --git a/src/mibew/libs/common/locale.php b/src/mibew/libs/common/locale.php index e68e72bd..78dea1b9 100644 --- a/src/mibew/libs/common/locale.php +++ b/src/mibew/libs/common/locale.php @@ -27,7 +27,7 @@ define('LOCALE_COOKIE_NAME', 'mibew_locale'); /** * Verified value of the $default_locale configuration parameter (see - * "libs/default_config.php" for details) + * "configs/default_config.php" for details) */ define( 'DEFAULT_LOCALE', @@ -38,7 +38,7 @@ define( /** * Verified value of the $home_locale configuration parameter (see - * "libs/default_config.php" for details) + * "configs/default_config.php" for details) */ define( 'HOME_LOCALE', diff --git a/src/mibew/libs/init.php b/src/mibew/libs/init.php index fcf6abfd..4520bd0a 100644 --- a/src/mibew/libs/init.php +++ b/src/mibew/libs/init.php @@ -91,7 +91,7 @@ if (!installation_in_progress()) { if (!empty($configs['plugins'])) { // A list of plugins is defined in $plugins_list variable in - // libs/config.php + // configs/config.php \Mibew\Plugin\Manager::loadPlugins($configs['plugins']); } }