Ticket #3096 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Page caps using incorrect author id

Reported by: activeingredient Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.1
Severity: normal Keywords: Page, Caps
Cc:

Description

When determining caps 'edit_page' & 'delete_page' in wp-includes/capabilities.php (introduced in Changeset 3513) the incorrect author id is determined.

Currently -

326: $page = get_page($args[0]);
327: $page_author_data = get_userdata($post->post_author);
...
380: $page = get_page($args[0]);
381: $page_author_data = get_userdata($post->post_author);

Should be -

326: $page = get_page($args[0]);
327: $page_author_data = get_userdata($page->post_author);
...
380: $page = get_page($args[0]);
381: $page_author_data = get_userdata($page->post_author);

Attachments

capabilities.php.diff (1.0 kB) - added by activeingredient on 09/02/06 01:25:11.

Change History

09/02/06 01:25:11 changed by activeingredient

  • attachment capabilities.php.diff added.

09/02/06 17:15:19 changed by ryan

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

(In [4158]) Page cap fixes from activeingredient. fixes #3096