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.

CommentFileSizeAuthor
#4 move_admin_ui2.patch79.09 KBberdir
#2 move_admin_ui.patch68.12 KBberdir

Comments

BenK’s picture

Subscribing

berdir’s picture

Status: Active » Needs review
StatusFileSize
new68.12 KB

Ok, 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.

BenK’s picture

Status: Needs review » Needs work

Hey 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

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new79.09 KB

Ok, here is a new patch, that one should be better I hope :)

BenK’s picture

Status: Needs review » Reviewed & tested by the community

I 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

berdir’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing, commited!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.