aboutsummaryrefslogtreecommitdiffstats
path: root/install/db
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-04-06 02:23:54 +0000
committerrvelices <rv-github@modusoptimus.com>2006-04-06 02:23:54 +0000
commitd700a5917233fb8049589a9e0aef3d94e87fb320 (patch)
tree81f8c53ccf908e900638abd117f3dc8719ca67a1 /install/db
parentb9a37cd6f06a19fd48d4a8e546b10c8fb3ff5b33 (diff)
improvement: urls for tags can contain now only the tag or the id and tag
improvement: urls for category can be now id and category names (instead of only id) improvement: added 2 indexes (#image_tag.tag_id and #tags.url_name) improvement: identification, register, search pages automatically set focus on first form input improvement: focus, nofocus css class now valid for all forms fix: category comment is tag stripped in category_subcats.inc.php (otherwise issues with html/scripts inside category comment) git-svn-id: http://piwigo.org/svn/trunk@1131 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--install/db/22-database.php58
1 files changed, 58 insertions, 0 deletions
diff --git a/install/db/22-database.php b/install/db/22-database.php
new file mode 100644
index 000000000..fcead3cf2
--- /dev/null
+++ b/install/db/22-database.php
@@ -0,0 +1,58 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | PhpWebGallery - a PHP based picture gallery |
+// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
+// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// +-----------------------------------------------------------------------+
+// | branch : BSF (Best So Far)
+// | file : $RCSfile$
+// | last update : $Date: 2005-09-21 00:04:57 +0200 (mer, 21 sep 2005) $
+// | last modifier : $Author: plg $
+// | revision : $Revision: 870 $
+// +-----------------------------------------------------------------------+
+// | 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;
+?>