mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Issue #5120 Fix customization of folder paths for handlers and plugins. Updated dependencies.
'defaultdb' is now deprecated in new e107_config.php. Use 'db' instead.
This commit is contained in:
16
class2.php
16
class2.php
@@ -157,12 +157,12 @@ if(!empty($CLASS2_INCLUDE))
|
||||
|
||||
if(empty($HANDLERS_DIRECTORY))
|
||||
{
|
||||
$HANDLERS_DIRECTORY = 'e107_handlers/';
|
||||
$HANDLERS_DIRECTORY = !empty($config['paths']['handlers']) ? $config['paths']['handlers'] : 'e107_handlers/';
|
||||
}
|
||||
|
||||
if(empty($PLUGINS_DIRECTORY))
|
||||
{
|
||||
$PLUGINS_DIRECTORY = 'e107_plugins/';
|
||||
$PLUGINS_DIRECTORY = !empty($config['paths']['plugins']) ? $config['paths']['plugins'] : 'e107_plugins/';
|
||||
}
|
||||
|
||||
//define("MPREFIX", $mySQLprefix); moved to $e107->set_constants()
|
||||
@@ -222,6 +222,13 @@ else // New e107_config.php format. v2.4+
|
||||
$e107_paths = $config['paths'];
|
||||
$sql_info = $config['database'];
|
||||
$E107_CONFIG = $config['other'] ?? [];
|
||||
|
||||
if(isset($sql_info['defaultdb']))
|
||||
{
|
||||
echo "WARNING: 'defaultdb' is deprecated. Please use 'db' instead.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
unset($config);
|
||||
}
|
||||
|
||||
@@ -291,11 +298,12 @@ e107::getSingleton('e107_traffic'); // We start traffic counting ASAP
|
||||
|
||||
//DEPRECATED, BC, $e107->sql caught by __get()
|
||||
/** @var e_db $sql */
|
||||
$sql = e107::getDb(); //TODO - find & replace $sql, $e107->sql
|
||||
$sql = e107::getDb();
|
||||
$sql->db_SetErrorReporting(false);
|
||||
|
||||
$dbg->logTime('SQL Connect');
|
||||
$merror=$sql->db_Connect($sql_info['server'], $sql_info['user'], $sql_info['password'], $sql_info['defaultdb']);
|
||||
|
||||
$merror=$sql->db_Connect($sql_info['server'], $sql_info['user'], $sql_info['password'], varset($sql_info['db'], $sql_info['db']));
|
||||
unset($sql_info);
|
||||
// create after the initial connection.
|
||||
//DEPRECATED, BC, call the method only when needed
|
||||
|
@@ -549,6 +549,11 @@ class e107
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($e107_config_mysql_info['db']))
|
||||
{
|
||||
$e107_config_mysql_info['defaultdb'] = $e107_config_mysql_info['db'];
|
||||
}
|
||||
|
||||
return $this->_init($e107_paths, $e107_root_path, $e107_config_mysql_info, $e107_config_override);
|
||||
}
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"description": "Test harness for e107",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"require-dev": {
|
||||
"twig/twig": "^3.0",
|
||||
"twig/twig": ">=3.14.1",
|
||||
"codeception/codeception": ">=5.0.11",
|
||||
"codeception/module-asserts": ">=3.0.0",
|
||||
"codeception/module-db": ">=3.1.2",
|
||||
@@ -15,11 +15,5 @@
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Helper\\": "tests/_support/Helper/",
|
||||
"Tests\\Unit\\": "tests/unit/"
|
||||
}
|
||||
}
|
||||
}
|
116
e107_tests/composer.lock
generated
116
e107_tests/composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "ae4819661a6eba7be2e2e4c2b9365531",
|
||||
"content-hash": "8f3cf57778f5679abfeb6f0b37d3a6c0",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
@@ -700,16 +700,16 @@
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "7.9.2",
|
||||
"version": "7.9.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/guzzle.git",
|
||||
"reference": "d281ed313b989f213357e3be1a179f02196ac99b"
|
||||
"reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
|
||||
"reference": "d281ed313b989f213357e3be1a179f02196ac99b",
|
||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
|
||||
"reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -806,7 +806,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/guzzle/issues",
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.9.2"
|
||||
"source": "https://github.com/guzzle/guzzle/tree/7.9.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -822,20 +822,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-24T11:22:20+00:00"
|
||||
"time": "2025-03-27T13:37:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/promises",
|
||||
"version": "2.0.4",
|
||||
"version": "2.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/promises.git",
|
||||
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
|
||||
"reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
|
||||
"reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
|
||||
"url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c",
|
||||
"reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -889,7 +889,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/promises/issues",
|
||||
"source": "https://github.com/guzzle/promises/tree/2.0.4"
|
||||
"source": "https://github.com/guzzle/promises/tree/2.2.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -905,20 +905,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-10-17T10:06:22+00:00"
|
||||
"time": "2025-03-27T13:27:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/psr7",
|
||||
"version": "2.7.0",
|
||||
"version": "2.7.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/psr7.git",
|
||||
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
|
||||
"reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
|
||||
"reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
|
||||
"url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16",
|
||||
"reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1005,7 +1005,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/guzzle/psr7/issues",
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.7.0"
|
||||
"source": "https://github.com/guzzle/psr7/tree/2.7.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1021,7 +1021,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-07-18T11:15:46+00:00"
|
||||
"time": "2025-03-27T12:30:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "masterminds/html5",
|
||||
@@ -1394,16 +1394,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
"version": "12.0.5",
|
||||
"version": "12.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
|
||||
"reference": "da732486790670c622aa367eb3dbb7e1619e68be"
|
||||
"reference": "d331a5ced3d9a2b917baa9841b2211e72f9e780d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/da732486790670c622aa367eb3dbb7e1619e68be",
|
||||
"reference": "da732486790670c622aa367eb3dbb7e1619e68be",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d331a5ced3d9a2b917baa9841b2211e72f9e780d",
|
||||
"reference": "d331a5ced3d9a2b917baa9841b2211e72f9e780d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1430,7 +1430,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "12.0.x-dev"
|
||||
"dev-main": "12.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1459,7 +1459,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
|
||||
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.0.5"
|
||||
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.1.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1467,7 +1467,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-03-15T07:24:51+00:00"
|
||||
"time": "2025-03-17T13:56:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-file-iterator",
|
||||
@@ -1716,16 +1716,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "12.0.7",
|
||||
"version": "12.0.10",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "2845e49082ef7acc4a71a2ef71bbf32f31da22c9"
|
||||
"reference": "6075843014de23bcd6992842d69ca99d25d6a433"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2845e49082ef7acc4a71a2ef71bbf32f31da22c9",
|
||||
"reference": "2845e49082ef7acc4a71a2ef71bbf32f31da22c9",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6075843014de23bcd6992842d69ca99d25d6a433",
|
||||
"reference": "6075843014de23bcd6992842d69ca99d25d6a433",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1739,7 +1739,7 @@
|
||||
"phar-io/manifest": "^2.0.4",
|
||||
"phar-io/version": "^3.2.1",
|
||||
"php": ">=8.3",
|
||||
"phpunit/php-code-coverage": "^12.0.4",
|
||||
"phpunit/php-code-coverage": "^12.1.0",
|
||||
"phpunit/php-file-iterator": "^6.0.0",
|
||||
"phpunit/php-invoker": "^6.0.0",
|
||||
"phpunit/php-text-template": "^5.0.0",
|
||||
@@ -1751,7 +1751,7 @@
|
||||
"sebastian/exporter": "^7.0.0",
|
||||
"sebastian/global-state": "^8.0.0",
|
||||
"sebastian/object-enumerator": "^7.0.0",
|
||||
"sebastian/type": "^6.0.0",
|
||||
"sebastian/type": "^6.0.2",
|
||||
"sebastian/version": "^6.0.0",
|
||||
"staabm/side-effects-detector": "^1.0.5"
|
||||
},
|
||||
@@ -1793,7 +1793,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.0.7"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/12.0.10"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -1809,7 +1809,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-03-07T07:32:22+00:00"
|
||||
"time": "2025-03-23T16:03:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/container",
|
||||
@@ -2901,16 +2901,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sebastian/type",
|
||||
"version": "6.0.0",
|
||||
"version": "6.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/type.git",
|
||||
"reference": "533fe082889a616f330bcba6f50965135f4f2fab"
|
||||
"reference": "1d7cd6e514384c36d7a390347f57c385d4be6069"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/533fe082889a616f330bcba6f50965135f4f2fab",
|
||||
"reference": "533fe082889a616f330bcba6f50965135f4f2fab",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/type/zipball/1d7cd6e514384c36d7a390347f57c385d4be6069",
|
||||
"reference": "1d7cd6e514384c36d7a390347f57c385d4be6069",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2946,7 +2946,7 @@
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/type/issues",
|
||||
"security": "https://github.com/sebastianbergmann/type/security/policy",
|
||||
"source": "https://github.com/sebastianbergmann/type/tree/6.0.0"
|
||||
"source": "https://github.com/sebastianbergmann/type/tree/6.0.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -2954,7 +2954,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-07T05:00:19+00:00"
|
||||
"time": "2025-03-18T13:37:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/version",
|
||||
@@ -3132,16 +3132,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v7.2.1",
|
||||
"version": "v7.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3"
|
||||
"reference": "e51498ea18570c062e7df29d05a7003585b19b88"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/fefcc18c0f5d0efe3ab3152f15857298868dc2c3",
|
||||
"reference": "fefcc18c0f5d0efe3ab3152f15857298868dc2c3",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/e51498ea18570c062e7df29d05a7003585b19b88",
|
||||
"reference": "e51498ea18570c062e7df29d05a7003585b19b88",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3205,7 +3205,7 @@
|
||||
"terminal"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/console/tree/v7.2.1"
|
||||
"source": "https://github.com/symfony/console/tree/v7.2.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3221,7 +3221,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-12-11T03:49:26+00:00"
|
||||
"time": "2025-03-12T08:11:12+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
@@ -3962,16 +3962,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v7.2.4",
|
||||
"version": "v7.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf"
|
||||
"reference": "87b7c93e57df9d8e39a093d32587702380ff045d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf",
|
||||
"reference": "d8f411ff3c7ddc4ae9166fb388d1190a2df5b5cf",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/87b7c93e57df9d8e39a093d32587702380ff045d",
|
||||
"reference": "87b7c93e57df9d8e39a093d32587702380ff045d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4003,7 +4003,7 @@
|
||||
"description": "Executes commands in sub-processes",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/process/tree/v7.2.4"
|
||||
"source": "https://github.com/symfony/process/tree/v7.2.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4019,7 +4019,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-02-05T08:33:46+00:00"
|
||||
"time": "2025-03-13T12:21:46+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
@@ -4276,16 +4276,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v7.2.3",
|
||||
"version": "v7.2.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "ac238f173df0c9c1120f862d0f599e17535a87ec"
|
||||
"reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/ac238f173df0c9c1120f862d0f599e17535a87ec",
|
||||
"reference": "ac238f173df0c9c1120f862d0f599e17535a87ec",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912",
|
||||
"reference": "4c4b6f4cfcd7e52053f0c8bfad0f7f30fb924912",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4328,7 +4328,7 @@
|
||||
"description": "Loads and dumps YAML files",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/yaml/tree/v7.2.3"
|
||||
"source": "https://github.com/symfony/yaml/tree/v7.2.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -4344,7 +4344,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-01-07T12:55:42+00:00"
|
||||
"time": "2025-03-03T07:12:39+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
|
@@ -43,7 +43,7 @@ return [
|
||||
'server' => '{{ mySQLserver }}',
|
||||
'user' => '{{ mySQLuser }}',
|
||||
'password' => '{{ mySQLpassword }}',
|
||||
'defaultdb'=> '{{ mySQLdefaultdb }}',
|
||||
'db' => '{{ mySQLdefaultdb }}',
|
||||
'prefix' => '{{ mySQLprefix }}',
|
||||
'charset' => 'utf8',
|
||||
],
|
||||
|
@@ -1561,7 +1561,7 @@ return [
|
||||
'server' => '{$this->previous_steps['mysql']['server']}',
|
||||
'user' => '{$this->previous_steps['mysql']['user']}',
|
||||
'password' => '{$this->previous_steps['mysql']['password']}',
|
||||
'defaultdb'=> '{$this->previous_steps['mysql']['db']}',
|
||||
'db' => '{$this->previous_steps['mysql']['db']}',
|
||||
'prefix' => '{$this->previous_steps['mysql']['prefix']}',
|
||||
'charset' => 'utf8mb4',
|
||||
],
|
||||
|
Reference in New Issue
Block a user