Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Fallback to sapphire/silverstripe_version if there is no CMS (…

…framework only)
  • Loading branch information...
commit df82dac3345215f6d8f416dd99447acc1a7105f7 1 parent 8790ba3
@simonwelsh simonwelsh authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 admin/code/LeftAndMain.php
View
6 admin/code/LeftAndMain.php
@@ -1216,7 +1216,11 @@ public function PreviewLink() {
* @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",
Please sign in to comment.
Something went wrong with that request. Please try again.