Skip to content

Commit

Permalink
Fix #2820
Browse files Browse the repository at this point in the history
  • Loading branch information
tadhgboyle committed Jun 4, 2022
1 parent d5cb217 commit 9a5e51f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/Core/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ public function onPageLoad(User $user, Pages $pages, Cache $cache, Smarty $smart

// Check for updates
if ($user->isLoggedIn()) {
if ($user->hasPermission('admincp.update')) {
if ((defined('PANEL_PAGE') && PANEL_PAGE !== 'update') && $user->hasPermission('admincp.update')) {
$cache->setCache('update_check');
if ($cache->isCached('update_check')) {
$update_check = $cache->retrieve('update_check');
Expand Down
10 changes: 10 additions & 0 deletions modules/Core/pages/panel/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@
if (!is_string($update_check)) {
if ($update_check->updateAvailable()) {
$smarty->assign([
'NEW_UPDATE' => $update_check->isUrgent()
? $language->get('admin', 'new_urgent_update_available')
: $language->get('admin', 'new_update_available'),
'NEW_UPDATE_URGENT' => $update_check->isUrgent(),
'CURRENT_VERSION' => $language->get('admin', 'current_version_x', [
'version' => Output::getClean(NAMELESS_VERSION)
]),
'NEW_VERSION' => $language->get('admin', 'new_version_x', [
'version' => Output::getClean($update_check->version())
]),
'INSTRUCTIONS' => $language->get('admin', 'instructions'),
'INSTRUCTIONS_VALUE' => Output::getDecoded($update_check->instructions()),
'UPGRADE_LINK' => URL::build('/panel/upgrade'),
Expand Down

0 comments on commit 9a5e51f

Please sign in to comment.