Index: tensions/autoupdate/autoupdate.php
===================================================================
--- /extensions/autoupdate/autoupdate.php	(revision 6167)
+++ 	(revision )
@@ -1,230 +1,0 @@
-<?php
-
-load_language('plugin.lang', dirname(__FILE__).'/');
-include(AUTOUPDATE_PATH.'include/functions.inc.php');
-include(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php');
-
-/*
-STEP:
-0 = check is needed. If version is latest or check fail, we stay on step 0
-1 = new version on same branch AND new branch are available => user may choose upgrade.
-2 = upgrade on same branch
-3 = upgrade on different branch
-*/
-$step = isset($_GET['step']) ? $_GET['step'] : 0;
-
-// +-----------------------------------------------------------------------+
-// |                                Step 0                                 |
-// +-----------------------------------------------------------------------+
-if ($step == 0)
-{
-  if (preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)
-    and @fetchRemote(PHPWG_URL.'/download/all_versions.php', $result)
-    and $all_versions = @explode("\n", $result)
-    and is_array($all_versions))
-  {
-    $template->assign('CHECK_VERSION', true);
-
-    $last_version = trim($all_versions[0]);
-
-    if (version_compare(PHPWG_VERSION, $last_version, '<'))
-    {
-      $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $last_version);
-      $actual_branch = $matches[1];
-
-      if ($new_branch == $actual_branch)
-      {
-        $step = 2;
-      }
-      else
-      {
-        $step = 3;
-
-        // Check if new version exists in same branch
-        foreach ($all_versions as $version)
-        {
-          $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $version);
-
-          if ($new_branch == $actual_branch)
-          {
-            if (version_compare(PHPWG_VERSION, $version, '<'))
-            {
-              $step = 1;
-            }
-            break;
-          }
-        }
-      }
-    }
-  }
-  else
-  {
-    $template->assign('CHECK_VERSION', false);
-  }
-}
-
-// +-----------------------------------------------------------------------+
-// |                                Step 1                                 |
-// +-----------------------------------------------------------------------+
-if ($step == 1)
-{
-  $new_versions = array($last_version, $version);
-  $template->assign('new_versions', $new_versions);
-}
-
-// +-----------------------------------------------------------------------+
-// |                                Step 2                                 |
-// +-----------------------------------------------------------------------+
-if ($step == 2)
-{
-  if (isset($_POST['submit']) and isset($_POST['upgrade_to']))
-  {
-    upgrade_to($_POST['upgrade_to'], $step);
-  }
-
-  $template->assign('UPGRADE_TO', isset($_GET['to']) ? $_GET['to'] : $last_version);
-}
-
-// +-----------------------------------------------------------------------+
-// |                                Step 3                                 |
-// +-----------------------------------------------------------------------+
-if ($step == 3)
-{
-  if (isset($_POST['saveTemplate']))
-  {
-    $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();
-    }
-
-    array_push($page['errors'], l10n('Unable to send template directory.'));
-  }
-
-  if (isset($_POST['dumpDatabase']))
-  {
-    if (version_compare(PHPWG_VERSION, '2.1', '<'))
-    {
-      global $cfgBase;
-      $conf['db_base'] = $cfgBase;
-    }
-
-    include(AUTOUPDATE_PATH.'include/mysqldump.php');
-
-    $path = $conf['local_data_dir'].'/autoupdate';
-
-    if (@mkgetdir($path)
-      and ($backupFile = tempnam($path, 'sql'))
-      and ($dumper = new MySQLDump($conf['db_base'],$backupFile,false,false)))
-    {
-      $tablesStructure = array(
-        CATEGORIES_TABLE,
-        COMMENTS_TABLE,
-        CONFIG_TABLE,
-        FAVORITES_TABLE,
-        GROUP_ACCESS_TABLE,
-        GROUPS_TABLE,
-        HISTORY_TABLE,
-        HISTORY_SUMMARY_TABLE,
-        IMAGE_CATEGORY_TABLE,
-        IMAGES_TABLE,
-        SESSIONS_TABLE,
-        SITES_TABLE,
-        USER_ACCESS_TABLE,
-        USER_GROUP_TABLE,
-        USERS_TABLE,
-        USER_INFOS_TABLE,
-        USER_FEED_TABLE,
-        WAITING_TABLE,
-        RATE_TABLE,
-        USER_CACHE_TABLE,
-        USER_CACHE_CATEGORIES_TABLE,
-        CADDIE_TABLE,
-        UPGRADE_TABLE,
-        SEARCH_TABLE,
-        USER_MAIL_NOTIFICATION_TABLE,
-        TAGS_TABLE,
-        IMAGE_TAG_TABLE,
-        PLUGINS_TABLE,
-        OLD_PERMALINKS_TABLE,
-        );
-
-      $tablesData = $tablesStructure;
-
-      if (!isset($_POST['includeHistory']))
-      {
-        unset($tablesData[6]);
-      }
-
-      foreach ($tablesStructure as $table)
-      {
-        $dumper->getTableStructure($table); 
-      }
-      foreach ($tablesData as $table)
-      {
-        $dumper->getTableData($table); 
-      }
-    }
-
-    if (@filesize($backupFile))
-    {
-      $http_headers = array(
-        'Content-Length: '.@filesize($backupFile),
-        'Content-Type: text/x-sql',
-        'Content-Disposition: attachment; filename="database.sql";',
-        'Content-Transfer-Encoding: binary',
-        );
-
-      foreach ($http_headers as $header) {
-        header($header);
-      }
-
-      @readfile($backupFile);
-      autoupdate_deltree($conf['local_data_dir'].'/autoupdate');
-      exit();
-    }
-
-    array_push($page['errors'], l10n('Unable to dump database.'));
-  }
-
-  if (isset($_POST['submit']) and isset($_POST['upgrade_to']))
-  {
-    upgrade_to($_POST['upgrade_to'], $step);
-  }
-
-  $template->assign('UPGRADE_TO', isset($_GET['to']) ? $_GET['to'] : $last_version);
-}
-
-// +-----------------------------------------------------------------------+
-// |                        Process template                               |
-// +-----------------------------------------------------------------------+
-
-$template->assign(array(
-  'STEP' => $step,
-  'AU_URL' => get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php'),
-  )
-);
-
-$template->set_filename('plugin_admin_content', realpath(AUTOUPDATE_PATH.'template/autoupdate.tpl'));
-$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
-
-?>
Index: tensions/autoupdate/class.inc.php
===================================================================
--- /extensions/autoupdate/class.inc.php	(revision 6167)
+++ 	(revision )
@@ -1,178 +1,0 @@
-<?php
-
-class autoupdate
-{
-  function deltree($path)
-  {
-    if (is_dir($path))
-    {
-      $fh = opendir($path);
-      while ($file = readdir($fh))
-      {
-        if ($file != '.' and $file != '..')
-        {
-          $pathfile = $path . '/' . $file;
-          if (is_dir($pathfile))
-          {
-            $this->deltree($pathfile);
-          }
-          else
-          {
-            @unlink($pathfile);
-          }
-        }
-      }
-      closedir($fh);
-      return @rmdir($path);
-    }
-  }
-
-  function check_version($version=PHPWG_VERSION)
-  {
-    global $conf;
-
-    if (!isset($_SESSION['need_update']))
-    {
-      $_SESSION['need_update'] = null;
-
-      if (preg_match('/(\d+\.\d+)\.(\d+)/', $version, $matches)
-        and @fetchRemote(PHPWG_URL.'/download/latest_version', $result))
-      {
-        $lines = @explode("\r\n", $result);
-        $new_version = trim($lines[1]);
-        $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $new_version);
-        $actual_branch = $matches[1];
-        $update_to =  $actual_branch . '.' . ($matches[2]+1);
-
-        if (version_compare($version, $new_version) < 0 and $actual_branch == $new_branch)
-        {
-          $_SESSION['need_update'] = $new_version;
-        }
-        else
-        {
-          $_SESSION['need_update'] = false;
-        }
-      }
-    }
-
-    if ($_SESSION['need_update'])
-    {
-      preg_match('/(\d+\.\d+)\.(\d+)/', $version, $matches);
-      $update_to =  $matches[1] . '.' . ($matches[2]+1);
-      $path = $conf['local_data_dir'].'/autoupdate/';
-      $code = $version.'_to_'.$update_to;
-      $filename = $path.$version.'_to_'.$update_to.'.zip';
-      mkgetdir($path);
-
-      if (!file_exists($filename) or !filesize($filename))
-      {
-        $zip = @fopen($filename, 'w+');
-        @fetchRemote(PHPWG_URL.'/download/dlcounter.php?code='.str_replace(array('.', '_'), '', $code), $zip);
-        @fclose($zip);
-      }
-
-      if (file_exists($filename) and filesize($filename))
-      {
-        if (isset($_GET['autoupdate']) and preg_match('/\d+\.\d+\.\d+_to_'.preg_quote($version).'/', $_GET['autoupdate']))
-        {
-          redirect('admin.php?autoupdate='.$code);
-        }
-        else
-        {
-          return rtrim(l10n('A new version of Piwigo is available.'), '.').' ('.$_SESSION['need_update'].')<br>'
-            . '<a href="admin.php?autoupdate='.$code.'" onClick="return confirm_autoupdate();">'.l10n('Click here to upgrade automatically').'</a>';
-        }
-      }
-      else
-      {
-        @unlink($filename);
-        return rtrim(l10n('A new version of Piwigo is available.'), '.').' ('.$_SESSION['need_update'].')<br>'
-          . l10n('Piwigo cannot retrieve upgrade file from server').'<br>'
-          . '<a href="'.PHPWG_URL.'/releases/'.$_SESSION['need_update'].'" onclick="window.open(this.href, \'\'); return false;">'
-          . sprintf(l10n('Click here to see Piwigo %s release notes'), $_SESSION['need_update']).'</a>';
-      }
-    }
-    else
-    {
-      // Gallery is up to date
-      // Check plugins upgrade
-      include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
-      $plugins = new plugins();
-      $ignore_list = unserialize($conf['autoupdate_ignore_list']);
-
-      if (!isset($_SESSION['plugins_need_update']))
-      {
-        $_SESSION['plugins_need_update'] = null;
-        $this->check_plugins_upgrade($plugins, $ignore_list);
-      }
-      elseif (!empty($_SESSION['plugins_need_update']))
-      {
-        // Check if plugins have been upgraded since last check
-        foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
-        {
-          if (isset($_SESSION['plugins_need_update'][$plugin_id])
-            and $plugins->plugin_version_compare($fs_plugin['version'], $_SESSION['plugins_need_update'][$plugin_id]))
-          {
-            // Plugin have been updated
-            $this->check_plugins_upgrade($plugins, $ignore_list);
-          }
-        }
-      }
-
-      if (!empty($_SESSION['plugins_need_update']))
-      {
-        return l10n('Some upgrades are available for you plugins').'<br>'
-          . '<a href="admin.php?page=plugins_update">'.l10n('Click here see upgrade plugins page').'</a>';
-      }
-    }
-
-    if ($_SESSION['need_update'] === false and $_SESSION['plugins_need_update'] === array())
-    {
-      return l10n('Gallery and plugins are up to date');
-    }
-    else
-    {
-      return l10n('Unable to check upgrades...')
-        . '<br><a href="admin.php?action=check_autoupdate">'
-        . l10n('Click here to check upgrades now') . '</a>';
-    }
-  }
-
-  function check_plugins_upgrade($plugins, $ignore_list)
-  {
-    if ($plugins->get_server_plugins())
-    {
-      $new_ignore_list = array();
-      $_SESSION['plugins_need_update'] = array();
-
-      foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
-      {
-        if (isset($fs_plugin['extension']) and isset($plugins->server_plugins[$fs_plugin['extension']]))
-        {
-          $plugin_info = $plugins->server_plugins[$fs_plugin['extension']];
-
-          if (!$plugins->plugin_version_compare($fs_plugin['version'], $plugin_info['revision_name']))
-          {
-            if (in_array($fs_plugin['name'], $ignore_list))
-            {
-              array_push($new_ignore_list, $fs_plugin['name']);
-            }
-            else
-            {
-              $_SESSION['plugins_need_update'][$plugin_id] = $plugin_info['revision_name'];
-            }
-          }
-        }
-      }
-
-      // Update ignore list in database
-      $query = '
-UPDATE '.CONFIG_TABLE.'
-SET value = "'.addslashes(serialize($new_ignore_list)).'"
-WHERE param = "autoupdate_ignore_list"
-;';
-      pwg_query($query);
-    }
-  }
-}
-?>
Index: tensions/autoupdate/head.tpl
===================================================================
--- /extensions/autoupdate/head.tpl	(revision 6167)
+++ 	(revision )
@@ -1,31 +1,0 @@
-{html_head}
-<script type="text/javascript">
-var mess_error = '{'Unable to check upgrades...'|@translate}<br><a href="admin.php?action=check_autoupdate">{'Click here to check upgrades now'|@translate}</a>';
-
-window.onload = function () {ldelim}
-  jQuery.ajax({ldelim}
-    type: 'GET',
-    url: '{$ROOT_URL|@cat:"plugins/autoupdate/remote.php"}',
-    dataType: 'text',
-    timeout: 10000,  // 10 sec timeout
-    success: function (data) {ldelim}
-      var reg = new RegExp("(warning|notice)","i");
-      if (data.match(reg)) {ldelim}
-        data = mess_error;
-      }
-      jQuery('#autoupdate').html(data);
-    },
-    error: function() {ldelim}
-     jQuery('#autoupdate').html(mess_error);
-    }
-  });
-}
-
-function confirm_autoupdate() {ldelim}
-  conf = confirm('{'autoupdate_alert'|@translate}');
-  if (conf) jQuery('#autoupdate').html('Upgrade in progress... Please wait.');
-  return conf;
-}
-</script>
-{/html_head}
-<p id="autoupdate"><img src="plugins/autoupdate/ajax-loader.gif"> &nbsp; {'Checking upgrades for gallery and plugins...'|@translate}</p>
Index: tensions/autoupdate/index.php
===================================================================
--- /extensions/autoupdate/index.php	(revision 6167)
+++ 	(revision )
@@ -1,30 +1,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery                                  |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008-2010 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 |
-// +-----------------------------------------------------------------------+
-// | 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                                          |
-// |                                                                       |
-// | This program is distributed in the hope that it will be useful, but   |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
-// | General Public License for more details.                              |
-// |                                                                       |
-// | 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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
Index: tensions/autoupdate/main.inc.php
===================================================================
--- /extensions/autoupdate/main.inc.php	(revision 6167)
+++ 	(revision )
@@ -1,50 +1,0 @@
-<?php
-/*
-Plugin Name: Piwigo AutoUpgrade
-Version: auto
-Description: Upgrade your gallery automatically.
-Plugin URI: http://piwigo.org/ext/extension_view.php?eid=302
-Author: P@t
-Author URI: http://www.gauchon.com
-*/
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-define('AUTOUPDATE_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
-
-if (script_basename() == 'admin')
- add_event_handler('get_admin_plugin_menu_links', 'check_for_auto_upgrade');
-
-function check_for_auto_upgrade($plugin_menu_links)
-{
-  global $template, $page, $conf, $header_notes, $prefixeTable;
-
-  if ($page['page'] == 'intro')
-  {
-    if (isset($_GET['action']) and 
-      ($_GET['action'] == 'check_autoupdate' or $_GET['action'] == 'check_upgrade' ))
-    {
-      unset($_SESSION['need_update']);
-      unset($_SESSION['plugins_need_update']);
-    }
-
-    if (!isset($_SESSION['need_update']) or !isset($_SESSION['plugins_need_update'])
-      or $_SESSION['need_update'] !== false or $_SESSION['plugins_need_update'] !== array())
-    {
-      $template->set_filename('autoupdate_head', realpath(AUTOUPDATE_PATH.'template/head.tpl'));
-      array_push($header_notes, $template->parse('autoupdate_head', true));
-    }
-  }
-
-  if ($page['page'] == 'plugins_update' and method_exists('template', 'set_prefilter'))
-  {
-    include(dirname(__FILE__).'/plugins_update.php');
-  }
-
-  array_push($plugin_menu_links, array(
-      'NAME' => 'Piwigo AutoUpgrade',
-      'URL' => get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php')));
-
-  return $plugin_menu_links;
-}
-?>
Index: tensions/autoupdate/maintain.inc.php
===================================================================
--- /extensions/autoupdate/maintain.inc.php	(revision 6167)
+++ 	(revision )
@@ -1,25 +1,0 @@
-<?php
-
-function plugin_activate()
-{
-  global $prefixeTable, $conf;
-
-  if (!isset($conf['autoupdate_ignore_list']))
-  {
-    $query = '
-INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-VALUES ("autoupdate_ignore_list" , "'.addslashes(serialize(array())).'" , "Ignored plugin list for Piwigo Auto Update plugin");';
-
-    pwg_query($query);
-  }
-}
-
-function plugin_deactivate()
-{
-  global $prefixeTable;
-
-  $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="autoupdate_ignore_list" LIMIT 1;';
-  pwg_query($query);
-}
-
-?>
Index: tensions/autoupdate/plugins_update.php
===================================================================
--- /extensions/autoupdate/plugins_update.php	(revision 6167)
+++ 	(revision )
@@ -1,39 +1,0 @@
-<?php
-
-load_language('plugin.lang', dirname(__FILE__).'/');
-
-function autoupdate_plugins_update_filter($content, &$smarty)
-{
-  $l_key = version_compare(PHPWG_VERSION, '2.1', '<') ? 'plugins_download' : 'Download file';
-
-  $search = '<a href="{$plugin.URL_DOWNLOAD}">{\''.$l_key.'\'|@translate}</a>';
-
-  $replacement = '  <a href="{$plugin.URL_DOWNLOAD}">{\''.$l_key.'\'|@translate}</a><br>
-    <a href="#" onClick="autoupdate_ignore(\'{$plugin.EXT_NAME}\', true, {$smarty.foreach.plugins_loop.index}); return false;" id="au_ignore_{$smarty.foreach.plugins_loop.index}_true" {if $plugin.EXT_NAME|@in_array:$AU_IGNORE_LIST}style="display: none;"{/if}>{\'Don\\\'t notify on admin homepage\'|@translate}</a>
-    <a href="#" onClick="autoupdate_ignore(\'{$plugin.EXT_NAME}\', false, {$smarty.foreach.plugins_loop.index}); return false;" id="au_ignore_{$smarty.foreach.plugins_loop.index}_false" {if !$plugin.EXT_NAME|@in_array:$AU_IGNORE_LIST}style="display: none;"{/if}>{\'Notify on admin homepage\'|@translate}</a>';
-
-  return str_replace($search, $replacement, $content);;  
-}
-
-$script_head = '
-<script type="text/javascript">
-function autoupdate_ignore(name, bool, id) {
-  jQuery.post(
-    "'.PHPWG_ROOT_PATH.'plugins/autoupdate/remote.php",
-    { "autoupdate_ignore'.(version_compare(PHPWG_VERSION, '2.1', '<') ? '[]' : '').'": [name, bool] },
-    function(data) {
-      if (data == "ok") {
-        jQuery("#au_ignore_"+id+"_"+bool).hide();
-        jQuery("#au_ignore_"+id+"_"+!bool).show();
-      }
-    }
-  );
-}
-</script>
-';
-
-$template->block_html_head('', $script_head, $smarty, $repeat);
-$template->set_prefilter('plugins', 'autoupdate_plugins_update_filter');
-$template->assign('AU_IGNORE_LIST', unserialize($conf['autoupdate_ignore_list']));
-
-?>
Index: tensions/autoupdate/remote.php
===================================================================
--- /extensions/autoupdate/remote.php	(revision 6167)
+++ 	(revision )
@@ -1,55 +1,0 @@
-<?php
-
-define('PHPWG_ROOT_PATH','../../');
-define('IN_ADMIN', true);
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');
-
-check_status(ACCESS_ADMINISTRATOR);
-
-if (isset($_POST['autoupdate_ignore'])
-  and is_array($_POST['autoupdate_ignore'])
-  and count($_POST['autoupdate_ignore']) == 2)
-{
-  // Add or remove plugin from ignore list
-  $ignore = unserialize($conf['autoupdate_ignore_list']);
-  $ignore = array_flip($ignore);
-
-  if ($_POST['autoupdate_ignore'][1] == "false" and isset($ignore[$_POST['autoupdate_ignore'][0]]))
-  {
-    unset($ignore[$_POST['autoupdate_ignore'][0]]);
-    $ignore = array_flip($ignore);
-  }
-  elseif ($_POST['autoupdate_ignore'][1] == "true" and !isset($ignore[$_POST['autoupdate_ignore'][0]]))
-  {
-    $ignore = array_flip($ignore);
-    array_push($ignore, $_POST['autoupdate_ignore'][0]);
-  }
-  else
-  {
-    die;
-  }
-  sort($ignore);  
-
-  $query = '
-UPDATE '.CONFIG_TABLE.'
-SET value = "'.addslashes(serialize($ignore)).'"
-WHERE param = "autoupdate_ignore_list"
-;';
-  pwg_query($query);
-
-  unset($_SESSION['plugins_need_update']);
-  echo 'ok';
-}
-else
-{
-  // Check if gallery or plugins are up to date
-  load_language('plugin.lang', dirname(__FILE__).'/');
-  header('Content-Type: text/html; charset=UTF-8');
-
-  include(AUTOUPDATE_PATH.'include/functions_remote.inc.php');
-  echo autoupdate_check_version();
-}
-
-?>
Index: /extensions/autoupdate/trunk/autoupdate.php
===================================================================
--- /extensions/autoupdate/trunk/autoupdate.php	(revision 6168)
+++ /extensions/autoupdate/trunk/autoupdate.php	(revision 6168)
@@ -0,0 +1,230 @@
+<?php
+
+load_language('plugin.lang', dirname(__FILE__).'/');
+include(AUTOUPDATE_PATH.'include/functions.inc.php');
+include(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php');
+
+/*
+STEP:
+0 = check is needed. If version is latest or check fail, we stay on step 0
+1 = new version on same branch AND new branch are available => user may choose upgrade.
+2 = upgrade on same branch
+3 = upgrade on different branch
+*/
+$step = isset($_GET['step']) ? $_GET['step'] : 0;
+
+// +-----------------------------------------------------------------------+
+// |                                Step 0                                 |
+// +-----------------------------------------------------------------------+
+if ($step == 0)
+{
+  if (preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches)
+    and @fetchRemote(PHPWG_URL.'/download/all_versions.php', $result)
+    and $all_versions = @explode("\n", $result)
+    and is_array($all_versions))
+  {
+    $template->assign('CHECK_VERSION', true);
+
+    $last_version = trim($all_versions[0]);
+
+    if (version_compare(PHPWG_VERSION, $last_version, '<'))
+    {
+      $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $last_version);
+      $actual_branch = $matches[1];
+
+      if ($new_branch == $actual_branch)
+      {
+        $step = 2;
+      }
+      else
+      {
+        $step = 3;
+
+        // Check if new version exists in same branch
+        foreach ($all_versions as $version)
+        {
+          $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $version);
+
+          if ($new_branch == $actual_branch)
+          {
+            if (version_compare(PHPWG_VERSION, $version, '<'))
+            {
+              $step = 1;
+            }
+            break;
+          }
+        }
+      }
+    }
+  }
+  else
+  {
+    $template->assign('CHECK_VERSION', false);
+  }
+}
+
+// +-----------------------------------------------------------------------+
+// |                                Step 1                                 |
+// +-----------------------------------------------------------------------+
+if ($step == 1)
+{
+  $new_versions = array($last_version, $version);
+  $template->assign('new_versions', $new_versions);
+}
+
+// +-----------------------------------------------------------------------+
+// |                                Step 2                                 |
+// +-----------------------------------------------------------------------+
+if ($step == 2)
+{
+  if (isset($_POST['submit']) and isset($_POST['upgrade_to']))
+  {
+    upgrade_to($_POST['upgrade_to'], $step);
+  }
+
+  $template->assign('UPGRADE_TO', isset($_GET['to']) ? $_GET['to'] : $last_version);
+}
+
+// +-----------------------------------------------------------------------+
+// |                                Step 3                                 |
+// +-----------------------------------------------------------------------+
+if ($step == 3)
+{
+  if (isset($_POST['saveTemplate']))
+  {
+    $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();
+    }
+
+    array_push($page['errors'], l10n('Unable to send template directory.'));
+  }
+
+  if (isset($_POST['dumpDatabase']))
+  {
+    if (version_compare(PHPWG_VERSION, '2.1', '<'))
+    {
+      global $cfgBase;
+      $conf['db_base'] = $cfgBase;
+    }
+
+    include(AUTOUPDATE_PATH.'include/mysqldump.php');
+
+    $path = $conf['local_data_dir'].'/autoupdate';
+
+    if (@mkgetdir($path)
+      and ($backupFile = tempnam($path, 'sql'))
+      and ($dumper = new MySQLDump($conf['db_base'],$backupFile,false,false)))
+    {
+      $tablesStructure = array(
+        CATEGORIES_TABLE,
+        COMMENTS_TABLE,
+        CONFIG_TABLE,
+        FAVORITES_TABLE,
+        GROUP_ACCESS_TABLE,
+        GROUPS_TABLE,
+        HISTORY_TABLE,
+        HISTORY_SUMMARY_TABLE,
+        IMAGE_CATEGORY_TABLE,
+        IMAGES_TABLE,
+        SESSIONS_TABLE,
+        SITES_TABLE,
+        USER_ACCESS_TABLE,
+        USER_GROUP_TABLE,
+        USERS_TABLE,
+        USER_INFOS_TABLE,
+        USER_FEED_TABLE,
+        WAITING_TABLE,
+        RATE_TABLE,
+        USER_CACHE_TABLE,
+        USER_CACHE_CATEGORIES_TABLE,
+        CADDIE_TABLE,
+        UPGRADE_TABLE,
+        SEARCH_TABLE,
+        USER_MAIL_NOTIFICATION_TABLE,
+        TAGS_TABLE,
+        IMAGE_TAG_TABLE,
+        PLUGINS_TABLE,
+        OLD_PERMALINKS_TABLE,
+        );
+
+      $tablesData = $tablesStructure;
+
+      if (!isset($_POST['includeHistory']))
+      {
+        unset($tablesData[6]);
+      }
+
+      foreach ($tablesStructure as $table)
+      {
+        $dumper->getTableStructure($table); 
+      }
+      foreach ($tablesData as $table)
+      {
+        $dumper->getTableData($table); 
+      }
+    }
+
+    if (@filesize($backupFile))
+    {
+      $http_headers = array(
+        'Content-Length: '.@filesize($backupFile),
+        'Content-Type: text/x-sql',
+        'Content-Disposition: attachment; filename="database.sql";',
+        'Content-Transfer-Encoding: binary',
+        );
+
+      foreach ($http_headers as $header) {
+        header($header);
+      }
+
+      @readfile($backupFile);
+      autoupdate_deltree($conf['local_data_dir'].'/autoupdate');
+      exit();
+    }
+
+    array_push($page['errors'], l10n('Unable to dump database.'));
+  }
+
+  if (isset($_POST['submit']) and isset($_POST['upgrade_to']))
+  {
+    upgrade_to($_POST['upgrade_to'], $step);
+  }
+
+  $template->assign('UPGRADE_TO', isset($_GET['to']) ? $_GET['to'] : $last_version);
+}
+
+// +-----------------------------------------------------------------------+
+// |                        Process template                               |
+// +-----------------------------------------------------------------------+
+
+$template->assign(array(
+  'STEP' => $step,
+  'AU_URL' => get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php'),
+  )
+);
+
+$template->set_filename('plugin_admin_content', realpath(AUTOUPDATE_PATH.'template/autoupdate.tpl'));
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+
+?>
Index: /extensions/autoupdate/trunk/class.inc.php
===================================================================
--- /extensions/autoupdate/trunk/class.inc.php	(revision 6168)
+++ /extensions/autoupdate/trunk/class.inc.php	(revision 6168)
@@ -0,0 +1,178 @@
+<?php
+
+class autoupdate
+{
+  function deltree($path)
+  {
+    if (is_dir($path))
+    {
+      $fh = opendir($path);
+      while ($file = readdir($fh))
+      {
+        if ($file != '.' and $file != '..')
+        {
+          $pathfile = $path . '/' . $file;
+          if (is_dir($pathfile))
+          {
+            $this->deltree($pathfile);
+          }
+          else
+          {
+            @unlink($pathfile);
+          }
+        }
+      }
+      closedir($fh);
+      return @rmdir($path);
+    }
+  }
+
+  function check_version($version=PHPWG_VERSION)
+  {
+    global $conf;
+
+    if (!isset($_SESSION['need_update']))
+    {
+      $_SESSION['need_update'] = null;
+
+      if (preg_match('/(\d+\.\d+)\.(\d+)/', $version, $matches)
+        and @fetchRemote(PHPWG_URL.'/download/latest_version', $result))
+      {
+        $lines = @explode("\r\n", $result);
+        $new_version = trim($lines[1]);
+        $new_branch = preg_replace('/(\d+\.\d+)\.\d+/', '$1', $new_version);
+        $actual_branch = $matches[1];
+        $update_to =  $actual_branch . '.' . ($matches[2]+1);
+
+        if (version_compare($version, $new_version) < 0 and $actual_branch == $new_branch)
+        {
+          $_SESSION['need_update'] = $new_version;
+        }
+        else
+        {
+          $_SESSION['need_update'] = false;
+        }
+      }
+    }
+
+    if ($_SESSION['need_update'])
+    {
+      preg_match('/(\d+\.\d+)\.(\d+)/', $version, $matches);
+      $update_to =  $matches[1] . '.' . ($matches[2]+1);
+      $path = $conf['local_data_dir'].'/autoupdate/';
+      $code = $version.'_to_'.$update_to;
+      $filename = $path.$version.'_to_'.$update_to.'.zip';
+      mkgetdir($path);
+
+      if (!file_exists($filename) or !filesize($filename))
+      {
+        $zip = @fopen($filename, 'w+');
+        @fetchRemote(PHPWG_URL.'/download/dlcounter.php?code='.str_replace(array('.', '_'), '', $code), $zip);
+        @fclose($zip);
+      }
+
+      if (file_exists($filename) and filesize($filename))
+      {
+        if (isset($_GET['autoupdate']) and preg_match('/\d+\.\d+\.\d+_to_'.preg_quote($version).'/', $_GET['autoupdate']))
+        {
+          redirect('admin.php?autoupdate='.$code);
+        }
+        else
+        {
+          return rtrim(l10n('A new version of Piwigo is available.'), '.').' ('.$_SESSION['need_update'].')<br>'
+            . '<a href="admin.php?autoupdate='.$code.'" onClick="return confirm_autoupdate();">'.l10n('Click here to upgrade automatically').'</a>';
+        }
+      }
+      else
+      {
+        @unlink($filename);
+        return rtrim(l10n('A new version of Piwigo is available.'), '.').' ('.$_SESSION['need_update'].')<br>'
+          . l10n('Piwigo cannot retrieve upgrade file from server').'<br>'
+          . '<a href="'.PHPWG_URL.'/releases/'.$_SESSION['need_update'].'" onclick="window.open(this.href, \'\'); return false;">'
+          . sprintf(l10n('Click here to see Piwigo %s release notes'), $_SESSION['need_update']).'</a>';
+      }
+    }
+    else
+    {
+      // Gallery is up to date
+      // Check plugins upgrade
+      include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
+      $plugins = new plugins();
+      $ignore_list = unserialize($conf['autoupdate_ignore_list']);
+
+      if (!isset($_SESSION['plugins_need_update']))
+      {
+        $_SESSION['plugins_need_update'] = null;
+        $this->check_plugins_upgrade($plugins, $ignore_list);
+      }
+      elseif (!empty($_SESSION['plugins_need_update']))
+      {
+        // Check if plugins have been upgraded since last check
+        foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
+        {
+          if (isset($_SESSION['plugins_need_update'][$plugin_id])
+            and $plugins->plugin_version_compare($fs_plugin['version'], $_SESSION['plugins_need_update'][$plugin_id]))
+          {
+            // Plugin have been updated
+            $this->check_plugins_upgrade($plugins, $ignore_list);
+          }
+        }
+      }
+
+      if (!empty($_SESSION['plugins_need_update']))
+      {
+        return l10n('Some upgrades are available for you plugins').'<br>'
+          . '<a href="admin.php?page=plugins_update">'.l10n('Click here see upgrade plugins page').'</a>';
+      }
+    }
+
+    if ($_SESSION['need_update'] === false and $_SESSION['plugins_need_update'] === array())
+    {
+      return l10n('Gallery and plugins are up to date');
+    }
+    else
+    {
+      return l10n('Unable to check upgrades...')
+        . '<br><a href="admin.php?action=check_autoupdate">'
+        . l10n('Click here to check upgrades now') . '</a>';
+    }
+  }
+
+  function check_plugins_upgrade($plugins, $ignore_list)
+  {
+    if ($plugins->get_server_plugins())
+    {
+      $new_ignore_list = array();
+      $_SESSION['plugins_need_update'] = array();
+
+      foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
+      {
+        if (isset($fs_plugin['extension']) and isset($plugins->server_plugins[$fs_plugin['extension']]))
+        {
+          $plugin_info = $plugins->server_plugins[$fs_plugin['extension']];
+
+          if (!$plugins->plugin_version_compare($fs_plugin['version'], $plugin_info['revision_name']))
+          {
+            if (in_array($fs_plugin['name'], $ignore_list))
+            {
+              array_push($new_ignore_list, $fs_plugin['name']);
+            }
+            else
+            {
+              $_SESSION['plugins_need_update'][$plugin_id] = $plugin_info['revision_name'];
+            }
+          }
+        }
+      }
+
+      // Update ignore list in database
+      $query = '
+UPDATE '.CONFIG_TABLE.'
+SET value = "'.addslashes(serialize($new_ignore_list)).'"
+WHERE param = "autoupdate_ignore_list"
+;';
+      pwg_query($query);
+    }
+  }
+}
+?>
Index: /extensions/autoupdate/trunk/head.tpl
===================================================================
--- /extensions/autoupdate/trunk/head.tpl	(revision 6168)
+++ /extensions/autoupdate/trunk/head.tpl	(revision 6168)
@@ -0,0 +1,31 @@
+{html_head}
+<script type="text/javascript">
+var mess_error = '{'Unable to check upgrades...'|@translate}<br><a href="admin.php?action=check_autoupdate">{'Click here to check upgrades now'|@translate}</a>';
+
+window.onload = function () {ldelim}
+  jQuery.ajax({ldelim}
+    type: 'GET',
+    url: '{$ROOT_URL|@cat:"plugins/autoupdate/remote.php"}',
+    dataType: 'text',
+    timeout: 10000,  // 10 sec timeout
+    success: function (data) {ldelim}
+      var reg = new RegExp("(warning|notice)","i");
+      if (data.match(reg)) {ldelim}
+        data = mess_error;
+      }
+      jQuery('#autoupdate').html(data);
+    },
+    error: function() {ldelim}
+     jQuery('#autoupdate').html(mess_error);
+    }
+  });
+}
+
+function confirm_autoupdate() {ldelim}
+  conf = confirm('{'autoupdate_alert'|@translate}');
+  if (conf) jQuery('#autoupdate').html('Upgrade in progress... Please wait.');
+  return conf;
+}
+</script>
+{/html_head}
+<p id="autoupdate"><img src="plugins/autoupdate/ajax-loader.gif"> &nbsp; {'Checking upgrades for gallery and plugins...'|@translate}</p>
Index: /extensions/autoupdate/trunk/include/functions.inc.php
===================================================================
--- /extensions/autoupdate/trunk/include/functions.inc.php	(revision 6168)
+++ /extensions/autoupdate/trunk/include/functions.inc.php	(revision 6168)
@@ -0,0 +1,312 @@
+<?php
+
+function autoupdate_deltree($path)
+{
+  if (is_dir($path))
+  {
+    $fh = opendir($path);
+    while ($file = readdir($fh))
+    {
+      if ($file != '.' and $file != '..')
+      {
+        $pathfile = $path . '/' . $file;
+        if (is_dir($pathfile))
+        {
+          autoupdate_deltree($pathfile);
+        }
+        else
+        {
+          @unlink($pathfile);
+        }
+      }
+    }
+    closedir($fh);
+    return @rmdir($path);
+  }
+}
+
+function autoupdate_add_index($path)
+{
+  if (is_dir($path))
+  {
+    $fh = opendir($path);
+    while ($file = readdir($fh))
+    {
+      if ($file != '.' and $file != '..')
+      {
+        $pathfile = $path . '/' . $file;
+        if (is_dir($pathfile))
+        {
+          autoupdate_add_index($pathfile);
+        }
+      }
+    }
+    $fp = @fopen($path.'/index.php', 'w');
+    @fwrite($fp, AU_DEFAULT_INDEX);
+    @fclose($fp);
+    closedir($fh);
+  }
+}
+
+function process_obsolete_list($file)
+{
+  if (file_exists(PHPWG_ROOT_PATH.$file)
+    and $old_files = file(PHPWG_ROOT_PATH.$file, FILE_IGNORE_NEW_LINES)
+    and !empty($old_files))
+  {
+    array_push($old_files, $file);
+    foreach($old_files as $old_file)
+    {
+      $path = PHPWG_ROOT_PATH.$old_file;
+      if (is_file($path))
+      {
+        @unlink($path);
+      }
+      elseif (is_dir($path))
+      {
+        autoupdate_deltree($path);
+      }
+    }
+  }
+}
+
+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 upgrade_to($upgrade_to, &$step)
+{
+  global $page, $conf, $template;
+
+  if (!version_compare($_POST['upgrade_to'], PHPWG_VERSION, '>'))
+  {
+    redirect(get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php'));
+  }
+
+  if ($step == 2)
+  {
+    preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches);
+    $code =  $matches[1].'.x_to_'.$_POST['upgrade_to'];
+    $dl_code = str_replace(array('.', '_'), '', $code);
+    $remove_path = $code;
+    $obsolete_list = 'obsolete.list';
+  }
+  else
+  {
+    $code = $_POST['upgrade_to'];
+    $dl_code = $code;
+    $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');
+    }
+  }
+
+  if (empty($page['errors']))
+  {
+    $path = $conf['local_data_dir'].'/autoupdate';
+    $filename = $path.'/'.$code.'.zip';
+    @mkgetdir($path);
+
+    $chunk_num = 0;
+    $end = false;
+    $zip = @fopen($filename, 'w');
+    while (!$end)
+    {
+      $chunk_num++;
+      if (@fetchRemote(PHPWG_URL.'/download/dlcounter.php?code='.$dl_code.'&chunk_num='.$chunk_num, $result)
+        and $input = @unserialize($result))
+      {
+        if (0 == $input['remaining'])
+        {
+          $end = true;
+        }
+        @fwrite($zip, base64_decode($input['data']));
+      }
+      else
+      {
+        $end = true;
+      }
+    }
+    @fclose($zip);
+
+    if (@filesize($filename))
+    {
+      $zip = new PclZip($filename);
+      if ($result = $zip->extract(PCLZIP_OPT_PATH, PHPWG_ROOT_PATH,
+                                  PCLZIP_OPT_REMOVE_PATH, $remove_path,
+                                  PCLZIP_OPT_SET_CHMOD, 0755,
+                                  PCLZIP_OPT_REPLACE_NEWER))
+      {
+        //Check if all files were extracted
+        $error = '';
+        foreach($result as $extract)
+        {
+          if (!in_array($extract['status'], array('ok', 'filtered', 'already_a_directory')))
+          {
+            // Try to change chmod and extract
+            if (@chmod(PHPWG_ROOT_PATH.$extract['filename'], 0777)
+              and ($res = $zip->extract(PCLZIP_OPT_BY_NAME, $remove_path.'/'.$extract['filename'],
+                                        PCLZIP_OPT_PATH, PHPWG_ROOT_PATH,
+                                        PCLZIP_OPT_REMOVE_PATH, $remove_path,
+                                        PCLZIP_OPT_SET_CHMOD, 0755,
+                                        PCLZIP_OPT_REPLACE_NEWER))
+              and isset($res[0]['status'])
+              and $res[0]['status'] == 'ok')
+            {
+              continue;
+            }
+            else
+            {
+              $error .= $extract['filename'].': '.$extract['status']."\n";
+            }
+          }
+        }
+
+        if (empty($error))
+        {
+          process_obsolete_list($obsolete_list);
+          autoupdate_deltree($conf['local_data_dir'].'/autoupdate');
+          invalidate_user_cache(true);
+          $template->delete_compiled_templates();
+          if ($step == 2)
+          {
+            array_push($page['infos'], sprintf(l10n('autoupdate_success'), $upgrade_to));
+            $template->assign('CHECK_VERSION', true);
+            $step = 0;
+          }
+          else
+          {
+            redirect(PHPWG_ROOT_PATH.'upgrade.php?now=');
+          }
+        }
+        else
+        {
+          file_put_contents($conf['local_data_dir'].'/autoupdate/log_error.txt', $error);
+          $relative_path = trim(str_replace(dirname(dirname(dirname(dirname(__FILE__)))), '', $conf['local_data_dir']), '/\\');
+          array_push($page['errors'], sprintf(l10n('autoupdate_extract_fail'), PHPWG_ROOT_PATH.$relative_path.'/autoupdate/log_error.txt'));
+        }
+      }
+      else
+      {
+        autoupdate_deltree($conf['local_data_dir'].'/autoupdate');
+        array_push($page['errors'], l10n('autoupdate_fail'));
+      }
+    }
+    else
+    {
+      array_push($page['errors'], l10n('Piwigo cannot retrieve upgrade file from server'));
+    }
+  }
+}
+
+define('AU_DEFAULT_INDEX', file_get_contents(AUTOUPDATE_PATH.'index.php'));
+?>
Index: /extensions/autoupdate/trunk/include/functions_remote.inc.php
===================================================================
--- /extensions/autoupdate/trunk/include/functions_remote.inc.php	(revision 6168)
+++ /extensions/autoupdate/trunk/include/functions_remote.inc.php	(revision 6168)
@@ -0,0 +1,108 @@
+<?php
+
+function autoupdate_check_version($version=PHPWG_VERSION)
+{
+  global $conf;
+
+  if (!isset($_SESSION['need_update']))
+  {
+    $_SESSION['need_update'] = null;
+
+    if (preg_match('/(\d+\.\d+)\.(\d+)/', $version, $matches)
+      and @fetchRemote(PHPWG_URL.'/download/all_versions.php', $result))
+    {
+      $all_versions = @explode("\n", $result);
+      $new_version = trim($all_versions[0]);
+      $_SESSION['need_update'] = version_compare($version, $new_version, '<');
+    }
+  }
+
+  if ($_SESSION['need_update'])
+  {
+    return l10n('A new version of Piwigo is available.').'<br>'
+          . '<a href="admin.php?page=plugin&amp;section=autoupdate%2Fautoupdate.php">'.l10n('Click here to upgrade automatically').'</a>';
+  }
+  else
+  {
+    // Gallery is up to date
+    // Check plugins upgrade
+    include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
+    $plugins = new plugins();
+    $ignore_list = unserialize($conf['autoupdate_ignore_list']);
+
+    if (!isset($_SESSION['plugins_need_update']))
+    {
+      $_SESSION['plugins_need_update'] = null;
+      autoupdate_check_plugins_upgrade($plugins, $ignore_list);
+    }
+    elseif (!empty($_SESSION['plugins_need_update']))
+    {
+      // Check if plugins have been upgraded since last check
+      foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
+      {
+        if (isset($_SESSION['plugins_need_update'][$plugin_id])
+          and $plugins->plugin_version_compare($fs_plugin['version'], $_SESSION['plugins_need_update'][$plugin_id]))
+        {
+          // Plugin have been updated
+          autoupdate_check_plugins_upgrade($plugins, $ignore_list);
+        }
+      }
+    }
+
+    if (!empty($_SESSION['plugins_need_update']))
+    {
+      return l10n('Some upgrades are available for you plugins').'<br>'
+        . '<a href="admin.php?page=plugins_update">'.l10n('Click here see upgrade plugins page').'</a>';
+    }
+  }
+
+  if ($_SESSION['need_update'] === false and $_SESSION['plugins_need_update'] === array())
+  {
+    return l10n('Gallery and plugins are up to date');
+  }
+  else
+  {
+    return l10n('Unable to check upgrades...')
+      . '<br><a href="admin.php?action=check_autoupdate">'
+      . l10n('Click here to check upgrades now') . '</a>';
+  }
+}
+
+function autoupdate_check_plugins_upgrade($plugins, $ignore_list)
+{
+  if ($plugins->get_server_plugins())
+  {
+    $new_ignore_list = array();
+    $_SESSION['plugins_need_update'] = array();
+
+    foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
+    {
+      if (isset($fs_plugin['extension']) and isset($plugins->server_plugins[$fs_plugin['extension']]))
+      {
+        $plugin_info = $plugins->server_plugins[$fs_plugin['extension']];
+
+        if (!$plugins->plugin_version_compare($fs_plugin['version'], $plugin_info['revision_name']))
+        {
+          if (in_array($fs_plugin['name'], $ignore_list))
+          {
+            array_push($new_ignore_list, $fs_plugin['name']);
+          }
+          else
+          {
+            $_SESSION['plugins_need_update'][$plugin_id] = $plugin_info['revision_name'];
+          }
+        }
+      }
+    }
+
+    // Update ignore list in database
+    $query = '
+UPDATE '.CONFIG_TABLE.'
+SET value = "'.addslashes(serialize($new_ignore_list)).'"
+WHERE param = "autoupdate_ignore_list"
+;';
+    pwg_query($query);
+  }
+}
+
+?>
Index: /extensions/autoupdate/trunk/include/index.php
===================================================================
--- /extensions/autoupdate/trunk/include/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/include/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/include/mysqldump.php
===================================================================
--- /extensions/autoupdate/trunk/include/mysqldump.php	(revision 6168)
+++ /extensions/autoupdate/trunk/include/mysqldump.php	(revision 6168)
@@ -0,0 +1,417 @@
+<?php
+/**
+* Dump MySQL database
+*
+* Here is an inline example:
+* <code>
+* $connection = @mysql_connect($dbhost,$dbuser,$dbpsw);
+* $dumper = new MySQLDump($dbname,'filename.sql',false,false);
+* $dumper->doDump();
+* </code>
+*
+* Special thanks to:
+* - Andrea Ingaglio <andrea@coders4fun.com> helping in development of all class code
+* - Dylan Pugh for precious advices halfing the size of the output file and for helping in debug
+*
+* @name    MySQLDump
+* @author  Daniele Viganò - CreativeFactory.it <daniele.vigano@creativefactory.it>
+* @version 2.20 - 02/11/2007
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*/
+
+class MySQLDump {
+	/**
+	* @access private
+	*/
+	var $database = null;
+
+	/**
+	* @access private
+	*/
+	var $compress = false;
+
+	/**
+	* @access private
+	*/
+	var $hexValue = false;
+
+  /**
+	* The output filename
+	* @access private
+	*/
+	var $filename = null;
+
+	/**
+	* The pointer of the output file
+	* @access private
+	*/
+	var $file = null;
+
+	/**
+	* @access private
+	*/
+	var $isWritten = false;
+
+	/**
+	* Class constructor
+	* @param string $db The database name
+	* @param string $filepath The file where the dump will be written
+	* @param boolean $compress It defines if the output file is compress (gzip) or not
+	* @param boolean $hexValue It defines if the outup values are base-16 or not
+	*/
+	function MYSQLDump($db = null, $filepath = 'dump.sql', $compress = false, $hexValue = false){
+		$this->compress = $compress;
+		if ( !$this->setOutputFile($filepath) )
+			return false;
+		return $this->setDatabase($db);
+	}
+
+	/**
+	* Sets the database to work on
+	* @param string $db The database name
+	*/
+	function setDatabase($db){
+		$this->database = $db;
+		if ( !@mysql_select_db($this->database) )
+			return false;
+		return true;
+  }
+
+	/**
+	* Returns the database where the class is working on
+	* @return string
+	*/
+  function getDatabase(){
+		return $this->database;
+	}
+
+	/**
+	* Sets the output file type (It can be made only if the file hasn't been already written)
+	* @param boolean $compress If it's true, the output file will be compressed
+	*/
+	function setCompress($compress){
+		if ( $this->isWritten )
+			return false;
+		$this->compress = $compress;
+		$this->openFile($this->filename);
+		return true;
+  }
+
+	/**
+	* Returns if the output file is or not compressed
+	* @return boolean
+	*/
+  function getCompress(){
+		return $this->compress;
+	}
+
+	/**
+	* Sets the output file
+	* @param string $filepath The file where the dump will be written
+	*/
+	function setOutputFile($filepath){
+		if ( $this->isWritten )
+			return false;
+		$this->filename = $filepath;
+		$this->file = $this->openFile($this->filename);
+		return $this->file;
+  }
+
+  /**
+	* Returns the output filename
+	* @return string
+	*/
+  function getOutputFile(){
+		return $this->filename;
+	}
+
+	/**
+	* Writes to file the $table's structure
+	* @param string $table The table name
+	*/
+  function getTableStructure($table){
+		if ( !$this->setDatabase($this->database) )
+			return false;
+		// Structure Header
+		$structure = "-- \n";
+		$structure .= "-- Table structure for table `{$table}` \n";
+		$structure .= "-- \n\n";
+		// Dump Structure
+		$structure .= 'DROP TABLE IF EXISTS `'.$table.'`;'."\n";
+		$structure .= "CREATE TABLE `".$table."` (\n";
+		$records = @mysql_query('SHOW FIELDS FROM `'.$table.'`');
+		if ( @mysql_num_rows($records) == 0 )
+			return false;
+		while ( $record = mysql_fetch_assoc($records) ) {
+			$structure .= '`'.$record['Field'].'` '.$record['Type'];
+			if ( !empty($record['Default']) )
+				$structure .= ' DEFAULT \''.$record['Default'].'\'';
+			if ( @strcmp($record['Null'],'YES') != 0 )
+				$structure .= ' NOT NULL';
+			if ( !empty($record['Extra']) )
+				$structure .= ' '.$record['Extra'];
+			$structure .= ",\n";
+		}
+		$structure = @ereg_replace(",\n$", null, $structure);
+
+		// Save all Column Indexes
+		$structure .= $this->getSqlKeysTable($table);
+		$structure .= "\n)";
+
+		//Save table engine
+		$records = @mysql_query("SHOW TABLE STATUS LIKE '".$table."'");
+
+		if ( $record = @mysql_fetch_assoc($records) ) {
+			if ( !empty($record['Engine']) )
+				$structure .= ' ENGINE='.$record['Engine'];
+			if ( !empty($record['Auto_increment']) )
+				$structure .= ' AUTO_INCREMENT='.$record['Auto_increment'];
+		}
+
+		$structure .= ";\n\n-- --------------------------------------------------------\n\n";
+		$this->saveToFile($this->file,$structure);
+	}
+
+	/**
+	* Writes to file the $table's data
+	* @param string $table The table name
+	* @param boolean $hexValue It defines if the output is base 16 or not
+	*/
+	function getTableData($table,$hexValue = true) {
+		if ( !$this->setDatabase($this->database) )
+			return false;
+		// Header
+		$data = "-- \n";
+		$data .= "-- Dumping data for table `$table` \n";
+		$data .= "-- \n\n";
+
+		$records = mysql_query('SHOW FIELDS FROM `'.$table.'`');
+		$num_fields = @mysql_num_rows($records);
+		if ( $num_fields == 0 )
+			return false;
+		// Field names
+		$selectStatement = "SELECT ";
+		$insertStatement = "INSERT INTO `$table` (";
+		$hexField = array();
+		for ($x = 0; $x < $num_fields; $x++) {
+			$record = @mysql_fetch_assoc($records);
+			if ( ($hexValue) && ($this->isTextValue($record['Type'])) ) {
+				$selectStatement .= 'HEX(`'.$record['Field'].'`)';
+				$hexField [$x] = true;
+			}
+			else
+				$selectStatement .= '`'.$record['Field'].'`';
+			$insertStatement .= '`'.$record['Field'].'`';
+			$insertStatement .= ", ";
+			$selectStatement .= ", ";
+		}
+		$insertStatement = @substr($insertStatement,0,-2).') VALUES';
+		$selectStatement = @substr($selectStatement,0,-2).' FROM `'.$table.'`';
+
+		$records = @mysql_query($selectStatement);
+		$num_rows = @mysql_num_rows($records);
+		$num_fields = @mysql_num_fields($records);
+		// Dump data
+		if ( $num_rows > 0 ) {
+			$data .= $insertStatement;
+			for ($i = 0; $i < $num_rows; $i++) {
+				$record = @mysql_fetch_assoc($records);
+				$data .= ' (';
+				for ($j = 0; $j < $num_fields; $j++) {
+					$field_name = @mysql_field_name($records, $j);
+					if ( @$hexField[$j] && (@strlen($record[$field_name]) > 0) )
+						$data .= "0x".$record[$field_name];
+					else
+						$data .= "'".@str_replace('\"','"',@mysql_escape_string($record[$field_name]))."'";
+					$data .= ',';
+				}
+				$data = @substr($data,0,-1).")";
+				$data .= ( $i < ($num_rows-1) ) ? ',' : ';';
+				$data .= "\n";
+				//if data in greather than 1MB save
+				if (strlen($data) > 1048576) {
+					$this->saveToFile($this->file,$data);
+					$data = '';
+				}
+			}
+			$data .= "\n-- --------------------------------------------------------\n\n";
+			$this->saveToFile($this->file,$data);
+		}
+	}
+
+  /**
+	* Writes to file all the selected database tables structure
+	* @return boolean
+	*/
+	function getDatabaseStructure(){
+		$records = @mysql_query('SHOW TABLES');
+		if ( @mysql_num_rows($records) == 0 )
+			return false;
+    $structure = '';
+		while ( $record = @mysql_fetch_row($records) ) {
+			$structure .= $this->getTableStructure($record[0]);
+		}
+		return true;
+  }
+
+	/**
+	* Writes to file all the selected database tables data
+	* @param boolean $hexValue It defines if the output is base-16 or not
+	*/
+	function getDatabaseData($hexValue = true){
+		$records = @mysql_query('SHOW TABLES');
+		if ( @mysql_num_rows($records) == 0 )
+			return false;
+		while ( $record = @mysql_fetch_row($records) ) {
+			$this->getTableData($record[0],$hexValue);
+		}
+  }
+
+	/**
+	* Writes to file the selected database dump
+	*/
+	function doDump() {
+		$this->saveToFile($this->file,"SET FOREIGN_KEY_CHECKS = 0;\n\n");
+		$this->getDatabaseStructure();
+		$this->getDatabaseData($this->hexValue);
+		$this->saveToFile($this->file,"SET FOREIGN_KEY_CHECKS = 1;\n\n");
+		$this->closeFile($this->file);
+		return true;
+	}
+	
+	/**
+	* @deprecated Look at the doDump() method
+	*/
+	function writeDump($filename) {
+		if ( !$this->setOutputFile($filename) )
+			return false;
+		$this->doDump();
+    $this->closeFile($this->file);
+    return true;
+	}
+
+	/**
+	* @access private
+	*/
+	function getSqlKeysTable ($table) {
+		$primary = "";
+		$unique = array();
+		$index = array();
+		$fulltext = array();
+		$results = mysql_query("SHOW KEYS FROM `{$table}`");
+		if ( @mysql_num_rows($results) == 0 )
+			return false;
+		while($row = mysql_fetch_object($results)) {
+			if (($row->Key_name == 'PRIMARY') AND ($row->Index_type == 'BTREE')) {
+				if ( $primary == "" )
+					$primary = "  PRIMARY KEY  (`{$row->Column_name}`";
+				else
+					$primary .= ", `{$row->Column_name}`";
+			}
+			if (($row->Key_name != 'PRIMARY') AND ($row->Non_unique == '0') AND ($row->Index_type == 'BTREE')) {
+				if ( (empty($unique)) OR (empty($unique[$row->Key_name])) )
+					$unique[$row->Key_name] = "  UNIQUE KEY `{$row->Key_name}` (`{$row->Column_name}`";
+				else
+					$unique[$row->Key_name] .= ", `{$row->Column_name}`";
+			}
+			if (($row->Key_name != 'PRIMARY') AND ($row->Non_unique == '1') AND ($row->Index_type == 'BTREE')) {
+				if ( (empty($index)) OR (empty($index[$row->Key_name])) )
+					$index[$row->Key_name] = "  KEY `{$row->Key_name}` (`{$row->Column_name}`";
+				else
+					$index[$row->Key_name] .= ", `{$row->Column_name}`";
+			}
+			if (($row->Key_name != 'PRIMARY') AND ($row->Non_unique == '1') AND ($row->Index_type == 'FULLTEXT')) {
+				if ( (empty($fulltext)) OR (empty($fulltext[$row->Key_name])) )
+					$fulltext[$row->Key_name] = "  FULLTEXT `{$row->Key_name}` (`{$row->Column_name}`";
+				else
+					$fulltext[$row->Key_name] .= ", `{$row->Column_name}`";
+			}
+		}
+		$sqlKeyStatement = '';
+		// generate primary, unique, key and fulltext
+		if ( $primary != "" ) {
+			$sqlKeyStatement .= ",\n";
+			$primary .= ")";
+			$sqlKeyStatement .= $primary;
+		}
+		if (!empty($unique)) {
+			foreach ($unique as $keyName => $keyDef) {
+				$sqlKeyStatement .= ",\n";
+				$keyDef .= ")";
+				$sqlKeyStatement .= $keyDef;
+
+			}
+		}
+		if (!empty($index)) {
+			foreach ($index as $keyName => $keyDef) {
+				$sqlKeyStatement .= ",\n";
+				$keyDef .= ")";
+				$sqlKeyStatement .= $keyDef;
+			}
+		}
+		if (!empty($fulltext)) {
+			foreach ($fulltext as $keyName => $keyDef) {
+				$sqlKeyStatement .= ",\n";
+				$keyDef .= ")";
+				$sqlKeyStatement .= $keyDef;
+			}
+		}
+		return $sqlKeyStatement;
+	}
+
+  /**
+	* @access private
+	*/
+	function isTextValue($field_type) {
+		switch ($field_type) {
+			case "tinytext":
+			case "text":
+			case "mediumtext":
+			case "longtext":
+			case "binary":
+			case "varbinary":
+			case "tinyblob":
+			case "blob":
+			case "mediumblob":
+			case "longblob":
+				return True;
+				break;
+			default:
+				return False;
+		}
+	}
+	
+	/**
+	* @access private
+	*/
+	function openFile($filename) {
+		$file = false;
+		if ( $this->compress )
+			$file = @gzopen($filename, "w9");
+		else
+			$file = @fopen($filename, "w");
+		return $file;
+	}
+
+  /**
+	* @access private
+	*/
+	function saveToFile($file, $data) {
+		if ( $this->compress )
+			@gzwrite($file, $data);
+		else
+			@fwrite($file, $data);
+		$this->isWritten = true;
+	}
+
+  /**
+	* @access private
+	*/
+	function closeFile($file) {
+		if ( $this->compress )
+			@gzclose($file);
+		else
+			@fclose($file);
+	}
+}
+?>
Index: /extensions/autoupdate/trunk/index.php
===================================================================
--- /extensions/autoupdate/trunk/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/index.php	(revision 6168)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 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 |
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/cs_CZ/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/cs_CZ/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/cs_CZ/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Akutualizuje automaticky Vai galerii Piwigo.
Index: /extensions/autoupdate/trunk/language/cs_CZ/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/cs_CZ/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/cs_CZ/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/cs_CZ/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/cs_CZ/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/cs_CZ/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Pro automatické provedení aktualizace kliknìte zde';
+$lang['autoupdate_alert'] = 'Jste si jistí, e chcete provést automatickou aktualizaci Piwigo?\nVarování!!! Ruènì provedené zmìny v souborech mohou být aktualizací pøepsány.';
+$lang['autoupdate_success'] = 'Piwigo bylo uspìnì aktualizováno (verze %s)';
+$lang['autoupdate_fail'] = 'Bìhem aktualizace dolo k chybì.';
+
+$lang['autoupdate_extract_fail'] = 'K chybì dolo bìhem rozbalování. Prosím ovìøte oprávnìní na soubory Vaí instalace Piwigo.<br><a href="%s">Pro zobrazení chybového logu kliknìte zde</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo nemùe získat novou verzi ze serveru';
+$lang['Click here to see Piwigo %s release notes'] = 'Pro informace o nové verzi Piwigo %s kliknìte zde';
+$lang['Some upgrades are available for you plugins'] = 'Pro nìkteré vae doplòky jsou dostupné aktualizace';
+$lang['Click here see upgrade plugins page'] = 'Pro stránku s aktualizacemi pro doplòky kliknìte zde';
+$lang['Gallery and plugins are up to date'] = 'Galerie Piwigo a doplòky jsou aktuální';
+$lang['Unable to check upgrades...'] = 'Nebylo moné zkontrolovat aktualizace...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo se o to automaticky pokusí pozdìji.';
+$lang['Click here to check upgrades now'] = 'Pro kontrolu aktualizací kliknìte zde';
+
+$lang['Notify on admin homepage'] = 'Upozoròovat na domovské stránce administrace';
+$lang['Don\'t notify on admin homepage'] = 'Neupozoròovat na domovské stránce administrace';
+
+$lang['Upgrade in progress... Please wait.'] = 'Aktualizace probíhá... Prosím èekejte.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Kontrolují se aktualizace pro galerii Piwigo a pro doplòky...';
+
+?>
Index: /extensions/autoupdate/trunk/language/de_DE/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/de_DE/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/de_DE/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Aktualisieren Sie ihre Galerie manuell.
Index: /extensions/autoupdate/trunk/language/de_DE/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/de_DE/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/de_DE/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/de_DE/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/de_DE/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Klicken Sie hier um automatisch zu aktualisieren';
+$lang['autoupdate_alert'] = 'Sind Sie sicher, das Sie automatisch Aktualisieren möchten?  Warnung: manuell modifizierte Dateien werden dabei überschrieben!';
+$lang['autoupdate_success'] = 'Piwigo wurde erfolgreich aktualisiert (version %s)';
+$lang['autoupdate_fail'] = 'Ein Fehler trat während des Aktualisierens auf.';
+
+$lang['autoupdate_extract_fail'] = 'Ein Fehler trat während des Entpackens auf. Bitte prüfen Sie die Schreibrechte ihrer Piwigo Installation.<br><a href="%s">Klicken Sie hier für das Fehlerprotokoll</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo kann die Aktualisierungsdatei nicht vom Server laden';
+$lang['Click here to see Piwigo %s release notes'] = 'Klicken Sie hier für die Piwigo %s Versionshinweise';
+$lang['Some upgrades are available for you plugins'] = 'Einige Aktualisierungen für Plugins sind verfügbar';
+$lang['Click here see upgrade plugins page'] = 'Klicken Sie hier für die Seite der Plugin Aktualisierungen';
+$lang['Gallery and plugins are up to date'] = 'Galerie und Plugins sind aktuell';
+$lang['Unable to check upgrades...'] = 'Die überprüfung auf Aktualisierungen ist nicht möglich...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo wird es später automatisch noch einmal probieren.';
+$lang['Click here to check upgrades now'] = 'Klicken Sie hier um auf Aktualisierungen zu prüfen';
+
+$lang['Notify on admin homepage'] = 'Benachrichtigung auf der Admin-Homepage';
+$lang['Don\'t notify on admin homepage'] = 'Keine Benachrichtigung auf der Admin-Homepage';
+
+$lang['Upgrade in progress... Please wait.'] = 'Aktualisierung in Arbeit....Bitte warten.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Suche nach Aktualisierungen für die Galerie und Plugins...';
+
+?>
Index: /extensions/autoupdate/trunk/language/en_UK/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/en_UK/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/en_UK/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Upgrade your gallery automatically.
Index: /extensions/autoupdate/trunk/language/en_UK/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/en_UK/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/en_UK/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/en_UK/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/en_UK/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Click here to upgrade automatically';
+$lang['autoupdate_alert'] = 'Are you sure you want to autmatically upgrade piwigo?\nWarning!!! Files manually modified could be overwritten.';
+$lang['autoupdate_success'] = 'Piwigo has been successfully upgraded (version %s)';
+$lang['autoupdate_fail'] = 'An error occured during upgrade.';
+
+$lang['autoupdate_extract_fail'] = 'An error occured during extract. Please check files permissions of your piwigo installation.<br><a href="%s">Click here to show log error</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo cannot retrieve upgrade file from server';
+$lang['Click here to see Piwigo %s release notes'] = 'Click here to see Piwigo %s release notes';
+$lang['Some upgrades are available for you plugins'] = 'Some upgrades are available for you plugins';
+$lang['Click here see upgrade plugins page'] = 'Click here see upgrade plugins page';
+$lang['Gallery and plugins are up to date'] = 'Gallery and plugins are up to date';
+$lang['Unable to check upgrades...'] = 'Unable to check upgrades...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo will automaticaly try again later.';
+$lang['Click here to check upgrades now'] = 'Click here to check upgrades now';
+
+$lang['Notify on admin homepage'] = 'Notify on admin homepage';
+$lang['Don\'t notify on admin homepage'] = 'Don\'t notify on admin homepage';
+
+$lang['Upgrade in progress... Please wait.'] = 'Upgrade in progress... Please wait.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Checking upgrades for gallery and plugins...';
+
+?>
Index: /extensions/autoupdate/trunk/language/es_ES/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/es_ES/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/es_ES/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Ponga al día su galería automáticamente
Index: /extensions/autoupdate/trunk/language/es_ES/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/es_ES/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/es_ES/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/es_ES/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/es_ES/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Haga clic aquí para una actualización automática';
+$lang['autoupdate_alert'] = '¿ Es usted seguro de querer actualizar piwigo automáticamente?\n¡Atención!!!  Los ficheros modificados manualmente podrián ser dañados.';
+$lang['autoupdate_success'] = 'Piwigo ha sido actualizado con éxito (Versión %s)';
+$lang['autoupdate_fail'] = 'Un error sobrevino durante la actualización.';
+
+$lang['autoupdate_extract_fail'] = 'Imposible extraer los ficheros. Por favor, verifique los permisos de los ficheros de su instalación. <Br> <a href="%s"> Haga clic aquí para ver el informe de error</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo no puede recuperar el fichero de actualización desde el servidor';
+$lang['Click here to see Piwigo %s release notes'] = 'Haga clic aquí para ver las informaciones relativas a Piwigo %s';
+$lang['Some upgrades are available for you plugins'] = 'Hay actualizaciónes disponibles para su plugins';
+$lang['Click here see upgrade plugins page'] = 'Haga clic aquí para visualizar la página de actualización des plugins';
+$lang['Gallery and plugins are up to date'] = 'Su galería y sus plugins están actualizados';
+$lang['Unable to check upgrades...'] = 'Imposible verificar las actualizaciónes...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo intentara automaticamente más tarde.';
+$lang['Click here to check upgrades now'] = 'Haga clic aquí para verificar las actualizaciónes';
+
+$lang['Notify on admin homepage'] = 'Notificar sobre la pagina de inicio de la administración';
+$lang['Don\'t notify on admin homepage'] = 'No notificar sobre la pagina de inicio de la administración';
+
+$lang['Upgrade in progress... Please wait.'] = 'Actualizaciónes progresando... Por favor, espere';
+$lang['Checking upgrades for gallery and plugins...'] = 'Comprobación de las actualizaciónes de la galería y los plugins...';
+
+?>
Index: /extensions/autoupdate/trunk/language/fr_FR/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/fr_FR/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/fr_FR/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Maintenez votre galerie à jour automatiquement
Index: /extensions/autoupdate/trunk/language/fr_FR/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/fr_FR/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/fr_FR/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/fr_FR/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/fr_FR/plugin.lang.php	(revision 6168)
@@ -0,0 +1,24 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Cliquez ici pour une mise à jour automatique';
+$lang['autoupdate_alert'] = 'Etes-vous sûr de vouloir mettre à jour piwigo automatiquement?\nAttention!!! Les fichiers modifiés manuellement pourront être écrasés.';
+$lang['autoupdate_success'] = 'Piwigo a été mis à jour avec succès (version %s)';
+$lang['autoupdate_fail'] = 'Une erreur est survenue pendant la mise à jour.';
+
+$lang['autoupdate_extract_fail'] = 'Impossible d\'extraire les fichiers. Veuillez vérifier les permissions des fichiers de votre installation.<br><a href="%s">Cliquez ici pour voir le rapport d\'erreur</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo ne peut pas récupérer le fichier de mise à jour depuis le serveur';
+$lang['Click here to see Piwigo %s release notes'] = 'Cliquez ici pour afficher les informations relatives à Piwigo %s';
+$lang['Some upgrades are available for you plugins'] = 'Des mises à jour sont disponibles pour vos plugins';
+$lang['Click here see upgrade plugins page'] = 'Cliquez ici pour afficher la page de mise à jour des plugins';
+$lang['Gallery and plugins are up to date'] = 'Votre galerie et vos plugins sont à jour';
+$lang['Unable to check upgrades...'] = 'Impossible de vérifier les mises à jour...';
+$lang['Click here to check upgrades now'] = 'Cliquez ici pour vérifier les mises à jour maintenant';
+
+$lang['Notify on admin homepage'] = 'Notifier sur l\'accueil de l\'administration';
+$lang['Don\'t notify on admin homepage'] = 'Ne pas notifier sur l\'accueil de l\'administration';
+
+$lang['Upgrade in progress... Please wait.'] = 'Mise à jour en cours... Veuillez patienter.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Vérification des mises à jour de la galerie et des plugins...';
+
+?>
Index: /extensions/autoupdate/trunk/language/hr_HR/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/hr_HR/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/hr_HR/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Nadogradite automatski vašu galeriju.
Index: /extensions/autoupdate/trunk/language/hr_HR/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/hr_HR/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/hr_HR/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/hr_HR/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/hr_HR/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/hr_HR/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Kliknite ovdje za automatsku nadogradnju';
+$lang['autoupdate_alert'] = 'Sigurno želite pokrenuti automatsku nadogradnju piwigo-a?\nPozor!!! Ručno izmijenjeni zapisi bi mogli biti prepisani.';
+$lang['autoupdate_success'] = 'Piwigo je uspješno nadograđen (inačica %s)';
+$lang['autoupdate_fail'] = 'Došlo je do greške tijekon postupka nadogradnje.';
+
+$lang['autoupdate_extract_fail'] = 'Greška se dogodila tijekom izlučivanja. Molimo provjerite upisne dozvole vaše piwigo postave.<br><a href="%s">Kliknite za prikaz dnevnika greške</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo ne može dohvatiti zapis nadogradnje sa poslužitelja';
+$lang['Click here to see Piwigo %s release notes'] = 'Kliknite ovdje za prikaz zabilješki Piwigo %s izdanja';
+$lang['Some upgrades are available for you plugins'] = 'Dostupne su nadogradnje za neke dodatke (plugin-ove)';
+$lang['Click here see upgrade plugins page'] = 'Kliknite za pregled stranice nadogradnji dodataka';
+$lang['Gallery and plugins are up to date'] = 'Galerija i dodaci su ažurni';
+$lang['Unable to check upgrades...'] = 'Nemoguće je provjeriti nadogradnje...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo će sam pokušati ponovo kasnije.';
+$lang['Click here to check upgrades now'] = 'Kliknite za provjeru nadogradnji sada';
+
+$lang['Notify on admin homepage'] = 'Objavi na upravnoj stranici';
+$lang['Don\'t notify on admin homepage'] = 'Nemoj objaviti na upravnoj stranici';
+
+$lang['Upgrade in progress... Please wait.'] = 'Nadogradnja u tijeku... Molimo sačekajte.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Provjera nadogradnji galerije i dodataka...';
+
+?>
Index: /extensions/autoupdate/trunk/language/hu_HU/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/hu_HU/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/hu_HU/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+A galéria automatikus frissítése
Index: /extensions/autoupdate/trunk/language/hu_HU/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/hu_HU/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/hu_HU/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/hu_HU/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/hu_HU/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Kattintson ide az automatikus frissítéshez';
+$lang['autoupdate_alert'] = 'Biztos benne, hogy el akarja indítani az automatikus frissítést?\nFigyelem!!! A fájlok felülírásra kerülnek, minden egyedi módosítás elvész.';
+$lang['autoupdate_success'] = 'A Piwigo galéria frissítése sikeres (verzió %s)';
+$lang['autoupdate_fail'] = 'Hiba történt frissítés közben.';
+
+$lang['autoupdate_extract_fail'] = 'Hibajelentés (Információ). Kérjük ellenőrizze a telepített fájlok jogosultságait.<br><a href="%s">További információkért kattintson ide</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Nem tudom letölteni a frissítést a Piwigo fájl szerverről';
+$lang['Click here to see Piwigo %s release notes'] = 'Kattintson ide a Piwigo% s kiadási megjegyzések megtekintéséhez';
+$lang['Some upgrades are available for you plugins'] = 'Frissítések találhatók egyes bővítményekhez';
+$lang['Click here see upgrade plugins page'] = 'Kattintson ide a "frissíthető pluginok" oldal megtekintéséhez ';
+$lang['Gallery and plugins are up to date'] = 'A galéria és a bővitmények a legfrissebbek';
+$lang['Unable to check upgrades...'] = 'A frissítés ellenőrzése nem lehetséges....';
+$lang['Piwigo will automaticaly try again later.'] = 'A Piwigo megkisérli az automatikus frissítést.';
+$lang['Click here to check upgrades now'] = 'Kattintson ide a frissítések ellenőrzéséhez';
+
+$lang['Notify on admin homepage'] = 'Legyen értesítés az "Adminisztráció" oldalon';
+$lang['Don\'t notify on admin homepage'] = 'Ne legyen értesítés az "Adminisztráció" oldalon';
+
+$lang['Upgrade in progress... Please wait.'] = 'Frissítés folyamatban... Kérem várjon.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Galéria és bővítmény frissítések ellenőrzése...';
+
+?>
Index: /extensions/autoupdate/trunk/language/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/it_IT/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/it_IT/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/it_IT/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Mantenete aggiorno la vostra galleria automaticamente
Index: /extensions/autoupdate/trunk/language/it_IT/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/it_IT/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/it_IT/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/it_IT/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/it_IT/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Cliccare qui per un\'aggiornamento automatico';
+$lang['autoupdate_alert'] = 'Siete sicuri di volere aggiornare Piwigo automaticamente?\nAttenzione!!! I file modificati potrebbero essere sovrascritti.';
+$lang['autoupdate_success'] = 'Piwigo e stato aggiornato con successo (versione %s)';
+$lang['autoupdate_fail'] = 'Si è verificato un\'errore durante l\'aggiornamento.';
+
+$lang['autoupdate_extract_fail'] = 'Non è stato possibile estrarre i file. Verificare i permessi dei file della vostra installazione.<br><a href="%s">Cliccare qui per visualizzare il rapporto degli errori</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo non può recuperare i file d\'aggiornamento dal server';
+$lang['Click here to see Piwigo %s release notes'] = 'Cliccare qui per visualizzare le informazioni relative a Piwigo %s';
+$lang['Some upgrades are available for you plugins'] = 'Degli aggiornamenti sono disponibili per i vostri plugins';
+$lang['Click here see upgrade plugins page'] = 'Cliccare qui per visualizzare la pagina di aggiornamento dei plugins';
+$lang['Gallery and plugins are up to date'] = 'La vostra galleria e i vostri plugins sono aggiorno';
+$lang['Unable to check upgrades...'] = 'Non è stato possibile verificare gli aggiornamenti...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo riproverà automaticamente più tardi.';
+$lang['Click here to check upgrades now'] = 'Cliccare qui per verificare gli aggiornameti ora';
+
+$lang['Notify on admin homepage'] = 'Notificare sulla pagina principale del amministrazione';
+$lang['Don\'t notify on admin homepage'] = 'Non notificare sulla pagina principale del amministrazione';
+
+/*TODO*/$lang['Upgrade in progress... Please wait.'] = 'Upgrade in progress... Please wait.';
+/*TODO*/$lang['Checking upgrades for gallery and plugins...'] = 'Checking upgrades for gallery and plugins...';
+
+?>
Index: /extensions/autoupdate/trunk/language/ja_JP/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/ja_JP/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/ja_JP/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/ja_JP/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/ja_JP/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/ja_JP/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = '自動的にアップグレードするには、ここをクリックしてください。';
+$lang['autoupdate_alert'] = '本当に自動的にPiwigoをアップグレードしてもよろしいですか?\n警告!!! 手動で修正したファイルは、上書きされます。';
+$lang['autoupdate_success'] = 'Piwigoが正常にアップグレードされました (バージョン %s)。';
+$lang['autoupdate_fail'] = 'アップグレード中にエラーが発生しました。';
+
+$lang['autoupdate_extract_fail'] = '解凍中にエラーが発生しました。あなたのPiwigoインストレーションのパーミッションを確認してください。<br /><a href="%s">ログエラーを表示するには、ここをクリックしてください</a>。';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigoは、アップグレードファイルをサーバから検索できません。';
+$lang['Click here to see Piwigo %s release notes'] = 'Piwigo %s リリースノートを閲覧するには、ここをクリックしてください。';
+$lang['Some upgrades are available for you plugins'] = 'あなたのプラグインに関して、いくつかのアップグレードが利用できます。';
+$lang['Click here see upgrade plugins page'] = 'プラグインのアップグレードページを閲覧するには、ここをクリックしてください。';
+$lang['Gallery and plugins are up to date'] = 'ギャラリーおよびプラグインは最新版です。';
+$lang['Unable to check upgrades...'] = 'アップグレードを確認できません ...';
+$lang['Piwigo will automaticaly try again later.'] = '後程、Piwigoは自動的に再試行します。';
+$lang['Click here to check upgrades now'] = 'アップグレードするには、ここをクリックしてください。';
+
+$lang['Notify on admin homepage'] = '管理ホームページで通知する';
+$lang['Don\'t notify on admin homepage'] = '管理ホームページで通知しない';
+
+$lang['Upgrade in progress... Please wait.'] = 'アップグレード処理中 ... お待ちください。';
+$lang['Checking upgrades for gallery and plugins...'] = 'ギャラリーおよびプラグインのアップグレード確認中 ...';
+
+?>
Index: /extensions/autoupdate/trunk/language/nl_NL/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/nl_NL/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/nl_NL/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Werkt uw galerie automatisch bij naar de nieuwste versie.
Index: /extensions/autoupdate/trunk/language/nl_NL/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/nl_NL/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/nl_NL/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/nl_NL/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/nl_NL/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/nl_NL/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Klik hier om automatisch te upgraden naar de nieuwste versie';
+$lang['autoupdate_alert'] = 'weet u zeker dat u Piwigo automatisch wilt upgraden?\nWaarschuwing!!! Handmatig aangepaste bestanden kunnen overschreven worden!';
+$lang['autoupdate_success'] = 'Piwigo is succesvol bijgewerkt naar de nieuwste versie %s';
+$lang['autoupdate_fail'] = 'Er is iets foutgegaan bij het bijwerken van Piwigo naar de nieuwste versie.';
+
+$lang['autoupdate_extract_fail'] = 'Er is iets foutgegaan bij het uitpakken. Controleer de bestandstoegangen van uw Piwigo-installatie.<br><a href="%s">Klik kier om de fout-logging weer te geven</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo kan het upgrade-bestand niet van de server verkrijgen';
+$lang['Click here to see Piwigo %s release notes'] = 'Klik hier om de Piwigo %s release-aantekeningen te bekijken';
+$lang['Some upgrades are available for you plugins'] = 'Er zijn upgrades beschikbaar voor sommige van uw plugins';
+$lang['Click here see upgrade plugins page'] = 'Klik hier om naar de upgrade-plugins-pagina te gaan';
+$lang['Gallery and plugins are up to date'] = 'Galerie en plugins zijn up to date';
+$lang['Unable to check upgrades...'] = 'Niet mogelijk om upgrades te controleren...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo zal het automatisch later nog eens proberen.';
+$lang['Click here to check upgrades now'] = 'Klik hier om nu naar upgrades te zoeken';
+
+$lang['Notify on admin homepage'] = 'Geef een melding op de admin-startpagina';
+$lang['Don\'t notify on admin homepage'] = 'Geef geen melding op de admin-startpagina';
+
+$lang['Upgrade in progress... Please wait.'] = 'Bezig met upgrade... Even geduld aub.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Bezig met het zoeken naar upgrades voor galerie en plugins...';
+
+?>
Index: /extensions/autoupdate/trunk/language/pl_PL/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/pl_PL/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/pl_PL/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/pl_PL/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/pl_PL/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/pl_PL/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Kliknij tutaj aby dokonać automatycznej aktualizacji';
+$lang['autoupdate_alert'] = 'Czy na pewno chcesz zaktualizować piwigo automatycznie?\nUwaga!!! Pliki ręcznie modyfikowane mogą zostać nadpisane.';
+$lang['autoupdate_success'] = 'Piwigo zostało zaktualizowane pomyślnie (wersja %s)';
+$lang['autoupdate_fail'] = 'Wystąpił błąd podczas aktualizacji.';
+
+$lang['autoupdate_extract_fail'] = 'Wystąpił błąd podczas rozpokowywania. Sprawdź uprawnienia do plików w katalogu gdize jest zainstalowane piwigo.<br><a href="%s">Kliknij aby zobaczyć błędy</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo nie może ściągnąć pliku aktualizacji z serwera';
+$lang['Click here to see Piwigo %s release notes'] = 'Kliknij tutaj, aby przejść do informacji o wydaniu Piwigo %s ';
+$lang['Some upgrades are available for you plugins'] = 'Są dostępne aktualizacje do niektórych Twoich wtyczek';
+$lang['Click here see upgrade plugins page'] = 'Kliknij tutaj, aby przejść na stronę aktualizacji wtyczek';
+$lang['Gallery and plugins are up to date'] = 'Galeria i wtyczki są aktualne';
+$lang['Unable to check upgrades...'] = 'Nie można sprawdzić aktualizacji...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo później automatycznie spróbuje jeszcze raz.';
+$lang['Click here to check upgrades now'] = 'Kliknij tutaj, aby teraz sprawdzić aktualizacje';
+
+$lang['Notify on admin homepage'] = 'Poinformuj na stronie domowej administratora';
+$lang['Don\'t notify on admin homepage'] = 'Nie informuj na stronie domowej administratora';
+
+$lang['Upgrade in progress... Please wait.'] = 'Trwa aktualizacja... Proszę czekać.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Sprawdzanie aktualizacji dla galerii oraz wtyczek...';
+
+?>
Index: /extensions/autoupdate/trunk/language/ru_RU/description.txt
===================================================================
--- /extensions/autoupdate/trunk/language/ru_RU/description.txt	(revision 6168)
+++ /extensions/autoupdate/trunk/language/ru_RU/description.txt	(revision 6168)
@@ -0,0 +1,1 @@
+Upgrade your gallery automatically.
Index: /extensions/autoupdate/trunk/language/ru_RU/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/ru_RU/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/ru_RU/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/ru_RU/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/ru_RU/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/ru_RU/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = 'Нажмите для автоматического обновления';
+$lang['autoupdate_alert'] = 'Вы действительно хотите автоматически обновить piwigo?\nВнимание!!! Файлы исправленные вручную будут перезаписаны.';
+$lang['autoupdate_success'] = 'Piwigo успешно обновлен (версия %s)';
+$lang['autoupdate_fail'] = 'Во время обновления произошла ошибка.';
+
+$lang['autoupdate_extract_fail'] = 'Во время распаковки произошла ошибка. Пожалуйста, проверьте права доступа к папке установки piwigo.<br><a href="%s">Нажмите, чтобы посмотреть лог ошибки</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo не может получить файлы обновления с сервера';
+$lang['Click here to see Piwigo %s release notes'] = 'Нажмите, чтобы посмотреть заметки к релизу Piwigo %s';
+$lang['Some upgrades are available for you plugins'] = 'Доступны некоторые обновления для плагинов';
+$lang['Click here see upgrade plugins page'] = 'Нажмите сюда, чтобы посмотреть страницу обновления плагинов';
+$lang['Gallery and plugins are up to date'] = 'Галерея и плагины обновлены';
+$lang['Unable to check upgrades...'] = 'Невозможно проверить обновления...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo автоматически попробует еще раз позже.';
+$lang['Click here to check upgrades now'] = 'Нажмите сюда, чтобы проверить обновления сейчас';
+
+$lang['Notify on admin homepage'] = 'Уведомлять на странице администратора';
+$lang['Don\'t notify on admin homepage'] = 'Не уведомлять на странице администратора';
+
+$lang['Upgrade in progress... Please wait.'] = 'Идет процесс обновления... Ждите.';
+$lang['Checking upgrades for gallery and plugins...'] = 'Проверка обновлений для галереи и плагинов...';
+
+?>
Index: /extensions/autoupdate/trunk/language/zh_CN/index.php
===================================================================
--- /extensions/autoupdate/trunk/language/zh_CN/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/zh_CN/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id$
+// | last update   : $Date$
+// | last modifier : $Author$
+// | revision      : $Revision$
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/autoupdate/trunk/language/zh_CN/plugin.lang.php
===================================================================
--- /extensions/autoupdate/trunk/language/zh_CN/plugin.lang.php	(revision 6168)
+++ /extensions/autoupdate/trunk/language/zh_CN/plugin.lang.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+$lang['Click here to upgrade automatically'] = '点击此自动升级';
+$lang['autoupdate_alert'] = '您确定要自动升级 piwigo 吗?\n警告!!! 曾经手工修改过的文件将被覆盖.';
+$lang['autoupdate_success'] = 'Piwigo 已经升级成功 (当前版本 %s)';
+$lang['autoupdate_fail'] = '在升级过程中出现了一个错误.';
+
+$lang['autoupdate_extract_fail'] = '在解压程序时出现了一个错误。请检查您 piwigo 安装文件的读写权限.<br><a href="%s">点击此查看错误日志</a>.';
+
+$lang['Piwigo cannot retrieve upgrade file from server'] = 'Piwigo 不能从服务器中获取升级文件';
+$lang['Click here to see Piwigo %s release notes'] = '点击此查看 Piwigo %s 的版通知';
+$lang['Some upgrades are available for you plugins'] = '您的插件已有更新了';
+$lang['Click here see upgrade plugins page'] = '点击此查看插件升级页面';
+$lang['Gallery and plugins are up to date'] = '图库和插件已是最新版';
+$lang['Unable to check upgrades...'] = '不能检查更新...';
+$lang['Piwigo will automaticaly try again later.'] = 'Piwigo 稍后将会自动再次尝试.';
+$lang['Click here to check upgrades now'] = '点击此检查更新';
+
+$lang['Notify on admin homepage'] = '在管理员首页显示通知';
+$lang['Don\'t notify on admin homepage'] = '不要在管理员首页显示通知';
+
+$lang['Upgrade in progress... Please wait.'] = '正在升级... 请稍等。';
+$lang['Checking upgrades for gallery and plugins...'] = '正在检查图库和插件的更新...';
+
+?>
Index: /extensions/autoupdate/trunk/main.inc.php
===================================================================
--- /extensions/autoupdate/trunk/main.inc.php	(revision 6168)
+++ /extensions/autoupdate/trunk/main.inc.php	(revision 6168)
@@ -0,0 +1,50 @@
+<?php
+/*
+Plugin Name: Piwigo AutoUpgrade
+Version: auto
+Description: Upgrade your gallery automatically.
+Plugin URI: http://piwigo.org/ext/extension_view.php?eid=302
+Author: P@t
+Author URI: http://www.gauchon.com
+*/
+
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('AUTOUPDATE_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+
+if (script_basename() == 'admin')
+ add_event_handler('get_admin_plugin_menu_links', 'check_for_auto_upgrade');
+
+function check_for_auto_upgrade($plugin_menu_links)
+{
+  global $template, $page, $conf, $header_notes, $prefixeTable;
+
+  if ($page['page'] == 'intro')
+  {
+    if (isset($_GET['action']) and 
+      ($_GET['action'] == 'check_autoupdate' or $_GET['action'] == 'check_upgrade' ))
+    {
+      unset($_SESSION['need_update']);
+      unset($_SESSION['plugins_need_update']);
+    }
+
+    if (!isset($_SESSION['need_update']) or !isset($_SESSION['plugins_need_update'])
+      or $_SESSION['need_update'] !== false or $_SESSION['plugins_need_update'] !== array())
+    {
+      $template->set_filename('autoupdate_head', realpath(AUTOUPDATE_PATH.'template/head.tpl'));
+      array_push($header_notes, $template->parse('autoupdate_head', true));
+    }
+  }
+
+  if ($page['page'] == 'plugins_update' and method_exists('template', 'set_prefilter'))
+  {
+    include(dirname(__FILE__).'/plugins_update.php');
+  }
+
+  array_push($plugin_menu_links, array(
+      'NAME' => 'Piwigo AutoUpgrade',
+      'URL' => get_admin_plugin_menu_link(AUTOUPDATE_PATH . '/autoupdate.php')));
+
+  return $plugin_menu_links;
+}
+?>
Index: /extensions/autoupdate/trunk/maintain.inc.php
===================================================================
--- /extensions/autoupdate/trunk/maintain.inc.php	(revision 6168)
+++ /extensions/autoupdate/trunk/maintain.inc.php	(revision 6168)
@@ -0,0 +1,25 @@
+<?php
+
+function plugin_activate()
+{
+  global $prefixeTable, $conf;
+
+  if (!isset($conf['autoupdate_ignore_list']))
+  {
+    $query = '
+INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
+VALUES ("autoupdate_ignore_list" , "'.addslashes(serialize(array())).'" , "Ignored plugin list for Piwigo Auto Update plugin");';
+
+    pwg_query($query);
+  }
+}
+
+function plugin_deactivate()
+{
+  global $prefixeTable;
+
+  $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="autoupdate_ignore_list" LIMIT 1;';
+  pwg_query($query);
+}
+
+?>
Index: /extensions/autoupdate/trunk/plugins_update.php
===================================================================
--- /extensions/autoupdate/trunk/plugins_update.php	(revision 6168)
+++ /extensions/autoupdate/trunk/plugins_update.php	(revision 6168)
@@ -0,0 +1,39 @@
+<?php
+
+load_language('plugin.lang', dirname(__FILE__).'/');
+
+function autoupdate_plugins_update_filter($content, &$smarty)
+{
+  $l_key = version_compare(PHPWG_VERSION, '2.1', '<') ? 'plugins_download' : 'Download file';
+
+  $search = '<a href="{$plugin.URL_DOWNLOAD}">{\''.$l_key.'\'|@translate}</a>';
+
+  $replacement = '  <a href="{$plugin.URL_DOWNLOAD}">{\''.$l_key.'\'|@translate}</a><br>
+    <a href="#" onClick="autoupdate_ignore(\'{$plugin.EXT_NAME}\', true, {$smarty.foreach.plugins_loop.index}); return false;" id="au_ignore_{$smarty.foreach.plugins_loop.index}_true" {if $plugin.EXT_NAME|@in_array:$AU_IGNORE_LIST}style="display: none;"{/if}>{\'Don\\\'t notify on admin homepage\'|@translate}</a>
+    <a href="#" onClick="autoupdate_ignore(\'{$plugin.EXT_NAME}\', false, {$smarty.foreach.plugins_loop.index}); return false;" id="au_ignore_{$smarty.foreach.plugins_loop.index}_false" {if !$plugin.EXT_NAME|@in_array:$AU_IGNORE_LIST}style="display: none;"{/if}>{\'Notify on admin homepage\'|@translate}</a>';
+
+  return str_replace($search, $replacement, $content);;  
+}
+
+$script_head = '
+<script type="text/javascript">
+function autoupdate_ignore(name, bool, id) {
+  jQuery.post(
+    "'.PHPWG_ROOT_PATH.'plugins/autoupdate/remote.php",
+    { "autoupdate_ignore'.(version_compare(PHPWG_VERSION, '2.1', '<') ? '[]' : '').'": [name, bool] },
+    function(data) {
+      if (data == "ok") {
+        jQuery("#au_ignore_"+id+"_"+bool).hide();
+        jQuery("#au_ignore_"+id+"_"+!bool).show();
+      }
+    }
+  );
+}
+</script>
+';
+
+$template->block_html_head('', $script_head, $smarty, $repeat);
+$template->set_prefilter('plugins', 'autoupdate_plugins_update_filter');
+$template->assign('AU_IGNORE_LIST', unserialize($conf['autoupdate_ignore_list']));
+
+?>
Index: /extensions/autoupdate/trunk/remote.php
===================================================================
--- /extensions/autoupdate/trunk/remote.php	(revision 6168)
+++ /extensions/autoupdate/trunk/remote.php	(revision 6168)
@@ -0,0 +1,55 @@
+<?php
+
+define('PHPWG_ROOT_PATH','../../');
+define('IN_ADMIN', true);
+include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
+include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
+include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');
+
+check_status(ACCESS_ADMINISTRATOR);
+
+if (isset($_POST['autoupdate_ignore'])
+  and is_array($_POST['autoupdate_ignore'])
+  and count($_POST['autoupdate_ignore']) == 2)
+{
+  // Add or remove plugin from ignore list
+  $ignore = unserialize($conf['autoupdate_ignore_list']);
+  $ignore = array_flip($ignore);
+
+  if ($_POST['autoupdate_ignore'][1] == "false" and isset($ignore[$_POST['autoupdate_ignore'][0]]))
+  {
+    unset($ignore[$_POST['autoupdate_ignore'][0]]);
+    $ignore = array_flip($ignore);
+  }
+  elseif ($_POST['autoupdate_ignore'][1] == "true" and !isset($ignore[$_POST['autoupdate_ignore'][0]]))
+  {
+    $ignore = array_flip($ignore);
+    array_push($ignore, $_POST['autoupdate_ignore'][0]);
+  }
+  else
+  {
+    die;
+  }
+  sort($ignore);  
+
+  $query = '
+UPDATE '.CONFIG_TABLE.'
+SET value = "'.addslashes(serialize($ignore)).'"
+WHERE param = "autoupdate_ignore_list"
+;';
+  pwg_query($query);
+
+  unset($_SESSION['plugins_need_update']);
+  echo 'ok';
+}
+else
+{
+  // Check if gallery or plugins are up to date
+  load_language('plugin.lang', dirname(__FILE__).'/');
+  header('Content-Type: text/html; charset=UTF-8');
+
+  include(AUTOUPDATE_PATH.'include/functions_remote.inc.php');
+  echo autoupdate_check_version();
+}
+
+?>
Index: /extensions/autoupdate/trunk/template/autoupdate.tpl
===================================================================
--- /extensions/autoupdate/trunk/template/autoupdate.tpl	(revision 6168)
+++ /extensions/autoupdate/trunk/template/autoupdate.tpl	(revision 6168)
@@ -0,0 +1,61 @@
+<div class="titrePage">
+{if $STEP < 2}
+<h2>Piwigo AutoUpgrade</h2>
+{else}
+<h2>{'Upgrade to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}</h2>
+{/if}
+</div>
+
+{if $STEP == 0}
+  {if $CHECK_VERSION}
+    <p>{'You are running the latest version of Piwigo.'|@translate}</p>
+  {else}  
+    <p>{'Check for upgrade failed for unknown reasons.'|@translate}</p>
+  {/if}
+{/if}
+
+{if $STEP == 1}
+<p>{'2 upgrades are available'|@translate}</p>
+<p>
+<ul>
+  <li><a href="{$AU_URL}&amp;step=2&amp;to={$new_versions.1}">{'Upgrade to Piwigo %s'|@translate|@sprintf:$new_versions.1}</a>: {'This is a minor upgrade, with only bug corrections'|@translate}</li>
+  <li><a href="{$AU_URL}&amp;step=3&amp;to={$new_versions.0}">{'Upgrade to Piwigo %s'|@translate|@sprintf:$new_versions.0}</a>: {'This is a major upgrade, with <a href="http://piwigo.org/releases/%s">new exciting features</a>. Some themes and plugins may be not available yet.'|@translate|@sprintf:$new_versions.0}</li>
+</ul>
+</p>
+{/if}
+
+{if $STEP == 2}
+<form action="" method="post">
+<p style="text-align:left; margin-left:20px;">
+  {'A new version of Piwigo is available.'}<br>
+  {'This is a minor upgrade, with only bug corrections'|@translate}
+</p>
+<p>
+  <input type="hidden" name="upgrade_to" value="{$UPGRADE_TO}">
+  <input type="submit" name="submit" value="{'Upgrade to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}" onClick="return confirm('{'autoupdate_alert'|@translate}');">
+</p>
+</form>
+{/if}
+
+{if $STEP == 3}
+<form action="" method="post">
+<p style="text-align:left; margin-left:20px;">
+  {'A new version of Piwigo is available.'}<br>
+  {'This is a major upgrade, with <a href="http://piwigo.org/releases/%s">new exciting features</a>. Some themes and plugins may be not available yet.'|@translate|@sprintf:$UPGRADE_TO}
+</p>
+<input type="hidden" name="upgrade_to" value="{$UPGRADE_TO}">
+<fieldset style="text-align:left;">
+  <legend>{'Save template directory'|@translate}</legend>
+  <p><input type="submit" name="saveTemplate" value="{'Save template directory'|@translate}"></p>
+</fieldset>
+<fieldset>
+  <legend>{'Dump Database'|@translate}</legend>
+  <p><input type="checkbox" name="includeHistory"> &nbsp; {'Include history table'|@translate}</p>
+  <p><input type="submit" name="dumpDatabase" value="{'Dump Database'|@translate|@sprintf:$UPGRADE_TO}"></p>
+</fieldset>
+<fieldset>
+  <legend>{'Upgrade to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}</legend>
+  <p><input type="submit" name="submit" value="{'Upgrade to Piwigo %s'|@translate|@sprintf:$UPGRADE_TO}"></p>
+</fieldset>
+</form>
+{/if}
Index: /extensions/autoupdate/trunk/template/head.tpl
===================================================================
--- /extensions/autoupdate/trunk/template/head.tpl	(revision 6168)
+++ /extensions/autoupdate/trunk/template/head.tpl	(revision 6168)
@@ -0,0 +1,25 @@
+{html_head}
+<script type="text/javascript">
+var mess_error = '{'Unable to check upgrades...'|@translate}<br><a href="admin.php?action=check_autoupdate">{'Click here to check upgrades now'|@translate}</a>';
+
+window.onload = function () {ldelim}
+  jQuery.ajax({ldelim}
+    type: 'GET',
+    url: '{$ROOT_URL|@cat:"plugins/autoupdate/remote.php"}',
+    dataType: 'text',
+    timeout: 10000,  // 10 sec timeout
+    success: function (data) {ldelim}
+      var reg = new RegExp("(warning|notice)","i");
+      if (data.match(reg)) {ldelim}
+        data = mess_error;
+      }
+      jQuery('#autoupdate').html(data);
+    },
+    error: function() {ldelim}
+     jQuery('#autoupdate').html(mess_error);
+    }
+  });
+}
+</script>
+{/html_head}
+<p id="autoupdate"><img src="plugins/autoupdate/template/ajax-loader.gif"> &nbsp; {'Checking upgrades for gallery and plugins...'|@translate}</p>
Index: /extensions/autoupdate/trunk/template/index.php
===================================================================
--- /extensions/autoupdate/trunk/template/index.php	(revision 6168)
+++ /extensions/autoupdate/trunk/template/index.php	(revision 6168)
@@ -0,0 +1,33 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery                           |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | file          : $Id: index.php 1912 2007-03-16 06:30:07Z rub $
+// | last update   : $Date: 2007-03-16 07:30:07 +0100 (ven, 16 mar 2007) $
+// | last modifier : $Author: rub $
+// | revision      : $Revision: 1912 $
+// +-----------------------------------------------------------------------+
+// | 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                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | 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.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
