Skip to content

Commit

Permalink
[Admin] Change dashboard to instead show version alias on intial block
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed May 3, 2019
1 parent 7dfd66c commit dee3162
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion design/admin/templates/dashboard/maintenance.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<div id="mainteinance-text">
<h2>{'Software update and Maintenance'|i18n( 'design/admin/dashboard/maintenance' )}</h2>

<p>{'Your installation: <span id="ez-version">%1</span>'|i18n( 'design/admin/dashboard/maintenance', , array( fetch( 'setup', 'version' ) ) )}</p>
<p>{'Your installation: <span id="ez-version">%1</span>'|i18n( 'design/admin/dashboard/maintenance', , array( fetch( 'setup', 'alias' ) ) )}</p>
<p>{'You are running <span class="edition-info">%edition</span>, it might not be up to date with the latest hot fixes and service packs. Contact <a href="%ez_link">eZ Systems</a> for more infomation.'|i18n( 'design/admin/dashboard/maintenance', , hash( '%edition', fetch( 'setup', 'edition' ), '%ez_link', "http://ez.no" ) )}</p>
</div>
5 changes: 5 additions & 0 deletions kernel/setup/ezsetupfunctioncollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ function fetchFullVersionString()
return array( 'result' => eZPublishSDK::version() );
}

function fetchVersionAlias()
{
return array( 'result' => eZPublishSDK::version( false, true ) );
}

function fetchMajorVersion()
{
return array( 'result' => eZPublishSDK::majorVersion() );
Expand Down
6 changes: 6 additions & 0 deletions kernel/setup/function_definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
'method' => 'fetchFullVersionString' ),
'parameter_type' => 'standard',
'parameters' => array( ) );
$FunctionList['alias'] = array( 'name' => 'alias',
'operation_types' => array( 'read' ),
'call_method' => array( 'class' => 'eZSetupFunctionCollection',
'method' => 'fetchVersionAlias' ),
'parameter_type' => 'standard',
'parameters' => array( ) );
$FunctionList['major_version'] = array( 'name' => 'major_version',
'operation_types' => array( 'read' ),
'call_method' => array( 'class' => 'eZSetupFunctionCollection',
Expand Down
4 changes: 2 additions & 2 deletions lib/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static function version( $withRelease = true, $asAlias = false, $withState = tru
if ( $asAlias )
{
$versionText = eZPublishSDK::alias();
if ( $withState )
if ( $withState && eZPublishSDK::state() )
$versionText .= "-" . eZPublishSDK::state();
}
else
Expand Down Expand Up @@ -94,7 +94,7 @@ static function release()
*/
static function alias()
{
return eZPublishSDK::version();
return eZPublishSDK::VERSION_ALIAS;
}

/*!
Expand Down

0 comments on commit dee3162

Please sign in to comment.