Index: /extensions/autoupdate/trunk/ajax/ignore_list.php
===================================================================
--- /extensions/autoupdate/trunk/ajax/ignore_list.php	(revision 9734)
+++ /extensions/autoupdate/trunk/ajax/ignore_list.php	(revision 9735)
@@ -18,5 +18,6 @@
 }
 
-if (empty($_POST['id']) or empty($_POST['type']))
+if (empty($_POST['id']) or empty($_POST['type'])
+  or !in_array($_POST['type'], array('plugins', 'themes', 'languages')))
 {
   die;
@@ -24,20 +25,8 @@
 
 // Add or remove plugin from ignore list
-$ignore = $conf['AU_ignore'][$_POST['type']];
-$ignore = array_flip($ignore);
-
-if (isset($ignore[$_POST['id']]))
+if (!in_array($_POST['id'], $conf['AU_ignore'][$_POST['type']]))
 {
-  unset($ignore[$_POST['id']]);
-  $ignore = array_flip($ignore);
+  array_push($conf['AU_ignore'][$_POST['type']], $_POST['id']);
 }
-else
-{
-  $ignore = array_flip($ignore);
-  array_push($ignore, $_POST['id']);
-}
-
-sort($ignore);
-$conf['AU_ignore'][$_POST['type']] = $ignore;
 conf_update_param('autoupdate_ignore_list', pwg_db_real_escape_string(serialize($conf['AU_ignore'])));
 unset($_SESSION['extensions_need_update']);
Index: /extensions/autoupdate/trunk/include/functions.inc.php
===================================================================
--- /extensions/autoupdate/trunk/include/functions.inc.php	(revision 9734)
+++ /extensions/autoupdate/trunk/include/functions.inc.php	(revision 9735)
@@ -86,148 +86,4 @@
       }
     }
