API: Remove CMS_PATH and CMS_DIR

This commit is contained in:
Sam Minnee 2017-06-28 10:17:52 +12:00 committed by Damian Mooyman
parent ce730319ec
commit ef6db273a1

View File

@ -17,14 +17,10 @@ use SilverStripe\View\Parsers\ShortcodeParser;
* - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms" * - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms"
*/ */
call_user_func(function () { call_user_func(function () {
define('CMS_PATH', __DIR__);
// Check if CMS is root dir, or subdir // Check if CMS is root dir, or subdir
if (strcasecmp(__DIR__, BASE_PATH) === 0) { if (strcasecmp(__DIR__, BASE_PATH) === 0) {
define('CMS_DIR', '');
$clientPath = 'client'; $clientPath = 'client';
} else { } else {
define('CMS_DIR', basename(__DIR__));
$clientPath = basename(__DIR__) . '/client'; $clientPath = basename(__DIR__) . '/client';
} }