Opened 14 years ago
Closed 14 years ago
#15903 closed defect (bug) (fixed)
Don't use self_admin_url() on ms-users list
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.1 | Priority: | high |
Severity: | major | Version: | 3.1 |
Component: | Network Admin | Keywords: | has-patch |
Focuses: | multisite | Cc: |
Description
self_admin_url() returns only the network url, if is_network_admin() is true.
The problem, if we have an AJAX request is_network_admin() is always false.
On network/users I have on page 2 a user which I want to grant super admin privileges. But it's not possible because it the edit link is linked to wp-admin/user-edit.php and not to wp-admin/network/user-edit.php.
The fix would be to use network_admin_url() here, because the ms-user list class is used only in the network admin.
Attachments (4)
Change History (15)
#3
@
14 years ago
Arguably, an approach to top that would be to create network/admin-ajax.php, but that was not implemented after some discussion a while ago.
Would rather not mess with network_admin at this stage.
#4
@
14 years ago
alt.15903.diff makes is_network_admin() check the screen object for ajax requests.
#9
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I forgot that set_current_screen() calls is_network_admin(). This causes a notice, which can cause AJAX requests to fail. Spotted by garyc40 in IRC.
15903.diff fixes it.
A better approach would be to make is_network_admin() smarter. Incoming patch.