mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Added special const RAINLOOP_INCLUDE_AS_API
This commit is contained in:
parent
91e3bd72d6
commit
0422aa5026
3 changed files with 2 additions and 6 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
define('APP_INDEX_ROOT_FILE', str_replace('\\', '/', __FILE__));
|
define('APP_INDEX_ROOT_PATH', str_replace('\\', '/', rtrim(dirname(__FILE__), '\\/').'/'));
|
||||||
define('APP_INDEX_ROOT_PATH', rtrim(dirname(APP_INDEX_ROOT_FILE), '/').'/');
|
|
||||||
|
|
||||||
$sCustomDataPath = '';
|
$sCustomDataPath = '';
|
||||||
if (file_exists(APP_INDEX_ROOT_PATH.'include.php'))
|
if (file_exists(APP_INDEX_ROOT_PATH.'include.php'))
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ if (!\defined('RAINLOOP_APP_ROOT_PATH'))
|
||||||
|
|
||||||
if (!$oException)
|
if (!$oException)
|
||||||
{
|
{
|
||||||
if (defined('APP_CALLER_AS_API') && APP_CALLER_AS_API)
|
if (defined('RAINLOOP_INCLUDE_AS_API') && RAINLOOP_INCLUDE_AS_API)
|
||||||
{
|
{
|
||||||
\RainLoop\Api::Handle();
|
\RainLoop\Api::Handle();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,9 +6,6 @@
|
||||||
define('APP_INDEX_FILE', 'index.php');
|
define('APP_INDEX_FILE', 'index.php');
|
||||||
define('APP_VERSION_ROOT_PATH', APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/');
|
define('APP_VERSION_ROOT_PATH', APP_INDEX_ROOT_PATH.'rainloop/v/'.APP_VERSION.'/');
|
||||||
|
|
||||||
define('APP_CALLER_ROOT_FILE', !empty($_SERVER['SCRIPT_FILENAME']) ? str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']) : '');
|
|
||||||
define('APP_CALLER_AS_API', APP_CALLER_ROOT_FILE !== APP_INDEX_ROOT_FILE);
|
|
||||||
|
|
||||||
if (function_exists('date_default_timezone_set'))
|
if (function_exists('date_default_timezone_set'))
|
||||||
{
|
{
|
||||||
date_default_timezone_set('UTC');
|
date_default_timezone_set('UTC');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue