Index: /extensions/pwgCumulus/CHANGELOG
===================================================================
--- /extensions/pwgCumulus/CHANGELOG	(revision 11666)
+++ /extensions/pwgCumulus/CHANGELOG	(revision 11667)
@@ -1,2 +1,8 @@
+pwgCumulus 0.6.1 - 2011-07-08
+================================
+* Fix issue preventing config to be persistent.
+  Thanks to xtouf and Billr for reporting bug.
+* Update Italian translations, thanks to rio.
+
 pwgCumulus 0.6.0 - 2011-06-13
 ================================
Index: /extensions/pwgCumulus/include/admin_menu.inc.php
===================================================================
--- /extensions/pwgCumulus/include/admin_menu.inc.php	(revision 11666)
+++ /extensions/pwgCumulus/include/admin_menu.inc.php	(revision 11667)
@@ -20,10 +20,12 @@
 // +-----------------------------------------------------------------------+
 
+if (!defined('PHPWG_ROOT_PATH')) {
+  die('Hacking attempt!');
+}
+
+$save_config = false;
 $Positions = array('before' => l10n('Before'), 
 		   'after' => l10n('After')
 		   );
-
-$position_order = $me->position_order;
-$position_block_id = $me->position_block_id;
 
 include_once(PHPWG_ROOT_PATH.'include/block.class.php');
@@ -37,33 +39,34 @@
 }
 
-if (!empty($_POST['pwg_cumulus_in_main_menu']) && !$me->pwg_cumulus_in_main_menu) {
-  $me->pwg_cumulus_in_main_menu = true;
-  $page['infos'][] = l10n('Tags cloud added in main menu');
-  $save_config = true;
-} elseif (empty($_POST['pwg_cumulus_in_main_menu']) && $me->pwg_cumulus_in_main_menu) {
-  $me->pwg_cumulus_in_main_menu = false;
-  $page['infos'][] = l10n('Tags cloud removed from main menu');
-  $save_config = true;
-}
+if (!empty($_POST['submit'])) {
+  if (!empty($_POST['pwg_cumulus_in_main_menu']) && $_POST['pwg_cumulus_in_main_menu']!=$me->pwg_cumulus_in_main_menu) {
+    $me->pwg_cumulus_in_main_menu = true;
+    $page['infos'][] = l10n('Tags cloud added in main menu');
+    $save_config = true;
+  } elseif (empty($_POST['pwg_cumulus_in_main_menu']) && $me->pwg_cumulus_in_main_menu) {
+    $me->pwg_cumulus_in_main_menu = false;
+    $page['infos'][] = l10n('Tags cloud removed from main menu');
+    $save_config = true;
+  }
 
-if (!empty($_POST['position_order']) && isset($Positions[$_POST['position_order']])) {
-  $position_order = $_POST['position_order'];
-}
+  if (!empty($_POST['position_order']) && isset($Positions[$_POST['position_order']])
+      && !empty($_POST['position_block_id']) && isset($Blocks[$_POST['position_block_id']])
+      && ($_POST['position_order']!=$me->position_order || $_POST['position_block_id']!=$me->position_block_id)) {
+    
+    $me->position_order = $_POST['position_order'];
+    $me->position_block_id = $_POST['position_block_id'];
+    $page['infos'][] = l10n('Block\'s position has been updated');    
+    $save_config = true;
+  }
 
-if (!empty($_POST['position_block_id']) && isset($Blocks[$_POST['position_block_id']])) {
-  $position_block_id = $_POST['position_block_id'];
-}
-
-if ($position_order!=null && $position_block_id!=null) {
-  $me->position_order = $position_order;
-  $me->position_block_id = $position_block_id;  
-  $page['infos'][] = l10n('Position in main menu has been updated');  
-  $me->save_config();
+  if ($save_config) {
+    $me->save_config();
+  }
 }
 
 $template->assign('MENUBAR_BLOCKS', $Blocks);
-$template->assign('POSITION_ORDER', $position_order);
+$template->assign('POSITION_ORDER', $me->position_order);
 $template->assign('POSITIONS', $Positions);
-$template->assign('POSITION_BLOCK_ID', $position_block_id);
+$template->assign('POSITION_BLOCK_ID', $me->position_block_id);
 $template->assign('PWG_CUMULUS_IN_MAIN_MENU', $me->pwg_cumulus_in_main_menu);
 ?>
Index: /extensions/pwgCumulus/include/pwgCumulusConfig.class.php
===================================================================
--- /extensions/pwgCumulus/include/pwgCumulusConfig.class.php	(revision 11666)
+++ /extensions/pwgCumulus/include/pwgCumulusConfig.class.php	(revision 11667)
@@ -35,4 +35,5 @@
 
     if (!file_exists($this->get_config_filename())) {
+      $this->setDefaults();
       $this->save_config();
     }
@@ -45,5 +46,4 @@
       $this->config = $c;
     }
