mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
API CHANGE silverstripe_version file now contains the plain version number, rather than an SVN path
This commit is contained in:
parent
cb26a83bd1
commit
71220ee99f
@ -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
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$URL$
|
|
Loading…
Reference in New Issue
Block a user