WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/11/2012 08:11:39 PM (7 years ago)
Author:
nacin
Message:

Remove AtomPub from core.

DB version is bumped to generate the new wp-app rewrite rule and remove the old enable_app option.

props wonderboymusic.
fixes #21509.

File:
1 edited

Legend:

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

    r21208 r21818  
    196196                    $matches = array('');
    197197                }
    198             } else if ( $req_uri != 'wp-app.php' ) {
     198            } else {
    199199                foreach ( (array) $rewrite as $match => $query ) {
    200200                    // If the requesting file is the anchor of the match, prepend it to the path info.
     
    230230                parse_str($query, $perma_query_vars);
    231231
    232                 // If we're processing a 404 request, clear the error var
    233                 // since we found something.
    234                 unset( $_GET['error'] );
    235                 unset( $error );
     232                // If we're processing a 404 request, clear the error var since we found something.
     233                if ( '404' == $error )
     234                    unset( $error, $_GET['error'] );
    236235            }
    237236
    238237            // If req_uri is empty or if it is a request for ourself, unset error.
    239238            if ( empty($request) || $req_uri == $self || strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false ) {
    240                 unset( $_GET['error'] );
    241                 unset( $error );
     239                unset( $error, $_GET['error'] );
    242240
    243241                if ( isset($perma_query_vars) && strpos($_SERVER['PHP_SELF'], 'wp-admin/') !== false )
     
    326324        if ( is_user_logged_in() )
    327325            $headers = array_merge($headers, wp_get_nocache_headers());
    328         if ( !empty($this->query_vars['error']) && '404' == $this->query_vars['error'] ) {
    329             $status = 404;
    330             if ( !is_user_logged_in() )
    331                 $headers = array_merge($headers, wp_get_nocache_headers());
    332             $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
     326        if ( ! empty( $this->query_vars['error'] ) ) {
     327            $status = (int) $this->query_vars['error'];
     328            if ( 404 === $status ) {
     329                if ( ! is_user_logged_in() )
     330                    $headers = array_merge($headers, wp_get_nocache_headers());
     331                $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
     332            } elseif ( in_array( $status, array( 403, 500, 502, 503 ) ) ) {
     333                $exit_required = true;
     334            }
    333335        } else if ( empty($this->query_vars['feed']) ) {
    334336            $headers['Content-Type'] = get_option('html_type') . '; charset=' . get_option('blog_charset');
Note: See TracChangeset for help on using the changeset viewer.