From ce8693de30e8da06a8a4982e321f0a33fbeee979 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 26 Feb 2007 14:03:58 +0000 Subject: WP Merge to rev 4950 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@900 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- app.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app.php') diff --git a/app.php b/app.php index 4d868bb..7c2d827 100644 --- a/app.php +++ b/app.php @@ -12,7 +12,9 @@ define('APP_REQUEST', true); require_once('wp-config.php'); require_once('wp-includes/post-template.php'); -$use_querystring = 1; +// Attempt to automatically detect whether to use querystring +// or PATH_INFO, based on our environment: +$use_querystring = $wp_version == 'MU' ? 1 : 0; // If using querystring, we need to put the path together manually: if ($use_querystring) { @@ -556,7 +558,7 @@ EOD; elseif ( isset( $_SERVER['HTTP_TITLE'] ) ) $slug = sanitize_file_name( $_SERVER['HTTP_TITLE'] ); elseif ( empty( $slug ) ) // just make a random name - $slug = substr( md5( uniqid( microtime() ) ), 0, 7);; + $slug = substr( md5( uniqid( microtime() ) ), 0, 7); $ext = preg_replace( '|.*/([a-z]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); $slug = "$slug.$ext"; $file = wp_upload_bits( $slug, NULL, $bits); -- cgit