fixes #1358 automatic call to pwg.extensions.checkUpdates can be deactivated

This commit is contained in:
plegall
2021-03-05 12:19:56 +01:00
parent e86d5525d0
commit e64acd03c5
3 changed files with 9 additions and 0 deletions

View File

@@ -156,6 +156,7 @@ $template->assign(
'NB_PLUGINS' => count($pwg_loaded_plugins),
'STORAGE_USED' => l10n('%sGB', number_format($du_gb, $du_decimals)),
'U_QUICK_SYNC' => PHPWG_ROOT_PATH.'admin.php?page=site_update&site=1&quick_sync=1&pwg_token='.get_pwg_token(),
'CHECK_FOR_UPDATES' => $conf['dashboard_check_for_updates'],
)
);

View File

@@ -15,6 +15,8 @@ jQuery().ready(function(){
splitTitle: '|',
positionBy: 'bottomTop'
});
{/literal}
{if $CHECK_FOR_UPDATES}
jQuery.ajax({
type: 'GET',
url: 'ws.php',
@@ -34,6 +36,8 @@ jQuery().ready(function(){
jQuery(".warnings ul").append('<li>'+ext_need_update_msg+'</li>');
}
});
{/if}
{literal}
jQuery('.newsletter-subscription a').click(function() {
jQuery('.newsletter-subscription').hide();

View File

@@ -696,6 +696,10 @@ $conf['ws_max_users_per_page'] = 1000;
// Display a link to subscribe to Piwigo Announcements Newsletter
$conf['show_newsletter_subscription'] = true;
// Check for available updates on Piwigo or extensions, performed each time
// the dashboard is displayed
$conf['dashboard_check_for_updates'] = true;
// Number Weeks displayed on activity chart on the dashboard
$conf['dashboard_activity_nb_weeks'] = 4;