Merge pull request #200 from simonwelsh/patch-1

BUGFIX Fallback to sapphire/silverstripe_version if there is no CMS (fra...
This commit is contained in:
Sam Minnée 2012-02-23 19:14:09 -08:00
commit 61c810a79a

View File

@ -1217,7 +1217,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",