-  }
-}
-
-function move_local_files($dir)
-{
-  global $page, $cfgBase, $cfgUser, $cfgPassword, $cfgHote, $prefixeTable;
-
-  if ((!is_dir($dir) and !mkdir($dir, 0777))
-    or (!is_dir($dir.'/config') and !mkdir($dir.'/config'))
-    or (!is_dir($dir.'/css') and !mkdir($dir.'/css'))
-    or (!is_dir($dir.'/language') and !mkdir($dir.'/language')))
-  {
-    autoupdate_deltree($dir);
-    array_push($page['errors'], l10n('Unable to write new local directory.'));
-    return;
-  }
-
-  // Add index.php
-  autoupdate_add_index($dir);
-
-  // mysql.inc.php
-  $file = PHPWG_ROOT_PATH.'include/mysql.inc.php';
-  if (is_readable($file))
-  {
-    $file_content = '<?php
-$conf[\'dblayer\'] = \'mysql\';
-$conf[\'db_base\'] = \''.$cfgBase.'\';
-$conf[\'db_user\'] = \''.$cfgUser.'\';
-$conf[\'db_password\'] = \''.$cfgPassword.'\';
-$conf[\'db_host\'] = \''.$cfgHote.'\';
-
-$prefixeTable = \''.$prefixeTable.'\';
-
-define(\'PHPWG_INSTALLED\', true);';
-    if (defined('PWG_CHARSET'))
-    {
-      $file_content.= '
-define(\'PWG_CHARSET\', \'utf-8\');
-define(\'DB_CHARSET\', \'utf8\');
-define(\'DB_COLLATE\', \'\');';
-    }
-    $file_content.= '
-?>';
-    $new_config_file = $dir.'/config/database.inc.php';
-
-    if (!($fp = @fopen($new_config_file, 'w'))
-      or !@fwrite($fp, $file_content)
-      or !@fclose($fp))
-    {
-      array_push($page['errors'], l10n('Unable to write new local directory.'));
-      return;
-    }
-    @chmod($new_config_file, 0755);
-  }
-
-  // config_local.inc.php
-  $file = PHPWG_ROOT_PATH.'include/config_local.inc.php';
-  if (is_readable($file))
-  {
-    copy($file, $dir.'/config/config.inc.php');
-    @chmod($file, 0755);
-  }
-
-  // languages
-  $language_dir = opendir(PHPWG_ROOT_PATH.'language');
-  while ($file = readdir($language_dir))
-  {
-    $path = PHPWG_ROOT_PATH.'language/'.$file;
-    if (!is_link($path) and is_dir($path) and is_readable($path.'/local.lang.php'))
-    {
-      $content = file_get_contents($path.'/local.lang.php');
-      $langdef = explode('.',$file);
-      if (count($langdef)>1)
-      {
-        $content = utf8_encode($content);
-      }
-      $filename = $dir.'/language/'.$langdef[0].'.lang.php';
-      $fp = @fopen($filename, 'w');
-      @fwrite($fp, $content);
-      @fclose($fp);
-      @chmod($filename, 0755);
-    }
-  }
-  closedir($language_dir);
-
-  // template-common/local-layout.css
-  $file = PHPWG_ROOT_PATH.'template-common/local-layout.css';
-  if (is_readable($file))
-  {
-    copy($file, $dir.'/css/rules.css');
-    @chmod($file, 0755);
-  }
-
-  // template/xxx/local-layout.css
-  $known_templates = array(
-    'yoga'     => 'default',
-    'floPure'  => 'Pure_default',
-    'floOs'    => 'OS_default',
-    'gally'    => 'gally-default',
-    'simple'   => 'simple',
-  );
-
-  foreach ($known_templates as $old_tpl => $new_tpl)
-  {
-    $file = PHPWG_ROOT_PATH.'template/'.$old_tpl.'/local-layout.css';
-    if (is_readable($file))
-    {
-      copy($file, $dir.'/css/'.$new_tpl.'-rules.css');
-      @chmod($file, 0755);
-    }
-  }
-}
-
-function autoupdate_save_template_dir()
-{
-  global $page, $conf;
-
-  $path = $conf['local_data_dir'].'/autoupdate';
-
-  if (@mkgetdir($path)
-    and ($zip = tempnam($path, 'zip'))
-    and ($archive = new pclZip($zip))
-    and ($v_list = $archive->add(PHPWG_ROOT_PATH.'template', PCLZIP_OPT_REMOVE_PATH, PHPWG_ROOT_PATH))
-    and is_array($v_list)
-    and !empty($v_list))
-  {
-    $http_headers = array(
-      'Content-Length: '.@filesize($zip),
-      'Content-Type: application/zip',
-      'Content-Disposition: attachment; filename="template.zip";',
-      'Content-Transfer-Encoding: binary',
-      );
-
-    foreach ($http_headers as $header) {
-      header($header);
-    }
-
-    @readfile($zip);
-    autoupdate_deltree($conf['local_data_dir'].'/autoupdate');
-    exit();
-  }
-  else
-  {
-    array_push($page['errors'], l10n('Unable to send template directory.'));
   }
 }
@@ -312,9 +168,4 @@
     $remove_path = version_compare($code, '2.0.8', '>=') ? 'piwigo' : 'piwigo-'.$code;
     $obsolete_list = PHPWG_ROOT_PATH.'install/obsolete.list';
-
-    if (version_compare(PHPWG_VERSION, '2.1', '<'))
-    {
-      move_local_files(PHPWG_ROOT_PATH.'local');
-    }
   }
 
Index: /extensions/autoupdate/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/en_UK/plugin.lang.php	(revision 9734)
+++ /extensions/autoupdate/trunk/language/en_UK/plugin.lang.php	(revision 9735)
@@ -37,5 +37,5 @@
 $lang['autoupdate_ignore'] = 'Ignore this update';
 $lang['autoupdate_reset_ignore'] = 'Reset ignored updates';
-$lang['autoupdate_update_all'] = 'All update';
+$lang['autoupdate_update_all'] = 'Update All';
 $lang['ERROR'] = 'ERROR';
 $lang['Upgrade Complete'] = 'Upgrade Complete';
Index: /extensions/autoupdate/trunk/template/autoupdate.js
===================================================================
--- /extensions/autoupdate/trunk/template/autoupdate.js	(revision 9734)
+++ /extensions/autoupdate/trunk/template/autoupdate.js	(revision 9735)
@@ -9,5 +9,4 @@
     if (extList.length > 0) eval(extList[0]);
   }
-  return false;
 };
 
@@ -23,8 +22,8 @@
         jQuery("#reset_ignore").hide();
         jQuery("#ignored").hide();
+        checkFieldsets();
       }
     }
   );
-  return false;
 };
 
@@ -36,9 +35,9 @@
     nbExtensions = 0;
     jQuery("div[id^='"+types[i]+"_']").each(function(index) {
-        if (jQuery(this).css('display') == 'block')
-          nbExtensions++;
-        else
-          ignored++;
-      });
+      if (jQuery(this).css('display') == 'block')
+        nbExtensions++;
+      else
+        ignored++;
+    });
     total = total + nbExtensions;
     if (nbExtensions == 0)
@@ -103,5 +102,4 @@
     dataType: 'json'
   });
-  return false;
 };
 
@@ -118,4 +116,3 @@
     }
   );
-  return false;
 };
Index: /extensions/autoupdate/trunk/template/update_ext.tpl
===================================================================
--- /extensions/autoupdate/trunk/template/update_ext.tpl	(revision 9734)
+++ /extensions/autoupdate/trunk/template/update_ext.tpl	(revision 9735)
@@ -32,6 +32,6 @@
 <div class="autoupdate_bar">
 <br>
