From e64acd03c5ebdbe45bf4714a71f8cbb8fe417bc9 Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 5 Mar 2021 12:19:56 +0100 Subject: [PATCH] fixes #1358 automatic call to pwg.extensions.checkUpdates can be deactivated --- admin/intro.php | 1 + admin/themes/default/template/intro.tpl | 4 ++++ include/config_default.inc.php | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/admin/intro.php b/admin/intro.php index 36730976f..6947641c9 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -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'], ) ); diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl index cc062b41d..a82300a71 100644 --- a/admin/themes/default/template/intro.tpl +++ b/admin/themes/default/template/intro.tpl @@ -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('
  • '+ext_need_update_msg+'
  • '); } }); +{/if} +{literal} jQuery('.newsletter-subscription a').click(function() { jQuery('.newsletter-subscription').hide(); diff --git a/include/config_default.inc.php b/include/config_default.inc.php index cdc2c823a..dc799a0ef 100644 --- a/include/config_default.inc.php +++ b/include/config_default.inc.php @@ -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;