WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/25/2013 12:17:40 AM (8 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/async-upload.php

    r24593 r25616  
    1212    require_once(ABSPATH . 'wp-load.php');
    1313else
    14     require_once('../wp-load.php');
     14    require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
    1515
    1616if ( ! ( isset( $_REQUEST['action'] ) && 'upload-attachment' == $_REQUEST['action'] ) ) {
     
    2525}
    2626
    27 require_once('./admin.php');
     27require_once( ABSPATH . 'wp-admin/admin.php' );
    2828
    2929if ( !current_user_can('upload_files') )
Note: See TracChangeset for help on using the changeset viewer.