diff --git a/admin/intro.php b/admin/intro.php index 39f52e9d9..c8b40898a 100644 --- a/admin/intro.php +++ b/admin/intro.php @@ -210,6 +210,7 @@ $template->assign( 'NB_PLUGINS' => count($pwg_loaded_plugins), 'STORAGE_USED' => l10n('%sGB', number_format($disk_usage/(1024*1024), 1)), 'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade', + 'U_QUICK_SYNC' => PHPWG_ROOT_PATH.'admin.php?page=site_update&site=1&quick_sync=1&pwg_token='.get_pwg_token(), ) ); diff --git a/admin/site_update.php b/admin/site_update.php index ad3ccba19..08d8e7db9 100644 --- a/admin/site_update.php +++ b/admin/site_update.php @@ -82,6 +82,24 @@ else $site_reader = new LocalSiteReader($site_url); } +// +-----------------------------------------------------------------------+ +// | Quick sync | +// +-----------------------------------------------------------------------+ + +if (isset($_GET['quick_sync'])) +{ + check_pwg_token(); + + $_POST['sync'] = 'files'; + $_POST['display_info'] = '1'; + $_POST['add_to_caddie'] = '1'; + $_POST['privacy_level'] = '0'; + $_POST['sync_meta'] = '1'; + $_POST['simulate'] = '0'; + $_POST['subcats-included'] = '1'; + $_POST['submit'] = 'Quick Local Synchronization'; +} + $general_failure = true; if (isset($_POST['submit'])) { diff --git a/admin/themes/default/template/intro.tpl b/admin/themes/default/template/intro.tpl index 0a76081e0..baaf36c20 100644 --- a/admin/themes/default/template/intro.tpl +++ b/admin/themes/default/template/intro.tpl @@ -140,6 +140,12 @@ jQuery().ready(function(){ {* .stat-boxes *} +

+{if $ENABLE_SYNCHRONIZATION} + {'Quick Local Synchronization'|translate} +{/if} +

+
{'Piwigo version'|@translate}
@@ -152,21 +158,3 @@ jQuery().ready(function(){
- -{if $ENABLE_SYNCHRONIZATION} -
-
- - - - - - - -
-
-{'Quick Local Synchronization'|@translate} - -
-
-{/if}