naming the database table {content_field_privacy} was a bad idea because this is also the format for cck fields, so technically anyone who creates a CCK field called "Privacy" (or field_privacy) would run into problems when the table that CCK tries to create already exists. therefore, i changed the table name to just {cckfp} which matches the variable naming scheme we've been using.
also, when a user doesn't have permission to the AJAX MENU_CALLBACK, they should get a blank page not the 404 page. So, now the user_access() checking happens inside the MENU_CALLBACK function instead of the hook_menu() function. also, the function should exit not return a boolean TRUE or FALSE, because then it is wrapped in the site template.
(see attached patch)
| Comment | File | Size | Author |
|---|---|---|---|
| cck_field_privacy.patch | 4.39 KB | ms2011 |
Comments
Comment #1
obsidiandesign commentedCode looks good - the question I have is how to best & properly handle the switch for users that are currently using the module. Insert & delete the old table? Insert & keep, then have an option to delete? Don't allow a direct copy?
Comment #2
ms2011 commentedThere should be a way to rename a table using ALTER TABLE syntax. I would do it as a hook_update_N() in the .install file.
Comment #3
obsidiandesign commentedPatch committed - thank you mike for the patch. I added in the hook_update_N() syntax to update 5.x-1.0 versions of the DB table.
Comment #4
obsidiandesign commentedPatch committed - thank you mike for the patch. I added in the hook_update_N() syntax to update 5.x-1.0 versions of the DB table.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.