Make WordPress Core


Ignore:
Timestamp:
09/25/2013 12:17:40 AM (13 years ago)
Author:
nacin
Message:

Don't rely on include_path to include files.

Always use dirname() or, once available, ABSPATH.

props ketwaroo, hakre.
fixes #17092.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/comment.php

    r25282 r25616  
    88
    99/** Load WordPress Bootstrap */
    10 require_once('./admin.php');
     10require_once( dirname( __FILE__ ) . '/admin.php' );
    1111
    1212$parent_file = 'edit-comments.php';
    … …  
    3737function comment_footer_die( $msg ) {
    3838        echo "<div class='wrap'><p>$msg</p></div>";
    39         include('./admin-footer.php');
     39        include( ABSPATH . 'wp-admin/admin-footer.php' );
    4040        die;
    4141}
    … …  
    6161
    6262        wp_enqueue_script('comment');
    63         require_once('./admin-header.php');
     63        require_once( ABSPATH . 'wp-admin/admin-header.php' );
    6464
    6565        $comment_id = absint( $_GET['c'] );
    … …  
    7676        $comment = get_comment_to_edit( $comment_id );
    7777
    78         include('./edit-form-comment.php');
     78        include( ABSPATH . 'wp-admin/edit-form-comment.php' );
    7979
    8080        break;
    … …  
    105105        }
    106106
    107         require_once('./admin-header.php');
     107        require_once( ABSPATH . 'wp-admin/admin-header.php' );
    108108
    109109        $formaction    = $action . 'comment';
    … …  
    301301} // end switch
    302302
    303 include('./admin-footer.php');
     303include( ABSPATH . 'wp-admin/admin-footer.php' );
Note: See TracChangeset for help on using the changeset viewer.