From 4be8ab0c62da77639c4b03318d5eb455adefb08e Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Sat, 24 Mar 2012 11:47:27 +1300 Subject: [PATCH 1/2] MINOR Move definition of CMS_DIR and CMS_PATH into cms/_config.php --- core/Core.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/core/Core.php b/core/Core.php index 592bbb880..2c450b15e 100644 --- a/core/Core.php +++ b/core/Core.php @@ -20,8 +20,6 @@ * - MODULES_PATH: Not used at the moment * - THEMES_DIR: Path relative to webroot, e.g. "themes" * - THEMES_PATH: Absolute filepath, e.g. "/var/www/my-webroot/themes" - * - CMS_DIR: Path relative to webroot, e.g. "cms" - * - CMS_PATH: Absolute filepath, e.g. "/var/www/my-webroot/cms" * - SAPPHIRE_DIR: Path relative to webroot, e.g. "sapphire" * - SAPPHIRE_PATH:Absolute filepath, e.g. "/var/www/my-webroot/sapphire" * - SAPPHIRE_ADMIN_DIR: @@ -169,8 +167,6 @@ define('SAPPHIRE_DIR', 'sapphire'); define('SAPPHIRE_PATH', BASE_PATH . '/' . SAPPHIRE_DIR); define('SAPPHIRE_ADMIN_DIR', 'sapphire/admin'); define('SAPPHIRE_ADMIN_PATH', BASE_PATH . '/' . SAPPHIRE_ADMIN_DIR); -define('CMS_DIR', 'cms'); -define('CMS_PATH', BASE_PATH . '/' . CMS_DIR); define('THIRDPARTY_DIR', SAPPHIRE_DIR . '/thirdparty'); define('THIRDPARTY_PATH', BASE_PATH . '/' . THIRDPARTY_DIR); define('ASSETS_DIR', 'assets'); From fa999ca2de3df1feb9fe8149065dd525eda13e87 Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Sat, 24 Mar 2012 11:49:48 +1300 Subject: [PATCH 2/2] BUGFIX TableListField should only include CSS from the cms if the cms exists. --- forms/TableListField.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/forms/TableListField.php b/forms/TableListField.php index aef5c162d..ca9657ae2 100644 --- a/forms/TableListField.php +++ b/forms/TableListField.php @@ -1049,8 +1049,10 @@ JS function printall() { Requirements::clear(); - Requirements::css(CMS_DIR . '/css/typography.css'); - Requirements::css(CMS_DIR . '/css/cms_right.css'); + if(defined('CMS_DIR')) { + Requirements::css(CMS_DIR . '/css/typography.css'); + Requirements::css(CMS_DIR . '/css/cms_right.css'); + } Requirements::css(SAPPHIRE_DIR . '/css/TableListField_print.css'); $this->cachedSourceItems = null;