Nobody is going to write a custom admin interface for user_relationships. It makes sense to move that in the user_relationships module.
This also helps to clean up the weird cross-dependency between the API and UI modules. For example, the API modules uses a author_pane variable, which is configured in UI and also removed in the uninstall hook of the UI.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | move_admin_ui2.patch | 79.09 KB | berdir |
| #2 | move_admin_ui.patch | 68.12 KB | berdir |
Comments
Comment #1
BenK commentedSubscribing
Comment #2
berdirOk, here is a patch.
- Moved all admin/... menu definitions to user_relationships
- Moved the corresponding page callbacks, form callbacks (in _ui.admin.inc, _ui.admin_actions.inc, _ui.pages.inc) to user_relationships.admin.inc
- Moved the messages configuration system to user_relationships.module
- Added an update function to rename the existing customized messages
- Moved the uninstall hook in the ui module to user_relationships.module, that just removes variables which are now 100% controlled by user_relationships.
Most additional modules depend on the ui module. We can check later on if some of these dependencies can be removed.
Comment #3
BenK commentedHey Berdir,
I tested the patch and all of the module settings are working fine. But I'm not getting WSODs in the following situations:
1. When deleting a relationship with another user. In my PHP error logs, this is the message:
PHP Fatal error: Call to undefined function user_relationships_ui_get_message() in /Users/benkaplan/git/drupal-7.0/sites/all/modules/user_relationships/user_relationships_ui/user_relationships_ui.actions.inc on line 201
2. When requesting a relationship with another user. In my PHP error logs, here is the message:
PHP Fatal error: Call to undefined function user_relationships_ui_get_message() in /Users/benkaplan/git/drupal-7.0/sites/all/modules/user_relationships/user_relationships_ui/user_relationships_ui.actions.inc on line 135
--Ben
Comment #4
berdirOk, here is a new patch, that one should be better I hope :)
Comment #5
BenK commentedI tested the latest patch and everything works great. All notices are gone and my additional testing didn't result in any new errors. So I think this is RTBC.
--Ben
Comment #6
berdirThanks for testing, commited!