From 5a8ecfbfb140333e08d85b1d4a7e97bbba78bfcc Mon Sep 17 00:00:00 2001 From: plegall Date: Mon, 20 Dec 2004 12:30:36 +0000 Subject: - in picture.php, $user['maxwidth'] and $user['maxheight'] can be unset if NULL in database - new table user_forbidden {user_id,need_update,forbidden_categories} and deletion of field users.forbidden_categories - new function calculate_permissions to update table user_forbidden when needed - simplification of include/user.inc.php - in footer of each page, use "-" instead of "::" to separate page information git-svn-id: http://piwigo.org/svn/trunk@648 68402e56-0260-453c-a942-63ccdbb3a9ee --- install/dbscheme.txt | 6 +++++- install/phpwebgallery_structure.sql | 13 ++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/dbscheme.txt b/install/dbscheme.txt index 8caeb48e6..d53e742c4 100644 --- a/install/dbscheme.txt +++ b/install/dbscheme.txt @@ -12,6 +12,7 @@ table:rate table:sessions table:sites table:user_access +table:user_forbidden table:user_group table:users table:waiting @@ -83,6 +84,9 @@ column:id table:sites type:tinyint column:galleries_url table:sites type:varchar nullable:N length:255 binary:N column:user_id table:user_access type:smallint nullable:N length:5 signed:N column:cat_id table:user_access type:smallint nullable:N length:5 signed:N +column:user_id table:user_forbidden type:smallint nullable:N length:5 signed:N +column:need_update table:user_forbidden type:enum('true','false') nullable:N +column:forbidden_categories table:user_forbidden type:text nullable:Y column:user_id table:user_group type:smallint nullable:N length:5 signed:N column:group_id table:user_group type:smallint nullable:N length:5 signed:N column:id table:users type:smallint nullable:N length:5 signed:N @@ -99,7 +103,6 @@ column:expand table:users type:enum('true','false') column:show_nb_comments table:users type:enum('true','false') nullable:N column:recent_period table:users type:tinyint nullable:N length:3 signed:N column:template table:users type:varchar nullable:N length:255 binary:N -column:forbidden_categories table:users type:text nullable:Y column:id table:waiting type:int nullable:N length:10 signed:N column:storage_category_id table:waiting type:smallint nullable:N length:5 signed:N column:file table:waiting type:varchar nullable:N length:255 binary:N @@ -127,6 +130,7 @@ PK:sessions_pk table:sessions column:id PK:sites_pk table:sites column:id PK:user_access_pk table:user_access column:user_id PK:user_access_pk table:user_access column:cat_id +PK:user_forbidden_pk table:user_forbidden column:user_id PK:user_group_pk table:user_group column:group_id PK:user_group_pk table:user_group column:user_id PK:users_pk table:users column:id diff --git a/install/phpwebgallery_structure.sql b/install/phpwebgallery_structure.sql index 4bf05af9c..45cfc8176 100644 --- a/install/phpwebgallery_structure.sql +++ b/install/phpwebgallery_structure.sql @@ -197,6 +197,18 @@ CREATE TABLE phpwebgallery_user_access ( PRIMARY KEY (user_id,cat_id) ) TYPE=MyISAM; +-- +-- Table structure for table 'phpwebgallery_user_forbidden' +-- + +DROP TABLE IF EXISTS phpwebgallery_user_forbidden; +CREATE TABLE phpwebgallery_user_forbidden ( + user_id smallint(5) unsigned NOT NULL default '0', + need_update enum('true','false') NOT NULL default 'true', + forbidden_categories text, + PRIMARY KEY (user_id) +) TYPE=MyISAM; + -- -- Table structure for table 'phpwebgallery_user_group' -- @@ -228,7 +240,6 @@ CREATE TABLE phpwebgallery_users ( show_nb_comments enum('true','false') NOT NULL default 'false', recent_period tinyint(3) unsigned NOT NULL default '7', template varchar(255) NOT NULL default 'default', - forbidden_categories text, PRIMARY KEY (id), UNIQUE KEY users_ui1 (username) ) TYPE=MyISAM; -- cgit v1.2.3