From 5f597c2cbabc9002886a056b3e513ceed27a99bf Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 26 May 2010 00:20:07 +0000 Subject: merge r6361 from branch 2.1 to trunk feature 1697: ability to deactivate the synchronization method to add photos. git-svn-id: http://piwigo.org/svn/trunk@6365 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin.php | 1 + admin/cat_options.php | 5 ++- admin/configuration.php | 5 ++- admin/help.php | 48 +++++++++++----------- admin/photos_add.php | 15 +++++-- admin/themes/default/template/admin.tpl | 6 +++ .../themes/default/template/element_set_global.tpl | 2 + admin/themes/default/template/footer.tpl | 10 +++++ admin/themes/default/template/intro.tpl | 3 +- include/config_default.inc.php | 3 ++ language/cs_CZ/help/help_add_photos.html | 2 + language/de_DE/help/help_add_photos.html | 2 + language/en_UK/help/help_add_photos.html | 2 + language/es_ES/help/help_add_photos.html | 2 + language/fr_FR/help/help_add_photos.html | 2 + language/hr_HR/help/help_add_photos.html | 2 + language/hu_HU/help/help_add_photos.html | 2 + language/it_IT/help/help_add_photos.html | 2 + language/ja_JP/help/help_add_photos.html | 2 + language/nl_NL/help/help_add_photos.html | 4 +- language/pl_PL/help/help_add_photos.html | 2 + language/ru_RU/help/help_add_photos.html | 4 +- language/sr_RS/help/help_add_photos.html | 4 +- language/zh_CN/help/help_add_photos.html | 4 +- 24 files changed, 100 insertions(+), 34 deletions(-) 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&section='; $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}