return more detailed message (include update_channel if testing)

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-05-26 13:46:44 +02:00
parent 66c3694809
commit 75fedcb7e8
6 changed files with 8 additions and 10 deletions

View File

@@ -105,7 +105,7 @@ if ($page == 'overview') {
}
} else {
// no new version
Response::standardSuccess('update.noupdatesavail');
Response::standardSuccess('update.noupdatesavail', [(Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') : '')]);
}
} // download the new archive
elseif ($page == 'getdownload') {

View File

@@ -135,6 +135,6 @@ if ($page == 'overview') {
'alert_msg' => $ui_text . $message
]);
} else {
Response::standardSuccess('update.noupdatesavail');
Response::standardSuccess('update.noupdatesavail', [(Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') : '')]);
}
}

View File

@@ -58,8 +58,6 @@ class Froxlor extends ApiCommand
*/
public function checkUpdate()
{
define('UPDATE_URI', "https://version.froxlor.org/Froxlor/api/" . $this->version);
if ($this->isAdmin() && $this->getUserDetail('change_serversettings')) {
// log our actions
@@ -71,10 +69,10 @@ class Froxlor extends ApiCommand
if ($aucheck == 1) {
// anzeige über version-status mit ggfls. formular
// zum update schritt #1 -> download
$text = 'There is a newer version available: "' . AutoUpdate::getFromResult('version') . '" (Your current version is: ' . $this->version . ')';
$text = 'There is a newer ' . (Settings::Get('system.update_channel') == 'testing' ? 'testing ' : '') . 'version available: "' . AutoUpdate::getFromResult('version') . '" (Your current version is: ' . $this->version . ')';
return $this->response([
'isnewerversion' => (int) !AutoUpdate::getFromResult('has_latest'),
'version' => AutoUpdate::getFromResult('version'),
'version' => $this->version,
'message' => $text,
'link' => AutoUpdate::getFromResult('url'),
'additional_info' => AutoUpdate::getFromResult('info')
@@ -103,7 +101,7 @@ class Froxlor extends ApiCommand
'version' => $this->version,
'message' => '',
'link' => '',
'additional_info' => lng('update.noupdatesavail')
'additional_info' => lng('update.noupdatesavail', [(Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') : '')])
]);
}
}

View File

@@ -94,7 +94,7 @@ final class UpdateCommand extends CliCommand
return self::SUCCESS;
}
// no new version
$output->writeln('<info>' . lng('update.noupdatesavail') . '</>');
$output->writeln('<info>' . lng('update.noupdatesavail', [(Settings::Get('system.update_channel') == 'testing' ? lng('serversettings.uc_testing') : '')]) . '</>');
$result = self::SUCCESS;
}
} catch (Exception $e) {

View File

@@ -2114,7 +2114,7 @@ Vielen Dank, Ihr Administrator',
'part_a' => 'Die Froxlor-Dateien wurden aktualisiert. Neue Version ist <strong>%s</strong>. Die bisher installierte Version ist <strong>%s</strong>',
'part_b' => '<br /><br />Ein Kunden-Login ist vor Abschluss des Aktualisierungsvorganges nicht möglich.<br /><strong>Aktualisierung ausführen?</strong>',
],
'noupdatesavail' => 'Ihre Froxlor-Version ist aktuell.',
'noupdatesavail' => 'Die genutzte %sVersion von Froxlor ist aktuell.',
'description' => 'Aktualisierung der froxlor Datenbank',
],
'usersettings' => [

View File

@@ -2499,7 +2499,7 @@ Yours sincerely, your administrator',
'part_a' => 'The Froxlor files have been updated to version <strong>%s</strong>. The installed version is <strong>%s</strong>.',
'part_b' => '<br /><br />Customers will not be able to log in until the update has been finished.<br /><strong>Proceed?</strong>',
],
'noupdatesavail' => 'You already have the latest Froxlor version.',
'noupdatesavail' => 'You already have the latest %sversion of Froxlor installed.',
'description' => 'Running database updates for your froxlor installation',
],
'usersettings' => [