API CHANGE silverstripe_version file now contains the plain version number, rather than an SVN path

This commit is contained in:
Ingo Schommer 2012-02-01 18:30:24 +01:00
parent cb26a83bd1
commit 71220ee99f
2 changed files with 10 additions and 9 deletions

View File

@ -1275,18 +1275,20 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
/** /**
* Return the version number of this application. * Return the version number of this application.
* Uses the subversion path information in <mymodule>/silverstripe_version * Uses the subversion path information in <mymodule>/silverstripe_version
* (automacially replaced $URL$ placeholder). * (automacially replaced by build scripts).
* *
* @return string * @return string
*/ */
public function CMSVersion() { public function CMSVersion() {
$sapphireVersionFile = file_get_contents(BASE_PATH . '/sapphire/silverstripe_version'); $cmsVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
$cmsVersionFile = file_get_contents(BASE_PATH . '/cms/silverstripe_version'); if(!$cmsVersion) $cmsVersion = _t('LeftAndMain.VersionUnknown');
$sapphireVersion = file_get_contents(BASE_PATH . '/cms/silverstripe_version');
$sapphireVersion = $this->versionFromVersionFile($sapphireVersionFile); if(!$sapphireVersion) $sapphireVersion = _t('LeftAndMain.VersionUnknown');
$cmsVersion = $this->versionFromVersionFile($cmsVersionFile); return sprintf(
"cms: %s, sapphire: %s",
return "cms: $cmsVersion, sapphire: $sapphireVersion"; $cmsVersion,
$sapphireVersion
);
} }
/** /**

View File

@ -1 +0,0 @@
$URL$