Make WordPress Core


Ignore:
Timestamp:
12/07/2009 06:01:02 PM (16 years ago)
Author:
westi
Message:

Check the correct global in get_page and also ensure that the cap check for deleting pages copes for the default page we edit when adding new. Fixes #11203.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r12307 r12332  
    22802280function &get_page(&$page, $output = OBJECT, $filter = 'raw') {
    22812281    if ( empty($page) ) {
    2282         if ( isset( $GLOBALS['page'] ) && isset( $GLOBALS['page']->ID ) ) {
    2283             return get_post($GLOBALS['page'], $output, $filter);
     2282        if ( isset( $GLOBALS['post'] ) && isset( $GLOBALS['post']->ID ) ) {
     2283            return get_post($GLOBALS['post'], $output, $filter);
    22842284        } else {
    22852285            $page = null;
Note: See TracChangeset for help on using the changeset viewer.