Ticket #5736 (closed defect: fixed)

Opened 4 months ago

Last modified 2 months ago

Merge profile.php and user-edit.php

Reported by: nbachiyski Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: Administration Version:
Severity: normal Keywords:
Cc:

Description

Inspired by #5508, this patch tries to merge wp-admin/profile.php and wp-admin/user-edit.php, since these files contain much common code.

Some details:

  • Both files are retained in order all old links to work. profile.php is almost empty and just sets a variable and loads user-edit.php
  • Password strength meter and pluggable personal options are still available only on the profile page.
  • The capability system was modified (with great help from Ryan) so that current_user_can('edit_user', $uid) returns true if the current user has id $uid

Attachments

merge-profile-user-edit.diff (22.5 kB) - added by nbachiyski on 01/30/08 22:14:39.

Change History

01/30/08 22:14:39 changed by nbachiyski

  • attachment merge-profile-user-edit.diff added.

01/31/08 05:48:40 changed by darkdragon

That is a pretty sweet patch. I'll see about testing it over the weekend. If at all possible, can you move the function outside of the file into another file in the wp-admin/includes folder?

I think the goal is to have as much separate of presentation and business logic as possible. Just a suggestion, if you want to spend time doing it.

01/31/08 08:57:08 changed by nbachiyski

This one function is presentation-oriented and isn't used anywhere else, so it would better stay there.

01/31/08 21:44:17 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [6697]) Merge user-edit.php and profile.php. Props nbachiyski. fixes #5736

01/31/08 21:53:16 changed by ryan

(In [6699]) Define parent_file and submenu_file after admin.php is loaded. see #5736

01/31/08 22:03:48 changed by ryan

(In [6700]) Fix profile submenu highlight. Make is_profile_page a constant so that register globals can't manipulate it. see #5736

01/31/08 23:02:55 changed by nbachiyski

  • status changed from closed to reopened.
  • resolution deleted.

profile-update.php is no longer needed -- all the work is done in user-edit.php

02/01/08 22:59:08 changed by jopa

with this patch the bug #5508 will be fixed? or its just a patch for merging the profile and user-edit php files?

Thanks

02/02/08 00:09:12 changed by ryan

(In [6703]) profile-update.php no longer needed. see #5736

02/02/08 00:09:44 changed by ryan

yes, #5508 is fixed

03/15/08 21:12:50 changed by westi

  • status changed from reopened to closed.
  • resolution set to fixed.

Closing as fixed as I can't see anything left to do here.