mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Don't rely on include_path to include files.
Always use dirname() or, once available, ABSPATH. props ketwaroo, hakre. fixes #17092. git-svn-id: https://develop.svn.wordpress.org/trunk@25616 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/** Load WordPress Bootstrap */
|
||||
require_once('./admin.php');
|
||||
require_once( dirname( __FILE__ ) . '/admin.php' );
|
||||
|
||||
$parent_file = 'edit-comments.php';
|
||||
$submenu_file = 'edit-comments.php';
|
||||
@@ -36,7 +36,7 @@ if ( isset( $_GET['dt'] ) ) {
|
||||
*/
|
||||
function comment_footer_die( $msg ) {
|
||||
echo "<div class='wrap'><p>$msg</p></div>";
|
||||
include('./admin-footer.php');
|
||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
die;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ case 'editcomment' :
|
||||
);
|
||||
|
||||
wp_enqueue_script('comment');
|
||||
require_once('./admin-header.php');
|
||||
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
$comment_id = absint( $_GET['c'] );
|
||||
|
||||
@@ -75,7 +75,7 @@ case 'editcomment' :
|
||||
|
||||
$comment = get_comment_to_edit( $comment_id );
|
||||
|
||||
include('./edit-form-comment.php');
|
||||
include( ABSPATH . 'wp-admin/edit-form-comment.php' );
|
||||
|
||||
break;
|
||||
|
||||
@@ -104,7 +104,7 @@ case 'spam' :
|
||||
die();
|
||||
}
|
||||
|
||||
require_once('./admin-header.php');
|
||||
require_once( ABSPATH . 'wp-admin/admin-header.php' );
|
||||
|
||||
$formaction = $action . 'comment';
|
||||
$nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
|
||||
@@ -300,4 +300,4 @@ default:
|
||||
|
||||
} // end switch
|
||||
|
||||
include('./admin-footer.php');
|
||||
include( ABSPATH . 'wp-admin/admin-footer.php' );
|
||||
|
||||
Reference in New Issue
Block a user