Skip to content

Commit

Permalink
BUGFIX Fallback to sapphire/silverstripe_version if there is no CMS (…
Browse files Browse the repository at this point in the history
…framework only)
  • Loading branch information
simonwelsh committed Feb 23, 2012
1 parent 8790ba3 commit df82dac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion admin/code/LeftAndMain.php
Expand Up @@ -1216,7 +1216,11 @@ public function PreviewLink() {
* @return string * @return string
*/ */
public function CMSVersion() { 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'); if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown', 'unknown');
return sprintf( return sprintf(
"sapphire: %s", "sapphire: %s",
Expand Down

0 comments on commit df82dac

Please sign in to comment.