Revert 8562 (last was incorrect)

git-svn-id: http://svn.automattic.com/wordpress/trunk@8565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-08-06 01:00:33 +00:00
parent dc9f3139a1
commit a5d9355329
1 changed files with 19 additions and 11 deletions

View File

@ -182,18 +182,26 @@ if ( defined('WP_CACHE') )
*/ */
define('WPINC', 'wp-includes'); define('WPINC', 'wp-includes');
if ( constant('WP_POST_REVISIONS') ) { if ( !defined('WP_LANG_DIR') ) {
/* /**
* PEAR Text_Diff depends on the include path matching its directory * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
* structure. This prevents modifying source code and maintaining the * and uses that folder if it exists. Or it uses the "languages" folder in WPINC.
* modifications when the package is updated. *
* @since 2.1.0
*/ */
if ( function_exists( 'set_include_path' ) ) if ( file_exists(WP_CONTENT_DIR . '/languages') && @is_dir(WP_CONTENT_DIR . '/languages') ) {
set_include_path( get_include_path() . PATH_SEPARATOR . ABSPATH . WPINC ); define('WP_LANG_DIR', WP_CONTENT_DIR . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH
else if ( function_exists( 'ini_set' ) ) if (!defined('LANGDIR')) {
ini_set( 'include_path', ini_get('include_path') . PATH_SEPARATOR . ABSPATH . WPINC ); // Old static relative path maintained for limited backwards compatibility - won't work in some cases
else define('LANGDIR', 'wp-content/languages');
define('WP_INCLUDE_PATH_DISABLED', true); }
} else {
define('WP_LANG_DIR', ABSPATH . WPINC . '/languages'); // no leading slash, no trailing slash, full path, not relative to ABSPATH
if (!defined('LANGDIR')) {
// Old relative path maintained for backwards compatibility
define('LANGDIR', WPINC . '/languages');
}
}
} }
require (ABSPATH . WPINC . '/compat.php'); require (ABSPATH . WPINC . '/compat.php');