mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fallback to sapphire/silverstripe_version if there is no CMS (framework only)
This commit is contained in:
parent
8790ba3c4f
commit
df82dac334
@ -1216,7 +1216,11 @@ class LeftAndMain extends Controller {
|
|||||||
* @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",
|
||||||
|
Loading…
Reference in New Issue
Block a user