Make WordPress Core

Ticket #5474: patch.txt

File patch.txt, 666 bytes (added by gimler, 18 years ago)
Line 
1Index: wp-admin/admin.php
2===================================================================
3--- wp-admin/admin.php  (revision 12646)
4+++ wp-admin/admin.php  (working copy)
5@@ -1,8 +1,6 @@
6 <?php
7-if ( defined('ABSPATH') )
8-       require_once( ABSPATH . 'wp-config.php');
9-else
10-    require_once('../wp-config.php');
11+$config_path = dirname($_SERVER["SCRIPT_FILENAME"]) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'wp-config.php';
12+require_once( $config_path );
13
14 if ( get_option('db_version') != $wp_db_version ) {
15        wp_redirect(get_option('siteurl') . '/wp-admin/upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])));