From df82dac3345215f6d8f416dd99447acc1a7105f7 Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Thu, 23 Feb 2012 20:46:34 +1300 Subject: [PATCH] BUGFIX Fallback to sapphire/silverstripe_version if there is no CMS (framework only) --- admin/code/LeftAndMain.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 809fa9be9..bf4801699 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -1216,7 +1216,11 @@ class LeftAndMain extends Controller { * @return string */ public function CMSVersion() { - $sapphireVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version'); + if(file_exists(CMS_PATH . '/silverstripe_version')) { + $sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version'); + } else { + $sapphireVersion = file_get_contents(SAPPHIRE_PATH . '/silverstripe_version'); + } if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown', 'unknown'); return sprintf( "sapphire: %s",