extra _extraPath if not empty, add rootDir.'../pear' to include path

This commit is contained in:
Uwe Steinmann 2021-07-23 12:08:26 +02:00
parent e29976bf25
commit 6a72b3c0fa

View File

@ -35,11 +35,12 @@ if(!trim($settings->_encryptionKey)) {
$settings->save();
}
if(isset($settings->_extraPath))
ini_set('include_path', $settings->_rootDir.'pear'. PATH_SEPARATOR .ini_get('include_path'));
if(!empty($settings->_extraPath)) {
ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
}
/* composer is installed in pear directory */
require_once 'vendor/autoload.php';
require_once $settings->_rootDir.'../pear/vendor/autoload.php';
if(isset($settings->_maxExecutionTime)) {
if (php_sapi_name() !== "cli") {
@ -67,3 +68,7 @@ if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
* relative to it.
*/
ini_set('include_path', $settings->_rootDir. PATH_SEPARATOR .ini_get('include_path'));
/* Add root Dir.'../pear'. Needed because the SeedDMS_Core, etc. are included
* relative to it.
*/
ini_set('include_path', $settings->_rootDir.'../pear'. PATH_SEPARATOR .ini_get('include_path'));