diff --git a/admin.php b/admin.php index c80fa508c..25eca3f6e 100644 --- a/admin.php +++ b/admin.php @@ -102,6 +102,7 @@ $template->set_filenames(array('admin' => 'admin.tpl')); $template->assign( array( 'USERNAME' => $user['username'], + 'ENABLE_SYNCHRONIZATION' => $conf['enable_synchronization'], 'U_SITE_MANAGER'=> $link_start.'site_manager', 'U_HISTORY_STAT'=> $link_start.'stats', 'U_FAQ'=> $link_start.'help', diff --git a/admin/cat_options.php b/admin/cat_options.php index 2daa2a539..b36083c49 100644 --- a/admin/cat_options.php +++ b/admin/cat_options.php @@ -162,7 +162,10 @@ $tabsheet = new tabsheet(); $opt_link = $link_start.'cat_options§ion='; $tabsheet->add('status', l10n('Public / Private'), $opt_link.'status'); $tabsheet->add('visible', l10n('Lock'), $opt_link.'visible'); -$tabsheet->add('upload', l10n('Upload'), $opt_link.'upload'); +if ($conf['enable_synchronization']) +{ + $tabsheet->add('upload', l10n('Upload'), $opt_link.'upload'); +} $tabsheet->add('comments', l10n('Comments'), $opt_link.'comments'); if ($conf['allow_random_representative']) { diff --git a/admin/configuration.php b/admin/configuration.php index 2b293a3ab..83a44004e 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -221,7 +221,10 @@ $tabsheet->add('main', l10n('Main'), $conf_link.'main'); $tabsheet->add('display', l10n('Display'), $conf_link.'display'); $tabsheet->add('history', l10n('History'), $conf_link.'history'); $tabsheet->add('comments', l10n('Comments'), $conf_link.'comments'); -$tabsheet->add('upload', l10n('Upload'), $conf_link.'upload'); +if ($conf['enable_synchronization']) +{ + $tabsheet->add('upload', l10n('Upload'), $conf_link.'upload'); +} $tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default'); // TabSheet selection $tabsheet->select($page['section']); diff --git a/admin/help.php b/admin/help.php index 6547c998e..e2eafd1e8 100644 --- a/admin/help.php +++ b/admin/help.php @@ -33,31 +33,33 @@ $link = get_root_url().'admin.php?page=help§ion='; $selected = null; $help_section_title = null; -$tabs = array( - array( - 'code' => 'add_photos', - 'label' => l10n('Add Photos'), - ), - array( - 'code' => 'permissions', - 'label' => l10n('Permissions'), - ), - array( - 'code' => 'groups', - 'label' => l10n('Groups'), - ), - array( +$tabs = array(); +$tabs[] = array( + 'code' => 'add_photos', + 'label' => l10n('Add Photos'), + ); +$tabs[] = array( + 'code' => 'permissions', + 'label' => l10n('Permissions'), + ); +$tabs[] = array( + 'code' => 'groups', + 'label' => l10n('Groups'), + ); +if ($conf['enable_synchronization']) +{ + $tabs[] = array( 'code' => 'user_upload', 'label' => l10n('User Upload'), - ), - array( - 'code' => 'virtual_links', - 'label' => l10n('Virtual Links'), - ), - array( - 'code' => 'misc', - 'label' => l10n('Miscellaneous'), - ), + ); +} +$tabs[] = array( + 'code' => 'virtual_links', + 'label' => l10n('Virtual Links'), + ); +$tabs[] = array( + 'code' => 'misc', + 'label' => l10n('Miscellaneous'), ); if (!isset($_GET['section'])) diff --git a/admin/photos_add.php b/admin/photos_add.php index af3b84211..54db3113c 100644 --- a/admin/photos_add.php +++ b/admin/photos_add.php @@ -152,12 +152,19 @@ $tabs = array( 'code' => 'ploader', 'label' => l10n('Piwigo Uploader'), ), - array( - 'code' => 'ftp', - 'label' => l10n('FTP + Synchronization'), - ), ); +if ($conf['enable_synchronization']) +{ + array_push( + $tabs, + array( + 'code' => 'ftp', + 'label' => l10n('FTP + Synchronization'), + ) + ); +} + $tab_codes = array_map( create_function('$a', 'return $a["code"];'), $tabs diff --git a/admin/themes/default/template/admin.tpl b/admin/themes/default/template/admin.tpl index ac4480de1..f95173a02 100644 --- a/admin/themes/default/template/admin.tpl +++ b/admin/themes/default/template/admin.tpl @@ -19,7 +19,9 @@ jQuery().ready(function(){ldelim}