WordPress.org

Make WordPress Core

Changeset 8267


Ignore:
Timestamp:
07/07/08 19:19:47 (7 years ago)
Author:
ryan
Message:

Send 403 if publishing is disabled. Props AlanJCastonguay. see #7157

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-app.php

    r8234 r8267  
    198198        // check to see if AtomPub is enabled 
    199199        if( !get_option( 'enable_app' ) ) 
    200             $this->not_allowed( sprintf( __( 'AtomPub services are disabled on this blog.  An admin user can enable them at %s' ), admin_url('options-writing.php') ) ); 
     200            $this->forbidden( sprintf( __( 'AtomPub services are disabled on this blog.  An admin user can enable them at %s' ), admin_url('options-writing.php') ) ); 
    201201 
    202202        // dispatch 
     
    940940    } 
    941941 
     942    function forbidden($reason='') { 
     943        log_app('Status','403: Forbidden'); 
     944        header('Content-Type: text/plain'); 
     945        status_header('403'); 
     946        echo $reason; 
     947        exit; 
     948    } 
     949 
    942950    function not_found() { 
    943951        log_app('Status','404: Not Found'); 
Note: See TracChangeset for help on using the changeset viewer.