Index: unk/install/db/1-database.php
===================================================================
--- /trunk/install/db/1-database.php	(revision 8469)
+++ 	(revision )
@@ -1,42 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Just a beginning test';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-list($now) = pwg_db_fetch_row(pwg_query('SELECT NOW()'));
-echo
-$now
-."\n"
-.'This upgrade script is for test purpose only'
-."\n"
-;
-?>
Index: unk/install/db/10-database.php
===================================================================
--- /trunk/install/db/10-database.php	(revision 8469)
+++ 	(revision )
@@ -1,52 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'New table #categories_link';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-CREATE TABLE phpwebgallery_categories_link (
-  source smallint(5) unsigned NOT NULL default '0',
-  destination smallint(5) unsigned NOT NULL default '0',
-  PRIMARY KEY  (source,destination)
-) TYPE=MyISAM;";
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'categories_link created'
-."\n"
-;
-?>
Index: unk/install/db/11-database.php
===================================================================
--- /trunk/install/db/11-database.php	(revision 8469)
+++ 	(revision )
@@ -1,65 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description =
-  'Table #categories_link created once again with correct prefix';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-if (PREFIX_TABLE == 'phpwebgallery_')
-{
-  echo
-    "\n"
-    .'Table '.PREFIX_TABLE.'categories_link was already correctly created'
-    ."\n"
-    ;
-}
-else
-{
-  $query = '
-DROP TABLE phpwebgallery_categories_link;
-;';
-  pwg_query($query);
-
-  $query = "
-CREATE TABLE ".PREFIX_TABLE."categories_link (
-  source smallint(5) unsigned NOT NULL default '0',
-  destination smallint(5) unsigned NOT NULL default '0',
-  PRIMARY KEY  (source,destination)
-) TYPE=MyISAM;";
-  pwg_query($query);
-
-  echo
-    "\n"
-    .'Table '.PREFIX_TABLE.'categories_link created'
-    ."\n"
-    ;
-}
-?>
Index: unk/install/db/12-database.php
===================================================================
--- /trunk/install/db/12-database.php	(revision 8469)
+++ 	(revision )
@@ -1,99 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Field "Status" Table #user_infos changed';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Alter table ".USER_INFOS_TABLE;
-$query = "
-alter table ".USER_INFOS_TABLE."
-  modify column `status` enum('webmaster', 'admin', 'normal', 'generic', 'guest') NOT NULL default 'guest'
-;";
-pwg_query($query);
-
-echo "Define webmaster";
-$query = '
-update
-  '.USER_INFOS_TABLE.'
-set status = \'webmaster\'
-where
-  user_id = '.$conf['webmaster_id'].' and status = \'admin\'
-;';
-$result = pwg_query($query);
-
-echo "Define normal";
-$query = '
-select
-  user_id
-from
-  '.USER_INFOS_TABLE.'
-where
-  user_id != '.$conf['guest_id'].' and status = \'guest\'
-;';
-$result = pwg_query($query);
-
-$datas = array();
-
-while ($row = pwg_db_fetch_assoc($result))
-{
-  array_push(
-    $datas,
-    array(
-      'user_id'    => $row['user_id'],
-      'status' => 'normal'
-      )
-    );
-}
-
-mass_updates(
-  USER_INFOS_TABLE,
-  array(
-    'primary' => array('user_id'),
-    'update'  => array('status')
-    ),
-  $datas
-  );
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.USER_INFOS_TABLE.'.status changed'
-."\n"
-;
-
-?>
Index: unk/install/db/13-database.php
===================================================================
--- /trunk/install/db/13-database.php	(revision 8469)
+++ 	(revision )
@@ -1,69 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = '#config (gallery_description out page_banner in)';
-
-$query = "
-ALTER TABLE ".PREFIX_TABLE."config MODIFY COLUMN `value` TEXT;";
-pwg_query($query);
-
-
-$query = '
-SELECT value
-  FROM '.PREFIX_TABLE.'config
-  WHERE param=\'gallery_title\'
-;';
-list($t) = array_from_query($query, 'value');
-
-$query = '
-SELECT value
-  FROM '.PREFIX_TABLE.'config
-  WHERE param=\'gallery_description\'
-;';
-list($d) = array_from_query($query, 'value');
-
-$page_banner='<div id="theHeader"><h1>'.$t.'</h1><p>'.$d.'</p></div>';
-$page_banner=addslashes($page_banner);
-$query = '
-INSERT INTO '.PREFIX_TABLE.'config (param,value,comment) VALUES (' .
-"'page_banner','$page_banner','html displayed on the top each page of your gallery');";
-pwg_query($query);
-
-$query = '
-DELETE FROM '.PREFIX_TABLE.'config
-  WHERE param=\'gallery_description\'
-;';
-pwg_query($query);
-
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'config updated'
-."\n"
-;
-?>
Index: unk/install/db/14-database.php
===================================================================
--- /trunk/install/db/14-database.php	(revision 8469)
+++ 	(revision )
@@ -1,59 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update database to new pwg_high structure';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Alter table ".USER_INFOS_TABLE. ' add field enabled_high';
-$query = "
-alter table ".USER_INFOS_TABLE."
-  add column `enabled_high` enum('true','false') NOT NULL default 'true'
-;";
-pwg_query($query);
-
-echo "Update ".USER_INFOS_TABLE.".enabled_high with default value";
-$query = "
-update ".USER_INFOS_TABLE." set enabled_high = '".$conf['newuser_default_enabled_high']."' 
-where enabled_high <> '".$conf['newuser_default_enabled_high']."'
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/15-database.php
===================================================================
--- /trunk/install/db/15-database.php	(revision 8469)
+++ 	(revision )
@@ -1,46 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = '#user_cache, add column nb_total_pictures (feature 262)';
-
-$query = "
-ALTER TABLE ".PREFIX_TABLE."user_cache ADD COLUMN `nb_total_images` MEDIUMINT(8) UNSIGNED;";
-pwg_query($query);
-
-$query = "
-UPDATE ".PREFIX_TABLE."user_cache SET need_update='true'";
-pwg_query($query);
-
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/16-database.php
===================================================================
--- /trunk/install/db/16-database.php	(revision 8469)
+++ 	(revision )
@@ -1,50 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update database from adviser functionnality';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Alter table ".USER_INFOS_TABLE. ' add field adviser';
-$query = "
-alter table ".USER_INFOS_TABLE."
-  add column `adviser` enum('true','false') NOT NULL default 'false' after `status`
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/17-database.php
===================================================================
--- /trunk/install/db/17-database.php	(revision 8469)
+++ 	(revision )
@@ -1,60 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add notification by mail param';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Add param on ".CONFIG_TABLE;
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_mail_as','','Send mail as param value for notification by mail');
-";
-pwg_query($query);
-
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_detailed_content','true','Send detailed content for notification by mail');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_complementary_mail_content','','Complementary mail content for notification by mail');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/18-database.php
===================================================================
--- /trunk/install/db/18-database.php	(revision 8469)
+++ 	(revision )
@@ -1,88 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Reduce length of #_user_mail_notification.check_key';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-echo "Compute new check_key";
-$query = '
-select
-  user_id
-from
-  '.USER_MAIL_NOTIFICATION_TABLE.'
-;';
-$result = pwg_query($query);
-
-$datas = array();
-
-while ($row = pwg_db_fetch_assoc($result))
-{
-  array_push(
-    $datas,
-    array(
-      'user_id'    => $row['user_id'],
-      'check_key' => find_available_check_key()
-      )
-    );
-}
-
-mass_updates(
-  USER_MAIL_NOTIFICATION_TABLE,
-  array(
-    'primary' => array('user_id'),
-    'update'  => array('check_key')
-    ),
-  $datas
-  );
-
-echo "Alter table ".USER_MAIL_NOTIFICATION_TABLE;
-$query = "
-alter table ".USER_MAIL_NOTIFICATION_TABLE."
-  modify column `check_key` varchar(16) binary NOT NULL default ''
-;";
-pwg_query($query);
-
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.USER_MAIL_NOTIFICATION_TABLE.'.check_key changed'
-."\n"
-;
-
-?>
Index: unk/install/db/19-database.php
===================================================================
--- /trunk/install/db/19-database.php	(revision 8469)
+++ 	(revision )
@@ -1,149 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = '#images.keywords moved to new table #tags';
-
-// +-----------------------------------------------------------------------+
-// |                              New tables                               |
-// +-----------------------------------------------------------------------+
-
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'tags (
-  id smallint(5) UNSIGNED NOT NULL auto_increment,
-  name varchar(255) BINARY NOT NULL,
-  url_name varchar(255) BINARY NOT NULL,
-  PRIMARY KEY (id)
-) TYPE=MyISAM
-;';
-pwg_query($query);
-
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'image_tag (
-  image_id mediumint(8) UNSIGNED NOT NULL,
-  tag_id smallint(5) UNSIGNED NOT NULL,
-  PRIMARY KEY (image_id,tag_id)
-) TYPE=MyISAM
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                        Move keywords to tags                          |
-// +-----------------------------------------------------------------------+
-
-// each tag label is associated to a numeric identifier
-$tag_id = array();
-// to each tag id (key) a list of image ids (value) is associated
-$tag_images = array();
-
-$current_id = 1;
-
-$query = '
-SELECT id, keywords
-  FROM '.PREFIX_TABLE.'images
-  WHERE keywords IS NOT NULL
-;';
-$result = pwg_query($query);
-while ($row = pwg_db_fetch_assoc($result))
-{
-  foreach(preg_split('/[,]+/', $row['keywords']) as $keyword)
-  {
-    if (!isset($tag_id[$keyword]))
-    {
-      $tag_id[$keyword] = $current_id++;
-    }
-
-    if (!isset($tag_images[ $tag_id[$keyword] ]))
-    {
-      $tag_images[ $tag_id[$keyword] ] = array();
-    }
-
-    array_push($tag_images[ $tag_id[$keyword] ], $row['id']);
-  }
-}
-
-$datas = array();
-foreach ($tag_id as $tag_name => $tag_id)
-{
-  array_push(
-    $datas,
-    array(
-      'id'       => $tag_id,
-      'name'     => $tag_name,
-      'url_name' => str2url($tag_name),
-      )
-    );
-}
-if (!empty($datas))
-mass_inserts(
-  PREFIX_TABLE.'tags',
-  array_keys($datas[0]),
-  $datas
-  );
-
-$datas = array();
-foreach ($tag_images as $tag_id => $images)
-{
-  foreach (array_unique($images) as $image_id)
-  {
-    array_push(
-      $datas,
-      array(
-        'tag_id'   => $tag_id,
-        'image_id' => $image_id,
-        )
-      );
-  }
-}
-
-if (!empty($datas))
-mass_inserts(
-  PREFIX_TABLE.'image_tag',
-  array_keys($datas[0]),
-  $datas
-  );
-
-// +-----------------------------------------------------------------------+
-// |                         Delete images.keywords                        |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images DROP COLUMN keywords
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'tags created and filled'."\n"
-.'Table '.PREFIX_TABLE.'image_tag created and filled'."\n"
-.'Column '.PREFIX_TABLE.'images.keywords dropped'."\n"
-;
-?>
Index: unk/install/db/2-database.php
===================================================================
--- /trunk/install/db/2-database.php	(revision 8469)
+++ 	(revision )
@@ -1,74 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update template preference for every user';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-// configuration update
-$query = '
-UPDATE '.PREFIX_TABLE.'config
-  SET value = \'yoga/clear\'
-  WHERE param = \'default_template\'
-;';
-pwg_query($query);
-
-// set yoga/clear as default value for user_infos.template column
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'user_infos
-  CHANGE COLUMN template template varchar(255) NOT NULL default \'yoga/clear\'
-;';
-pwg_query($query);
-
-// users having yoga-dark for template now have yoga/dark
-$query = '
-UPDATE '.PREFIX_TABLE.'user_infos
-  SET template = \'yoga/dark\'
-  WHERE template = \'yoga-dark\'
-;';
-pwg_query($query);
-
-// all other users have yoga/clear
-$query = '
-UPDATE '.PREFIX_TABLE.'user_infos
-  SET template = \'yoga/clear\'
-  WHERE template != \'yoga/dark\'
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'Default template modified to yoga/clear'
-."\n"
-.'Template preference modified for every users : yoga/dark'
-.' (for yoga-dark users) and yoga/clear as default'
-."\n"
-;
-?>
Index: unk/install/db/20-database.php
===================================================================
--- /trunk/install/db/20-database.php	(revision 8469)
+++ 	(revision )
@@ -1,87 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description =
-  '#image_category.is_storage replaced by #image.storage_category_id';
-
-// +-----------------------------------------------------------------------+
-// |                              New column                               |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images
-  ADD storage_category_id smallint(5) unsigned default NULL
-;';
-pwg_query($query);
-
-$query = '
-SELECT category_id, image_id
-  FROM '.PREFIX_TABLE.'image_category
-  WHERE is_storage = \'true\'
-;';
-$result = pwg_query($query);
-
-$datas = array();
-while ($row = pwg_db_fetch_assoc($result))
-{
-  array_push(
-    $datas,
-    array(
-      'id' => $row['image_id'],
-      'storage_category_id' => $row['category_id'],
-      )
-    );
-}
-mass_updates(
-  PREFIX_TABLE.'images',
-  array(
-    'primary' => array('id'),
-    'update' => array('storage_category_id'),
-    ),
-  $datas
-  );
-
-// +-----------------------------------------------------------------------+
-// |                         Delete obsolete column                        |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_category DROP COLUMN is_storage
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.PREFIX_TABLE.'image_category'
-.' replaced by '.PREFIX_TABLE.'images.storage_category_id'."\n"
-;
-?>
Index: unk/install/db/21-database.php
===================================================================
--- /trunk/install/db/21-database.php	(revision 8469)
+++ 	(revision )
@@ -1,48 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'drop table #categories_link';
-
-// +-----------------------------------------------------------------------+
-// |                              New column                               |
-// +-----------------------------------------------------------------------+
-
-$query = '
-DROP TABLE '.PREFIX_TABLE.'categories_link
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'categories_link dropped'."\n"
-;
-?>
Index: unk/install/db/22-database.php
===================================================================
--- /trunk/install/db/22-database.php	(revision 8469)
+++ 	(revision )
@@ -1,54 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'add index on #tags.url_name and #image_tag.tag_id ';
-
-
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'tags ADD INDEX `tags_i1`(`url_name`);
-;';
-pwg_query($query);
-
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_tag ADD INDEX `image_tag_i1`(`tag_id`);
-;';
-pwg_query($query);
-
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Tables '.PREFIX_TABLE.'tags and '.PREFIX_TABLE.'image_tag updated'."\n"
-;
-echo $upgrade_description;
-?>
Index: unk/install/db/23-database.php
===================================================================
--- /trunk/install/db/23-database.php	(revision 8469)
+++ 	(revision )
@@ -1,46 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'index images_i1 on storage_category_id comes back';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images
-  ADD INDEX images_i1(storage_category_id)
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.$upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/24-database.php
===================================================================
--- /trunk/install/db/24-database.php	(revision 8469)
+++ 	(revision )
@@ -1,46 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'increase categories.rank size, up to 65535';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'categories
-  CHANGE COLUMN rank rank SMALLINT(5) UNSIGNED DEFAULT NULL
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.$upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/25-database.php
===================================================================
--- /trunk/install/db/25-database.php	(revision 8469)
+++ 	(revision )
@@ -1,47 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'reinitialize page_banner';
-
-$query = '
-UPDATE '.PREFIX_TABLE.'config
-  SET value = \'<h1>Piwigo demonstration site</h1><p>My photos web site</p>\'
-  WHERE param = \'page_banner\'
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.$upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/26-database.php
===================================================================
--- /trunk/install/db/26-database.php	(revision 8469)
+++ 	(revision )
@@ -1,43 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'add an auto login key in users table';
-
-// add column auto_login_key
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
-  ADD auto_login_key varchar(64) NOT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/27-database.php
===================================================================
--- /trunk/install/db/27-database.php	(revision 8469)
+++ 	(revision )
@@ -1,43 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'change username length in users table';
-
-// add column auto_login_key
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
-  CHANGE username username VARCHAR(100) NOT NULL 
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/28-database.php
===================================================================
--- /trunk/install/db/28-database.php	(revision 8469)
+++ 	(revision )
@@ -1,42 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Delete old file index.htm';
-
-@unlink(PHPWG_ROOT_PATH.'/admin/images/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/admin/include/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/admin/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/language/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/galleries/index.htm');
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/29-database.php
===================================================================
--- /trunk/install/db/29-database.php	(revision 8469)
+++ 	(revision )
@@ -1,42 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add column #categories.image_order';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'categories
-  ADD COLUMN image_order VARCHAR(128) DEFAULT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/3-database.php
===================================================================
--- /trunk/install/db/3-database.php	(revision 8469)
+++ 	(revision )
@@ -1,53 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update session table for new session system';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-// delete content of old session table
-$query = '
-DELETE FROM '.PREFIX_TABLE.'sessions
-;';
-pwg_query($query);
-
-// column user_id becomes data of type text
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'sessions
-  CHANGE COLUMN user_id data text NOT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'Column modified in sessions table'
-."\n"
-;
-?>
Index: unk/install/db/30-database.php
===================================================================
--- /trunk/install/db/30-database.php	(revision 8469)
+++ 	(revision )
@@ -1,50 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add history_guest and login_history to #config';
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('history_admin',".
-((isset($conf['history_admin']) and $conf['history_admin']) ? 'true' : 'false').
-",'keep a history of administrator visits on your website');";
-pwg_query($query);
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('history_guest','true','keep a history of guest visits on your website');";
-pwg_query($query);
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('login_history','true','keep a history of user logins on your website');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/31-database.php
===================================================================
--- /trunk/install/db/31-database.php	(revision 8469)
+++ 	(revision )
@@ -1,43 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'change the upgrade 27 - username is binary';
-
-// add column auto_login_key
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
-  CHANGE username username VARCHAR(100) binary NOT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/32-database.php
===================================================================
--- /trunk/install/db/32-database.php	(revision 8469)
+++ 	(revision )
@@ -1,43 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'add active_plugins to config';
-
-// add column auto_login_key
-$query = '
-INSERT INTO '.PREFIX_TABLE.'config (param,value,comment)
-  VALUES (\'active_plugins\',\'\',\'activated plugins\')
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/33-database.php
===================================================================
--- /trunk/install/db/33-database.php	(revision 8469)
+++ 	(revision )
@@ -1,51 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add column #group.is_default';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Add column is_default on ".GROUPS_TABLE;
-$query = '
-alter table '.GROUPS_TABLE.' add column 
-`is_default` enum(\'true\',\'false\') NOT NULL default \'false\'
-;';
-pwg_query($query);
-
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/34-database.php
===================================================================
--- /trunk/install/db/34-database.php	(revision 8469)
+++ 	(revision )
@@ -1,56 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add #plugins and remove active_plugins from #config';
-
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = '
-DELETE FROM '.PREFIX_TABLE.'config WHERE param="active_plugins"';
-pwg_query($query);
-
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'plugins (
-  `id` varchar(64) binary NOT NULL default "",
-  `state` enum("inactive","active") NOT NULL default "inactive",
-  `version` varchar(64) NOT NULL default "0",
-  PRIMARY KEY  (`id`)
-);';
-pwg_query($query);
-
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/35-database.php
===================================================================
--- /trunk/install/db/35-database.php	(revision 8469)
+++ 	(revision )
@@ -1,58 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add email_admin_on_new_user, email_admin_on_comment, email_admin_on_comment_validation';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_new_user','false','Send an email to the admin when a user registers');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_comment','false','Send an email to the admin when a valid comment is entered');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_comment_validation','false','Send an email to the admin when a comment requires validation');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/36-database.php
===================================================================
--- /trunk/install/db/36-database.php	(revision 8469)
+++ 	(revision )
@@ -1,43 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'get rid of #users.auto_login_key';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
-  DROP COLUMN auto_login_key
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/37-database.php
===================================================================
--- /trunk/install/db/37-database.php	(revision 8469)
+++ 	(revision )
@@ -1,63 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Cache user categories update';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Create table ".USER_CACHE_CATEGORIES_TABLE;
-$query = '
-CREATE TABLE '.USER_CACHE_CATEGORIES_TABLE.' (
-  `user_id` smallint(5) NOT NULL default \'0\',
-  `cat_id` smallint(5) unsigned NOT NULL default \'0\',
-  `is_child_date_last` enum(\'true\',\'false\') NOT NULL default \'false\',
-  `max_date_last` datetime default NULL,
-  `count_images` mediumint(8) unsigned default 0,
-  `count_categories` mediumint(8) unsigned default 0,
-  PRIMARY KEY  (`user_id`, `cat_id`)
-) TYPE=MyISAM;';
-pwg_query($query);
-
-echo "Update table cache ".USER_CACHE_TABLE;
-$query = '
-UPDATE '.USER_CACHE_TABLE.'
-  SET need_update = \'true\'
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/38-database.php
===================================================================
--- /trunk/install/db/38-database.php	(revision 8469)
+++ 	(revision )
@@ -1,46 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'delete #user_cache_categories.is_child_date_last';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-$query = '
-ALTER TABLE '.USER_CACHE_CATEGORIES_TABLE.' DROP COLUMN is_child_date_last';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/39-database.php
===================================================================
--- /trunk/install/db/39-database.php	(revision 8469)
+++ 	(revision )
@@ -1,40 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add allow_user_registration to #config';
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('allow_user_registration','true','allow visitors to register?');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/4-database.php
===================================================================
--- /trunk/install/db/4-database.php	(revision 8469)
+++ 	(revision )
@@ -1,50 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Table #search is required for search engine redesign';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-// column user_id becomes data of type text
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'search (
-  id int UNSIGNED NOT NULL AUTO_INCREMENT,
-  last_seen date DEFAULT NULL,
-  rules text,
-  PRIMARY KEY  (id)
-);';
-pwg_query($query);
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'search created'
-."\n"
-;
-?>
Index: unk/install/db/40-database.php
===================================================================
--- /trunk/install/db/40-database.php	(revision 8469)
+++ 	(revision )
@@ -1,40 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add ws_status to #config';
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('ws_status','true','Web Service is active/inactive');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/41-database.php
===================================================================
--- /trunk/install/db/41-database.php	(revision 8469)
+++ 	(revision )
@@ -1,61 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Web service access table creation';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Create table ".WEB_SERVICES_ACCESS_TABLE;
-$query = '
-CREATE TABLE '.WEB_SERVICES_ACCESS_TABLE." (
-  id smallint(5) unsigned NOT NULL auto_increment,
-  name varchar(32) NOT NULL default '',
-  access varchar(255) default NULL,
-  `start` datetime default NULL,
-  `end` datetime default NULL,
-  request varchar(255) default NULL,
-  high enum('true','false') NOT NULL default 'true',
-  normal enum('true','false') NOT NULL default 'true',
-  `limit` smallint(5) unsigned default NULL,
-  `comment` varchar(255) default NULL,
-  PRIMARY KEY  (id),
-  UNIQUE KEY name (name)
-) ENGINE=MyISAM COMMENT='Access for Web Services';";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/42-database.php
===================================================================
--- /trunk/install/db/42-database.php	(revision 8469)
+++ 	(revision )
@@ -1,84 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'History table new model and new table history_summary';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Recreate table ".HISTORY_TABLE."\n";
-
-$query = 'DROP TABLE '.HISTORY_TABLE.';';
-pwg_query($query);
-
-$query = "
-CREATE TABLE `".HISTORY_TABLE."` (
-  `id` int(10) unsigned NOT NULL auto_increment,
-  `date` date NOT NULL default '0000-00-00',
-  `time` time NOT NULL default '00:00:00',
-  `year` smallint(4) NOT NULL default '0',
-  `month` tinyint(2) NOT NULL default '0',
-  `day` tinyint(2) NOT NULL default '0',
-  `hour` tinyint(2) NOT NULL default '0',
-  `user_id` smallint(5) NOT NULL default '0',
-  `IP` varchar(15) NOT NULL default '',
-  `section` enum('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats') default NULL,
-  `category_id` smallint(5) default NULL,
-  `tag_ids` varchar(50) default NULL,
-  `image_id` mediumint(8) default NULL,
-  `summarized` enum('true','false') default 'false',
-  PRIMARY KEY  (`id`),
-  KEY `history_i1` (`summarized`)
-) TYPE=MyISAM
-;";
-pwg_query($query);
-
-echo "Create table ".HISTORY_SUMMARY_TABLE."\n";
-$query = "
-CREATE TABLE `".HISTORY_SUMMARY_TABLE."` (
-  `id` varchar(13) NOT NULL default '',
-  `year` smallint(4) NOT NULL default '0',
-  `month` tinyint(2) default NULL,
-  `day` tinyint(2) default NULL,
-  `hour` tinyint(2) default NULL,
-  `nb_pages` int(11) default NULL,
-  PRIMARY KEY  (`id`)
-) TYPE=MyISAM
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/43-database.php
===================================================================
--- /trunk/install/db/43-database.php	(revision 8469)
+++ 	(revision )
@@ -1,47 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Insert secret_key into #config';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('secret_key', MD5(RAND()), 'a secret key specific to the gallery for internal use');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
Index: unk/install/db/44-database.php
===================================================================
--- /trunk/install/db/44-database.php	(revision 8469)
+++ 	(revision )
@@ -1,47 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'None efficient index removed for performance reasons';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_category DROP INDEX `image_category_i1;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
Index: unk/install/db/45-database.php
===================================================================
--- /trunk/install/db/45-database.php	(revision 8469)
+++ 	(revision )
@@ -1,48 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Index rename without any reason except human logic';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_category DROP INDEX image_category_i2 ,
-ADD INDEX image_category ( category_id ) ;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
Index: unk/install/db/46-database.php
===================================================================
--- /trunk/install/db/46-database.php	(revision 8469)
+++ 	(revision )
@@ -1,46 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'remove login_history from #config (partial revert 30-database.php)';
-
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = '
-DELETE FROM '.PREFIX_TABLE.'config WHERE param="login_history"';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/47-database.php
===================================================================
--- /trunk/install/db/47-database.php	(revision 8469)
+++ 	(revision )
@@ -1,52 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Remove ws_status from #config';
-
-$query = '
-DELETE FROM '.PREFIX_TABLE."config WHERE param ='ws_status';";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-$upgrade_description = 'Add show_nb_hits to #user_infos';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE."user_infos ADD `show_nb_hits` 
-ENUM( 'true', 'false' ) DEFAULT 'false' NOT NULL AFTER `show_nb_comments` ;";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
Index: unk/install/db/48-database.php
===================================================================
--- /trunk/install/db/48-database.php	(revision 8469)
+++ 	(revision )
@@ -1,48 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Insert show_nb_hits into #config';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) 
-VALUES ('show_nb_hits', 'false', 'Show hits count under thumbnails');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
Index: unk/install/db/49-database.php
===================================================================
--- /trunk/install/db/49-database.php	(revision 8469)
+++ 	(revision )
@@ -1,54 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add notification by mail params (HTML mail and new informartions)';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Add params on ".CONFIG_TABLE;
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_html_mail','true','Send mail on HTML format for notification by mail');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_recent_post_dates','true','Send recent post by dates for notification by mail');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/5-database.php
===================================================================
--- /trunk/install/db/5-database.php	(revision 8469)
+++ 	(revision )
@@ -1,46 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update images table with has_high column';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-// column user_id becomes data of type text
-$query = "
-ALTER TABLE ".PREFIX_TABLE."images ADD COLUMN has_high ENUM('true') DEFAULT NULL AFTER average_rate;
-";
-pwg_query($query);
-
-echo
-"\n"
-.'Column has_high '.PREFIX_TABLE.'images added'
-."\n"
-;
-?>
Index: unk/install/db/50-database.php
===================================================================
--- /trunk/install/db/50-database.php	(revision 8469)
+++ 	(revision )
@@ -1,50 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Remove high and normal columns from #ws_access';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-echo "Drop some columns from ".WEB_SERVICES_ACCESS_TABLE;
-$query = "
-ALTER TABLE ".WEB_SERVICES_ACCESS_TABLE."
-  DROP `high`,
-  DROP `normal`;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/51-database.php
===================================================================
--- /trunk/install/db/51-database.php	(revision 8469)
+++ 	(revision )
@@ -1,57 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add #history.is_high column';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".HISTORY_TABLE."
-  ADD COLUMN is_high ENUM('true', 'false') DEFAULT NULL
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
-  SET is_high = 'false'
-  WHERE image_id IS NOT NULL
-   AND is_high IS NULL
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
Index: unk/install/db/52-database.php
===================================================================
--- /trunk/install/db/52-database.php	(revision 8469)
+++ 	(revision )
@@ -1,69 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Replace #history.is_high by #history.image_type';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".HISTORY_TABLE."
-  ADD COLUMN image_type ENUM('picture', 'high', 'other') DEFAULT NULL
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
-  SET image_type = 'high'
-  WHERE is_high = 'true'
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
-  SET image_type = 'picture'
-  WHERE is_high = 'false'
-;";
-pwg_query($query);
-
-$query = "
-ALTER TABLE ".HISTORY_TABLE."
-  DROP COLUMN is_high
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
Index: unk/install/db/53-database.php
===================================================================
--- /trunk/install/db/53-database.php	(revision 8469)
+++ 	(revision )
@@ -1,57 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = '#comments.content is not html escaped anymore';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-
-$replacements = array(
-    array('&#039;', '\''),
-    array('&quot;', '"'),
-    array('&lt;',   '<'),
-    array('&gt;',   '>'),
-    array('&amp;',  '&') // <- this must be the last one
-  );
-
-foreach ($replacements as $replacement)
-{
-  $query = '
-UPDATE '.COMMENTS_TABLE.'
-  SET content = REPLACE(content, "'.addslashes($replacement[0]).'", "'.addslashes($replacement[1]).'")
-;';
-  pwg_query($query);
-}
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
Index: unk/install/db/54-database.php
===================================================================
--- /trunk/install/db/54-database.php	(revision 8469)
+++ 	(revision )
@@ -1,69 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'add column #categories.permalink and table #old_permalinks';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-defined('OLD_PERMALINKS_TABLE') or die('OLD_PERMALINKS_TABLE is not defined');
-
-$query = "
-CREATE TABLE `".OLD_PERMALINKS_TABLE."` (
-  `cat_id` smallint(5) unsigned NOT NULL,
-  `permalink` VARCHAR(64) NOT NULL,
-  `date_deleted` datetime NOT NULL,
-  `last_hit` datetime default NULL,
-  `hit` int(10) unsigned NOT NULL default '0',
-  PRIMARY KEY (`permalink`)
-) TYPE=MyISAM
-;";
-pwg_query($query);
-
-$query = "
-ALTER TABLE `".CATEGORIES_TABLE."`
-  ADD COLUMN `permalink` VARCHAR(64) default NULL
-;";
-pwg_query($query);
-
-$query = "
-ALTER TABLE `".CATEGORIES_TABLE."`
-  ADD UNIQUE INDEX `categories_i3` (`permalink`)
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/55-database.php
===================================================================
--- /trunk/install/db/55-database.php	(revision 8469)
+++ 	(revision )
@@ -1,59 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description =
-  'Update #history.image_type to "picture" by default when image_id is not null';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-UPDATE ".HISTORY_TABLE."
-  SET image_type = 'picture'
-  WHERE image_id IS NOT NULL
-    AND image_type IS NULL
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
-  SET image_type = NULL
-  WHERE image_id IS NULL
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
Index: unk/install/db/56-database.php
===================================================================
--- /trunk/install/db/56-database.php	(revision 8469)
+++ 	(revision )
@@ -1,49 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add #images.high_filesize';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".IMAGES_TABLE."
-  ADD COLUMN high_filesize mediumint(9) unsigned default NULL
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
Index: unk/install/db/57-database.php
===================================================================
--- /trunk/install/db/57-database.php	(revision 8469)
+++ 	(revision )
@@ -1,63 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update email_admin_on_new_user, email_admin_on_comment, email_admin_on_comment_validation & Add email_admin_on_picture_uploaded';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-UPDATE ".CONFIG_TABLE." set comment = 'Send an email to the administrators when a user registers' where param = 'email_admin_on_new_user';
-";
-pwg_query($query);
-
-$query = "
-UPDATE ".CONFIG_TABLE." set comment = 'Send an email to the administrators when a valid comment is entered' where param = 'email_admin_on_comment';
-";
-pwg_query($query);
-
-$query = "
-UPDATE ".CONFIG_TABLE." set comment = 'Send an email to the administrators when a comment requires validation' where param = 'email_admin_on_comment_validation';
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/58-database.php
===================================================================
--- /trunk/install/db/58-database.php	(revision 8469)
+++ 	(revision )
@@ -1,48 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Change default value for #user_infos.language';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".USER_INFOS_TABLE." CHANGE `language` `language` varchar(50) NOT NULL default 'en_UK.iso-8859-1'
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/59-database.php
===================================================================
--- /trunk/install/db/59-database.php	(revision 8469)
+++ 	(revision )
@@ -1,79 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Rename some indexes following PWG naming rules';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-DROP INDEX image_category ON ".IMAGE_CATEGORY_TABLE."
-;
-";
-pwg_query($query);
-
-$query = "
-CREATE INDEX image_category_i1 ON ".IMAGE_CATEGORY_TABLE." (category_id)
-;
-";
-pwg_query($query);
-
-$query = "
-DROP INDEX uidx_check_key ON ".USER_MAIL_NOTIFICATION_TABLE."
-;
-";
-pwg_query($query);
-
-$query = "
-CREATE UNIQUE INDEX user_mail_notification_ui1 ON ".USER_MAIL_NOTIFICATION_TABLE." (check_key)
-;
-";
-pwg_query($query);
-
-$query = "
-DROP INDEX name ON ".WEB_SERVICES_ACCESS_TABLE."
-;
-";
-pwg_query($query);
-
-$query = "
-CREATE UNIQUE INDEX ws_access_ui1 ON ".WEB_SERVICES_ACCESS_TABLE." (name)
-;
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/6-database.php
===================================================================
--- /trunk/install/db/6-database.php	(revision 8469)
+++ 	(revision )
@@ -1,53 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Table #user_mail_notification is required for NBM';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-// Creating table user_mail_notification
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'user_mail_notification
-(
-  user_id smallint(5) NOT NULL default \'0\',
-  check_key varchar(128) binary NOT NULL,
-  enabled enum(\'true\',\'false\') NOT NULL default \'false\',
-  last_send datetime default NULL,
-  PRIMARY KEY  (`user_id`),
-  UNIQUE KEY `uidx_check_key` (`check_key`)
-) TYPE=MyISAM;';
-pwg_query($query);
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'user_mail_notification created'
-."\n"
-;
-?>
Index: unk/install/db/60-database.php
===================================================================
--- /trunk/install/db/60-database.php	(revision 8469)
+++ 	(revision )
@@ -1,86 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Change default value on #user_infos for guest';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-load_conf_from_db();
-
-$query = "
-update ".USER_INFOS_TABLE."
-set
-  template = '".$conf['default_template']."',
-  nb_image_line = ".$conf['nb_image_line'].",
-  nb_line_page = ".$conf['nb_line_page'].",
-  language = '".$conf['default_language']."',
-  maxwidth = ".(empty($conf['default_maxwidth']) ? "null" : $conf['default_maxwidth']).",
-  maxheight = ".(empty($conf['default_maxheight']) ? "null" : $conf['default_maxheight']).",
-  recent_period = ".$conf['recent_period'].",
-  expand = '".boolean_to_string($conf['auto_expand'])."',
-  show_nb_comments = '".boolean_to_string($conf['show_nb_comments'])."',
-  show_nb_hits = '".boolean_to_string($conf['show_nb_hits'])."',
-  enabled_high = '".boolean_to_string(
-    (isset($conf['newuser_default_enabled_high']) ? 
-      $conf['newuser_default_enabled_high'] : true))."'
-where
-  user_id = ".$conf['default_user_id'].";";
-pwg_query($query);
-
-
-$query = "
-delete from ".CONFIG_TABLE."
-where
-  param in
-(
-  'default_template',
-  'nb_image_line',
-  'nb_line_page',
-  'default_language',
-  'default_maxwidth',
-  'default_maxheight',
-  'recent_period',
-  'auto_expand',
-  'show_nb_comments',
-  'show_nb_hits'
-);";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
Index: unk/install/db/7-database.php
===================================================================
--- /trunk/install/db/7-database.php	(revision 8469)
+++ 	(revision )
@@ -1,65 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Anonymous rating';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'rate DROP PRIMARY KEY;'
-;
-pwg_query($query);
-
-$query ='
-ALTER TABLE '.PREFIX_TABLE.'rate ADD COLUMN anonymous_id VARCHAR(45) NOT NULL DEFAULT \'\' AFTER element_id;'
-;
-pwg_query($query);
-
-$query ='
-ALTER TABLE '.PREFIX_TABLE.'rate ADD COLUMN date DATE NOT NULL AFTER rate;'
-;
-pwg_query($query);
-
-$query ='
-UPDATE '.PREFIX_TABLE.'rate SET date=NOW() WHERE date<"1990-01-01";'
-;
-pwg_query($query);
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'rate ADD PRIMARY KEY (element_id, user_id, anonymous_id);'
-;
-pwg_query($query);
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'rate upgraded'
-."\n"
-;
-?>
Index: unk/install/db/8-database.php
===================================================================
--- /trunk/install/db/8-database.php	(revision 8469)
+++ 	(revision )
@@ -1,83 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description = 'Move rate, rate_anonymous and gallery_url from config file to database';
-
-$params = array(
-  'gallery_url' => array('http://demo.phpwebgallery.net','URL given in RSS feed'),
-  'rate' => array('true','Rating pictures feature is enabled') ,
-  'rate_anonymous' => array('true','Rating pictures feature is also enabled for visitors')
-  );
-
-
-
-// +-Get real values from config file--------------------------------------+
-
-$conf_save = $conf;
-unset($conf);
-@include(PHPWG_ROOT_PATH. 'local/config/config.inc.php');
-if ( isset($conf['gallery_url']) )
-{
-  $params['gallery_url'][0] = $conf['gallery_url'];
-}
-if ( isset($conf['rate']) and is_bool($conf['rate']) )
-{
-  $params['rate'][0] = $conf['rate'] ? 'true' : 'false';
-}
-if ( isset($conf['rate_anonymous']) and is_bool($conf['rate_anonymous']) )
-{
-  $params['rate_anonymous'][0] = $conf['rate_anonymous'] ? 'true' : 'false';
-}
-$conf = $conf_save;
-
-
-
-// +-Do I already have them in DB ?----------------------------------------+
-$query = 'SELECT param FROM '.PREFIX_TABLE.'config';
-$result = pwg_query($query);
-while ($row = pwg_db_fetch_assoc($result))
-{
-  unset( $params[ $row['param'] ] );
-}
-
-// +-Perform the insert query----------------------------------------------+
-foreach ($params as $param_key => $param_values)
-{
-  $query = '
-INSERT INTO '.PREFIX_TABLE.'config (param,value,comment) VALUES (' .
-"'$param_key','$param_values[0]','$param_values[1]');";
-  pwg_query($query);
-}
-
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'config upgraded'
-."\n"
-;
-?>
Index: unk/install/db/9-database.php
===================================================================
--- /trunk/install/db/9-database.php	(revision 8469)
+++ 	(revision )
@@ -1,86 +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.                                                                  |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
-  die('Hacking attempt!');
-}
-
-$upgrade_description =
-  'Column #image_category.is_storage replaces #images.storage_category_id';
-
-// +-----------------------------------------------------------------------+
-// |                            Upgrade content                            |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".PREFIX_TABLE."image_category
-  ADD COLUMN is_storage ENUM('true','false') DEFAULT 'false'
-;";
-pwg_query($query);
-
-$query = '
-SELECT id, storage_category_id
-  FROM '.PREFIX_TABLE.'images
-;';
-$result = pwg_query($query);
-
-$datas = array();
-
-while ($row = pwg_db_fetch_assoc($result))
-{
-  array_push(
-    $datas,
-    array(
-      'image_id'    => $row['id'],
-      'category_id' => $row['storage_category_id'],
-      'is_storage'  => 'true',
-      )
-    );
-}
-
-mass_updates(
-  PREFIX_TABLE.'image_category',
-  array(
-    'primary' => array('image_id', 'category_id'),
-    'update'  => array('is_storage')
-    ),
-  $datas
-  );
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images
-  DROP COLUMN storage_category_id
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// |                           End notification                            |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.PREFIX_TABLE.'image_category.is_storage created and filled'
-."\n"
-;
-?>
