Internal: Change how the bootstrap.inc.php file is included in endpoints (This completes commit ec095896)

This commit is contained in:
Molkobain
2019-08-13 17:38:51 +02:00
parent e3995a130f
commit 947e26d864
54 changed files with 820 additions and 1032 deletions

View File

@@ -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
*
*
*/
/**
@@ -40,14 +38,15 @@
);
// Load current environment
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';
// Protection against setup in the following configuration : ITIL Ticket with Enhanced Portal selected but neither UserRequest or Incident. Which would crash the portal.