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
1 changed files with 0 additions and 4 deletions

View File

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