-<input type="button" id="update_all" value="{'autoupdate_update_all'|@translate}" onClick="updateAll();">
-<input type="button" id="reset_ignore" value="{'autoupdate_reset_ignore'|@translate}" onClick="resetIgnored();" {if !$SHOW_RESET}style="display:none;"{/if}>
+<input type="submit" id="update_all" value="{'autoupdate_update_all'|@translate}" onClick="updateAll(); return false;">
+<input type="submit" id="reset_ignore" value="{'autoupdate_reset_ignore'|@translate}" onClick="resetIgnored(); return false;" {if !$SHOW_RESET}style="display:none;"{/if}>
 </div>
 <div class="autoupdate_bar" style="display:none;">
@@ -44,5 +44,5 @@
 <div>
 <fieldset id="plugins">
-<legend>{'Plugins which need upgrade'|@translate}</legend>
+<legend>{'Plugins'|@translate}</legend>
 {foreach from=$update_plugins item=plugin name=plugins_loop}
 <div class="pluginBox" id="plugin_{$plugin.EXT_ID}" {if $plugin.IGNORED}style="display:none;"{/if}>
@@ -55,5 +55,5 @@
         <a href="#" onClick="upgradeExtension('plugin', '{$plugin.EXT_ID}', {$plugin.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
         | <a href="{$plugin.URL_DOWNLOAD}">{'Download'|@translate}</a>
-        | <a href="#" onClick="ignoreExtension('plugin', '{$plugin.EXT_ID}');">{'autoupdate_ignore'|@translate}</a>
+        | <a href="#" onClick="ignoreExtension('plugin', '{$plugin.EXT_ID}'); return false;">{'autoupdate_ignore'|@translate}</a>
       </td>
     </tr>
@@ -86,5 +86,5 @@
 <div>
 <fieldset id="themes">
-<legend>{'Themes which need upgrade'|@translate}</legend>
+<legend>{'Themes'|@translate}</legend>
 {foreach from=$update_themes item=theme name=themes_loop}
 <div class="pluginBox" id="theme_{$theme.EXT_ID}" {if $theme.IGNORED}style="display:none;"{/if}>
@@ -97,5 +97,5 @@
         <a href="#" onClick="upgradeExtension('theme', '{$theme.EXT_ID}', {$theme.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
         | <a href="{$theme.URL_DOWNLOAD}">{'Download'|@translate}</a>
-        | <a href="#" onClick="ignoreExtension('theme', '{$theme.EXT_ID}');">{'autoupdate_ignore'|@translate}</a>
+        | <a href="#" onClick="ignoreExtension('theme', '{$theme.EXT_ID}'); return false;">{'autoupdate_ignore'|@translate}</a>
       </td>
     </tr>
@@ -128,5 +128,5 @@
 <div>
 <fieldset id="languages">
-<legend>{'Languages which need upgrade'|@translate}</legend>
+<legend>{'Languages'|@translate}</legend>
 {foreach from=$update_languages item=language name=languages_loop}
 <div class="pluginBox" id="language_{$language.EXT_ID}" {if $language.IGNORED}style="display:none;"{/if}>
@@ -139,5 +139,5 @@
         <a href="#" onClick="upgradeExtension('language', '{$language.EXT_ID}', {$language.REVISION_ID});" class="updateExtension">{'Install'|@translate}</a>
         | <a href="{$language.URL_DOWNLOAD}">{'Download'|@translate}</a>
-        | <a href="#" onClick="ignoreExtension('language', '{$language.EXT_ID}');">{'autoupdate_ignore'|@translate}</a>
+        | <a href="#" onClick="ignoreExtension('language', '{$language.EXT_ID}'); return false;">{'autoupdate_ignore'|@translate}</a>
       </td>
     </tr>
Index: /extensions/autoupdate/trunk/template/update_pwg.tpl
===================================================================
--- /extensions/autoupdate/trunk/template/update_pwg.tpl	(revision 9734)
+++ /extensions/autoupdate/trunk/template/update_pwg.tpl	(revision 9735)
@@ -57,12 +57,4 @@
 <form action="" method="post">
 
-{if version_compare($PHPWG_VERSION, '2.1', '<')}
-{counter assign=i}
-<fieldset>
-  <legend>{'autoupdate_step_'|cat:$i|@translate}</legend>
-  <p><input type="submit" name="saveTemplate" value="{'Save Template Directory'|@translate}"></p>
-</fieldset>
-{/if}
-
 {counter assign=i}
 <fieldset>
Index: /extensions/autoupdate/trunk/update_pwg.inc.php
===================================================================
--- /extensions/autoupdate/trunk/update_pwg.inc.php	(revision 9734)
+++ /extensions/autoupdate/trunk/update_pwg.inc.php	(revision 9735)
@@ -106,9 +106,4 @@
 if ($step == 3 and is_webmaster())
 {
-  if (isset($_POST['saveTemplate']) and version_compare(PHPWG_VERSION, '2.1', '<'))
-  {
-    autoupdate_save_template_dir();
-  }
-
   if (isset($_POST['dumpDatabase']))
   {
