From fe569ab1bf4baa44a808a2d6e81bcddc28d61b62 Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 13 Jan 2011 15:24:18 +0000 Subject: feature 2108 added: user upload removed from core. It will come back as a "new generation" user upload in the Community plugin. git-svn-id: http://piwigo.org/svn/trunk@8651 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/config.sql | 3 -- install/db/94-database.php | 93 +++++++++++++++++++++++++++++++++ install/piwigo_structure-mysql.sql | 19 ------- install/piwigo_structure-pdo-sqlite.sql | 20 ------- install/piwigo_structure-pgsql.sql | 25 --------- install/piwigo_structure-sqlite.sql | 21 -------- 6 files changed, 93 insertions(+), 88 deletions(-) create mode 100644 install/db/94-database.php (limited to 'install') diff --git a/install/config.sql b/install/config.sql index 02f6f71a1..e96a7cf30 100644 --- a/install/config.sql +++ b/install/config.sql @@ -26,11 +26,8 @@ INSERT INTO piwigo_config (param,value,comment) VALUES ('nbm_send_recent_post_da INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_new_user','false','Send an email to theadministrators when a user registers'); INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_comment','false','Send an email to the administrators when a valid comment is entered'); INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_comment_validation','false','Send an email to the administrators when a comment requires validation'); -INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded'); INSERT INTO piwigo_config (param,value,comment) VALUES ('obligatory_user_mail_address','false','Mail address is obligatory for users'); INSERT INTO piwigo_config (param,value,comment) VALUES ('c13y_ignore',null,'List of ignored anomalies'); -INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_link_everytime','false','Show upload link every time'); -INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_user_access',2 /*ACCESS_CLASSIC*/,'User access level to upload'); INSERT INTO piwigo_config (param,value,comment) VALUES ('extents_for_templates','a:0:{}','Actived template-extension(s)'); INSERT INTO piwigo_config (param,value,comment) VALUES ('blk_menubar','','Menubar options'); INSERT INTO piwigo_config (param,value,comment) VALUES ('menubar_filter_icon','true','Display filter icon'); diff --git a/install/db/94-database.php b/install/db/94-database.php new file mode 100644 index 000000000..fbaa5a3cf --- /dev/null +++ b/install/db/94-database.php @@ -0,0 +1,93 @@ +' + ); + +// +// remove all what is related to user upload in the database +// + +// categories.uploadable +pwg_query('ALTER TABLE '.CATEGORIES_TABLE.' DROP COLUMN uploadable;'); + +// waiting +pwg_query('DROP TABLE '.PREFIX_TABLE.'waiting;'); + +// config parameter settings : upload_user_access, upload_link_everytime +$query = ' +DELETE FROM '.PREFIX_TABLE.'config + WHERE param IN (\'upload_user_access\', \'upload_link_everytime\', \'email_admin_on_picture_uploaded\') +;'; +pwg_query($query); + +echo +"\n" +. $upgrade_description +."\n" +; +?> diff --git a/install/piwigo_structure-mysql.sql b/install/piwigo_structure-mysql.sql index a241ab1f4..39184daab 100644 --- a/install/piwigo_structure-mysql.sql +++ b/install/piwigo_structure-mysql.sql @@ -30,7 +30,6 @@ CREATE TABLE `piwigo_categories` ( `status` enum('public','private') NOT NULL default 'public', `site_id` tinyint(4) unsigned default '1', `visible` enum('true','false') NOT NULL default 'true', - `uploadable` enum('true','false') NOT NULL default 'false', `representative_picture_id` mediumint(8) unsigned default NULL, `uppercats` varchar(255) NOT NULL default '', `commentable` enum('true','false') NOT NULL default 'true', @@ -446,21 +445,3 @@ CREATE TABLE `piwigo_users` ( PRIMARY KEY (`id`), UNIQUE KEY `users_ui1` (`username`) ) TYPE=MyISAM; - --- --- Table structure for table `piwigo_waiting` --- - -DROP TABLE IF EXISTS `piwigo_waiting`; -CREATE TABLE `piwigo_waiting` ( - `id` int(10) unsigned NOT NULL auto_increment, - `storage_category_id` smallint(5) unsigned NOT NULL default '0', - `file` varchar(255) NOT NULL default '', - `username` varchar(255) NOT NULL default '', - `mail_address` varchar(255) NOT NULL default '', - `date` int(10) unsigned NOT NULL default '0', - `tn_ext` char(3) default NULL, - `validated` enum('true','false') NOT NULL default 'false', - `infos` text, - PRIMARY KEY (`id`) -) TYPE=MyISAM; diff --git a/install/piwigo_structure-pdo-sqlite.sql b/install/piwigo_structure-pdo-sqlite.sql index 0c38b4008..c01f55892 100644 --- a/install/piwigo_structure-pdo-sqlite.sql +++ b/install/piwigo_structure-pdo-sqlite.sql @@ -26,7 +26,6 @@ CREATE TABLE "piwigo_categories" "status" VARCHAR(50) default 'public', "site_id" INTEGER default 1, "visible" BOOLEAN default true, - "uploadable" BOOLEAN default false, "representative_picture_id" INTEGER, "uppercats" TEXT, "commentable" BOOLEAN default true, @@ -537,22 +536,3 @@ CREATE TABLE piwigo_comments CREATE INDEX "comments_i2" ON "piwigo_comments" ("validation_date"); CREATE INDEX "comments_i1" ON "piwigo_comments" ("image_id"); ------------------------------------------------------------------------------ --- piwigo_waiting ------------------------------------------------------------------------------ - -DROP TABLE IF EXISTS piwigo_waiting; -CREATE TABLE piwigo_waiting -( - "id" INTEGER NOT NULL, - "storage_category_id" INTEGER default 0 NOT NULL, - "file" VARCHAR(255) default '' NOT NULL, - "username" VARCHAR(255) default '' NOT NULL, - "mail_address" VARCHAR(255) default '' NOT NULL, - "date" INTEGER default 0 NOT NULL, - "tn_ext" CHAR(3), - "validated" BOOLEAN default false, - "infos" TEXT, - PRIMARY KEY ("id") -); - diff --git a/install/piwigo_structure-pgsql.sql b/install/piwigo_structure-pgsql.sql index 5f9d5a8cf..feab9acc3 100644 --- a/install/piwigo_structure-pgsql.sql +++ b/install/piwigo_structure-pgsql.sql @@ -33,7 +33,6 @@ CREATE TABLE "piwigo_categories" "status" CATEGORIES_STATUS default 'public'::CATEGORIES_STATUS, "site_id" INTEGER default 1, "visible" BOOLEAN default true, - "uploadable" BOOLEAN default false, "representative_picture_id" INTEGER, "uppercats" TEXT, "commentable" BOOLEAN default true, @@ -652,27 +651,3 @@ SET search_path TO public; CREATE INDEX "comments_i2" ON "piwigo_comments" ("validation_date"); CREATE INDEX "comments_i1" ON "piwigo_comments" ("image_id"); - ------------------------------------------------------------------------------ --- piwigo_waiting ------------------------------------------------------------------------------ - -DROP TABLE IF EXISTS "piwigo_waiting" CASCADE; -CREATE TABLE "piwigo_waiting" -( - "id" serial NOT NULL, - "storage_category_id" INTEGER default 0 NOT NULL, - "file" VARCHAR(255) default '' NOT NULL, - "username" VARCHAR(255) default '' NOT NULL, - "mail_address" VARCHAR(255) default '' NOT NULL, - "date" INTEGER default 0 NOT NULL, - "tn_ext" CHAR(3), - "validated" BOOLEAN default false, - "infos" TEXT, - PRIMARY KEY ("id") -); - -COMMENT ON TABLE "piwigo_waiting" IS ''; - - -SET search_path TO public; \ No newline at end of file diff --git a/install/piwigo_structure-sqlite.sql b/install/piwigo_structure-sqlite.sql index 0c38b4008..54e2f0d12 100644 --- a/install/piwigo_structure-sqlite.sql +++ b/install/piwigo_structure-sqlite.sql @@ -26,7 +26,6 @@ CREATE TABLE "piwigo_categories" "status" VARCHAR(50) default 'public', "site_id" INTEGER default 1, "visible" BOOLEAN default true, - "uploadable" BOOLEAN default false, "representative_picture_id" INTEGER, "uppercats" TEXT, "commentable" BOOLEAN default true, @@ -536,23 +535,3 @@ CREATE TABLE piwigo_comments CREATE INDEX "comments_i2" ON "piwigo_comments" ("validation_date"); CREATE INDEX "comments_i1" ON "piwigo_comments" ("image_id"); - ------------------------------------------------------------------------------ --- piwigo_waiting ------------------------------------------------------------------------------ - -DROP TABLE IF EXISTS piwigo_waiting; -CREATE TABLE piwigo_waiting -( - "id" INTEGER NOT NULL, - "storage_category_id" INTEGER default 0 NOT NULL, - "file" VARCHAR(255) default '' NOT NULL, - "username" VARCHAR(255) default '' NOT NULL, - "mail_address" VARCHAR(255) default '' NOT NULL, - "date" INTEGER default 0 NOT NULL, - "tn_ext" CHAR(3), - "validated" BOOLEAN default false, - "infos" TEXT, - PRIMARY KEY ("id") -); - -- cgit v1.2.3