Skip to content

Commit

Permalink
API CHANGE silverstripe_version file now contains the plain version n…
Browse files Browse the repository at this point in the history
…umber, rather than an SVN path
  • Loading branch information
chillu committed Feb 1, 2012
1 parent cb26a83 commit 71220ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 10 additions & 8 deletions code/controllers/CMSMain.php
Original file line number Diff line number Diff line change
Expand Up @@ -1275,18 +1275,20 @@ function duplicatewithchildren($request) {
/**
* Return the version number of this application.
* Uses the subversion path information in <mymodule>/silverstripe_version
* (automacially replaced $URL$ placeholder).
* (automacially replaced by build scripts).
*
* @return string
*/
public function CMSVersion() {
$sapphireVersionFile = file_get_contents(BASE_PATH . '/sapphire/silverstripe_version');
$cmsVersionFile = file_get_contents(BASE_PATH . '/cms/silverstripe_version');

$sapphireVersion = $this->versionFromVersionFile($sapphireVersionFile);
$cmsVersion = $this->versionFromVersionFile($cmsVersionFile);

return "cms: $cmsVersion, sapphire: $sapphireVersion";
$cmsVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown');
$sapphireVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown');
return sprintf(
"cms: %s, sapphire: %s",
$cmsVersion,
$sapphireVersion
);
}

/**
Expand Down
1 change: 0 additions & 1 deletion silverstripe_version
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
$URL$

0 comments on commit 71220ee

Please sign in to comment.