MINOR Don't assume existence of cms/ folder in LeftAndMain->CMSVersion() (regression from earlier code)

This commit is contained in:
Ingo Schommer 2012-04-09 23:55:23 +02:00
parent c2f7bf4dcf
commit 85a898e1d5

View File

@ -1172,7 +1172,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
* @return string
*/
public function CMSVersion() {
if(file_exists(CMS_PATH . '/silverstripe_version')) {
if(defined('CMS_PATH') && file_exists(CMS_PATH . '/silverstripe_version')) {
$sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
} else {
$sapphireVersion = file_get_contents(SAPPHIRE_PATH . '/silverstripe_version');