From: <sy...@us...> - 2008-03-15 21:11:15
|
Update of /cvsroot/tikiwiki/tiki/db In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv26222/db Modified Files: Tag: BRANCH-1-10 tiki.sql tiki_1.9to1.10.sql Log Message: [MOD]gal: new perm tiki_p_list_iamge_galleries + anonymous can upload with antibot + delete the old watches in tiki_mail_events ->not to read the watches Index: tiki.sql =================================================================== RCS file: /cvsroot/tikiwiki/tiki/db/tiki.sql,v retrieving revision 1.457.2.43 retrieving revision 1.457.2.44 diff -u -d -r1.457.2.43 -r1.457.2.44 --- tiki.sql 13 Mar 2008 22:52:51 -0000 1.457.2.43 +++ tiki.sql 15 Mar 2008 21:11:14 -0000 1.457.2.44 @@ -1720,7 +1720,7 @@ lon float default NULL, lat float default NULL, created int(14) default NULL, - user varchar(200) NOT NULL default '', + user varchar(200) default '', hits int(14) default NULL, path varchar(255) default NULL, PRIMARY KEY (imageId), @@ -2123,9 +2123,9 @@ INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Structures','tiki-admin_structures.php',250,'feature_wiki','tiki_p_view',''); -INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'s','Image Galleries','tiki-galleries.php',300,'feature_galleries','tiki_p_view_image_gallery',''); -INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Galleries','tiki-galleries.php',305,'feature_galleries','tiki_p_view_image_gallery',''); -INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Rankings','tiki-galleries_rankings.php',310,'feature_galleries,feature_gal_rankings','tiki_p_view_image_gallery',''); +INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'s','Image Galleries','tiki-galleries.php',300,'feature_galleries','tiki_p_list_image_galleries',''); +INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Galleries','tiki-galleries.php',305,'feature_galleries','tiki_p_list_image_galleries',''); +INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Rankings','tiki-galleries_rankings.php',310,'feature_galleries,feature_gal_rankings','tiki_p_list_image_galleries',''); INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Upload image','tiki-upload_image.php',315,'feature_galleries','tiki_p_upload_images',''); INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Directory batch','tiki-batch_upload.php',318,'feature_galleries,feature_gal_batch','tiki_p_batch_upload',''); INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','System gallery','tiki-list_gallery.php?galleryId=0',320,'feature_galleries','tiki_p_admin_galleries',''); @@ -4328,6 +4328,7 @@ INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_freetags', 'Can browse freetags', 'basic', 'freetags'); INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_html_pages', 'Can view HTML pages', 'basic', 'html pages'); INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_image_gallery', 'Can view image galleries', 'basic', 'image galleries'); +INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_list_image_galleries', 'Can list image galleries', 'basic', 'image galleries'); INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_integrator', 'Can view integrated repositories', 'basic', 'tiki'); INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_quiz_stats', 'Can view quiz stats', 'basic', 'quizzes'); INSERT INTO users_permissions (permName, permDesc, level, type) VALUES ('tiki_p_view_referer_stats', 'Can view referer stats', 'editors', 'tiki'); Index: tiki_1.9to1.10.sql =================================================================== RCS file: /cvsroot/tikiwiki/tiki/db/tiki_1.9to1.10.sql,v retrieving revision 1.221.2.46 retrieving revision 1.221.2.47 diff -u -d -r1.221.2.46 -r1.221.2.47 --- tiki_1.9to1.10.sql 13 Mar 2008 22:52:51 -0000 1.221.2.46 +++ tiki_1.9to1.10.sql 15 Mar 2008 21:11:14 -0000 1.221.2.47 @@ -1740,24 +1740,27 @@ ALTER TABLE users_users DROP KEY openid_url_59; ALTER TABLE `tiki_user_watches` DROP PRIMARY KEY; ALTER TABLE `tiki_user_watches` ADD PRIMARY KEY (`user`(50),event,object(100),email(50)); -insert into tiki_user_watches (event,object,email,`type`,url,title) -select event, object, email, 'wiki','tiki-lastchanges.php', 'Any wiki page is changed' from tiki_mail_events tme -where event='wiki_page_changes'; -insert into tiki_user_watches (event, object,email,`type`,url,title) -select event, object, email, 'wiki','tiki-lastchanges.php', 'Any wiki page is changed, even minor changes' from tiki_mail_events tme -where event='wiki_page_changes_incl_minor'; -insert into tiki_user_watches (event, object,email,`type`,url,title) -select event, object, email, concat('tracker', tit.itemId),concat('tiki-view_tracker_item.php?trackerId=', tit.trackerId,'&itemId=',tit.itemId), tt.name from tiki_mail_events tme, tiki_tracker_items tit, tiki_trackers tt -where event='tracker_modified_item' and object=itemId and tit.trackerId=tt.trackerId; -insert into tiki_user_watches (event, object,email,`type`,url,title) -select event, object, email, 'tracker',concat('tiki-view_tracker.php?trackerId=', tt.trackerId), tt.name from tiki_mail_events tme, tiki_trackers tt -where event='tracker_modified' and tt.trackerId=tme.object; -insert into tiki_user_watches (event, object,email,`type`,url,title) -select event, object, email, 'cms','tiki-list_submissions.php', 'A user submits an article' from tiki_mail_events tme -where event='article_submitted'; -insert into tiki_user_watches (event, object,email,`type`,url,title) -select event, object, email, 'system','', 'PHP error' from tiki_mail_events tme -where event='php_error'; -insert into tiki_user_watches (event, object,email,`type`,url,title) -select event, object, email, 'users','tiki-adminusers.php', 'A user registers' from tiki_mail_events tme -where event='user_registers'; +INSERT INTO tiki_user_watches (event,object,email,`type`,url,title) +SELECT event, object, email, 'wiki','tiki-lastchanges.php', 'Any wiki page is changed' FROM tiki_mail_events tme WHERE event='wiki_page_changes'; +INSERT INTO tiki_user_watches (event, object,email,`type`,url,title) +SELECT event, object, email, 'wiki','tiki-lastchanges.php', 'Any wiki page is changed, even minor changes' FROM tiki_mail_events tme WHERE event='wiki_page_changes_incl_minor'; +INSERT INTO tiki_user_watches (event, object,email,`type`,url,title) +SELECT event, object, email, concat('tracker', tit.itemId),concat('tiki-view_tracker_item.php?trackerId=', tit.trackerId,'&itemId=',tit.itemId), tt.name FROM tiki_mail_events tme, tiki_tracker_items tit, tiki_trackers tt WHERE event='tracker_modified_item' and object=itemId and tit.trackerId=tt.trackerId; +INSERT INTO tiki_user_watches (event, object,email,`type`,url,title) +SELECT event, object, email, 'tracker',concat('tiki-view_tracker.php?trackerId=', tt.trackerId), tt.name FROM tiki_mail_events tme, tiki_trackers tt WHERE event='tracker_modified' and tt.trackerId=tme.object; +INSERT INTO tiki_user_watches (event, object,email,`type`,url,title) +SELECT event, object, email, 'cms','tiki-list_submissions.php', 'A user submits an article' FROM tiki_mail_events tme WHERE event='article_submitted'; +INSERT INTO tiki_user_watches (event, object,email,`type`,url,title) +SELECT event, object, email, 'system','', 'PHP error' FROM tiki_mail_events tme WHERE event='php_error'; +INSERT INTO tiki_user_watches (event, object,email,`type`,url,title) +SELECT event, object, email, 'users','tiki-adminusers.php', 'A user registers' FROM tiki_mail_events tme WHERE event='user_registers'; + +#2008-03-15 sylvieg +DELETE FROM tiki_mail_events WHERE event='wiki_page_changes' or event='wiki_page_changes_incl_minor' or event='tracker_modified_item' or event='tracker_modified' or event='article_submitted' or event='php_error' or event='user_registers'; + +SELECT count(*) FROM users_permissions WHERE permName = 'tiki_p_list_image_galleries' INTO @fgcant; +INSERT INTO `users_grouppermissions` SELECT groupName,'tiki_p_list_image_galleries','' FROM `users_grouppermissions` WHERE permName = 'tiki_p_view_image_gallery' AND @fgcant = 0; +UPDATE `tiki_menu_options` SET perm='tiki_p_list_image_galleries' WHERE url='tiki-galleries.php' AND perm='tiki_p_view_image_gallery' AND type='o' AND @fgcant = 0; +UPDATE `tiki_menu_options` SET perm='tiki_p_list_image_galleries' WHERE url='tiki-galleries_rankings.php' AND perm='tiki_p_view_image_gallery' AND type='o' AND @fgcant = 0; +INSERT INTO `users_permissions` SELECT 'tiki_p_list_image_galleries', 'Can list image galleries', 'basic', 'image galleries',NULL FROM `users_permissions` WHERE permName = 'tiki_p_view_image_gallery' AND @fgcant = 0; +ALTER TABLE tiki_images CHANGE user user varchar(200) default NULL; \ No newline at end of file |