-    $this->setDefaults();
   }
 
@@ -79,5 +79,5 @@
 
   private function setDefaults() {
-    include_once $this->plugin_dir.'/default_values.inc.php';
+    include $this->plugin_dir.'/default_values.inc.php';
 
     foreach ($default_values as $key => $value) {
Index: /extensions/pwgCumulus/language/ar_SA/index.php
===================================================================
--- /extensions/pwgCumulus/language/ar_SA/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/ar_SA/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/cs_CZ/index.php
===================================================================
--- /extensions/pwgCumulus/language/cs_CZ/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/cs_CZ/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/de_DE/index.php
===================================================================
--- /extensions/pwgCumulus/language/de_DE/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/de_DE/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/en_UK/index.php
===================================================================
--- /extensions/pwgCumulus/language/en_UK/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/en_UK/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/es_ES/index.php
===================================================================
--- /extensions/pwgCumulus/language/es_ES/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/es_ES/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/fr_FR/index.php
===================================================================
--- /extensions/pwgCumulus/language/fr_FR/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/fr_FR/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/hr_HR/index.php
===================================================================
--- /extensions/pwgCumulus/language/hr_HR/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/hr_HR/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/hu_HU/index.php
===================================================================
--- /extensions/pwgCumulus/language/hu_HU/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/hu_HU/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/it_IT/index.php
===================================================================
--- /extensions/pwgCumulus/language/it_IT/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/it_IT/index.php	(revision 11667)
@@ -1,13 +1,11 @@
 <?php
 // +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based photo gallery                                    |
+// | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2011 Piwigo Team                  http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
-// | it under the terms of the GNU General Public License as published by  |
-// | the Free Software Foundation                                          |
+// | it under the terms of the GNU General Public License version 2 as     |
+// | published by  the Free Software Foundation                            |
 // |                                                                       |
 // | This program is distributed in the hope that it will be useful, but   |
@@ -18,6 +16,6 @@
 // | You should have received a copy of the GNU General Public License     |
 // | along with this program; if not, write to the Free Software           |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA.                                                                  |
+// | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,            |
+// | MA 02110-1301 USA                                                     |
 // +-----------------------------------------------------------------------+
 
Index: /extensions/pwgCumulus/language/lv_LV/index.php
===================================================================
--- /extensions/pwgCumulus/language/lv_LV/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/lv_LV/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/nl_NL/index.php
===================================================================
--- /extensions/pwgCumulus/language/nl_NL/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/nl_NL/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/no_NO/index.php
===================================================================
--- /extensions/pwgCumulus/language/no_NO/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/no_NO/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/pl_PL/index.php
===================================================================
--- /extensions/pwgCumulus/language/pl_PL/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/pl_PL/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/ru_RU/index.php
===================================================================
--- /extensions/pwgCumulus/language/ru_RU/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/ru_RU/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/sk_SK/index.php
===================================================================
--- /extensions/pwgCumulus/language/sk_SK/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/sk_SK/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/sv_SE/index.php
===================================================================
--- /extensions/pwgCumulus/language/sv_SE/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/sv_SE/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/templates/index.php
===================================================================
--- /extensions/pwgCumulus/language/templates/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/templates/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/language/tr_TR/index.php
===================================================================
--- /extensions/pwgCumulus/language/tr_TR/index.php	(revision 11666)
+++ /extensions/pwgCumulus/language/tr_TR/index.php	(revision 11667)
@@ -3,5 +3,5 @@
 // | pwgCumulus  - a plugin for Piwigo                                     |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // +-----------------------------------------------------------------------+
 // | This program is free software; you can redistribute it and/or modify  |
Index: /extensions/pwgCumulus/main.inc.php
===================================================================
--- /extensions/pwgCumulus/main.inc.php	(revision 11666)
+++ /extensions/pwgCumulus/main.inc.php	(revision 11667)
@@ -22,5 +22,5 @@
 /*
 Plugin Name: pwgCumulus
-Version: 0.6.0
+Version: 0.6.1
 Description: add an amazing tag cloud
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=263
