mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
Internal: Change how the bootstrap.inc.php file is included in endpoints (This completes commit ec095896)
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
// Disable PhpUnhandledExceptionInspection as the exception handling is made by the file including this one
|
||||
@@ -32,14 +30,15 @@ require_once APPROOT.'/lib/autoload.php';
|
||||
// Load current environment if necessary (typically from CLI as the app is not started yet)
|
||||
if (!defined('MODULESROOT'))
|
||||
{
|
||||
if (file_exists(__DIR__.'/../../../../bootstrap.inc.php'))
|
||||
if (file_exists(__DIR__.'/../../../../approot.inc.php'))
|
||||
{
|
||||
require_once __DIR__.'/../../../../bootstrap.inc.php'; // When in env-xxxx folder
|
||||
require_once __DIR__.'/../../../../approot.inc.php'; // When in env-xxxx folder
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once __DIR__.'/../../../../../bootstrap.inc.php'; // When in datamodels/x.x folder
|
||||
require_once __DIR__.'/../../../../../approot.inc.php'; // When in datamodels/x.x folder
|
||||
}
|
||||
require_once APPROOT.'/bootstrap.inc.php';
|
||||
require_once APPROOT.'/application/startup.inc.php';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user