Skip to content

Commit

Permalink
MINOR: look for framework version in framework path rather than CMS path
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Apr 15, 2012
1 parent a0e320d commit 4718f14
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions code/controllers/CMSMain.php
Expand Up @@ -1164,13 +1164,15 @@ function duplicatewithchildren($request) {
*/
public function CMSVersion() {
$cmsVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown');
$sapphireVersion = file_get_contents(CMS_PATH . '/silverstripe_version');
if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown');
if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown', 'Unknown');

$frameworkVersion = file_get_contents(FRAMEWORK_PATH . '/silverstripe_version');
if(!$frameworkVersion) $frameworkVersion = _t('LeftAndMain.VersionUnknown', 'Unknown');

return sprintf(
"cms: %s, framework: %s",
"CMS: %s Framework: %s",
$cmsVersion,
$sapphireVersion
$frameworkVersion
);
}

Expand Down

0 comments on commit 4718f14

Please sign in to comment.