feat(api): strip CRMEB-PRO prefix from getVersion response
The admin auth page rendered the raw version string from the .version file (e.g. "CRMEB-PRO v3.5.1"); strip the vendor brand prefix at the controller boundary so display matches the rebranded UI without touching internal version detection. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -487,10 +487,12 @@ class SystemConfig extends AuthController
|
|||||||
public function getVersion()
|
public function getVersion()
|
||||||
{
|
{
|
||||||
$version = get_crmeb_version();
|
$version = get_crmeb_version();
|
||||||
|
$label = strripos($version, 'min') === false ? 3 : 2;
|
||||||
|
$displayVersion = preg_replace('/^CRMEB-PRO\s*/i', '', (string)$version);
|
||||||
|
|
||||||
return $this->success([
|
return $this->success([
|
||||||
'version' => $version,
|
'version' => $displayVersion,
|
||||||
'label' => strripos($version, 'min') === false ? 3 : 2
|
'label' => $label,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user