From c08fa6f67ef5b149fdeb3bcc57045e629df8fff4 Mon Sep 17 00:00:00 2001 From: plegall Date: Sat, 4 Mar 2006 23:31:46 +0000 Subject: new feature: source/destination links between categories. Will we keep this feature? Code is complicated and very few people will understand how it works... modification: #images.storage_category_id replaced by #image_category.is_storage improvement: many code refactoring to improve readibility improvement: virtual category creation code was moved to a dedicated function in order to be called from admin/cat_list.php and admin/cat_modify.php (create a new destination category) git-svn-id: http://piwigo.org/svn/trunk@1064 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/db/10-database.php | 56 +++++++++++++++++++++++++++++ install/db/9-database.php | 90 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) create mode 100644 install/db/10-database.php create mode 100644 install/db/9-database.php (limited to 'install/db') diff --git a/install/db/10-database.php b/install/db/10-database.php new file mode 100644 index 000000000..24a7f655e --- /dev/null +++ b/install/db/10-database.php @@ -0,0 +1,56 @@ + diff --git a/install/db/9-database.php b/install/db/9-database.php new file mode 100644 index 000000000..3abf384a3 --- /dev/null +++ b/install/db/9-database.php @@ -0,0 +1,90 @@ + $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" +; +?> -- cgit v1.2.3