Make WordPress Core

Changeset 6104


Ignore:
Timestamp:
09/13/2007 04:48:41 AM (17 years ago)
Author:
markjaquith
Message:

Move $wp_header_to_desc array to get_status_header_desc() so that it can be called before vars.php is loaded.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r6064 r6104  
    738738
    739739    $code = (int) $code;
     740
     741    if ( !isset($wp_header_to_desc) ) {
     742        $wp_header_to_desc = array(
     743            100 => 'Continue',
     744            101 => 'Switching Protocols',
     745
     746            200 => 'OK',
     747            201 => 'Created',
     748            202 => 'Accepted',
     749            203 => 'Non-Authoritative Information',
     750            204 => 'No Content',
     751            205 => 'Reset Content',
     752            206 => 'Partial Content',
     753
     754            300 => 'Multiple Choices',
     755            301 => 'Moved Permanently',
     756            302 => 'Found',
     757            303 => 'See Other',
     758            304 => 'Not Modified',
     759            305 => 'Use Proxy',
     760            307 => 'Temporary Redirect',
     761
     762            400 => 'Bad Request',
     763            401 => 'Unauthorized',
     764            403 => 'Forbidden',
     765            404 => 'Not Found',
     766            405 => 'Method Not Allowed',
     767            406 => 'Not Acceptable',
     768            407 => 'Proxy Authentication Required',
     769            408 => 'Request Timeout',
     770            409 => 'Conflict',
     771            410 => 'Gone',
     772            411 => 'Length Required',
     773            412 => 'Precondition Failed',
     774            413 => 'Request Entity Too Large',
     775            414 => 'Request-URI Too Long',
     776            415 => 'Unsupported Media Type',
     777            416 => 'Requested Range Not Satisfiable',
     778            417 => 'Expectation Failed',
     779
     780            500 => 'Internal Server Error',
     781            501 => 'Not Implemented',
     782            502 => 'Bad Gateway',
     783            503 => 'Service Unavailable',
     784            504 => 'Gateway Timeout',
     785            505 => 'HTTP Version Not Supported'
     786        );
     787    }
    740788
    741789    if ( isset( $wp_header_to_desc[$code] ) ) {
  • trunk/wp-includes/vars.php

    r6103 r6104  
    4545$is_IIS = (strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false) ? true : false;
    4646
    47 $wp_header_to_desc = array(
    48     100 => 'Continue',
    49     101 => 'Switching Protocols',
    50 
    51     200 => 'OK',
    52     201 => 'Created',
    53     202 => 'Accepted',
    54     203 => 'Non-Authoritative Information',
    55     204 => 'No Content',
    56     205 => 'Reset Content',
    57     206 => 'Partial Content',
    58 
    59     300 => 'Multiple Choices',
    60     301 => 'Moved Permanently',
    61     302 => 'Found',
    62     303 => 'See Other',
    63     304 => 'Not Modified',
    64     305 => 'Use Proxy',
    65     307 => 'Temporary Redirect',
    66 
    67     400 => 'Bad Request',
    68     401 => 'Unauthorized',
    69     403 => 'Forbidden',
    70     404 => 'Not Found',
    71     405 => 'Method Not Allowed',
    72     406 => 'Not Acceptable',
    73     407 => 'Proxy Authentication Required',
    74     408 => 'Request Timeout',
    75     409 => 'Conflict',
    76     410 => 'Gone',
    77     411 => 'Length Required',
    78     412 => 'Precondition Failed',
    79     413 => 'Request Entity Too Large',
    80     414 => 'Request-URI Too Long',
    81     415 => 'Unsupported Media Type',
    82     416 => 'Requested Range Not Satisfiable',
    83     417 => 'Expectation Failed',
    84 
    85     500 => 'Internal Server Error',
    86     501 => 'Not Implemented',
    87     502 => 'Bad Gateway',
    88     503 => 'Service Unavailable',
    89     504 => 'Gateway Timeout',
    90     505 => 'HTTP Version Not Supported'
    91 );
    92 
    9347?>
Note: See TracChangeset for help on using the changeset viewer.